bali 1.1.0rc2 → 1.1.0

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: fd5c0fb2638885502b2fdb39ecaba159b90dac24
4
- data.tar.gz: 2d6308b4df6d3d363bed7d2ce4b72ec9b7368e57
3
+ metadata.gz: ace804a23b863182a963445bfa6c155019eb63fb
4
+ data.tar.gz: 35aec1c6457269fac4f5e145b7714fa1509ffa09
5
5
  SHA512:
6
- metadata.gz: 5f675d90ac77a7558ce6cb545a3dbf3aa5c05bf6856df44b50331b34ed3c786200453efa371c13ac13b3b3eaef7d38a9b1d3d8ee05cfadb473246a0982e9224e
7
- data.tar.gz: 33919e7f7c83e50aee8afb59704bef97f902d257099f3af799a947ab955353b4144f7df3243623dee88d9d3f37ba298216b65313ae1638ad5a6a513f7649fc78
6
+ metadata.gz: 8fdcf47c1d1222118e81bc425ec045729419e63ca834dced4ba9471102e29a420deb6618d111fd21324938e2c79ec3d079cc1d32161dbc52876959e608185140
7
+ data.tar.gz: 0d0157c91b98396a0805742f619e124cce725bac14417af71afa2300fe234885e5c35dd5695fec498b07f80182b8d14ecaca9a01ca4a2663d4bdaddd251f16df
data/README.md CHANGED
@@ -184,4 +184,7 @@ Bali is proudly available as open source under the terms of the [MIT License](ht
184
184
 
185
185
  ### Version 1.1.0rc2
186
186
  1. Ability to check `can?` and `cant?` for subtarget with multiple roles
187
- 2. Describe multiple rules at once for multiple subtarget
187
+ 2. Describe multiple rules at once for multiple subtarget
188
+
189
+ ### Version 1.1.0
190
+ 1. Respecting precedence; rule that is defined first can be replaced with later-defined rule clause for the same operation
@@ -46,9 +46,11 @@ class Bali::RuleGroup
46
46
  raise Bali::DslError, "Rule is defined twice for operation #{operation}" if self.cants[operation] && self.cans[operation]
47
47
 
48
48
  if rule.is_discouragement?
49
- self.cants[rule.operation.to_sym] = rule
49
+ self.cants[operation] = rule
50
+ self.cans.delete operation
50
51
  else
51
- self.cans[rule.operation.to_sym] = rule
52
+ self.cans[operation] = rule
53
+ self.cants.delete operation
52
54
  end
53
55
  end
54
56
 
@@ -1,3 +1,3 @@
1
1
  module Bali
2
- VERSION = "1.1.0rc2"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bali
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0rc2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Pahlevi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-23 00:00:00.000000000 Z
11
+ date: 2015-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,9 +97,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
97
  version: '0'
98
98
  required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ">"
100
+ - - ">="
101
101
  - !ruby/object:Gem::Version
102
- version: 1.3.1
102
+ version: '0'
103
103
  requirements: []
104
104
  rubyforge_project:
105
105
  rubygems_version: 2.4.5