hash_conditions 0.1.19 → 1.1.20

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OWQ2NzY5YWExYjE5MjIwOTNiODFhZTRjNTZmNmNjMmJiYzdiODU0ZQ==
4
+ MDMwYWRhYWIzOGNhZDFkOWUzZTgyOWQxYTczMzJlZGY3M2FmOGQ1OA==
5
5
  data.tar.gz: !binary |-
6
- NTI5NWJjZTkyMmI0MmRjNTVmZmY3OGZiYzgwNWYyZmExMzY2ZDg3Yg==
6
+ OTU2YzNjM2QxOTg3YzlhMjk2M2FlNjAyOTAyMmVjYTQ4ZjBmNGQwNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODI3NTZiMjU2ZTg1OTBjMzgzNzkxMzQzMWQ2ZGExZDIwY2MyZWUwZGYxYzQ2
10
- ZDc3ZmRhMGRiMzU3NzhmZGI2MTkyY2NhMzc4MjMzOGQ3NjNmZTc1YTU0Mjdm
11
- MjJhZDYwNzc2MzE0MTI2ZDU4M2RjNzIyZjRiNzA2ZDUzNDdjMmE=
9
+ NDAzZTY3NTkzMDA5OGMwYmFlNDc4MmZhMTE1MmFlNDhmNTM1OGEyNzdmY2M0
10
+ ZjJkZjY1MjIwZDFhMDcyYTVkNzA3NDgyMDJkODcyYjgyNjdhNWM4YzM2ZTg2
11
+ MjM1NjkyM2YxYjk4NDUyNmE4YTNiNzU3YWMwYzMzOTUxYjg1YWI=
12
12
  data.tar.gz: !binary |-
13
- Mzg1ZDM1ZDVkNmEwZmNiNGZmZjdmMWIxMzdhZjhjNTViZWViNGNkN2JkM2Fl
14
- ZjliMWFiZjgxMDg2MmE4NTRhZmE1ODI0MzAyZjk4MzJiNjQ4ZjRjMDY0ZGY0
15
- M2VhY2ViZTJiZTBmMDljZWRiMmRjMjYwYzhmYzYxNWMxNjA3ZjI=
13
+ NGM0NDFkNDhiZjQ1ZThjOGQyZDIzNDRjZjMzNWRlMzkyMDQyNTQ4MWM5MTQy
14
+ MzkwZjQ3NWE1NTY5ZjFjZWY5NmYzNDk4OTg5Nzg1OTg1ZTc5OTUyM2NkZGE4
15
+ MDgxYjkzN2M5YTZiMzRiNmQyY2EyMjU5YzJhYzk1M2E5ZTU3MWQ=
@@ -1,6 +1,7 @@
1
1
  module HashConditions
2
2
  module Core
3
3
  # Modular Matchers
4
+ DEBUG=false
4
5
  ARITMETIC_OPERATORS = {
5
6
  '$add' => :+,
6
7
  '$substract' => :-,
@@ -207,5 +208,9 @@ module HashConditions
207
208
  else raise "return data of type #{ parser_output.class } not supported"
208
209
  end
209
210
  end
211
+
212
+ def log *args
213
+ puts *args if(DEBUG)
214
+ end
210
215
  end
211
216
  end
@@ -49,9 +49,13 @@ module HashConditions
49
49
  end
50
50
 
51
51
  def self.match_single hash, expression, options
52
+ log "Matching:", expression
52
53
  hash_value = eval_operand hash, expression[:key], options.merge(is_key: true)
53
54
  comparisson_value = eval_operand hash, expression[ :value ], options
54
55
 
56
+ log "Left:", hash_value
57
+ log "Right:", comparisson_value
58
+
55
59
  case expression[:operator]
56
60
  when :==
57
61
  if configuration( :force_string_comparations )
@@ -1,3 +1,3 @@
1
1
  module HashConditions
2
- VERSION = "0.1.19"
2
+ VERSION = "1.1.20"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash_conditions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 1.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giancarlo Palavicini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-10 00:00:00.000000000 Z
11
+ date: 2015-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler