daily_affirmation 0.3.1 → 0.3.2

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: 94605e7d69f4f97c4ec51b7ae89f813f74a75e8f
4
- data.tar.gz: 3754de93153d51826cc98410c199cc6cac4730db
3
+ metadata.gz: 30065f01b099b0b0aee3e2b73232b6bde7f02a36
4
+ data.tar.gz: efde73fcb7aa4c2174f58cf5bf80e42adc076171
5
5
  SHA512:
6
- metadata.gz: 6e7006de8350a3b28611692d7b4a1e2dbe0430c90175e6f6e02f9f70f393a0aa4203433f5b7d9c8564233e5d47a530166f308da1f48b2854cbf8fcedf6766c59
7
- data.tar.gz: b4d8275d96b85de094dd78fa89f4c9aef10e6d2aed4db502f2a56fd933e430c5663c55a5d89ad157e7b025d2e89c50c83307ec15ba463f4a73fe7586c80e9397
6
+ metadata.gz: 24326312ef59b9a67e04078f03e20c24e0d171caea5e74db4b8602e413cb08b6e665e33aa9acec666f0ddaaa739adc2f6cc790eac7b74bf9f86d5945c9bb4632
7
+ data.tar.gz: 0a1cb9a2d89a63ff4990b31b414a86d5f154f5600272586e32d2043039965cf6c7095c7ad503f0782d595c17a7aa3d1360fc261b5e953ccb359d071e65209338
@@ -72,27 +72,31 @@ module DailyAffirmation
72
72
  }.merge(opts)
73
73
  end
74
74
 
75
- def affirms_exclusion_of(attribute, opts = {}, list: [])
75
+ def affirms_exclusion_of(attribute, opts = {})
76
+ opts[:list] ||= []
76
77
  affirmations << {
77
- :attribute => attribute, :type => :exclusion, :list => list
78
+ :attribute => attribute, :type => :exclusion
78
79
  }.merge(opts)
79
80
  end
80
81
 
81
- def affirms_format_of(attribute, opts = {}, regex: //)
82
+ def affirms_format_of(attribute, opts = {})
83
+ opts[:regex] ||= //
82
84
  affirmations << {
83
- :attribute => attribute, :type => :format, :regex => regex
85
+ :attribute => attribute, :type => :format
84
86
  }.merge(opts)
85
87
  end
86
88
 
87
- def affirms_inclusion_of(attribute, opts = {}, list: [])
89
+ def affirms_inclusion_of(attribute, opts = {})
90
+ opts[:list] ||= []
88
91
  affirmations << {
89
- :attribute => attribute, :type => :inclusion, :list => list
92
+ :attribute => attribute, :type => :inclusion
90
93
  }.merge(opts)
91
94
  end
92
95
 
93
- def affirms_length_of(attribute, opts = {}, range: 0..0)
96
+ def affirms_length_of(attribute, opts = {})
97
+ opts[:range] ||= 0..0
94
98
  affirmations << {
95
- :attribute => attribute, :type => :length, :range => range
99
+ :attribute => attribute, :type => :length
96
100
  }.merge(opts)
97
101
  end
98
102
 
@@ -1,3 +1,3 @@
1
1
  module DailyAffirmation
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daily_affirmation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Emmons
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-02 00:00:00.000000000 Z
11
+ date: 2014-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler