weak_parameters 0.2.0 → 0.2.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: ce72b5b0bbcb84e9bb99010f8d173ba34441a15a
4
- data.tar.gz: 6b4ae1fff602fd5788c9bcaa757e31026650ce72
3
+ metadata.gz: eeea4e867c594c1a75ba205e0c6bf1038121afc5
4
+ data.tar.gz: 43331276b21d5828492bc965efa415847a9dc9dc
5
5
  SHA512:
6
- metadata.gz: 68fa4f22e20c97547cc4bcf47232e10e26046e56c85ce2fd6572b07b4cd49c40bd74b00d7c6ba87a18274930062a3ad0c1cd971870ce303bd3494a9bc8783bfd
7
- data.tar.gz: 874e969e4eefe923012c0c66a7e293c69e65661504bdbc625ed202d1c666a580db2664d97d4102f565f3b9b770d153ce3fe9252ca387fe53a5ac2905b11ae316
6
+ metadata.gz: 58bd29edf5a084ba22db0fe3e10c0997cb12c59a17baa8cba1f7d83350dbeebcc78d20d82181cb71648736f7517e5efd1a8e35c3764c437ba0e88e29bb88b662
7
+ data.tar.gz: f8a5204ee8b78c6eb038437a17f6cf12b07379a48fb826eb6289c3e96947e1774677b4eee5bbd3eb476fcd5dcce83103b5ea5882de103fcde61107660ab77797
data/CHANGELOG.md CHANGED
@@ -1,55 +1,58 @@
1
+ ## 0.2.1
2
+ - Fix validtion bug on existence check
3
+
1
4
  ## 0.2.0
2
- * Add strong options on validator DSL (Thx @yoshiori)
5
+ - Add strong options on validator DSL (Thx @yoshiori)
3
6
 
4
7
  ## 0.1.7
5
- * Fix bug on missing `@path` variable (Thx @taka0125)
8
+ - Fix bug on missing `@path` variable (Thx @taka0125)
6
9
 
7
10
  ## 0.1.6
8
- * Support nested parameters (Thx @mzp)
11
+ - Support nested parameters (Thx @mzp)
9
12
 
10
13
  ## 0.1.5
11
- * Support `file` validator (#6)
14
+ - Support `file` validator (#6)
12
15
 
13
16
  ## 0.1.4
14
- * Tiny improvement about Validator#params
17
+ - Tiny improvement about Validator#params
15
18
 
16
19
  ## 0.1.3
17
- * Don't directly touch AC::Base, but do it via AS.on_load
20
+ - Don't directly touch AC::Base, but do it via AS.on_load
18
21
 
19
22
  ## 0.1.2
20
- * Add `:handler` option to customize failure behavior
21
- * Fix bug around `float` validator with block
23
+ - Add `:handler` option to customize failure behavior
24
+ - Fix bug around `float` validator with block
22
25
 
23
26
  ## 0.1.1
24
- * Add `any` validator
27
+ - Add `any` validator
25
28
 
26
29
  ## 0.1.0
27
- * Add type checking to `string` validator
30
+ - Add type checking to `string` validator
28
31
 
29
32
  ## 0.0.9
30
- * Improve error message
33
+ - Improve error message
31
34
 
32
35
  ## 0.0.8
33
- * Add block support to all validators
34
- * Add `float` validator
36
+ - Add block support to all validators
37
+ - Add `float` validator
35
38
 
36
39
  ## 0.0.7
37
- * Fix `integer` validator bug
40
+ - Fix `integer` validator bug
38
41
 
39
42
  ## 0.0.6
40
- * Change value handling in `:only` & `:except` checking
43
+ - Change value handling in `:only` & `:except` checking
41
44
 
42
45
  ## 0.0.5
43
- * Add `:only` & `:except` options
46
+ - Add `:only` & `:except` options
44
47
 
45
48
  ## 0.0.4
46
- * Fix stored controller name for namespaced controller
49
+ - Fix stored controller name for namespaced controller
47
50
 
48
51
  ## 0.0.3
49
- * Fix type name bug
52
+ - Fix type name bug
50
53
 
51
54
  ## 0.0.2
52
- * Add `hash` & `boolean` validator
55
+ - Add `hash` & `boolean` validator
53
56
 
54
57
  ## 0.0.1
55
- * Release the first version on 2013-06-07
58
+ - Release the first version on 2013-06-07
@@ -54,7 +54,7 @@ module WeakParameters
54
54
  end
55
55
 
56
56
  def nil?
57
- value.nil?
57
+ params[key].nil?
58
58
  end
59
59
 
60
60
  def exist?
@@ -1,3 +1,3 @@
1
1
  module WeakParameters
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -64,7 +64,7 @@ describe "Recipes", type: :request do
64
64
 
65
65
  context "with exceptional interger param" do
66
66
  before do
67
- params[:number] = true
67
+ params[:number] = [1]
68
68
  end
69
69
  include_examples "400"
70
70
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weak_parameters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura