industrial_girl 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +19 -0
- data/.travis.yml +7 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +44 -0
- data/Rakefile +1 -0
- data/bin/industrial_girl +23 -0
- data/cert_file +4665 -0
- data/industrial_girl.gemspec +27 -0
- data/lib/database.rb +25 -0
- data/lib/generator.rb +82 -0
- data/lib/industrial_girl/version.rb +3 -0
- data/lib/industrial_girl.rb +11 -0
- data/lib/library.rb +43 -0
- data/lib/root.rb +24 -0
- data/spec/database.spec +40 -0
- data/spec/database.yml +42 -0
- data/spec/factories.rb +3 -0
- data/spec/library_spec.rb +76 -0
- data/spec/root_spec.rb +52 -0
- data/spec/spec_helper.rb +6 -0
- metadata +155 -0
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 TODO: Write your name
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# IndustrialGirl
|
2
|
+
|
3
|
+
[![Build Status](https://secure.travis-ci.org/danbickford007/industrial_girl.png)](http://travis-ci.org/danbickford007/industrial_girl?branch=master)
|
4
|
+
|
5
|
+
Industrial Girl generates factories for Factory Girl using Faker. You are able to generate your
|
6
|
+
factories in a single file or in multiple files.
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
gem 'industrial_girl'
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install industrial_girl
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
cd to rails root
|
25
|
+
|
26
|
+
get usage
|
27
|
+
industrial_girl
|
28
|
+
create multiple factory files within spec/factories directory
|
29
|
+
industrial_girl g or industrial_girl generate
|
30
|
+
create a single factory file with spec
|
31
|
+
industrial_girl g single
|
32
|
+
if you already have factories, but want industrial_girl to overwrite them and make new factories(you can still pass the single argument if needed)
|
33
|
+
industrial_girl g force
|
34
|
+
|
35
|
+
within your rails app Gemfile, you may need to set the following,
|
36
|
+
gem "factory_girl_rails", :require=>false
|
37
|
+
|
38
|
+
## Contributing
|
39
|
+
|
40
|
+
1. Fork it
|
41
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
42
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
43
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
44
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/industrial_girl
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
$LOAD_PATH << File.expand_path('../../lib', __FILE__)
|
3
|
+
|
4
|
+
require 'industrial_girl'
|
5
|
+
|
6
|
+
single = false
|
7
|
+
force = false
|
8
|
+
ARGV.each do |arg|
|
9
|
+
single = true if arg == 'single'
|
10
|
+
force = true if arg == 'force'
|
11
|
+
end
|
12
|
+
|
13
|
+
if (ARGV.first == 'generate' or ARGV.first == 'g')
|
14
|
+
Root.new(single, force)
|
15
|
+
else
|
16
|
+
puts 'USAGE:'
|
17
|
+
puts 'industrial_girl g'
|
18
|
+
puts ' creates all factories within spec/factories'
|
19
|
+
puts 'industrial_girl g single'
|
20
|
+
puts ' creates single file with all factories in spec/factories.rb'
|
21
|
+
puts 'industrial_girl g force'
|
22
|
+
puts ' overwrites any factories already generated'
|
23
|
+
end
|