rails-acu 3.0.0 → 3.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0450675f2600156c12c47211f1675108244b1d30
4
- data.tar.gz: a39ea7d9a539734311d0f0f38c72d2b5f0091129
3
+ metadata.gz: 9c298ae9948cd9f569a6c19abe50dec72bbafc89
4
+ data.tar.gz: d6821e2c66972fe7b4da88a00f789d9ac1e124cc
5
5
  SHA512:
6
- metadata.gz: be5b38572c20932cadadca6d14d519dd2d770305bb8b3f23bd88d769b526615bf4f286127c8e3b41be7eed8e14aa860f1bc4209fad2fc37a7949caaef5692b8f
7
- data.tar.gz: 90401c33bd2b434f5eefa43821d82580e7da0bae588b04c96a8c858c01aab6177a56d7cecba429b34984b1e9e786eef791b46c5c808a96f7c2e2f0d2db3e1015
6
+ metadata.gz: e16c4efad53ef956e1e4582ffaf1971f038aa54fe53d1d20f209ca9a335f921ca1eaf0479f82e17b20d09ba5e1f687dd1c7a3ea8bc63d9a6545277cf741135fd
7
+ data.tar.gz: c5e2449eff3bc68ddefaf385a01585de0fe649e3ea7235982a04cc7ac77c8ebf4a26d75bf4fd75dc9cb865733dcdcd67a81af336fcfd53ea439344accdabbf3f
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: .
9
9
  specs:
10
- rails-acu (3.0.0)
10
+ rails-acu (3.0.1)
11
11
  rails (~> 5.0.0, >= 5.0.0)
12
12
 
13
13
  GEM
@@ -112,7 +112,7 @@ module Acu
112
112
  def op *symbol, opr, on
113
113
  symbol = symbol.flatten
114
114
  raise Errors::InvalidData.new("invalid argument") if not symbol or symbol.to_s.blank? or opr.to_s.blank?
115
- raise Errors::AmbiguousRule.new("cannot have `on` argument inside the action `#{@_params[:action][:name]}`") if not on.empty? and @_params[:action]
115
+ raise Errors::AmbiguousRule.new("cannot have `on` argument inside the action `#{@_params[:action][:name]}`") if not on.empty? and (@_params[:action] and not @_params[:action].empty?)
116
116
  raise Errors::InvalidData.new("the symbol `#{symbol}` is not defined by `whois`") if not symbol.all? { |s| @entities.include? s }
117
117
  return if on.empty? and symbol.each { |s| build_rule({"#{s}": opr}) }
118
118
  # for each action in the `on` create a new rule
@@ -12,7 +12,7 @@ module Acu
12
12
  @_params[k].flatten
13
13
  end
14
14
  yield
15
- args.each { |k, _| @_params.delete k }
15
+ args.each { |k, _| @_params[k].pop }
16
16
  end
17
17
  end
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module Acu
2
- VERSION = '3.0.0'
2
+ VERSION = '3.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-acu
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dariush Hasanpour
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-06 00:00:00.000000000 Z
11
+ date: 2017-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails