time_pilot 1.0.1 → 1.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
  SHA256:
3
- metadata.gz: c6553820e8f6b3c0a0432cbc93853d738c185d241d4600054c6004bf6bb72c8b
4
- data.tar.gz: 6a15e38e9b53dd74c3d46b2117f6c357136b1119ea1c1d29b20950e79d27ce52
3
+ metadata.gz: 395652c6669b8b9f05506489edb4987e83a0ce4c97f50b7875ebd394f3b307cb
4
+ data.tar.gz: 33e752d68a67695695e4fc6885b9b8d7b15f47b039d2c46901dd68f84018da03
5
5
  SHA512:
6
- metadata.gz: 3e3ae4b4ff917dd411dc82fd56e32be43c297e7b3b0116f34dbd902d171a73c5e2a5965e1770f52933652868bd1f405a73044c128ece0d101bb5561bd6ca1e00
7
- data.tar.gz: 1e0e68b17d22063b01aaea0ad9580e654590635e2e909d7b9c7de68b9c66350fbf51ba0afd0582ac8a7c990e89e59ef9443e2a878795e636029d3df1b802af51
6
+ metadata.gz: cf79172d52e85f69796308deaa940988ab31b8027e153e384caafcc3c2596c4851998e0cd284db376fe91ece14c78f1780a354c362ac86f5e4f97fe95130eede
7
+ data.tar.gz: 4d25bbf76b1684e4f5e0a2ef076bb420f5954cdc7a5993e8058eaa5e7ea5db3d05ee407152c2d374e60ebbc4ded1fd0b54c2b6403b426b552ec33625affa8855
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source "http://rubygems.org"
2
2
  gem 'rake'
3
- gem 'redis'
3
+ gem 'redis', '>= 4.8.0'
4
4
  gemspec
@@ -71,13 +71,13 @@ module TimePilot
71
71
 
72
72
  def pilot_enable_feature(feature_name)
73
73
  key_name = "#{feature_name}:#{self.class.to_s.underscore}_ids"
74
- TimePilot.redis.sadd TimePilot.key(key_name), id
74
+ TimePilot.redis.sadd? TimePilot.key(key_name), id
75
75
  instance_variable_set("@#{feature_name}_enabled", true)
76
76
  end
77
77
 
78
78
  def pilot_disable_feature(feature_name)
79
79
  key_name = "#{feature_name}:#{self.class.to_s.underscore}_ids"
80
- TimePilot.redis.srem TimePilot.key(key_name), id
80
+ TimePilot.redis.srem? TimePilot.key(key_name), id
81
81
  instance_variable_set("@#{feature_name}_enabled", false)
82
82
  end
83
83
 
@@ -1,3 +1,3 @@
1
1
  module TimePilot
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
@@ -62,7 +62,7 @@ describe TimePilot do
62
62
  end
63
63
 
64
64
  it "defines a getter on company" do
65
- TimePilot.redis.sadd "timepilot:planning:company_ids", @acme.id
65
+ TimePilot.redis.sadd? "timepilot:planning:company_ids", @acme.id
66
66
  _(@acme.planning_enabled?).must_equal true
67
67
  _(@acme.instance_variable_get("@planning_enabled")).must_equal true
68
68
  end
@@ -82,7 +82,7 @@ describe TimePilot do
82
82
  end
83
83
 
84
84
  it "defines a getter on team" do
85
- TimePilot.redis.sadd "timepilot:planning:team_ids", @healthcare.id
85
+ TimePilot.redis.sadd? "timepilot:planning:team_ids", @healthcare.id
86
86
  _(@healthcare.planning_enabled?).must_equal true
87
87
  end
88
88
 
@@ -101,7 +101,7 @@ describe TimePilot do
101
101
  end
102
102
 
103
103
  it "defines a getter on employee" do
104
- TimePilot.redis.sadd "timepilot:planning:employee_ids", @john.id
104
+ TimePilot.redis.sadd? "timepilot:planning:employee_ids", @john.id
105
105
  _(@john.planning_enabled?).must_equal true
106
106
  _(@john.instance_variable_get("@planning_enabled")).must_equal true
107
107
  end
@@ -192,7 +192,7 @@ describe TimePilot do
192
192
  end
193
193
 
194
194
  specify "does not call redis to get status after disabling" do
195
- @mock.expect(:srem, true, ["timepilot:planning:company_ids", @acme.id])
195
+ @mock.expect(:srem?, true, ["timepilot:planning:company_ids", @acme.id])
196
196
 
197
197
  @acme.disable_planning
198
198
  # Call the feature again it should hit the instance variable
@@ -202,7 +202,7 @@ describe TimePilot do
202
202
  end
203
203
 
204
204
  specify "does not call redis to get status after enabling" do
205
- @mock.expect(:sadd, true, ["timepilot:planning:company_ids", @acme.id])
205
+ @mock.expect(:sadd?, true, ["timepilot:planning:company_ids", @acme.id])
206
206
 
207
207
  @acme.enable_planning
208
208
  # Call the feature again it should hit the instance variable
data/time_pilot.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.email = ['matthijs.langenberg@nedap.com', 'mark.oudeveldhuis@nedap.com']
17
17
  s.homepage = 'https://github.com/nedap/time_pilot'
18
18
 
19
- s.add_dependency 'redis', '>= 3.0.0'
19
+ s.add_dependency 'redis', '>= 4.8.0'
20
20
  s.add_dependency 'activesupport', '>= 3.0.0'
21
21
  s.add_development_dependency "minitest"
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_pilot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "@mlangenberg"
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-02-22 00:00:00.000000000 Z
12
+ date: 2022-10-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 3.0.0
20
+ version: 4.8.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 3.0.0
27
+ version: 4.8.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: activesupport
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubygems_version: 3.2.26
104
+ rubygems_version: 3.2.22
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: Configure enabled features for a specific set of users.