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 +4 -4
- data/lib/daily_affirmation/affirmations.rb +12 -8
- data/lib/daily_affirmation/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 30065f01b099b0b0aee3e2b73232b6bde7f02a36
|
|
4
|
+
data.tar.gz: efde73fcb7aa4c2174f58cf5bf80e42adc076171
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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 = {}
|
|
75
|
+
def affirms_exclusion_of(attribute, opts = {})
|
|
76
|
+
opts[:list] ||= []
|
|
76
77
|
affirmations << {
|
|
77
|
-
:attribute => attribute, :type => :exclusion
|
|
78
|
+
:attribute => attribute, :type => :exclusion
|
|
78
79
|
}.merge(opts)
|
|
79
80
|
end
|
|
80
81
|
|
|
81
|
-
def affirms_format_of(attribute, opts = {}
|
|
82
|
+
def affirms_format_of(attribute, opts = {})
|
|
83
|
+
opts[:regex] ||= //
|
|
82
84
|
affirmations << {
|
|
83
|
-
:attribute => attribute, :type => :format
|
|
85
|
+
:attribute => attribute, :type => :format
|
|
84
86
|
}.merge(opts)
|
|
85
87
|
end
|
|
86
88
|
|
|
87
|
-
def affirms_inclusion_of(attribute, opts = {}
|
|
89
|
+
def affirms_inclusion_of(attribute, opts = {})
|
|
90
|
+
opts[:list] ||= []
|
|
88
91
|
affirmations << {
|
|
89
|
-
:attribute => attribute, :type => :inclusion
|
|
92
|
+
:attribute => attribute, :type => :inclusion
|
|
90
93
|
}.merge(opts)
|
|
91
94
|
end
|
|
92
95
|
|
|
93
|
-
def affirms_length_of(attribute, opts = {}
|
|
96
|
+
def affirms_length_of(attribute, opts = {})
|
|
97
|
+
opts[:range] ||= 0..0
|
|
94
98
|
affirmations << {
|
|
95
|
-
:attribute => attribute, :type => :length
|
|
99
|
+
:attribute => attribute, :type => :length
|
|
96
100
|
}.merge(opts)
|
|
97
101
|
end
|
|
98
102
|
|
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.
|
|
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-
|
|
11
|
+
date: 2014-01-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|