lita-onewheel-chemex 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e764fcce75eca472bcae7ed544759ee27674307f
4
- data.tar.gz: 049070456520ed11bbf10f4f73923b8ab74c2399
3
+ metadata.gz: 93745f3fc285dd688cbf8e453a6fca1ead2e57e5
4
+ data.tar.gz: 4624dd0de073a795d43bfce9c67cb33839b4c7dd
5
5
  SHA512:
6
- metadata.gz: 6fbb4be8d2dc8ee4db5384a65e53d1e80b795ba6e26f4d82bf16d00f1e8dbbaf02a0fcdcc8379d658b8b5e0820035fc4431d1b4deb5270355bd3f3810b59f6a7
7
- data.tar.gz: 73aaf9f407c1b525c12b4b61b835f5efa5e3d579650e57542e13070a30cbd5149e036519cede39099ba252368f9ce150623bdff545be1ff41f8309279dbfc5c3
6
+ metadata.gz: 20cae9ff4ca7776c7efb74a9819670c4e541c4b052083bd5b677c0311bd89e6e7c9735986d2d4ac1ca13ecead18b2c6a092cee7c50a0c2e69879ace94f33343a
7
+ data.tar.gz: ecaa3b8c38eddb5288dc78679aacb27fcbef06f1de8325ead362d4f6f658d46e18602f74a5949f8f0075f3641a83ab5856613d77b2ecb11b464082f0071d4d67
@@ -21,15 +21,22 @@ module Lita
21
21
 
22
22
  def chemex_report(response)
23
23
  chemex_date = redis.get('chemex')
24
- if chemex_date.nil?
25
- response.reply 'There is no chemex.'
24
+ if chemex_date.to_s == ''
25
+ response.reply old_chemex_message
26
26
  return
27
27
  end
28
28
 
29
29
  chemex_age = Time::parse chemex_date
30
+ if chemex_age.to_i < Time.now.to_i - 7200
31
+
32
+ end
30
33
  response.reply "The chemex was brewed at #{chemex_age.strftime('%H:%M:%S')}"
31
34
  end
32
35
 
36
+ def old_chemex_message
37
+ 'Chemex is old and cold; make a new one!'
38
+ end
39
+
33
40
  def chemex_reset(response)
34
41
  redis.set('chemex', nil)
35
42
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-chemex'
3
- spec.version = '0.0.1'
3
+ spec.version = '0.0.2'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = 'Chemex brewing tracking.'
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
15
  spec.require_paths = ['lib']
16
16
 
17
- spec.add_runtime_dependency 'lita', '~> 4.4'
17
+ spec.add_runtime_dependency 'lita', '~> 4'
18
18
 
19
19
  spec.add_development_dependency 'bundler', '~> 1.3'
20
20
  # spec.add_development_dependency 'pry-byebug', '~> 3.1'
@@ -5,13 +5,17 @@ describe Lita::Handlers::OnewheelChemex, lita_handler: true do
5
5
  send_command 'chemex fresh'
6
6
  expect(replies.last).to eq('Fresh chemex is available now!')
7
7
  end
8
+
8
9
  it 'will track the age of a chemex pour' do
10
+ send_command 'chemex fresh'
9
11
  send_command 'chemex'
10
12
  expect(replies.last).to include('The chemex was brewed at')
11
13
  end
14
+
12
15
  it 'will reset the chemex timer' do
16
+ send_command 'chemex fresh'
13
17
  send_command 'chemex reset'
14
18
  send_command 'chemex'
15
- expect(replies.last).to include('There is no chemex.')
19
+ expect(replies.last).to include('Chemex is old and cold; make a new one!')
16
20
  end
17
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-chemex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-10 00:00:00.000000000 Z
11
+ date: 2016-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.4'
19
+ version: '4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.4'
26
+ version: '4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  requirements: []
148
148
  rubyforge_project:
149
- rubygems_version: 2.4.5
149
+ rubygems_version: 2.5.1
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: Want to know when the last chemex was brewed?