forgery 0.7.0 → 0.8.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
- SHA1:
3
- metadata.gz: edfed01a47576d5c89584ba13963d84d7e5a1a33
4
- data.tar.gz: 4148f955ffab8872206eb45fee99a3f6dec63b1b
2
+ SHA256:
3
+ metadata.gz: 76b44d025c21b45dc7df8213246deb73529223357e862efb5278c5ffa3bcc7ef
4
+ data.tar.gz: 5f905c142572cc921c5c2742cef6ecf192e6cc2570dd1fff234f5313ce658ee9
5
5
  SHA512:
6
- metadata.gz: 30bc7b7c2a647705238a09b742db2281db7e4d465f55cc81c6407cb9c7f0383fb5dee678cfc2313918c18064f21a2cbf78c7f474bb767fe1dfb6d21dc85bfea4
7
- data.tar.gz: d2ecc07f38a548cb044f55caa39b3dc7940b9adde56556f64c13a58835539e0cc0cdae3ae67ee647d6a85ca3cde40181f74a37e8396ab0e79642421fe9b90643
6
+ metadata.gz: 68431f47e7370aa37d807779d0253e9dd9b81d49b8e8e02f47a6d6f240f146dd7b986fbcd0b71796c9f397fb6919501fda5afc422f9d9e2dc976f2da4a6833b0
7
+ data.tar.gz: 01ed166d1e736194f9d67b80870ab3c116bea2764660504e22bf23e37c8cbf08183b86fcc9e797d6ca28de7c222c750fedf90ebe12de57a7f8cf283f1c182864
@@ -1,8 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.6
4
- - 2.3.3
5
- - 2.4.0
3
+ - 2.4.10
4
+ - 2.5.8
5
+ - 2.6.6
6
+ - 2.7.1
6
7
  - ruby-head
7
8
 
8
9
  matrix:
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- forgery (0.7.0)
4
+ forgery (0.8.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  diff-lcs (1.3)
10
- rake (12.3.0)
10
+ rake (13.0.1)
11
11
  rspec (3.7.0)
12
12
  rspec-core (~> 3.7.0)
13
13
  rspec-expectations (~> 3.7.0)
@@ -26,10 +26,10 @@ PLATFORMS
26
26
  ruby
27
27
 
28
28
  DEPENDENCIES
29
- bundler (~> 1.16.0)
29
+ bundler (~> 2.1.4)
30
30
  forgery!
31
31
  rake
32
32
  rspec
33
33
 
34
34
  BUNDLED WITH
35
- 1.16.0
35
+ 2.1.4
@@ -1,21 +1,17 @@
1
- Forgery
2
- =======
3
-
4
- [![Build Status](https://travis-ci.org/sevenwire/forgery.png)](https://travis-ci.org/sevenwire/forgery)
5
- [![Code Climate](https://codeclimate.com/github/sevenwire/forgery.png)](https://codeclimate.com/github/sevenwire/forgery)
1
+ # Forgery
6
2
 
3
+ [![Build Status](https://travis-ci.org/sevenwire/forgery.svg)](https://travis-ci.org/sevenwire/forgery)
4
+ [![Code Climate](https://codeclimate.com/github/sevenwire/forgery.svg)](https://codeclimate.com/github/sevenwire/forgery)
7
5
 
8
6
  **A Problem**:
9
- It's harder than *absolutely easy* to make meaningful, simple, data for testing and development.
7
+ It's harder than _absolutely easy_ to make meaningful, simple, data for testing and development.
10
8
 
11
9
  **A Solution**:
12
10
  A fake data generator that provides not only a host of basics and a rememberable syntax, but a customizable library to boot.
13
11
 
14
12
  Welcome to Forgery, an excellent solution to a problem so hard you didn't know it was there.
15
13
 
16
-
17
- Using
18
- -----
14
+ ## Using
19
15
 
20
16
  You'll want to read individual Forgery categories for more information, but these are the basics:
21
17
 
@@ -38,7 +34,7 @@ Forgery(:monetary).formatted_money :min => 100, :max => 1000
38
34
 
39
35
  And many many more!
40
36
 
41
- Alternatively you can write it like this:
37
+ Alternatively you can write it like this:
42
38
 
43
39
  ```ruby
44
40
  Forgery::Basic.hex_color
@@ -49,24 +45,21 @@ Forgery::Personal.shirt_size
49
45
  In addition, you can always write your own dictionaries and formats, overriding the ones in the gem.
50
46
  Fully explained here.
51
47
 
52
-
53
- Installing
54
- ----------
48
+ ## Installing
55
49
 
56
50
  Like any gem, you can install Forgery two ways depending on it's use.
57
51
 
58
52
  For normal Ruby development, you need simply use:
59
53
 
60
54
  ```bash
61
- $ gem install forgery
55
+ gem install forgery
62
56
  ```
63
57
 
64
58
  This will add it to your gem library, just like any normal gem.
65
59
  You can then use it like any normal gem library.
66
60
  See examples for more.
67
61
 
68
-
69
- **Rails 3.x**
62
+ ### Rails 3.x
70
63
 
71
64
  If you're using Rails 3.x you need to do a few extra things (that are probably rote).
72
65
  First step is to add it to your `Rails.root/Gemfile`, we also suggest specifying the latest version (found on rubygems):
@@ -78,11 +71,11 @@ gem 'forgery', '0.6.0'
78
71
  Then you'll need to run `bundle install` to install and lock in your new gem.
79
72
  Next you'll want to run the special Rails 3 generator:
80
73
 
81
- ```
82
- $ [bundle exec] rails generate forgery
74
+ ```bash
75
+ bundle exec rails generate forgery
83
76
  ```
84
77
 
85
- **Rails 2.x**
78
+ ### Rails 2.x
86
79
 
87
80
  For **Rails 2.x** you'll need to do something a little different, by first editing your `Rails.root/config/environment.rb` and adding this to the configuration block:
88
81
 
@@ -93,10 +86,10 @@ config.gem 'forgery'
93
86
  Then you'll need to run this in your command line:
94
87
 
95
88
  ```bash
96
- $ script/generate forgery
89
+ script/generate forgery
97
90
  ```
98
91
 
99
- **Generators**
92
+ ### Generators
100
93
 
101
94
  This Rails generators will make these directories in your Rails.root directory:
102
95
 
@@ -108,185 +101,177 @@ This Rails generators will make these directories in your Rails.root directory:
108
101
 
109
102
  You can then use these directories to write your own dictionaries, class extensions, forgeries, and formats.
110
103
 
111
- Full List of methods:
112
- --------------------
113
-
114
- Address | Example Output
115
- :------------------------------ |:----------------
116
- `Forgery('address').city` | Loomis
117
- `Forgery('address').continent` | South America
118
- `Forgery('address').country` | Cameroon
119
- `Forgery('address').phone` | +1 (693) 901-4549
120
- `Forgery('address').province` | Alberta
121
- `Forgery('address').province_abbrev` | NT
122
- `Forgery('address').state` | Alabama
123
- `Forgery('address').state_abbrev` | SC
124
- `Forgery('address').street_address` | 21 Hayes Park
125
- `Forgery('address').street_name` | Oneill
126
- `Forgery('address').street_number` | 222
127
- `Forgery('address').street_suffix` | Drive
128
- `Forgery('address').zip` | 11281-5568
129
-
130
-
131
- Basic | Example Output
132
- :------------------------------ |:----------------
133
- `Forgery('basic').boolean` | `true` (`TrueClass`)
134
- `Forgery('basic').color` | Red
135
- `Forgery('basic').encrypt` | fc0d835dd4e4df144a33a6a346298b0f23dcd14a
136
- `Forgery('basic').frequency` | Never
137
- `Forgery('basic').hex_color` | #e1d82a
138
- `Forgery('basic').number` | 4
139
- `Forgery('basic').password` | KcLBHCv6
140
- `Forgery('basic').short_hex_color` | #c1d
141
- `Forgery('basic').text` | G8gECFfvDs2
142
-
143
- Credit Card | Example Output
144
- :------------------------------ |:----------------
145
- `Forgery('credit_card').check_digit(number)` | 5
146
- `Forgery('credit_card').number` | 343682330855371
147
- `Forgery('credit_card').type` | American Express
148
- `Forgery('currency').code` | XPF
149
- `Forgery('currency').description` | Austria Schillings
150
-
151
- Date | Example Output
152
- :------------------------------ |:----------------
153
- `Forgery('date').date` | Fri, 20 Mar 2009 (`Date`)
154
- `Forgery('date').day` | 15
155
- `Forgery('date').day_of_week` | Monday
156
- `Forgery('date').delta(options)` | 3
157
- `Forgery('date').month` | January
158
- `Forgery('date').year` | 1994
159
-
160
- Email | Example Output
161
- :------------------------------ |:----------------
162
- `Forgery('email').address` | gsmith@kamba.org
163
- `Forgery('email').body` | Lorem ipsum dolor sit amet, consectetuer ...
164
- `Forgery('email').subject` | Lorem Ipsum Dolor Sit Amet...
165
-
166
-
167
- Geo | Example Output
168
- :------------------------------ |:----------------
169
- `Forgery('geo').latitude` | -8.095096815540515 (`Float`)
170
- `Forgery('geo').latitude_degrees` | -49
171
- `Forgery('geo').latitude_direction` | N
172
- `Forgery('geo').latitude_minutes` | 14
173
- `Forgery('geo').latitude_seconds` | 45
174
- `Forgery('geo').longitude` | -22.56746406884514 (`Float`)
175
- `Forgery('geo').longitude_degrees` | 100
176
- `Forgery('geo').longitude_direction` | W
177
- `Forgery('geo').longitude_minutes` | 47
178
- `Forgery('geo').longitude_seconds` | 41
179
-
180
- Internet | Example Output
181
- :------------------------------ |:----------------
182
- `Forgery('internet').cctld` | cf
183
- `Forgery('internet').domain_name` | bubbletube.net
184
- `Forgery('internet').email_address` | cwalker@quire.name
185
- `Forgery('internet').email_subject` | Lorem Ipsum Dolor Sit Amet...
186
- `Forgery('internet').ip_v4` | 94.120.51.103
187
- `Forgery('internet').ip_v6` | c61e:5926:15e6:d225:8eef:fb39:7412:e9d5
188
- `Forgery('internet').top_level_domain` | com
189
- `Forgery('internet').user_name` | sdixon
190
-
191
- Lorem Ipsum | Example Output
192
- :------------------------------ |:----------------
193
- `Forgery('lorem_ipsum').character` | l
194
- `Forgery('lorem_ipsum').characters` | lorem ipsu
195
- `Forgery('lorem_ipsum').lorem_ipsum_characters` | lorem ipsum dolor sit amet...
196
- `Forgery('lorem_ipsum').lorem_ipsum_words` | ["lorem", "ipsum", "dolor", ...] (`Array`)
197
- `Forgery('lorem_ipsum').paragraph` | Lorem ipsum dolor sit amet...
198
- `Forgery('lorem_ipsum').paragraphs` | Lorem ipsum dolor sit amet...
199
- `Forgery('lorem_ipsum').range_from_quantity(quantity)` | 0..4 (`Range`)
200
- `Forgery('lorem_ipsum').sentence` | Lorem ipsum dolor sit amet...
201
- `Forgery('lorem_ipsum').sentences` | Lorem ipsum dolor sit amet...
202
- `Forgery('lorem_ipsum').text` | Lorem ipsum dolor sit amet...
203
- `Forgery('lorem_ipsum').title` | Lorem Ipsum Dolor Sit Amet...
204
- `Forgery('lorem_ipsum').word` | lorem
205
- `Forgery('lorem_ipsum').words` | lorem ipsum dolor sit amet...
206
-
207
- Monetary | Example Output
208
- :------------------------------ |:----------------
209
- `Forgery('monetary').formatted_money` | $5.49
210
- `Forgery('monetary').money` | 9.20 (`String`)
211
-
212
-
213
- Name | Example Output
214
- :------------------------------ |:----------------
215
- `Forgery('name').company_name` | Bubbletube
216
- `Forgery('name').female_first_name` | Judy
217
- `Forgery('name').first_name` | Albert
218
- `Forgery('name').full_name` | Evelyn Wallace
219
- `Forgery('name').industry` | Toy & Hobby Stores
220
- `Forgery('name').job_title` | Analyst Programmer
221
- `Forgery('name').job_title_suffix` | III
222
- `Forgery('name').last_name` | Jackson
223
- `Forgery('name').location` | Try-N-Save
224
- `Forgery('name').male_first_name` | Donald
225
- `Forgery('name').suffix` | Sr
226
- `Forgery('name').title` | Mr
227
-
228
- Personal | Example Output
229
- :------------------------------ |:----------------
230
- `Forgery('personal').abbreviated_gender` | F
231
- `Forgery('personal').gender` | Female
232
- `Forgery('personal').language` | Bislama
233
- `Forgery('personal').race` | Indonesian
234
- `Forgery('personal').shirt_size` | 2XL
235
-
236
- Bank Account | Example Output
237
- :------------------------------ |:----------------
238
- `Forgery('bank_account').iban` | BE68539007547034
239
- `Forgery('bank_account').bic` | VBRSDE33345
240
-
241
- Russian Tax | Example Output
242
- :------------------------------ |:----------------
243
- `Forgery('russian_tax').account_number` | 56335652786612121479
244
- `Forgery('russian_tax').bik` | 046533860
245
- `Forgery('russian_tax').inn` | 7366543467
246
- `Forgery('russian_tax').legal_inn` | 7822838630
247
- `Forgery('russian_tax').legal_ogrn` | 3483465598635
248
- `Forgery('russian_tax').ogrn` | 666325227817763
249
- `Forgery('russian_tax').person_inn` | 451559765443
250
- `Forgery('russian_tax').person_ogrn` | 195478617554621
251
-
252
- Time | Example Output
253
- :------------------------------ |:----------------
254
- `Forgery('time').zone` | Amsterdam (`String`)
255
-
256
-
257
- Contributing
258
- ------------
104
+ ## Full List of Methods
105
+
106
+ | Address | Example Output |
107
+ | :----------------------------------- | :---------------- |
108
+ | `Forgery('address').city` | Loomis |
109
+ | `Forgery('address').continent` | South America |
110
+ | `Forgery('address').country` | Cameroon |
111
+ | `Forgery('address').phone` | +1 (693) 901-4549 |
112
+ | `Forgery('address').province` | Alberta |
113
+ | `Forgery('address').province_abbrev` | NT |
114
+ | `Forgery('address').state` | Alabama |
115
+ | `Forgery('address').state_abbrev` | SC |
116
+ | `Forgery('address').street_address` | 21 Hayes Park |
117
+ | `Forgery('address').street_name` | Oneill |
118
+ | `Forgery('address').street_number` | 222 |
119
+ | `Forgery('address').street_suffix` | Drive |
120
+ | `Forgery('address').zip` | 11281-5568 |
121
+
122
+ | Basic | Example Output |
123
+ | :--------------------------------- | :--------------------------------------- |
124
+ | `Forgery('basic').boolean` | `true` (`TrueClass`) |
125
+ | `Forgery('basic').color` | Red |
126
+ | `Forgery('basic').encrypt` | fc0d835dd4e4df144a33a6a346298b0f23dcd14a |
127
+ | `Forgery('basic').frequency` | Never |
128
+ | `Forgery('basic').hex_color` | #e1d82a |
129
+ | `Forgery('basic').number` | 4 |
130
+ | `Forgery('basic').password` | KcLBHCv6 |
131
+ | `Forgery('basic').short_hex_color` | #c1d |
132
+ | `Forgery('basic').text` | G8gECFfvDs2 |
133
+
134
+ | Credit Card | Example Output |
135
+ | :------------------------------------------- | :----------------- |
136
+ | `Forgery('credit_card').check_digit(number)` | 5 |
137
+ | `Forgery('credit_card').number` | 343682330855371 |
138
+ | `Forgery('credit_card').type` | American Express |
139
+ | `Forgery('currency').code` | XPF |
140
+ | `Forgery('currency').description` | Austria Schillings |
141
+
142
+ | Date | Example Output |
143
+ | :------------------------------- | :------------------------ |
144
+ | `Forgery('date').date` | Fri, 20 Mar 2009 (`Date`) |
145
+ | `Forgery('date').day` | 15 |
146
+ | `Forgery('date').day_of_week` | Monday |
147
+ | `Forgery('date').delta(options)` | 3 |
148
+ | `Forgery('date').month` | January |
149
+ | `Forgery('date').year` | 1994 |
150
+
151
+ | Email | Example Output |
152
+ | :------------------------- | :------------------------------------------- |
153
+ | `Forgery('email').address` | gsmith@kamba.org |
154
+ | `Forgery('email').body` | Lorem ipsum dolor sit amet, consectetuer ... |
155
+ | `Forgery('email').subject` | Lorem Ipsum Dolor Sit Amet... |
156
+
157
+ | Geo | Example Output |
158
+ | :----------------------------------- | :--------------------------- |
159
+ | `Forgery('geo').latitude` | -8.095096815540515 (`Float`) |
160
+ | `Forgery('geo').latitude_degrees` | -49 |
161
+ | `Forgery('geo').latitude_direction` | N |
162
+ | `Forgery('geo').latitude_minutes` | 14 |
163
+ | `Forgery('geo').latitude_seconds` | 45 |
164
+ | `Forgery('geo').longitude` | -22.56746406884514 (`Float`) |
165
+ | `Forgery('geo').longitude_degrees` | 100 |
166
+ | `Forgery('geo').longitude_direction` | W |
167
+ | `Forgery('geo').longitude_minutes` | 47 |
168
+ | `Forgery('geo').longitude_seconds` | 41 |
169
+
170
+ | Internet | Example Output |
171
+ | :------------------------------------- | :-------------------------------------- |
172
+ | `Forgery('internet').cctld` | cf |
173
+ | `Forgery('internet').domain_name` | bubbletube.net |
174
+ | `Forgery('internet').email_address` | cwalker@quire.name |
175
+ | `Forgery('internet').email_subject` | Lorem Ipsum Dolor Sit Amet... |
176
+ | `Forgery('internet').ip_v4` | 94.120.51.103 |
177
+ | `Forgery('internet').ip_v6` | c61e:5926:15e6:d225:8eef:fb39:7412:e9d5 |
178
+ | `Forgery('internet').top_level_domain` | com |
179
+ | `Forgery('internet').user_name` | sdixon |
180
+
181
+ | Lorem Ipsum | Example Output |
182
+ | :----------------------------------------------------- | :---------------------------------------- |
183
+ | `Forgery('lorem_ipsum').character` | l |
184
+ | `Forgery('lorem_ipsum').characters` | lorem ipsu |
185
+ | `Forgery('lorem_ipsum').lorem_ipsum_characters` | lorem ipsum dolor sit amet... |
186
+ | `Forgery('lorem_ipsum').lorem_ipsum_words` | ["lorem", "ipsum", "dolor", ...](`Array`) |
187
+ | `Forgery('lorem_ipsum').paragraph` | Lorem ipsum dolor sit amet... |
188
+ | `Forgery('lorem_ipsum').paragraphs` | Lorem ipsum dolor sit amet... |
189
+ | `Forgery('lorem_ipsum').range_from_quantity(quantity)` | 0..4 (`Range`) |
190
+ | `Forgery('lorem_ipsum').sentence` | Lorem ipsum dolor sit amet... |
191
+ | `Forgery('lorem_ipsum').sentences` | Lorem ipsum dolor sit amet... |
192
+ | `Forgery('lorem_ipsum').text` | Lorem ipsum dolor sit amet... |
193
+ | `Forgery('lorem_ipsum').title` | Lorem Ipsum Dolor Sit Amet... |
194
+ | `Forgery('lorem_ipsum').word` | lorem |
195
+ | `Forgery('lorem_ipsum').words` | lorem ipsum dolor sit amet... |
196
+
197
+ | Monetary | Example Output |
198
+ | :------------------------------------ | :-------------- |
199
+ | `Forgery('monetary').formatted_money` | \$5.49 |
200
+ | `Forgery('monetary').money` | 9.20 (`String`) |
201
+
202
+ | Name | Example Output |
203
+ | :---------------------------------- | :----------------- |
204
+ | `Forgery('name').company_name` | Bubbletube |
205
+ | `Forgery('name').female_first_name` | Judy |
206
+ | `Forgery('name').first_name` | Albert |
207
+ | `Forgery('name').full_name` | Evelyn Wallace |
208
+ | `Forgery('name').industry` | Toy & Hobby Stores |
209
+ | `Forgery('name').job_title` | Analyst Programmer |
210
+ | `Forgery('name').job_title_suffix` | III |
211
+ | `Forgery('name').last_name` | Jackson |
212
+ | `Forgery('name').location` | Try-N-Save |
213
+ | `Forgery('name').male_first_name` | Donald |
214
+ | `Forgery('name').suffix` | Sr |
215
+ | `Forgery('name').title` | Mr |
216
+
217
+ | Personal | Example Output |
218
+ | :--------------------------------------- | :------------- |
219
+ | `Forgery('personal').abbreviated_gender` | F |
220
+ | `Forgery('personal').gender` | Female |
221
+ | `Forgery('personal').language` | Bislama |
222
+ | `Forgery('personal').race` | Indonesian |
223
+ | `Forgery('personal').shirt_size` | 2XL |
224
+
225
+ | Bank Account | Example Output |
226
+ | :----------------------------- | :--------------- |
227
+ | `Forgery('bank_account').iban` | BE68539007547034 |
228
+ | `Forgery('bank_account').bic` | VBRSDE33345 |
229
+
230
+ | Russian Tax | Example Output |
231
+ | :-------------------------------------- | :------------------- |
232
+ | `Forgery('russian_tax').account_number` | 56335652786612121479 |
233
+ | `Forgery('russian_tax').bik` | 046533860 |
234
+ | `Forgery('russian_tax').inn` | 7366543467 |
235
+ | `Forgery('russian_tax').legal_inn` | 7822838630 |
236
+ | `Forgery('russian_tax').legal_ogrn` | 3483465598635 |
237
+ | `Forgery('russian_tax').ogrn` | 666325227817763 |
238
+ | `Forgery('russian_tax').person_inn` | 451559765443 |
239
+ | `Forgery('russian_tax').person_ogrn` | 195478617554621 |
240
+
241
+ | Time | Example Output |
242
+ | :--------------------- | :------------------- |
243
+ | `Forgery('time').zone` | Amsterdam (`String`) |
244
+
245
+ ## Contributing
259
246
 
260
247
  This is a work in progress and an open source project, so feel free to contribute.
261
248
  We'll take pull requests via git or suggestions via the issues tab.
262
249
  Any work done on Forgery will get you into the credits list and in our hearts.
263
250
 
264
-
265
- Credits
266
- -------
251
+ ## Credits
267
252
 
268
253
  Thanks to the authors and contributors:
269
254
 
270
- * Nate Sutton (nate aka fowlduck)
271
- * Brandon Arbini (brandonarbini)
272
- * Josh Nichols (technicalpickles)
273
- * Jeremy Stephens (viking aka crookshanks)
274
- * Darcy Laycock (Sutto)
275
- * Lukas Westermann (lwe)
276
- * Mike Dungan
277
- * Andrew Selder (aselder)
278
- * Thomas Sinclair (anathematic)
279
- * Stafford Brunk (wingrunr21)
280
- * SixArm (SixArm)
281
- * Akira Matsuda (amatsuda)
282
- * Diego Plentz (plentz)
283
- * Gabe Berke-Williams (gabebw)
284
- * Todd Mazierski (toddmazierski)
285
- * Galen Palmer (palmergs)
286
-
287
-
288
- Licensing
289
- ---------
255
+ - Nate Sutton (nate aka fowlduck)
256
+ - Brandon Arbini (brandonarbini)
257
+ - Josh Nichols (technicalpickles)
258
+ - Jeremy Stephens (viking aka crookshanks)
259
+ - Darcy Laycock (Sutto)
260
+ - Lukas Westermann (lwe)
261
+ - Mike Dungan
262
+ - Andrew Selder (aselder)
263
+ - Thomas Sinclair (anathematic)
264
+ - Stafford Brunk (wingrunr21)
265
+ - SixArm (SixArm)
266
+ - Akira Matsuda (amatsuda)
267
+ - Diego Plentz (plentz)
268
+ - Gabe Berke-Williams (gabebw)
269
+ - Todd Mazierski (toddmazierski)
270
+ - Galen Palmer (palmergs)
271
+ - Matt Bertino (mbbertino)
272
+ - Olle Jonsson (olleolleolle)
273
+
274
+ ## Licensing
290
275
 
291
276
  Copyright (c) 2007 Sevenwire LLC
292
277
 
@@ -310,4 +295,3 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
310
295
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
311
296
 
312
297
  On that note, have fun!
313
-
@@ -1,23 +1,23 @@
1
+ # frozen_string_literal: true
1
2
 
2
- $LOAD_PATH.push File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.push File.expand_path('lib', __dir__)
3
4
  require 'forgery/version'
4
5
 
5
6
  Gem::Specification.new do |spec|
6
7
  spec.name = 'forgery'
7
8
  spec.version = Forgery::VERSION
8
9
  spec.authors = ['Nathan Sutton', 'Brandon Arbini', 'Kamil Kieliszczyk']
9
- spec.email = ['nate@zencoder.com', 'brandon@zencoder.com', 'kamil@kieliszczyk.net']
10
+ spec.email = ['nate@zencoder.com', 'b@arbini.dev', 'kamil@kieliszczyk.net']
10
11
  spec.homepage = 'http://github.com/sevenwire/forgery'
11
12
  spec.summary = 'Easy and customizable generation of forged data.'
12
13
  spec.description = 'Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.'
13
14
 
14
15
  spec.platform = Gem::Platform::RUBY
15
16
  spec.required_rubygems_version = '>= 1.3.6'
16
- spec.rubyforge_project = 'forgery'
17
17
 
18
18
  spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
19
19
  spec.test_files = `git ls-files spec`.split($INPUT_RECORD_SEPARATOR)
20
20
  spec.require_paths = %w[lib]
21
21
 
22
- spec.add_development_dependency 'bundler', '~> 1.16.0'
22
+ spec.add_development_dependency 'bundler', '~> 2.1.4'
23
23
  end
@@ -50,7 +50,7 @@ class Forgery::Basic < Forgery
50
50
  #
51
51
  # Forgery(:basic).encrypt('your-password', Time.utc(2009))
52
52
  # # => "4b157c2fbf430b962842d21926eaa887c3a12f81"
53
- def self.encrypt(password="password", salt=::Time.now.to_s)
53
+ def self.encrypt(password="password", salt=rand)
54
54
  Digest::SHA1.hexdigest("--#{salt}--#{password}--")
55
55
  end
56
56
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Forgery
2
- VERSION = '0.7.0'.freeze
4
+ VERSION = '0.8.1'
3
5
  end
@@ -1,14 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
  require 'bigdecimal'
3
5
 
4
6
  describe Forgery::Monetary do
5
-
6
- it "should return random number string" do
7
+ it 'should return random number string' do
7
8
  expect(Forgery(:monetary).money).to match(/^[\d+\.]+$/)
8
9
  end
9
10
 
10
- it "should return random number respecting min and max parameters" do
11
- expect(BigDecimal.new(Forgery(:monetary).money({:min => 10, :max => 20}))).to be_between(10, 20)
11
+ it 'should return random number respecting min and max parameters' do
12
+ expect(BigDecimal(Forgery(:monetary).money({ min: 10, max: 20 }))).to be_between(10, 20)
12
13
  end
13
-
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forgery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Sutton
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-12-05 00:00:00.000000000 Z
13
+ date: 2020-07-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -18,19 +18,19 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 1.16.0
21
+ version: 2.1.4
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 1.16.0
28
+ version: 2.1.4
29
29
  description: Easy and customizable generation of forged data. Can be used as a gem
30
30
  or a rails plugin. Includes rails generators for creating your own forgeries.
31
31
  email:
32
32
  - nate@zencoder.com
33
- - brandon@zencoder.com
33
+ - b@arbini.dev
34
34
  - kamil@kieliszczyk.net
35
35
  executables: []
36
36
  extensions: []
@@ -153,8 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  - !ruby/object:Gem::Version
154
154
  version: 1.3.6
155
155
  requirements: []
156
- rubyforge_project: forgery
157
- rubygems_version: 2.6.13
156
+ rubygems_version: 3.1.2
158
157
  signing_key:
159
158
  specification_version: 4
160
159
  summary: Easy and customizable generation of forged data.