ruser 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -4
- data/lib/ruser/api.rb +1 -1
- data/lib/ruser/version.rb +1 -1
- data/spec/functional/api_spec.rb +1 -1
- data/spec/functional/{person_spec.rb → ruser_spec.rb} +5 -5
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ab812ef94b94d2bb1ed0fe509a7dc8bbd159e9b
|
4
|
+
data.tar.gz: 2240ea986ae78949f2db71bad85c4b5a76425434
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d517ab1f1b5ea28236341b0f4de48a92f2d6c0b9b259db5abb25db452180fee1e512634188e5ba55a9da1eb61154a897c94909dc2d5a9946b5b75f94e5efa0af
|
7
|
+
data.tar.gz: cead44f2201b54fd8aeaa7c2d9925cc89db1981a5ff89ffebaa545c0de597fdcd662ec0e205e4b2e487178bb852f7bdd42f5407c983f6468ba9cc6aa42c2643f
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ Using RUser in it's simplest form is as easy as calling:
|
|
24
24
|
|
25
25
|
require 'ruser'
|
26
26
|
|
27
|
-
|
27
|
+
user = RUser.new.first
|
28
28
|
|
29
29
|
puts "This user is a #{user.gender} named #{user.name.first_name}!"
|
30
30
|
|
@@ -59,15 +59,26 @@ If you want to request a female or male user specifically, specify the `:gender`
|
|
59
59
|
|
60
60
|
require 'ruser'
|
61
61
|
|
62
|
-
woman = RUser
|
62
|
+
woman = RUser.new({:gender => 'female'})
|
63
63
|
|
64
|
-
man = RUser
|
64
|
+
man = RUser.new({:gender => 'male'})
|
65
65
|
|
66
66
|
If you want to request a specific user by their seed, specify the `:seed` key in the options hash passed to `new`:
|
67
67
|
|
68
68
|
require 'ruser'
|
69
69
|
|
70
|
-
lazyWolf = RUser
|
70
|
+
lazyWolf = RUser.new({:seed => 'lazyWolf'})
|
71
|
+
|
72
|
+
If you would like more than one user supply the `:results` key in the options hash passed to `new`:
|
73
|
+
|
74
|
+
require 'ruser'
|
75
|
+
|
76
|
+
results = RUser.new({:results => 3})
|
77
|
+
|
78
|
+
The maximum number of results is 40, any number larger than that will default to 40. You can pass the `:gender` key along with results to return x number of male or female users:
|
79
|
+
|
80
|
+
results = RUser.new({ :results => 3, :gender => 'female' })
|
81
|
+
|
71
82
|
|
72
83
|
## Contributing & Development
|
73
84
|
|
data/lib/ruser/api.rb
CHANGED
data/lib/ruser/version.rb
CHANGED
data/spec/functional/api_spec.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
require 'ruser'
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
|
-
describe '
|
4
|
+
describe 'RUser' do
|
5
5
|
|
6
6
|
describe '.man' do
|
7
7
|
before do
|
8
|
-
@man = RUser
|
8
|
+
@man = RUser.new({ :gender => 'male' }).first
|
9
9
|
end
|
10
10
|
|
11
11
|
it 'should return a male user' do
|
@@ -15,7 +15,7 @@ describe 'Person' do
|
|
15
15
|
|
16
16
|
describe '.woman' do
|
17
17
|
before do
|
18
|
-
@woman = RUser
|
18
|
+
@woman = RUser.new({ :gender => 'female' }).first
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'should return a female user' do
|
@@ -25,7 +25,7 @@ describe 'Person' do
|
|
25
25
|
|
26
26
|
describe '.random' do
|
27
27
|
before do
|
28
|
-
@user = RUser
|
28
|
+
@user = RUser.new().first
|
29
29
|
end
|
30
30
|
|
31
31
|
it 'should return a gendered user' do
|
@@ -35,7 +35,7 @@ describe 'Person' do
|
|
35
35
|
|
36
36
|
describe '.seed' do
|
37
37
|
before do
|
38
|
-
@user = RUser
|
38
|
+
@user = RUser.new({ :seed => 'lazyWolf' }).first
|
39
39
|
end
|
40
40
|
|
41
41
|
it 'should have the first name alberto' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Kendall
|
@@ -65,7 +65,7 @@ files:
|
|
65
65
|
- lib/ruser/person.rb
|
66
66
|
- lib/ruser/version.rb
|
67
67
|
- spec/functional/api_spec.rb
|
68
|
-
- spec/functional/
|
68
|
+
- spec/functional/ruser_spec.rb
|
69
69
|
- spec/spec_helper.rb
|
70
70
|
homepage: http://github.com/simpleappgroup/ruser
|
71
71
|
licenses:
|
@@ -92,3 +92,4 @@ signing_key:
|
|
92
92
|
specification_version: 4
|
93
93
|
summary: Random User Generator API
|
94
94
|
test_files: []
|
95
|
+
has_rdoc:
|