industrial_girl 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,19 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.swo
19
+ *.swp
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - "1.9.2"
4
+ - "1.9.3"
5
+ - "2.0.0"
6
+
7
+ script: rspec spec
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in industrial_girl.gemspec
4
+ gemspec
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"
@@ -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