Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quotes broken? #168

Closed
stig opened this issue Apr 6, 2017 · 2 comments
Closed

Quotes broken? #168

stig opened this issue Apr 6, 2017 · 2 comments

Comments

@stig
Copy link
Contributor

stig commented Apr 6, 2017

Hi,

I'm trying to get the quotes feature to work for our team, but I keep getting the following error:

/Users/stig/tmp/seal/lib/message_builder.rb:69:in `bark_about_quotes': undefined method `sample' for nil:NilClass (NoMethodError)
	from /Users/stig/tmp/seal/lib/message_builder.rb:12:in `build'
	from /Users/stig/tmp/seal/lib/seal.rb:37:in `bark_at'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `block in bark'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `each'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `bark'
	from ./bin/seal.rb:5:in `<main>'

I spent a long time trying to debug my config before I started wondering if this worked at all, and at least for me it does not. Witness this session, checking out master and building it:

16:18:46 ~/tmp> git clone https://github.com/binaryberry/seal
Cloning into 'seal'...
remote: Counting objects: 1792, done.
remote: Total 1792 (delta 0), reused 0 (delta 0), pack-reused 1792
Receiving objects: 100% (1792/1792), 684.11 KiB | 353.00 KiB/s, done.
Resolving deltas: 100% (916/916), done.
16:18:54 ~/tmp> cd seal
16:18:57 ~/t/seal (master)> bundle install --path vendor/bundle
Your Ruby version is 2.2.0, but your Gemfile specified 2.2.6
16:19:04 ~/t/seal (master) [18]> rbenv shell 2.2.6
16:19:14 ~/t/seal (master)> bundle install --path vendor/bundle
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Installing rake 12.0.0
Installing public_suffix 2.0.5
Installing byebug 9.0.6 with native extensions
Installing coderay 1.1.1
Installing daemons 1.2.4
Installing diff-lcs 1.3
Installing eventmachine 1.2.1 with native extensions
Installing multipart-post 2.0.0
Installing ffi 1.9.17 with native extensions
Installing formatador 0.2.5
Installing rb-fsevent 0.9.8
Installing lumberjack 1.0.11
Installing nenv 0.3.0
Installing shellany 0.0.1
Installing method_source 0.8.2
Installing slop 3.6.0
Installing thor 0.19.4
Installing guard-compat 1.2.1
Installing rspec-support 3.5.0
Installing multi_xml 0.6.0
Installing oj 2.18.1 with native extensions
Installing trollop 2.1.2
Installing rack 1.6.5
Installing tilt 2.0.6
Installing timecop 0.8.1
Using bundler 1.14.6
Installing addressable 2.5.0
Installing faraday 0.11.0
Installing rb-inotify 0.9.8
Installing notiffany 0.1.1
Installing pry 0.10.4
Installing rspec-core 3.5.4
Installing rspec-expectations 3.5.0
Installing rspec-mocks 3.5.0
Installing httparty 0.14.0
Installing jsonlint 0.2.0
Installing rack-protection 1.5.3
Installing thin 1.7.0 with native extensions
Installing sawyer 0.8.1
Installing listen 3.1.1
Installing pry-byebug 3.4.2
Installing rspec 3.5.0
Installing slack-poster 1.0.1
Installing sinatra 1.4.7
Installing octokit 4.6.2
Installing guard 2.14.0
Installing guard-rspec 4.7.3
Bundle complete! 11 Gemfile dependencies, 47 gems now installed.
Bundled gems are installed into ./vendor/bundle.
Post-install message from httparty:
When you HTTParty, you must party hard!
16:19:51 ~/t/seal (master)> set -xg SLACK_CHANNEL platform-team^C
16:20:06 ~/t/seal (master)> bundle exec bin/afternoon_seal.sh 
/Users/stig/tmp/seal/lib/message_builder.rb:69:in `bark_about_quotes': undefined method `sample' for nil:NilClass (NoMethodError)
	from /Users/stig/tmp/seal/lib/message_builder.rb:12:in `build'
	from /Users/stig/tmp/seal/lib/seal.rb:37:in `bark_at'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `block in bark'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `each'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `bark'
	from ./bin/seal.rb:5:in `<main>'
/Users/stig/tmp/seal/lib/message_builder.rb:69:in `bark_about_quotes': undefined method `sample' for nil:NilClass (NoMethodError)
	from /Users/stig/tmp/seal/lib/message_builder.rb:12:in `build'
	from /Users/stig/tmp/seal/lib/seal.rb:37:in `bark_at'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `block in bark'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `each'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `bark'
	from ./bin/seal.rb:5:in `<main>'
/Users/stig/tmp/seal/lib/message_builder.rb:69:in `bark_about_quotes': undefined method `sample' for nil:NilClass (NoMethodError)
	from /Users/stig/tmp/seal/lib/message_builder.rb:12:in `build'
	from /Users/stig/tmp/seal/lib/seal.rb:37:in `bark_at'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `block in bark'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `each'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `bark'
	from ./bin/seal.rb:5:in `<main>'
/Users/stig/tmp/seal/lib/message_builder.rb:69:in `bark_about_quotes': undefined method `sample' for nil:NilClass (NoMethodError)
	from /Users/stig/tmp/seal/lib/message_builder.rb:12:in `build'
	from /Users/stig/tmp/seal/lib/seal.rb:37:in `bark_at'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `block in bark'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `each'
	from /Users/stig/tmp/seal/lib/seal.rb:20:in `bark'
	from ./bin/seal.rb:5:in `<main>'
16:20:14 ~/t/seal (master) [1]> 
@netflash
Copy link
Contributor

netflash commented Apr 6, 2017

It works for be. I've also hit some walls while I was adopting this tool. Unfortunately I don't remember how I fix them :-(

Presently I do use only ENV variables, you can see them here
it misses the quotes part, so here they are

#       ‚ << --- this is another unicode character that we can use inside the text as a comma, as regular comma is a separator here
# http://www.fileformat.info/info/unicode/char/201a/index.htm
export SEAL_QUOTES="Everyone should have the opportunity to learn. Don’t be afraid to pick up stories on things you don’t understand and ask for help with them.,Try to pair when possible.,Be considerate to remote workers and follow the Working from home practices https://gov-uk.atlassian.net/wiki/x/Bz_5Bw,Who's organising the next team lunch?,If you're not well - don't come in to the office.,We focus on users - always starting with ‘why’ we are doing something‚ not ‘what’ we are doing.,If it’s gonna take more than 30 minutes or it needs deploying - write a card for it and chat to the Product Manager.,Never be afraid to suggest better ways of working."

@stig
Copy link
Contributor Author

stig commented Apr 7, 2017

Closing this as the particular error was me failing to set SEAL_ORGANISATION in the environment 🙄

I still haven't actually managed to get it to push quotes to my channel, but this error is a distraction.

@stig stig closed this as completed Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants