SykGenData 0.1.3 → 0.1.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
  SHA256:
3
- metadata.gz: ac2d9e6aae5ddc73a010e225b8c61624559e3eae0337e27b92e9f2bb632f05e8
4
- data.tar.gz: ed1c384b3f9d94f57b8eb6471995f8b11c4daf821d32c26112a4a4b8a75488bb
3
+ metadata.gz: 207508a794e56e164be63e7de6c91782807f16eba08738992907e13a230aff58
4
+ data.tar.gz: b8f24bd5cc69a20531cb2ff99bea29676fc06572c2a04bcf611b558ffc926133
5
5
  SHA512:
6
- metadata.gz: 2eac52518d5d962fbee34a07e78fd3369b17f2ad846b8fe883f88b9f02f16ebfee2b8f79ddb3230a88eff3d337d2f41247f0846e580f26086089c9c38e4a9679
7
- data.tar.gz: ca7adbb8fcb4aa43e018bdd54c7d777889da8a1c22f43c957f94907bd162fac4e207a10f0d5d9b46e6f8b43c0b1e514949732b6052f9d234156cf6983af2f92c
6
+ metadata.gz: 6048f3bc4df5218fa4c600325435dc4e134f267f0d61bbefc154a20e126c05666b344e08da6f21b791819db0765306eb00b31b8bac9ffc2c61af64902feacc1e
7
+ data.tar.gz: 6ba77dcd863cf155ac691aa0b40e8d808ed80ea07c62fd7ccdff13f5915a8ad46112ff43459bccf2a3d7c7679369eba7ea1a29efb9e043b73cd67284006f5f63
data/README.md CHANGED
@@ -4,7 +4,7 @@ This project was to make a ruby gem which came with a library of useful data gen
4
4
 
5
5
  These generators could be added to later as I find the need for different types of data. Making these generators into a gem means that I can easily include and use my generators in new projects without much hassle of copying files, making require statements etc.
6
6
 
7
- The generators themselves come in a SOM model with a super module handing out appropriate generator services.
7
+ The generators themselves come in a SOM model with a super module handing out appropriate generator services.
8
8
 
9
9
  ## Installation
10
10
 
@@ -36,12 +36,14 @@ to your Generator Super class if you have one or to any class you'd like to gene
36
36
 
37
37
  Eg.
38
38
  ```ruby
39
- class DummyClass
39
+ require 'SykGenData'
40
+ ...
41
+ class Dummy
40
42
  include SykGenData
41
43
  end
42
-
43
- Foo = Dummy.new
44
- Foo.form.get_username
44
+ ...
45
+ dummy = Dummy.new
46
+ dummy.form.get_username
45
47
  ```
46
48
 
47
49
  ## Methods
@@ -50,15 +52,18 @@ form
50
52
  ```
51
53
  to call the GenFormData class used to generate data for filling in online registration forms.
52
54
  ```ruby
53
- form.get_country # returns a country
54
- form.get_first_name # returns a first name
55
- form.get_last_name # returns a last name
56
- form.get_username # returns a dbz inspired username
57
- form.get_email # returns a random email
58
- form.get_password # returns a string with upper and lower case as well as special characters and numbers
59
- form.get_dob # returns a date of birth as an array of 3 values
60
- form.get_phone_number # returns a phone number starting 07
61
- form.get_about_me # returns a quote for an about me section
55
+ form.get_country # returns a country
56
+ form.get_fake_location # returns a fictional location
57
+ form.get_first_name # returns a first name
58
+ form.get_last_name # returns a last name
59
+ form.get_username # returns a username
60
+ form.get_email # returns a random email
61
+ form.get_password # returns a string with upper and lower case as well as special characters and numbers
62
+ form.get_dob # returns a date of birth as an array of 3 values
63
+ form.get_visa_cc_number # returns a random fake VISA credit card number
64
+ form.get_visa_sec_code # returns a random fake VISA security code
65
+ form.get_phone_number # returns a phone number starting 07
66
+ form.get_about_me # returns a quote for an about me section
62
67
  ```
63
68
  --------
64
69
  ```ruby
@@ -79,7 +84,7 @@ The generators are all tested using rspec, you can run the tests from the projec
79
84
 
80
85
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
81
86
 
82
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
87
+ To install this gem onto your local machine, run `bundle exec rake install`.
83
88
 
84
89
  ## Contributing
85
90
 
@@ -88,7 +93,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/Sykand
88
93
  ## License
89
94
 
90
95
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
91
-
92
- ## Code of Conduct
93
-
94
- Everyone interacting in the SykGenData project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/SykGenData/blob/master/CODE_OF_CONDUCT.md).
@@ -27,6 +27,22 @@ class GenFormData
27
27
  Date.birthday(min_years_old, max_years_old).to_s.split('-').map {|x| x.to_i}
28
28
  end
29
29
 
30
+ def get_visa_cc_number
31
+ cc_number = '4917 3000 0000 '
32
+ while cc_number.length <= 16
33
+ cc_number += rand(0..9).to_s
34
+ end
35
+ cc_number
36
+ end
37
+
38
+ def get_visa_sec_code
39
+ sec_code = ''
40
+ while sec_code.length <= 3
41
+ sec_code += rand(0..9).to_s
42
+ end
43
+ sec_code
44
+ end
45
+
30
46
  def get_marital_status
31
47
  case Random.new.rand(0..2)
32
48
  when 0
@@ -1,3 +1,3 @@
1
1
  module SykGenData
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SykGenData
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sykander
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-17 00:00:00.000000000 Z
11
+ date: 2018-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -146,7 +146,6 @@ files:
146
146
  - ".gitignore"
147
147
  - ".rspec"
148
148
  - ".travis.yml"
149
- - CODE_OF_CONDUCT.md
150
149
  - Gemfile
151
150
  - Gemfile.lock
152
151
  - LICENSE.txt
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at sgul@spartaglobal.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/