sixarm_ruby_fab 1.0.0

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.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +1 -0
  3. data.tar.gz.sig +0 -0
  4. data/.gemtest +0 -0
  5. data/CONTRIBUTING.md +28 -0
  6. data/README.md +91 -0
  7. data/Rakefile +8 -0
  8. data/VERSION +1 -0
  9. data/lib/sixarm_ruby_fab.rb +40 -0
  10. data/lib/sixarm_ruby_fab/agent.rb +20 -0
  11. data/lib/sixarm_ruby_fab/basic.rb +26 -0
  12. data/lib/sixarm_ruby_fab/company.rb +21 -0
  13. data/lib/sixarm_ruby_fab/date.rb +45 -0
  14. data/lib/sixarm_ruby_fab/datetime.rb +44 -0
  15. data/lib/sixarm_ruby_fab/email.rb +12 -0
  16. data/lib/sixarm_ruby_fab/files.rb +113 -0
  17. data/lib/sixarm_ruby_fab/forgery/geo.rb +56 -0
  18. data/lib/sixarm_ruby_fab/forgery/uri.rb +12 -0
  19. data/lib/sixarm_ruby_fab/geo.rb +21 -0
  20. data/lib/sixarm_ruby_fab/id.rb +28 -0
  21. data/lib/sixarm_ruby_fab/internet.rb +12 -0
  22. data/lib/sixarm_ruby_fab/locale.rb +34 -0
  23. data/lib/sixarm_ruby_fab/mime.rb +29 -0
  24. data/lib/sixarm_ruby_fab/names.rb +30 -0
  25. data/lib/sixarm_ruby_fab/password.rb +16 -0
  26. data/lib/sixarm_ruby_fab/phone.rb +12 -0
  27. data/lib/sixarm_ruby_fab/postal.rb +39 -0
  28. data/lib/sixarm_ruby_fab/text.rb +58 -0
  29. data/lib/sixarm_ruby_fab/time.rb +44 -0
  30. data/lib/sixarm_ruby_fab/twitter.rb +119 -0
  31. data/lib/sixarm_ruby_fab/username.rb +16 -0
  32. data/lib/sixarm_ruby_fab/uuid.rb +27 -0
  33. data/test/sixarm_ruby_fab_test.rb +32 -0
  34. data/test/sixarm_ruby_fab_test/agent_test.rb +40 -0
  35. data/test/sixarm_ruby_fab_test/basic_test.rb +35 -0
  36. data/test/sixarm_ruby_fab_test/company_test.rb +34 -0
  37. data/test/sixarm_ruby_fab_test/date_test.rb +67 -0
  38. data/test/sixarm_ruby_fab_test/datetime_test.rb +66 -0
  39. data/test/sixarm_ruby_fab_test/email_test.rb +22 -0
  40. data/test/sixarm_ruby_fab_test/files_test.rb +106 -0
  41. data/test/sixarm_ruby_fab_test/forgery/geo_test.rb +0 -0
  42. data/test/sixarm_ruby_fab_test/forgery/uri_test.rb +0 -0
  43. data/test/sixarm_ruby_fab_test/geo_test.rb +34 -0
  44. data/test/sixarm_ruby_fab_test/id_test.rb +34 -0
  45. data/test/sixarm_ruby_fab_test/internet_test.rb +23 -0
  46. data/test/sixarm_ruby_fab_test/locale_test.rb +51 -0
  47. data/test/sixarm_ruby_fab_test/mime_test.rb +41 -0
  48. data/test/sixarm_ruby_fab_test/names_test.rb +47 -0
  49. data/test/sixarm_ruby_fab_test/password_test.rb +26 -0
  50. data/test/sixarm_ruby_fab_test/phone_test.rb +22 -0
  51. data/test/sixarm_ruby_fab_test/postal_test.rb +58 -0
  52. data/test/sixarm_ruby_fab_test/text_test.rb +58 -0
  53. data/test/sixarm_ruby_fab_test/time_test.rb +66 -0
  54. data/test/sixarm_ruby_fab_test/twitter_test.rb +98 -0
  55. data/test/sixarm_ruby_fab_test/username_test.rb +58 -0
  56. data/test/sixarm_ruby_fab_test/uuid_test.rb +34 -0
  57. metadata +159 -0
  58. metadata.gz.sig +3 -0
@@ -0,0 +1,98 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#twitter_screen_name" do
11
+
12
+ before do
13
+ @x = fab.twitter_screen_name
14
+ end
15
+
16
+ it "is a string" do
17
+ @x.must_be_kind_of String
18
+ end
19
+
20
+ it "is a short string of characters a-z" do
21
+ @x.must_match /\A[a-z]{2,15}\z/
22
+ end
23
+
24
+ end
25
+
26
+ describe "#twitter_user_id" do
27
+
28
+ before do
29
+ @x = fab.twitter_user_id
30
+ end
31
+
32
+ it "is an integer" do
33
+ @x.must_be_kind_of Fixnum
34
+ end
35
+
36
+ it "is a large number-- we choose 8 digits for our implmentation" do
37
+ (1000000...100000000).must_include @x
38
+ end
39
+
40
+ end
41
+
42
+ describe "#twitter_user_hash" do
43
+
44
+ before do
45
+ @hash = fab.twitter_user_hash
46
+ end
47
+
48
+ it "is a hash" do
49
+ @hash.must_be_kind_of Hash
50
+ end
51
+
52
+ it "contains a user id" do
53
+ (10000000...100000000).must_include @hash["id"]
54
+ end
55
+
56
+ it "contains a user id_str that is the id as a string" do
57
+ @hash["id_str"].must_equal @hash["id"].to_s
58
+ end
59
+
60
+ end
61
+
62
+ describe "#twitter_retweet_count" do
63
+
64
+ before do
65
+ @x = fab.twitter_retweet_count
66
+ end
67
+
68
+ it "is a count" do
69
+ @x.must_be_kind_of Fixnum
70
+ end
71
+
72
+ end
73
+
74
+ describe "#twitter_favorite_count" do
75
+
76
+ before do
77
+ @x = fab.twitter_favorite_count
78
+ end
79
+
80
+ it "is a count" do
81
+ @x.must_be_kind_of Fixnum
82
+ end
83
+
84
+ end
85
+
86
+ describe "#twitter_tweet_id" do
87
+
88
+ before do
89
+ @x = fab.twitter_tweet_id
90
+ end
91
+
92
+ it "is an id" do
93
+ @x.must_be_kind_of Fixnum
94
+ end
95
+
96
+ end
97
+
98
+ end
@@ -0,0 +1,58 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#username" do
11
+
12
+ describe "with defaults" do
13
+
14
+ before do
15
+ @x = fab.username
16
+ end
17
+
18
+ it "is a string" do
19
+ @x.must_be_kind_of String
20
+ end
21
+
22
+ it "is a short string of lowercase letters" do
23
+ @x.must_match /\A[a-z]{5,15}\z/
24
+ end
25
+
26
+ end
27
+
28
+ describe "with chars" do
29
+
30
+ before do
31
+ @chars = ['a','b']
32
+ @x = fab.username(chars: @chars)
33
+ end
34
+
35
+ it "uses the chars" do
36
+ @x.must_match /\A[ab]+\z/
37
+ end
38
+
39
+ end
40
+
41
+ describe "with size" do
42
+
43
+ before do
44
+ @size = 20
45
+ @x = fab.username(size: @size)
46
+ end
47
+
48
+ it "uses the size" do
49
+ @x.size.must_equal @size
50
+ end
51
+
52
+ end
53
+
54
+ end
55
+
56
+ end
57
+
58
+
@@ -0,0 +1,34 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#uuid" do
11
+
12
+ before do
13
+ @x = fab.uuid
14
+ end
15
+
16
+ it "is a string" do
17
+ @x.must_be_kind_of String
18
+ end
19
+
20
+ end
21
+
22
+ describe "#uuids" do
23
+
24
+ before do
25
+ @x = fab.uuids
26
+ end
27
+
28
+ it "is a list of String items" do
29
+ @x.each{|x| x.must_be_kind_of String}
30
+ end
31
+
32
+ end
33
+
34
+ end
metadata ADDED
@@ -0,0 +1,159 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sixarm_ruby_fab
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - SixArm
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDBDCCAm2gAwIBAgIJAKPwEETU5bHoMA0GCSqGSIb3DQEBBQUAMGAxCzAJBgNV
14
+ BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp
15
+ c2NvMQ8wDQYDVQQKEwZTaXhBcm0xEzARBgNVBAMTCnNpeGFybS5jb20wHhcNMTAx
16
+ MjEzMjMyNzEzWhcNMTMwOTA4MjMyNzEzWjBgMQswCQYDVQQGEwJVUzETMBEGA1UE
17
+ CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEPMA0GA1UEChMG
18
+ U2l4QXJtMRMwEQYDVQQDEwpzaXhhcm0uY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GN
19
+ ADCBiQKBgQC94mD9JDwBsunsOI0VR3CXXbOWg9cWaWciwFyJNFiM7A9I8KPLfXUw
20
+ QC4czUe5ZuG4WHvinrWhkrCK+1dWBqoEClxdF/FoKO5a+tonGCjjmfy81JmFjjyx
21
+ eTsjsHyvw+Qik9kpf9aj6+pnkNrVswgNHVea2o9yabbEiS6VSeJWoQIDAQABo4HF
22
+ MIHCMB0GA1UdDgQWBBQzPJtqmSgc53eDN7aSzDQwr9TALDCBkgYDVR0jBIGKMIGH
23
+ gBQzPJtqmSgc53eDN7aSzDQwr9TALKFkpGIwYDELMAkGA1UEBhMCVVMxEzARBgNV
24
+ BAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xDzANBgNVBAoT
25
+ BlNpeEFybTETMBEGA1UEAxMKc2l4YXJtLmNvbYIJAKPwEETU5bHoMAwGA1UdEwQF
26
+ MAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAooEexP/oPam1TP71SyuhxMb+uTrZbSQe
27
+ jVB+ExRwWadGwaNPUA56d39qwavwP+iu+3JpeonNMVvbWXF5naCX/dNFIeREHzER
28
+ ZDRQYMqru9TEMna6HD9zpcstF7vwThGovlOQ+3Y6plQ4nMzipXcZ9THqs65PIL0q
29
+ eabwpCbAopo=
30
+ -----END CERTIFICATE-----
31
+ date: 2013-07-31 00:00:00.000000000 Z
32
+ dependencies:
33
+ - !ruby/object:Gem::Dependency
34
+ name: forgery
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - '>='
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ description: Generate sample names, places, agents, tweets, etc.
48
+ email: sixarm@sixarm.com
49
+ executables: []
50
+ extensions: []
51
+ extra_rdoc_files: []
52
+ files:
53
+ - .gemtest
54
+ - CONTRIBUTING.md
55
+ - Rakefile
56
+ - README.md
57
+ - VERSION
58
+ - lib/sixarm_ruby_fab.rb
59
+ - lib/sixarm_ruby_fab/agent.rb
60
+ - lib/sixarm_ruby_fab/basic.rb
61
+ - lib/sixarm_ruby_fab/company.rb
62
+ - lib/sixarm_ruby_fab/date.rb
63
+ - lib/sixarm_ruby_fab/datetime.rb
64
+ - lib/sixarm_ruby_fab/email.rb
65
+ - lib/sixarm_ruby_fab/files.rb
66
+ - lib/sixarm_ruby_fab/geo.rb
67
+ - lib/sixarm_ruby_fab/id.rb
68
+ - lib/sixarm_ruby_fab/internet.rb
69
+ - lib/sixarm_ruby_fab/locale.rb
70
+ - lib/sixarm_ruby_fab/mime.rb
71
+ - lib/sixarm_ruby_fab/names.rb
72
+ - lib/sixarm_ruby_fab/password.rb
73
+ - lib/sixarm_ruby_fab/phone.rb
74
+ - lib/sixarm_ruby_fab/postal.rb
75
+ - lib/sixarm_ruby_fab/text.rb
76
+ - lib/sixarm_ruby_fab/time.rb
77
+ - lib/sixarm_ruby_fab/twitter.rb
78
+ - lib/sixarm_ruby_fab/username.rb
79
+ - lib/sixarm_ruby_fab/uuid.rb
80
+ - lib/sixarm_ruby_fab/forgery/geo.rb
81
+ - lib/sixarm_ruby_fab/forgery/uri.rb
82
+ - test/sixarm_ruby_fab_test.rb
83
+ - test/sixarm_ruby_fab_test/agent_test.rb
84
+ - test/sixarm_ruby_fab_test/basic_test.rb
85
+ - test/sixarm_ruby_fab_test/company_test.rb
86
+ - test/sixarm_ruby_fab_test/date_test.rb
87
+ - test/sixarm_ruby_fab_test/datetime_test.rb
88
+ - test/sixarm_ruby_fab_test/email_test.rb
89
+ - test/sixarm_ruby_fab_test/files_test.rb
90
+ - test/sixarm_ruby_fab_test/geo_test.rb
91
+ - test/sixarm_ruby_fab_test/id_test.rb
92
+ - test/sixarm_ruby_fab_test/internet_test.rb
93
+ - test/sixarm_ruby_fab_test/locale_test.rb
94
+ - test/sixarm_ruby_fab_test/mime_test.rb
95
+ - test/sixarm_ruby_fab_test/names_test.rb
96
+ - test/sixarm_ruby_fab_test/password_test.rb
97
+ - test/sixarm_ruby_fab_test/phone_test.rb
98
+ - test/sixarm_ruby_fab_test/postal_test.rb
99
+ - test/sixarm_ruby_fab_test/text_test.rb
100
+ - test/sixarm_ruby_fab_test/time_test.rb
101
+ - test/sixarm_ruby_fab_test/twitter_test.rb
102
+ - test/sixarm_ruby_fab_test/username_test.rb
103
+ - test/sixarm_ruby_fab_test/uuid_test.rb
104
+ - test/sixarm_ruby_fab_test/forgery/geo_test.rb
105
+ - test/sixarm_ruby_fab_test/forgery/uri_test.rb
106
+ homepage: http://sixarm.com/
107
+ licenses:
108
+ - BSD
109
+ - GPL
110
+ - MIT
111
+ - PAL
112
+ - Various
113
+ metadata: {}
114
+ post_install_message:
115
+ rdoc_options: []
116
+ require_paths:
117
+ - lib
118
+ required_ruby_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - '>='
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ required_rubygems_version: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - '>='
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ requirements: []
129
+ rubyforge_project:
130
+ rubygems_version: 2.0.3
131
+ signing_key:
132
+ specification_version: 4
133
+ summary: SixArm.com » Ruby » Fab gem to fabricate sample data for testing
134
+ test_files:
135
+ - test/sixarm_ruby_fab_test.rb
136
+ - test/sixarm_ruby_fab_test/agent_test.rb
137
+ - test/sixarm_ruby_fab_test/basic_test.rb
138
+ - test/sixarm_ruby_fab_test/company_test.rb
139
+ - test/sixarm_ruby_fab_test/date_test.rb
140
+ - test/sixarm_ruby_fab_test/datetime_test.rb
141
+ - test/sixarm_ruby_fab_test/email_test.rb
142
+ - test/sixarm_ruby_fab_test/files_test.rb
143
+ - test/sixarm_ruby_fab_test/geo_test.rb
144
+ - test/sixarm_ruby_fab_test/id_test.rb
145
+ - test/sixarm_ruby_fab_test/internet_test.rb
146
+ - test/sixarm_ruby_fab_test/locale_test.rb
147
+ - test/sixarm_ruby_fab_test/mime_test.rb
148
+ - test/sixarm_ruby_fab_test/names_test.rb
149
+ - test/sixarm_ruby_fab_test/password_test.rb
150
+ - test/sixarm_ruby_fab_test/phone_test.rb
151
+ - test/sixarm_ruby_fab_test/postal_test.rb
152
+ - test/sixarm_ruby_fab_test/text_test.rb
153
+ - test/sixarm_ruby_fab_test/time_test.rb
154
+ - test/sixarm_ruby_fab_test/twitter_test.rb
155
+ - test/sixarm_ruby_fab_test/username_test.rb
156
+ - test/sixarm_ruby_fab_test/uuid_test.rb
157
+ - test/sixarm_ruby_fab_test/forgery/geo_test.rb
158
+ - test/sixarm_ruby_fab_test/forgery/uri_test.rb
159
+ has_rdoc: true
@@ -0,0 +1,3 @@
1
+ Q!s�k��ym����_��вֳ-�
2
+
3
+ � _��ԕ�՗�|�ڜTo��n,�x42 Ԙ;0E�˕�>m���f�����L��n�i�6�?�r��^�U��+�]L�e��wò�$�!JO`��