codelocks 1.0.0 → 1.0.1

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: 706157b5adb66d052b717f3a8dc0a7a619bce477
4
- data.tar.gz: e6535ffecc98c8f01361ca1de1ad006fd79b3bbe
3
+ metadata.gz: 22a32b897d94688bf6f6a455987b58f0c05d251c
4
+ data.tar.gz: 7c58c530ddc5ea411222c82d0f66b95e286b3e51
5
5
  SHA512:
6
- metadata.gz: 98cad81d6ff1cc09b75a2e5dcf67c123ecd8ed64fb74ffe282f1623437b07a236c577f0a2e830e3e511bb5fea3ad4389acaa13fbe39db6d3bbca4755262ea392
7
- data.tar.gz: 296316b33e2a544692d37871c2c8acb15f7b985502b1afb11f2e4b7f392c8dd3f80bec5814d22365be153df6d1b6972d1c2e9693fcf68742d9765c8974dd4d2d
6
+ metadata.gz: e8860b06e8c2b86a4a5f388b3e9d57a9ffb5b8ea2de4e36ec897f5f793a019d9a9ca05d9cfb8129c010a1dbd9df4ac4035d3c27bcff34d410c6dacbccd4e1ace
7
+ data.tar.gz: 6ac150201dfc62c9cefc77a88dd8bab938b0405c63cc28f7b66436bf66a540240768553842e2c11ced71a20c04bfb34891fb8d3219b77c4d4c48e6386ce07fa9
@@ -32,19 +32,19 @@ module Codelocks
32
32
  duration
33
33
  when duration <= 12 # less than 13 hours
34
34
  duration -1
35
- when 13..24.include?(duration) # 1 day
35
+ when (13..24).include?(duration) # 1 day
36
36
  12
37
- when 25..48.include?(duration) # 2 days
37
+ when (25..48).include?(duration) # 2 days
38
38
  13
39
- when 49..72.include?(duration) # 3 days
39
+ when (49..72).include?(duration) # 3 days
40
40
  14
41
- when 73..96.include?(duration) # 4 days
41
+ when (73..96).include?(duration) # 4 days
42
42
  15
43
- when 97..120.include?(duration) # 5 days
43
+ when (97..120).include?(duration) # 5 days
44
44
  16
45
- when 121..144.include?(duration) # 6 days
45
+ when (121..144).include?(duration) # 6 days
46
46
  17
47
- when 145..168.include?(duration) # 7 days
47
+ when (145..168).include?(duration) # 7 days
48
48
  18
49
49
  when duration > 168 # more than 7 days, generates a URM code
50
50
  19
@@ -1,3 +1,3 @@
1
1
  module Codelocks
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -61,4 +61,17 @@ describe Codelocks::NetCode do
61
61
  end
62
62
  end
63
63
  end
64
+
65
+ describe '#convert_duration' do
66
+ subject { Codelocks::NetCode.send(:convert_duration, duration) }
67
+ let(:duration) { rand(0..1000) }
68
+
69
+ it "doesn't return an error" do
70
+ expect { subject }.not_to raise_error
71
+ end
72
+
73
+ it "returns an integer" do
74
+ expect(subject).to be_a(Integer)
75
+ end
76
+ end
64
77
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codelocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert May