might 0.5.0 → 0.5.1

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: 2050feff383533125774a05a3de740e55ffd6fc5
4
- data.tar.gz: a7a70f53d00d24ff06b4110d016a2c35edd677a6
3
+ metadata.gz: ad96c2f9fdfbd6c5dcd9d741d9ca5dc7de704ebb
4
+ data.tar.gz: a2f69450d6b65032942bc95236226aba5710f9a1
5
5
  SHA512:
6
- metadata.gz: 5e6302efe3d97007443100a2ed6b6887b9f778950ca83ff0584bccc2892ab5d8fceb5d9fbcca119f639d397dfb1cd68f43b0598c4475566df6dd49ee20f1b7bf
7
- data.tar.gz: 66fada3e80be4d3bd5c350e7d4a8f9b01c26dd0a899f3f4fe5b91018a93c8b6d6e57a6a6edae58f62e35a9de7d42831ead615f3da4c3c511e08b1f7782167fb4
6
+ metadata.gz: 435e9bacc6502d9d718259716584c07f4685e0c07a6b972cbb7e6af1c6008d5f11bdda84fee7513efb10c43fa40aaf214a88175a6b92848a1097c96022d62cdd
7
+ data.tar.gz: b18938e5e5f207e76c2112048465d6e7552dc73e861572a7b1589b05ce273c5732910aa9e50a6f113614c6c058f78eec9eca1d0e87fbf6ef06b66e69e90769a0
@@ -25,5 +25,9 @@ module Might
25
25
  fail FilterError, "filter not found: #{name.inspect}"
26
26
  end
27
27
  end
28
+
29
+ def map(&block)
30
+ dup.map!(&block)
31
+ end
28
32
  end
29
33
  end
@@ -1,6 +1,7 @@
1
1
  require_relative 'filter_predicates'
2
2
  require_relative 'filter_undefined_parameter'
3
3
  require_relative 'filter_parameter'
4
+ require_relative 'filter_parameters'
4
5
 
5
6
  module Might
6
7
  # User provided filters syntax:
@@ -29,7 +30,7 @@ module Might
29
30
  def call(env)
30
31
  params, errors = env
31
32
 
32
- provided_parameters = Hash(params[:filter]).each_with_object([]) do |(name, value), parameters|
33
+ provided_parameters = Hash(params[:filter]).each_with_object(FilterParameters.new) do |(name, value), parameters|
33
34
  type_casted_value = type_cast_value(name, value)
34
35
  parameters << extract_parameter(name, type_casted_value)
35
36
  end
@@ -1,4 +1,4 @@
1
1
  #
2
2
  module Might
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: might
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tema Bolshakov