Skip to content

Commit

Permalink
Fixes Lita version dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
onewheelskyward committed Aug 28, 2016
1 parent c4cd75a commit 44028f7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion lib/lita/handlers/onewheel_chemex.rb
Expand Up @@ -22,14 +22,21 @@ def chemex_fresh(response)
def chemex_report(response)
chemex_date = redis.get('chemex')
if chemex_date.to_s == ''
response.reply 'There is no chemex.'
response.reply old_chemex_message
return
end

chemex_age = Time::parse chemex_date
if chemex_age.to_i < Time.now.to_i - 7200

end
response.reply "The chemex was brewed at #{chemex_age.strftime('%H:%M:%S')}"
end

def old_chemex_message
'Chemex is old and cold; make a new one!'
end

def chemex_reset(response)
redis.set('chemex', nil)
end
Expand Down
4 changes: 2 additions & 2 deletions lita-onewheel-chemex.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = 'lita-onewheel-chemex'
spec.version = '0.0.1'
spec.version = '0.0.2'
spec.authors = ['Andrew Kreps']
spec.email = ['andrew.kreps@gmail.com']
spec.description = 'Chemex brewing tracking.'
Expand All @@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

spec.add_runtime_dependency 'lita', '~> 4.4'
spec.add_runtime_dependency 'lita', '~> 4'

spec.add_development_dependency 'bundler', '~> 1.3'
# spec.add_development_dependency 'pry-byebug', '~> 3.1'
Expand Down
2 changes: 1 addition & 1 deletion spec/lita/handlers/onewheel_chemex_spec.rb
Expand Up @@ -16,6 +16,6 @@
send_command 'chemex fresh'
send_command 'chemex reset'
send_command 'chemex'
expect(replies.last).to include('There is no chemex.')
expect(replies.last).to include('Chemex is old and cold; make a new one!')
end
end

0 comments on commit 44028f7

Please sign in to comment.