colonization 0.3.3 → 0.3.4

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: f7b238a1f52eb0e3154bc44755b8a9b9412824b4
4
- data.tar.gz: 14c8ec0adc365c5747e15d35e66f9cb60c24ced9
3
+ metadata.gz: 0a16a2e6a128d704c81093c40a4b65876bfe38ea
4
+ data.tar.gz: ee5c40cdbfdce588e48f5757a2d718a58a1ec0c6
5
5
  SHA512:
6
- metadata.gz: 0eaaa8beb2cbefd30416cea77350558864f7f1cde56c8eee70eb05d2f4cdc041385244e9eae76f840b3d0ee92396c2f5d397372b18c35df49d986031ef97fddd
7
- data.tar.gz: 43ef128aae6cfddfb2f702cf5ae29c0bb6bdb14bb975f112083b52261444abbff7dda7046ed51bc699913f6a8953d08c32d2d17cc5d1bf6a62c584a39b8af737
6
+ metadata.gz: 1ac27909a89414767da093f69b9b706d3da8c3bf25f3c938c3d62e7e5e09cc732df46f938f42ebaa1559fc78107083566321afd09abe2a89b097ed1a0daa6b85
7
+ data.tar.gz: 6738a0dde708eb24f26038655f8fec34988a81506e37d341b19b04bade6ac672f91ba3092020a66c23f727516c2090639836ac2ecdbc276cd6ece33ed93df76e
@@ -72,6 +72,8 @@ class Colonization::ValuesGenerator
72
72
  case validator.type
73
73
  when :acceptance
74
74
  raise DisaparateValidatorError
75
+ when :presence
76
+ return Faker::Number.decimal(2, 3)
75
77
  when :exclusion
76
78
  begin
77
79
  num = Faker::Number.decimal(2)
@@ -90,6 +92,8 @@ class Colonization::ValuesGenerator
90
92
  when :acceptance
91
93
  return validator.options[:accept].sample if validator.options[:accept].present?
92
94
  return "1"
95
+ when :presence
96
+ return Faker::Lorem.word
93
97
  when :exclusion
94
98
  begin
95
99
  word = Faker::Lorem.word
@@ -107,6 +111,8 @@ class Colonization::ValuesGenerator
107
111
  case validator.type
108
112
  when :acceptance
109
113
  raise DisaparateValidatorError
114
+ when :presence
115
+ return Faker::Lorem.sentence
110
116
  when :exclusion
111
117
  begin
112
118
  sentence = Faker::Lorem.sentence
@@ -124,6 +130,8 @@ class Colonization::ValuesGenerator
124
130
  case validator.type
125
131
  when :acceptance
126
132
  raise DisaparateValidatorError
133
+ when :presence
134
+ return Faker::Date.between(30.days.ago, Date.today)
127
135
  when :exclusion
128
136
  begin
129
137
  date = Faker::Date.between(30.days.ago, Date.today)
@@ -141,6 +149,8 @@ class Colonization::ValuesGenerator
141
149
  case validator.type
142
150
  when :acceptance
143
151
  raise DisaparateValidatorError
152
+ when :presence
153
+ return Faker::Time.between(30.days.ago, Date.today)
144
154
  when :exclusion
145
155
  begin
146
156
  datetime = Faker::Time.between(30.days.ago, Date.today)
@@ -158,6 +168,8 @@ class Colonization::ValuesGenerator
158
168
  case validator.type
159
169
  when :acceptance
160
170
  return true
171
+ when :presence
172
+ return [false, true].sample
161
173
  when :exclusion
162
174
  if validator.options[:in].exclude?(false)
163
175
  return false
@@ -178,6 +190,8 @@ class Colonization::ValuesGenerator
178
190
  case validator.type
179
191
  when :acceptance
180
192
  raise DisaparateValidatorError
193
+ when :presence
194
+ return Faker::Time.between(30.days.ago, Date.today)
181
195
  when :exclusion
182
196
  begin
183
197
  time = Faker::Time.between(30.days.ago, Date.today)
@@ -1,3 +1,3 @@
1
1
  module Colonization
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colonization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denys Dvoriashyn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-26 00:00:00.000000000 Z
11
+ date: 2016-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler