ruby_yappl 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +7 -1
- data/lib/policy.rb +2 -0
- data/lib/rule.rb +1 -1
- data/ruby_yappl.gemspec +2 -2
- data/spec/policy_spec.rb +5 -1
- data/spec/rule_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c947a7a0333170aae3db149b67871c16c7de7bda252db3e2270bf7deba42264e
|
|
4
|
+
data.tar.gz: 5ec1150fbe4aacb9140bc08e7e8b3b51e06077b4206c6189261461c594f22918
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96bee779cca4ab16d95b5de6ad2d8d4e904bc7b72a75978dbacde03683b9abd10a37b52571ef1166966c5fa8a26c531dbe43c338e98d8328b84a4131482e5a48
|
|
7
|
+
data.tar.gz: fc65bacfabcc9f9b9499d656c683512def40984fef0efb75d77ae025bfeba33310712a6fd587f7ec95386ea881dbe66d0391739963a96cc9ef28effd257853f8
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -3,9 +3,14 @@ GEM
|
|
|
3
3
|
specs:
|
|
4
4
|
addressable (2.5.2)
|
|
5
5
|
public_suffix (>= 2.0.2, < 4.0)
|
|
6
|
+
coderay (1.1.2)
|
|
6
7
|
diff-lcs (1.3)
|
|
7
8
|
json-schema (2.8.0)
|
|
8
9
|
addressable (>= 2.4)
|
|
10
|
+
method_source (0.9.2)
|
|
11
|
+
pry (0.12.2)
|
|
12
|
+
coderay (~> 1.1.0)
|
|
13
|
+
method_source (~> 0.9.0)
|
|
9
14
|
public_suffix (3.0.2)
|
|
10
15
|
rspec (3.7.0)
|
|
11
16
|
rspec-core (~> 3.7.0)
|
|
@@ -26,7 +31,8 @@ PLATFORMS
|
|
|
26
31
|
|
|
27
32
|
DEPENDENCIES
|
|
28
33
|
json-schema
|
|
34
|
+
pry
|
|
29
35
|
rspec
|
|
30
36
|
|
|
31
37
|
BUNDLED WITH
|
|
32
|
-
1.
|
|
38
|
+
1.17.1
|
data/lib/policy.rb
CHANGED
|
@@ -37,7 +37,9 @@ module YaPPL
|
|
|
37
37
|
active_rules.map do |rule|
|
|
38
38
|
{
|
|
39
39
|
permitted_purposes: rule.permitted_purposes,
|
|
40
|
+
excluded_purposes: rule.excluded_purposes,
|
|
40
41
|
permitted_utilizers: rule.permitted_utilizers,
|
|
42
|
+
excluded_utilizers: rule.excluded_utilizers,
|
|
41
43
|
transformations: rule.transformations
|
|
42
44
|
}
|
|
43
45
|
end
|
data/lib/rule.rb
CHANGED
data/ruby_yappl.gemspec
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'ruby_yappl'
|
|
3
|
-
s.version = '0.1.
|
|
4
|
-
s.date = '2019-01-
|
|
3
|
+
s.version = '0.1.5'
|
|
4
|
+
s.date = '2019-01-30'
|
|
5
5
|
s.summary = 'ruby gem for the yappl privacy preference language'
|
|
6
6
|
s.authors = ['Thomas Peikert']
|
|
7
7
|
s.email = 't.s.peikert+yappl@gmail.com'
|
data/spec/policy_spec.rb
CHANGED
|
@@ -214,7 +214,7 @@ RSpec.describe YaPPL::Policy do
|
|
|
214
214
|
excluded_utilizers: ['u4'],
|
|
215
215
|
excluded_purposes: ['p2'],
|
|
216
216
|
valid_from: Time.now,
|
|
217
|
-
expiration_date: Time.
|
|
217
|
+
expiration_date: Time.utc(0, 1, 1)
|
|
218
218
|
)
|
|
219
219
|
]
|
|
220
220
|
inactive_rules = [YaPPL::Rule.new(id: -1), YaPPL::Rule.new(expiration_date: Time.now - 1000)]
|
|
@@ -222,7 +222,9 @@ RSpec.describe YaPPL::Policy do
|
|
|
222
222
|
expect(policy.get_tr_rules).to eq ([
|
|
223
223
|
{
|
|
224
224
|
permitted_purposes: ['p1'],
|
|
225
|
+
excluded_purposes: nil,
|
|
225
226
|
permitted_utilizers: ['u1'],
|
|
227
|
+
excluded_utilizers: ['u2'],
|
|
226
228
|
transformations: [{
|
|
227
229
|
attribute: 'temperature',
|
|
228
230
|
tr_func: 'minmax_hourly'
|
|
@@ -230,7 +232,9 @@ RSpec.describe YaPPL::Policy do
|
|
|
230
232
|
},
|
|
231
233
|
{
|
|
232
234
|
permitted_purposes: ['p2'],
|
|
235
|
+
excluded_purposes: ['p2'],
|
|
233
236
|
permitted_utilizers: ['u3'],
|
|
237
|
+
excluded_utilizers: ['u4'],
|
|
234
238
|
transformations: [{
|
|
235
239
|
attribute: 'step_count',
|
|
236
240
|
tr_func: 'minmax_hourly'
|
data/spec/rule_spec.rb
CHANGED
|
@@ -35,7 +35,7 @@ RSpec.describe YaPPL::Rule do
|
|
|
35
35
|
it 'sets defaults values' do
|
|
36
36
|
rule = YaPPL::Rule.new
|
|
37
37
|
expect(rule.valid_from).not_to eq nil
|
|
38
|
-
expect(rule.expiration_date).to eq Time.
|
|
38
|
+
expect(rule.expiration_date).to eq Time.utc(0, 1, 1)
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby_yappl
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thomas Peikert
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-01-
|
|
11
|
+
date: 2019-01-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json-schema
|