fabrication 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +14 -0
- data/README.markdown +7 -1
- data/Rakefile +19 -0
- data/lib/fabrication.rb +11 -0
- data/lib/fabrication/config.rb +1 -1
- data/lib/fabrication/{cucumber.rb → cucumber/step_fabricator.rb} +2 -7
- data/lib/fabrication/fabricator.rb +6 -1
- data/lib/fabrication/support.rb +1 -1
- data/lib/fabrication/syntax/make.rb +26 -0
- data/lib/fabrication/transform.rb +26 -0
- data/lib/fabrication/version.rb +1 -1
- data/lib/rails/generators/fabrication/cucumber_steps/templates/fabrication_steps.rb +0 -2
- data/lib/rails/generators/fabrication/turnip_steps/templates/fabrication_steps.rb +57 -0
- data/lib/rails/generators/fabrication/turnip_steps/turnip_steps_generator.rb +21 -0
- metadata +156 -135
- data/spec/fabrication/attribute_spec.rb +0 -53
- data/spec/fabrication/config_spec.rb +0 -32
- data/spec/fabrication/cucumber_spec.rb +0 -116
- data/spec/fabrication/fabricator_spec.rb +0 -67
- data/spec/fabrication/generator/active_record_spec.rb +0 -83
- data/spec/fabrication/generator/base_spec.rb +0 -108
- data/spec/fabrication/schematic_spec.rb +0 -199
- data/spec/fabrication/sequencer_spec.rb +0 -98
- data/spec/fabrication/support_spec.rb +0 -54
- data/spec/fabrication_spec.rb +0 -329
- data/spec/fabricators/active_record_fabricator.rb +0 -21
- data/spec/fabricators/cool_object_fabricator.rb +0 -1
- data/spec/fabricators/mongoid_fabricator.rb +0 -36
- data/spec/fabricators/plain_old_ruby_object_fabricator.rb +0 -51
- data/spec/fabricators/sequel_fabricator.rb +0 -15
- data/spec/fabricators/sequencer_fabricator.rb +0 -9
- data/spec/spec_helper.rb +0 -12
- data/spec/support/active_record.rb +0 -65
- data/spec/support/mongoid.rb +0 -74
- data/spec/support/plain_old_ruby_objects.rb +0 -68
- data/spec/support/sequel.rb +0 -22
- data/spec/support/sequel_migrations/001_create_tables.rb +0 -23
data/LICENSE
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
2
|
+
Version 2, December 2004
|
3
|
+
|
4
|
+
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
5
|
+
|
6
|
+
Everyone is permitted to copy and distribute verbatim or modified
|
7
|
+
copies of this license document, and changing it is allowed as long
|
8
|
+
as the name is changed.
|
9
|
+
|
10
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
11
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
12
|
+
|
13
|
+
0. You just DO WHAT THE FUCK YOU WANT TO.
|
14
|
+
|
data/README.markdown
CHANGED
@@ -6,8 +6,14 @@ Fabrication is an object generation framework for Ruby.
|
|
6
6
|
|
7
7
|
## Compatibility
|
8
8
|
|
9
|
-
Fabrication is
|
9
|
+
Fabrication is tested against Ruby 1.9.2, 1.9.3, and Rubinius.
|
10
|
+
|
11
|
+
[![Build Status](https://secure.travis-ci.org/paulelliott/fabrication.png)](http://travis-ci.org/paulelliott/fabrication)
|
10
12
|
|
11
13
|
## Documentation
|
12
14
|
|
13
15
|
Please see the Fabrication website for up-to-date documentation: http://fabricationgem.org
|
16
|
+
|
17
|
+
You can also view the raw documentation without all the awesome: https://github.com/paulelliott/fabrication-site/blob/master/views/_content.markdown
|
18
|
+
|
19
|
+
Get help from the mailing list: https://groups.google.com/group/fabricationgem
|
data/Rakefile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
|
3
|
+
Bundler.require(:default, :development)
|
4
|
+
|
5
|
+
require "rspec/core/rake_task"
|
6
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
7
|
+
spec.pattern = "spec/**/*_spec.rb"
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'cucumber/rake/task'
|
11
|
+
Cucumber::Rake::Task.new(:cucumber) do |t|
|
12
|
+
t.cucumber_opts = "--format Cucumber::Formatter::Fuubar --tags ~@wip"
|
13
|
+
end
|
14
|
+
|
15
|
+
RSpec::Core::RakeTask.new(:turnip) do |spec|
|
16
|
+
spec.pattern = "turnip/**/*.feature"
|
17
|
+
end
|
18
|
+
|
19
|
+
task :default => [:spec, :cucumber, :turnip]
|
data/lib/fabrication.rb
CHANGED
@@ -10,6 +10,11 @@ module Fabrication
|
|
10
10
|
autoload :Sequencer, 'fabrication/sequencer'
|
11
11
|
autoload :Schematic, 'fabrication/schematic'
|
12
12
|
autoload :Support, 'fabrication/support'
|
13
|
+
autoload :Transform, 'fabrication/transform'
|
14
|
+
|
15
|
+
module Cucumber
|
16
|
+
autoload :StepFabricator, 'fabrication/cucumber/step_fabricator'
|
17
|
+
end
|
13
18
|
|
14
19
|
module Generator
|
15
20
|
autoload :ActiveRecord, 'fabrication/generator/active_record'
|
@@ -58,3 +63,9 @@ class Fabricate
|
|
58
63
|
end
|
59
64
|
|
60
65
|
end
|
66
|
+
|
67
|
+
module FabricationMethods
|
68
|
+
def fabrications
|
69
|
+
Fabrication::Cucumber::Fabrications
|
70
|
+
end
|
71
|
+
end
|
data/lib/fabrication/config.rb
CHANGED
@@ -12,7 +12,8 @@ module Fabrication
|
|
12
12
|
def from_table(table, extra={})
|
13
13
|
hashes = singular? ? [table.rows_hash] : table.hashes
|
14
14
|
hashes.map do |hash|
|
15
|
-
|
15
|
+
transformed_hash = Fabrication::Transform.apply(parameterize_hash(hash))
|
16
|
+
make(transformed_hash.merge(extra))
|
16
17
|
end.tap {|o| remember(o) }
|
17
18
|
end
|
18
19
|
|
@@ -96,9 +97,3 @@ module Fabrication
|
|
96
97
|
end
|
97
98
|
end
|
98
99
|
end
|
99
|
-
|
100
|
-
module FabricationMethods
|
101
|
-
def fabrications
|
102
|
-
Fabrication::Cucumber::Fabrications
|
103
|
-
end
|
104
|
-
end
|
@@ -4,7 +4,12 @@ class Fabrication::Fabricator
|
|
4
4
|
|
5
5
|
def define(name, options={}, &block)
|
6
6
|
raise Fabrication::DuplicateFabricatorError, "'#{name}' is already defined" if schematics.include?(name)
|
7
|
-
|
7
|
+
aliases = Array(options.delete(:aliases))
|
8
|
+
schematic = schematics[name] = schematic_for(name, options, &block)
|
9
|
+
Array(aliases).each do |as|
|
10
|
+
schematics[as.to_sym] = schematic
|
11
|
+
end
|
12
|
+
schematic
|
8
13
|
end
|
9
14
|
|
10
15
|
def generate(name, options={}, overrides={}, &block)
|
data/lib/fabrication/support.rb
CHANGED
@@ -25,7 +25,7 @@ class Fabrication::Support
|
|
25
25
|
def find_definitions
|
26
26
|
path_prefix = defined?(Rails) ? Rails.root : "."
|
27
27
|
Fabrication::Config.fabricator_dir.each do |folder|
|
28
|
-
Dir.glob(File.join(path_prefix, folder, '**', '
|
28
|
+
Dir.glob(File.join(path_prefix, folder, '**', '*.rb')).sort.each do |file|
|
29
29
|
load file
|
30
30
|
end
|
31
31
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Fabrication
|
2
|
+
module Syntax
|
3
|
+
|
4
|
+
# Extends Fabrication to provide make/make! class methods, which are
|
5
|
+
# shortcuts for Fabricate.build/Fabricate.
|
6
|
+
#
|
7
|
+
# Usage:
|
8
|
+
#
|
9
|
+
# require 'fabrication/syntax/make'
|
10
|
+
#
|
11
|
+
# User.make(:name => 'Johnny')
|
12
|
+
#
|
13
|
+
#
|
14
|
+
module Make
|
15
|
+
def make(overrides = {}, &block)
|
16
|
+
Fabricate.build(name.underscore.to_sym, overrides, &block)
|
17
|
+
end
|
18
|
+
|
19
|
+
def make!(overrides = {}, &block)
|
20
|
+
Fabricate(name.underscore.to_sym, overrides, &block)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
Object.extend Fabrication::Syntax::Make
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class Fabrication::Transform
|
2
|
+
|
3
|
+
class << self
|
4
|
+
|
5
|
+
def apply(attributes_hash)
|
6
|
+
Fabrication::Support.find_definitions if transforms.empty?
|
7
|
+
attributes_hash.inject({}) {|h,(k,v)| h.update(k => transforms[k].call(v)) }
|
8
|
+
end
|
9
|
+
|
10
|
+
def clear_all
|
11
|
+
@transforms = nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def define(attribute, transform)
|
15
|
+
transforms[attribute] = transform
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def transforms
|
21
|
+
@transforms ||= Hash.new(lambda {|value| value})
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
data/lib/fabrication/version.rb
CHANGED
@@ -0,0 +1,57 @@
|
|
1
|
+
placeholder :fabrication_count do
|
2
|
+
match /\d+/ do |count|
|
3
|
+
count.to_i
|
4
|
+
end
|
5
|
+
match /a/ do
|
6
|
+
1
|
7
|
+
end
|
8
|
+
match /no/ do
|
9
|
+
0
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
steps_for :global do
|
14
|
+
def with_ivars(fabricator)
|
15
|
+
@they = yield fabricator
|
16
|
+
instance_variable_set("@#{fabricator.model}", @they)
|
17
|
+
end
|
18
|
+
|
19
|
+
step ':fabrication_count :model_name' do |count, model_name|
|
20
|
+
with_ivars Fabrication::Cucumber::StepFabricator.new(model_name) do |fab|
|
21
|
+
fab.n(count)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
step 'the following :model_name:' do |model_name, table|
|
26
|
+
with_ivars Fabrication::Cucumber::StepFabricator.new(model_name) do |fab|
|
27
|
+
fab.from_table(table)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
step 'that :parent has the following :child:' do |parent, child, table|
|
32
|
+
with_ivars Fabrication::Cucumber::StepFabricator.new(child, :parent => parent) do |fab|
|
33
|
+
fab.from_table(table)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
step 'that :parent has :fabrication_count :child' do |parent, count, child|
|
38
|
+
with_ivars Fabrication::Cucumber::StepFabricator.new(child, :parent => parent) do |fab|
|
39
|
+
fab.n(count)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
step 'that/those :children belong/belongs to that :parent' do |children, parent|
|
44
|
+
with_ivars Fabrication::Cucumber::StepFabricator.new(parent) do |fab|
|
45
|
+
fab.has_many(children)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
step 'I should see :fabrication_count :model_name in the database' do |count, model_name|
|
50
|
+
Fabrication::Cucumber::StepFabricator.new(model_name).klass.count.should == count
|
51
|
+
end
|
52
|
+
|
53
|
+
step 'I should see the following :model_name in the database:' do |model_name, table|
|
54
|
+
klass = Fabrication::Cucumber::StepFabricator.new(model_name).klass
|
55
|
+
klass.where(table.rows_hash).count.should == 1
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'rails/generators/base'
|
2
|
+
|
3
|
+
module Fabrication::Generators
|
4
|
+
class TurnipStepsGenerator < Rails::Generators::Base
|
5
|
+
argument :step_dir, :type => :string, :default => "spec/acceptance/steps/"
|
6
|
+
|
7
|
+
def generate
|
8
|
+
template 'fabrication_steps.rb', turnip_step_directory
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.source_root
|
12
|
+
@_fabrication_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def turnip_step_directory
|
18
|
+
File.join(step_dir, 'fabrication_steps.rb')
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,151 +1,192 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: fabrication
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.3.0
|
4
5
|
prerelease:
|
5
|
-
version: 1.2.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Paul Elliott
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-02-12 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: activerecord
|
16
|
+
requirement: &70179799272900 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
17
23
|
prerelease: false
|
18
|
-
|
24
|
+
version_requirements: *70179799272900
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: bson
|
27
|
+
requirement: &70179799272220 !ruby/object:Gem::Requirement
|
19
28
|
none: false
|
20
|
-
requirements:
|
29
|
+
requirements:
|
21
30
|
- - ~>
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 3.
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.3.1
|
24
33
|
type: :development
|
25
|
-
version_requirements: *id001
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: bson_ext
|
28
34
|
prerelease: false
|
29
|
-
|
35
|
+
version_requirements: *70179799272220
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: bson_ext
|
38
|
+
requirement: &70179799191440 !ruby/object:Gem::Requirement
|
30
39
|
none: false
|
31
|
-
requirements:
|
40
|
+
requirements:
|
32
41
|
- - ~>
|
33
|
-
- !ruby/object:Gem::Version
|
42
|
+
- !ruby/object:Gem::Version
|
34
43
|
version: 1.3.1
|
35
44
|
type: :development
|
36
|
-
|
37
|
-
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70179799191440
|
47
|
+
- !ruby/object:Gem::Dependency
|
38
48
|
name: cucumber
|
49
|
+
requirement: &70179799190480 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
39
56
|
prerelease: false
|
40
|
-
|
57
|
+
version_requirements: *70179799190480
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: turnip
|
60
|
+
requirement: &70179799189220 !ruby/object:Gem::Requirement
|
41
61
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version:
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0.3'
|
46
66
|
type: :development
|
47
|
-
version_requirements: *id003
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: ffaker
|
50
67
|
prerelease: false
|
51
|
-
|
68
|
+
version_requirements: *70179799189220
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: ffaker
|
71
|
+
requirement: &70179799188280 !ruby/object:Gem::Requirement
|
52
72
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version:
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
57
77
|
type: :development
|
58
|
-
version_requirements: *id004
|
59
|
-
- !ruby/object:Gem::Dependency
|
60
|
-
name: fuubar
|
61
78
|
prerelease: false
|
62
|
-
|
79
|
+
version_requirements: *70179799188280
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: fuubar
|
82
|
+
requirement: &70179799187180 !ruby/object:Gem::Requirement
|
63
83
|
none: false
|
64
|
-
requirements:
|
65
|
-
- -
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version:
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
68
88
|
type: :development
|
69
|
-
|
70
|
-
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *70179799187180
|
91
|
+
- !ruby/object:Gem::Dependency
|
71
92
|
name: fuubar-cucumber
|
93
|
+
requirement: &70179799185860 !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
type: :development
|
72
100
|
prerelease: false
|
73
|
-
|
101
|
+
version_requirements: *70179799185860
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: mongo
|
104
|
+
requirement: &70179799184700 !ruby/object:Gem::Requirement
|
74
105
|
none: false
|
75
|
-
requirements:
|
76
|
-
- -
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version:
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 1.3.1
|
79
110
|
type: :development
|
80
|
-
|
81
|
-
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: *70179799184700
|
113
|
+
- !ruby/object:Gem::Dependency
|
82
114
|
name: mongoid
|
115
|
+
requirement: &70179799199560 !ruby/object:Gem::Requirement
|
116
|
+
none: false
|
117
|
+
requirements:
|
118
|
+
- - =
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: 2.1.4
|
121
|
+
type: :development
|
83
122
|
prerelease: false
|
84
|
-
|
123
|
+
version_requirements: *70179799199560
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: pry
|
126
|
+
requirement: &70179799198060 !ruby/object:Gem::Requirement
|
85
127
|
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version:
|
128
|
+
requirements:
|
129
|
+
- - ! '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
90
132
|
type: :development
|
91
|
-
version_requirements: *id007
|
92
|
-
- !ruby/object:Gem::Dependency
|
93
|
-
name: rake
|
94
133
|
prerelease: false
|
95
|
-
|
134
|
+
version_requirements: *70179799198060
|
135
|
+
- !ruby/object:Gem::Dependency
|
136
|
+
name: rake
|
137
|
+
requirement: &70179799196940 !ruby/object:Gem::Requirement
|
96
138
|
none: false
|
97
|
-
requirements:
|
98
|
-
- -
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version:
|
139
|
+
requirements:
|
140
|
+
- - ! '>='
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
101
143
|
type: :development
|
102
|
-
version_requirements: *id008
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: rspec
|
105
144
|
prerelease: false
|
106
|
-
|
145
|
+
version_requirements: *70179799196940
|
146
|
+
- !ruby/object:Gem::Dependency
|
147
|
+
name: rspec
|
148
|
+
requirement: &70179799196040 !ruby/object:Gem::Requirement
|
107
149
|
none: false
|
108
|
-
requirements:
|
109
|
-
- -
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version:
|
150
|
+
requirements:
|
151
|
+
- - ! '>='
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
112
154
|
type: :development
|
113
|
-
version_requirements: *id009
|
114
|
-
- !ruby/object:Gem::Dependency
|
115
|
-
name: sequel
|
116
155
|
prerelease: false
|
117
|
-
|
156
|
+
version_requirements: *70179799196040
|
157
|
+
- !ruby/object:Gem::Dependency
|
158
|
+
name: sequel
|
159
|
+
requirement: &70179799195000 !ruby/object:Gem::Requirement
|
118
160
|
none: false
|
119
|
-
requirements:
|
120
|
-
- -
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version:
|
161
|
+
requirements:
|
162
|
+
- - ! '>='
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
123
165
|
type: :development
|
124
|
-
version_requirements: *id010
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: sqlite3-ruby
|
127
166
|
prerelease: false
|
128
|
-
|
167
|
+
version_requirements: *70179799195000
|
168
|
+
- !ruby/object:Gem::Dependency
|
169
|
+
name: sqlite3
|
170
|
+
requirement: &70179799194100 !ruby/object:Gem::Requirement
|
129
171
|
none: false
|
130
|
-
requirements:
|
131
|
-
- -
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
version:
|
172
|
+
requirements:
|
173
|
+
- - ! '>='
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
version: '0'
|
134
176
|
type: :development
|
135
|
-
|
136
|
-
|
137
|
-
|
177
|
+
prerelease: false
|
178
|
+
version_requirements: *70179799194100
|
179
|
+
description: Fabrication is an object generation framework for ActiveRecord, Mongoid,
|
180
|
+
and Sequel. It has a sensible syntax and lazily generates ActiveRecord associations!
|
181
|
+
email:
|
138
182
|
- paul@hashrocket.com
|
139
183
|
executables: []
|
140
|
-
|
141
184
|
extensions: []
|
142
|
-
|
143
185
|
extra_rdoc_files: []
|
144
|
-
|
145
|
-
files:
|
186
|
+
files:
|
146
187
|
- lib/fabrication/attribute.rb
|
147
188
|
- lib/fabrication/config.rb
|
148
|
-
- lib/fabrication/cucumber.rb
|
189
|
+
- lib/fabrication/cucumber/step_fabricator.rb
|
149
190
|
- lib/fabrication/errors/duplicate_fabricator_error.rb
|
150
191
|
- lib/fabrication/errors/unfabricatable_error.rb
|
151
192
|
- lib/fabrication/errors/unknown_fabricator_error.rb
|
@@ -157,61 +198,41 @@ files:
|
|
157
198
|
- lib/fabrication/schematic.rb
|
158
199
|
- lib/fabrication/sequencer.rb
|
159
200
|
- lib/fabrication/support.rb
|
201
|
+
- lib/fabrication/syntax/make.rb
|
202
|
+
- lib/fabrication/transform.rb
|
160
203
|
- lib/fabrication/version.rb
|
161
204
|
- lib/fabrication.rb
|
162
205
|
- lib/rails/generators/fabrication/cucumber_steps/cucumber_steps_generator.rb
|
163
206
|
- lib/rails/generators/fabrication/cucumber_steps/templates/fabrication_steps.rb
|
164
207
|
- lib/rails/generators/fabrication/model/model_generator.rb
|
165
208
|
- lib/rails/generators/fabrication/model/templates/fabricator.rb
|
166
|
-
-
|
167
|
-
-
|
168
|
-
-
|
169
|
-
- spec/fabrication/fabricator_spec.rb
|
170
|
-
- spec/fabrication/generator/active_record_spec.rb
|
171
|
-
- spec/fabrication/generator/base_spec.rb
|
172
|
-
- spec/fabrication/schematic_spec.rb
|
173
|
-
- spec/fabrication/sequencer_spec.rb
|
174
|
-
- spec/fabrication/support_spec.rb
|
175
|
-
- spec/fabrication_spec.rb
|
176
|
-
- spec/fabricators/active_record_fabricator.rb
|
177
|
-
- spec/fabricators/cool_object_fabricator.rb
|
178
|
-
- spec/fabricators/mongoid_fabricator.rb
|
179
|
-
- spec/fabricators/plain_old_ruby_object_fabricator.rb
|
180
|
-
- spec/fabricators/sequel_fabricator.rb
|
181
|
-
- spec/fabricators/sequencer_fabricator.rb
|
182
|
-
- spec/spec_helper.rb
|
183
|
-
- spec/support/active_record.rb
|
184
|
-
- spec/support/mongoid.rb
|
185
|
-
- spec/support/plain_old_ruby_objects.rb
|
186
|
-
- spec/support/sequel.rb
|
187
|
-
- spec/support/sequel_migrations/001_create_tables.rb
|
209
|
+
- lib/rails/generators/fabrication/turnip_steps/templates/fabrication_steps.rb
|
210
|
+
- lib/rails/generators/fabrication/turnip_steps/turnip_steps_generator.rb
|
211
|
+
- LICENSE
|
188
212
|
- README.markdown
|
189
|
-
|
213
|
+
- Rakefile
|
214
|
+
homepage: http://fabricationgem.org
|
190
215
|
licenses: []
|
191
|
-
|
192
216
|
post_install_message:
|
193
217
|
rdoc_options: []
|
194
|
-
|
195
|
-
require_paths:
|
218
|
+
require_paths:
|
196
219
|
- lib
|
197
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
220
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
198
221
|
none: false
|
199
|
-
requirements:
|
200
|
-
- -
|
201
|
-
- !ruby/object:Gem::Version
|
202
|
-
version:
|
203
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
|
+
requirements:
|
223
|
+
- - ! '>='
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
version: '0'
|
226
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
227
|
none: false
|
205
|
-
requirements:
|
206
|
-
- -
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version:
|
228
|
+
requirements:
|
229
|
+
- - ! '>='
|
230
|
+
- !ruby/object:Gem::Version
|
231
|
+
version: '0'
|
209
232
|
requirements: []
|
210
|
-
|
211
233
|
rubyforge_project:
|
212
|
-
rubygems_version: 1.8.
|
234
|
+
rubygems_version: 1.8.10
|
213
235
|
signing_key:
|
214
236
|
specification_version: 3
|
215
|
-
summary: Fabrication provides a
|
237
|
+
summary: Fabrication provides a simple solution for test object generation.
|
216
238
|
test_files: []
|
217
|
-
|