fluent_fixtures 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d33bbaa00f8e53051894c6cdfa9696965a1fb73
4
- data.tar.gz: 1cf3f1e78b8ae7532782df1b657ae5b0ef365d88
3
+ metadata.gz: c70fba1d0e0cb81714a74684bc8906bfd363a707
4
+ data.tar.gz: 0cb6b28e3e362e2f86e6b2a2543fa8974a5b1309
5
5
  SHA512:
6
- metadata.gz: da3d7e7e75da53dccd23a834f6eeeec0a531203b51c5385b4dda469eb4a39eb60040df7d0244465a3e24d7f455a53c4c3b76f7288686e035edf38141f40bb9ac
7
- data.tar.gz: 4def254094af54a2f4f4c72f1425a7d124717d552e588226c5c6f8ba48e40e4634dc3067287ae2f7b0216a96a3f7a40e45b835f0378f6aa52956a3c65b0575f1
6
+ metadata.gz: aea30395e953f18e878fc54cfb97da5e9fa05b937a220a5cccb641182adc311bf0dbff0579a5f0ea7acb2afb7c9952f9b59937dd5cbd2ac36fa30da20e939575
7
+ data.tar.gz: e4a83d0c50b788dc98d52284f5ef7fb4d7ecb28d863c54b51eb87df5a40be4775852feb0b9a231b3303d6d1b6f40553badfe7528edcf80f69ffe89fda2bfa491
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/ChangeLog CHANGED
@@ -1,8 +1,53 @@
1
+ 2016-10-28 Michael Granger <ged@FaerieMUD.org>
2
+
3
+ * certs/ged.pem:
4
+ Update gem cert to the latest one
5
+ [f3b80f1dca30] [tip]
6
+
7
+ * GettingStarted.md, README.md, TheSetup.md:
8
+ Add some more documentation work
9
+ [9428d297d024]
10
+
11
+ 2016-10-20 Michael Granger <ged@FaerieMUD.org>
12
+
13
+ * examples/acme_fixtures.rb, examples/lib/acme.rb,
14
+ examples/lib/acme/base.rb, examples/lib/acme/fixtures.rb,
15
+ examples/lib/acme/fixtures/groups.rb,
16
+ examples/lib/acme/fixtures/users.rb, examples/lib/acme/group.rb,
17
+ examples/lib/acme/user.rb, examples/nodb/acme_fixtures.rb,
18
+ examples/nodb/lib/acme.rb, examples/nodb/lib/acme/base.rb,
19
+ examples/nodb/lib/acme/fixtures.rb,
20
+ examples/nodb/lib/acme/fixtures/groups.rb,
21
+ examples/nodb/lib/acme/fixtures/users.rb,
22
+ examples/nodb/lib/acme/group.rb, examples/nodb/lib/acme/user.rb,
23
+ examples/sequel_model/.pryrc, examples/sequel_model/Gemfile,
24
+ examples/sequel_model/Gemfile.lock,
25
+ examples/sequel_model/acme_fixtures.rb,
26
+ examples/sequel_model/lib/acme.rb,
27
+ examples/sequel_model/lib/acme/customer.rb,
28
+ examples/sequel_model/lib/acme/fixtures.rb,
29
+ examples/sequel_model/lib/acme/fixtures/customers.rb,
30
+ examples/sequel_model/lib/acme/fixtures/order_items.rb,
31
+ examples/sequel_model/lib/acme/fixtures/orders.rb,
32
+ examples/sequel_model/lib/acme/order.rb,
33
+ examples/sequel_model/lib/acme/order_item.rb,
34
+ examples/sequel_model/migrations/1_schema.rb:
35
+ Split examples into per-backend directories
36
+ [49d76036d758]
37
+
1
38
  2016-06-01 Michael Granger <ged@FaerieMUD.org>
2
39
 
40
+ * .hgtags:
41
+ Added tag v0.0.2 for changeset f13e6d1aa624
42
+ [9c56821be4a9]
43
+
44
+ * .hgsigs:
45
+ Added signature for changeset e500071dd9c0
46
+ [f13e6d1aa624] [v0.0.2]
47
+
3
48
  * History.md, lib/fluent_fixtures.rb:
4
49
  Bump the patch version, update history.
5
- [e500071dd9c0] [tip]
50
+ [e500071dd9c0]
6
51
 
7
52
  * Rakefile, fluent_fixtures.gemspec:
8
53
  Remove the release failsafe from the Rakefile
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v0.1.0 [2016-10-28] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ New feature:
4
+ - Add an after-save hook and a declaration for it.
5
+
6
+
1
7
  ## v0.0.2 [2016-06-01] Michael Granger <ged@FaerieMUD.org>
2
8
 
3
9
  Remove the release failsafe from the Rakefile
data/Manifest.txt CHANGED
@@ -2,12 +2,12 @@
2
2
  .rdoc_options
3
3
  .simplecov
4
4
  ChangeLog
5
- GettingStarted.md
6
5
  History.md
7
6
  LICENSE.txt
8
7
  Manifest.txt
9
8
  README.md
10
9
  Rakefile
10
+ TheSetup.md
11
11
  lib/fluent_fixtures.rb
12
12
  lib/fluent_fixtures/collection.rb
13
13
  lib/fluent_fixtures/dsl.rb
data/README.md CHANGED
@@ -15,10 +15,13 @@ docs
15
15
 
16
16
  ## Description
17
17
 
18
- A toolkit for building a collection of composable testing fixtures with a fluent interface.
18
+ FluentFixtures is a toolkit for building testing objects with a fluent interface.
19
19
 
20
- To get started using the library, check out the [Getting Started](GettingStarted_md.html) guide.
20
+ It allows testers to describe test data via composition rather than setting up fragile monolithic datasets.
21
21
 
22
+ To see a walkthrough of how you might set your own fixtures up, check out the [The Setup](TheSetup_md.html).
23
+
24
+ If you're already on your way and just want some API docs, [we got those, too](FluentFixtures.html).
22
25
 
23
26
  ## Prerequisites
24
27
 
data/TheSetup.md ADDED
@@ -0,0 +1,171 @@
1
+ # The Setup
2
+
3
+ To make use of FluentFixtures, you'll need to first set up a module to contain them. Each base fixture you declare will show up in this module.
4
+
5
+ For example, say I'm adding fixtures to a hypothetical codebase for acme-warehouse.com's website. It has a set of Sequel::Model classes that are backed by a PostgreSQL database. with a schema like:
6
+
7
+ CREATE SCHEMA acme;
8
+ CREATE TABLE acme.customers (
9
+ id serial primary key,
10
+ first_name text NOT NULL,
11
+ last_name text NOT NULL
12
+ );
13
+ CREATE TABLE acme.orders (
14
+ id serial primary key,
15
+ ordered_at timestamp with time zone DEFAULT now(),
16
+ updated_at timestamp with time zone,
17
+ customer_id integer REFERENCES acme.customers NOT NULL
18
+ );
19
+ CREATE TABLE acme.order_items (
20
+ id serial primary key,
21
+ sku text NOT NULL,
22
+ order_id integer REFERENCES acme.orders NOT NULL
23
+ );
24
+
25
+
26
+ The codebase has three classes: Customers, Orders, and OrderItems, all in the `Acme` namespace:
27
+
28
+ # lib/acme.rb
29
+
30
+ require 'sequel'
31
+
32
+ module Acme
33
+
34
+ DB = Sequel.postgres( 'acme' )
35
+
36
+ Sequel::Model.plugin :validation_helpers
37
+ Sequel::Model.plugin :auto_validations, not_null: :presence
38
+
39
+ autoload :Customer, 'acme/customer'
40
+ autoload :Order, 'acme/order'
41
+ autoload :OrderItem, 'acme/order_item'
42
+
43
+ end
44
+
45
+ And the model classes look something like this:
46
+
47
+ # lib/acme/customer.rb
48
+
49
+ require 'sequel/model'
50
+ require 'acme' unless defined?( Acme )
51
+
52
+ class Acme::Customer < Sequel::Model( :acme__customers )
53
+
54
+ one_to_many :orders
55
+
56
+ end
57
+
58
+ # lib/acme/order.rb
59
+
60
+ require 'sequel/model'
61
+ require 'acme' unless defined?( Acme )
62
+
63
+ class Acme::Order < Sequel::Model( :acme__orders )
64
+
65
+ many_to_one :customer, class: 'Acme::User'
66
+ one_to_many :order_items
67
+
68
+ end
69
+
70
+ # lib/acme/order_item.rb
71
+
72
+ require 'sequel/model'
73
+ require 'acme' unless defined?( Acme )
74
+
75
+ class Acme::OrderItem < Sequel::Model( :acme__order_items )
76
+
77
+ many_to_one :order
78
+
79
+ end
80
+
81
+
82
+ ## Collections
83
+
84
+ To start the fixture library, I'll create a new `lib/acme/fixtures.rb` that looks like:
85
+
86
+ # lib/acme/fixtures.rb
87
+
88
+ require 'fluent_fixtures'
89
+ require 'acme' unless defined?( Acme )
90
+
91
+ module Acme::Fixtures
92
+ extend FluentFixtures::Collection
93
+
94
+ fixture_path_prefix 'acme/fixtures'
95
+
96
+ end
97
+
98
+ The `extend` line tell FluentFixtures that the extended module is a collection of related fixtures, and the `fixture_path_prefix` line tells FluentFixtures where to find the files that contain the individual fixture declarations themselves.
99
+
100
+ This module will act as the main interface to all of ACME's fixtures.
101
+
102
+
103
+ ## Fixtures
104
+
105
+ First, we'll add a bare-bones `customer` fixture for creating instances of `Acme::Customer`:
106
+
107
+ # lib/acme/fixtures/customers.rb
108
+
109
+ require 'acme/fixtures'
110
+ require 'acme/customer
111
+
112
+ module Acme::Fixtures::Customers
113
+ extend Acme::Fixtures
114
+ fixtured_class Acme::Customer
115
+ end
116
+
117
+ This time, the `extend` line tells the fixture collection we just created that any fixtures declared in this module belong to it. The `fixtured_class` declaration tells FluentFixtures what kinds of objects these fixtures will create.
118
+
119
+ This by itself sets up some defaults based on convention. The first is the "base" fixture, which is the name of the method you'll call on the collection to get a factory that can create `Acme::Customer` objects:
120
+
121
+ customer = Acme::Fixtures.customer
122
+ # => #<FluentFixtures::Factory:0x007fede4113210 for Acme::Fixtures::Customers>
123
+
124
+ customer.instance
125
+ # => #<Acme::Customer @values={}>
126
+
127
+ ### The `base` Declaration
128
+
129
+ If I wanted the base fixture to be called something else, I could also override the conventional one using the `base` declaration:
130
+
131
+ module Acme::Fixtures::Customers
132
+ # ...
133
+ base :user
134
+ end
135
+
136
+ customer = Acme::Fixtures.user
137
+ # => #<FluentFixtures::Factory:0x007fc15992a370 for Acme::Fixtures::Customers>
138
+
139
+ Obviously this is a little unintuitive, so I won't actually do that, but the `base` declaration can also take a block to provide reasonable defaults. I'll use the `Faker` gem to generate a default first and last name if one hasn't already been set when the object is created:
140
+
141
+ require 'faker'
142
+
143
+ module Acme::Fixtures::Customers
144
+ # ...
145
+ base :customer do
146
+ self.first_name ||= Faker::Name.first_name
147
+ self.last_name ||= Faker::Name.last_name
148
+ end
149
+ end
150
+
151
+ customer = Acme::Fixtures.customer
152
+ # => #<FluentFixtures::Factory:0x007fdb492cd4c8 for Acme::Fixtures::Customers>
153
+ customer.instance
154
+ # => #<Acme::Customer @values={:first_name=>"Polly", :last_name=>"Larson"}>
155
+
156
+
157
+ The block executes in the context of the new object if the `base` block doesn't take an argument; you can also declare a block that accepts the new object as an argument if you prefer that.
158
+
159
+
160
+ ### Decorators
161
+
162
+
163
+
164
+ ### Hooks
165
+
166
+
167
+
168
+ ## RSpec
169
+
170
+
171
+
@@ -11,10 +11,10 @@ module FluentFixtures
11
11
 
12
12
 
13
13
  # Package version
14
- VERSION = '0.0.2'
14
+ VERSION = '0.1.0'
15
15
 
16
16
  # Version control revision
17
- REVISION = %q$Revision: e500071dd9c0 $
17
+ REVISION = %q$Revision: c6eb79628953 $
18
18
 
19
19
 
20
20
  # Loggability API -- set up a named logger
@@ -62,7 +62,7 @@ module FluentFixtures::DSL
62
62
  alias_method :has_decorator?, :decorator?
63
63
 
64
64
 
65
- ### Declare a +new_name+ for the decorator declarted with with +original_name+.
65
+ ### Declare a +new_name+ for the decorator declared with with +original_name+.
66
66
  def alias_decorator( new_name, original_name )
67
67
  block = self.decorators[ original_name.to_sym ] or
68
68
  raise ScriptError, "undefined decorator %p" % [ original_name ]
@@ -70,15 +70,21 @@ module FluentFixtures::DSL
70
70
  end
71
71
 
72
72
 
73
- ### Add a callback to the fixture that will passed new instances after all
73
+ ### Add a callback to the fixture that will be passed new instances after all
74
74
  ### decorators have been applied and immediately before it's saved. The results of
75
- ### the block will be used as the fixtured instance. This can be
76
- ### used for tables with fixed rows to use `find_or_create` or similar.
75
+ ### the block will be used as the fixtured instance.
77
76
  def before_saving( &block )
78
77
  define_singleton_method( :call_before_saving, &block )
79
78
  end
80
79
 
81
80
 
81
+ ### Add a callback to the fixture that will be passed new instances after it's
82
+ ### saved. The results of the block will be used as the fixtured instance.
83
+ def after_saving( &block )
84
+ define_singleton_method( :call_after_saving, &block )
85
+ end
86
+
87
+
82
88
  ### Return an instance of Cozy::FluentFixtures::FluentFactory for the base fixture
83
89
  ### of the receiving module.
84
90
  def factory( *args, &block )
@@ -101,6 +101,8 @@ class FluentFixtures::Factory
101
101
 
102
102
  self.try_to_save( obj )
103
103
 
104
+ obj = self.fixture_module.call_after_saving( obj ) if
105
+ self.fixture_module.respond_to?( :call_after_saving )
104
106
  obj
105
107
  end
106
108
 
@@ -115,9 +115,9 @@ describe FluentFixtures::Collection do
115
115
 
116
116
 
117
117
  it "allows the loading prefix to be customized" do
118
- collection.fixture_path_prefix( 'acme/fixtures' )
118
+ collection.fixture_path_prefix( 'example/fixtures' )
119
119
  expect( collection ).to receive( :require ).
120
- with( "acme/fixtures/foo" ).and_return( false )
120
+ with( "example/fixtures/foo" ).and_return( false )
121
121
 
122
122
  collection.load( :foo )
123
123
  end
@@ -60,7 +60,7 @@ describe FluentFixtures::DSL do
60
60
  end
61
61
 
62
62
 
63
- it "can register a creation hook to allow for unusual models" do
63
+ it "can register a before-creation hook to allow for unusual models" do
64
64
  expect {
65
65
  fixture_module.before_saving do |obj|
66
66
  obj
@@ -70,6 +70,16 @@ describe FluentFixtures::DSL do
70
70
  end
71
71
 
72
72
 
73
+ it "can register an after-creation hook to allow for unusual models" do
74
+ expect {
75
+ fixture_module.after_saving do |obj|
76
+ obj
77
+ end
78
+ }.to change { fixture_module.respond_to?(:call_after_saving) }.
79
+ from( false ).to( true )
80
+ end
81
+
82
+
73
83
  it "can declare an alias for an already-declared decorator" do
74
84
  fixture_module.decorator( :with_no_email ) { self.email = nil }
75
85
  fixture_module.alias_decorator( :emailless, :with_no_email )
@@ -14,6 +14,7 @@ describe FluentFixtures::Factory do
14
14
  Class.new do
15
15
  def initialize( params={} )
16
16
  @saved = false
17
+ @deleted = false
17
18
  params.each do |name, value|
18
19
  self.send( "#{name}=", value )
19
20
  end
@@ -28,6 +29,8 @@ describe FluentFixtures::Factory do
28
29
  self.login = "__#{self.login}__"
29
30
  self
30
31
  end
32
+ def delete; @deleted = true; end
33
+ def deleted?; @deleted; end
31
34
  end
32
35
  end
33
36
 
@@ -202,6 +205,19 @@ describe FluentFixtures::Factory do
202
205
  end
203
206
 
204
207
 
208
+ it "calls its fixture module's #call_after_saving method after creating if it implements it" do
209
+ def fixture_module.call_after_saving( instance )
210
+ instance.delete
211
+ instance
212
+ end
213
+
214
+ result = factory.create
215
+
216
+ expect( result ).to be_an_instance_of( fixtured_class )
217
+ expect( result ).to be_deleted
218
+ end
219
+
220
+
205
221
  it "allows ad-hoc decorators declared as inline blocks" do
206
222
  counter = 0
207
223
  result = factory.decorated_with do |obj|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent_fixtures
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
@@ -10,26 +10,32 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDMDCCAhigAwIBAgIBAjANBgkqhkiG9w0BAQUFADA+MQwwCgYDVQQDDANnZWQx
13
+ MIIEbDCCAtSgAwIBAgIBATANBgkqhkiG9w0BAQsFADA+MQwwCgYDVQQDDANnZWQx
14
14
  GTAXBgoJkiaJk/IsZAEZFglGYWVyaWVNVUQxEzARBgoJkiaJk/IsZAEZFgNvcmcw
15
- HhcNMTYwNjAyMDE1NTQ2WhcNMTcwNjAyMDE1NTQ2WjA+MQwwCgYDVQQDDANnZWQx
15
+ HhcNMTYwODIwMTgxNzQyWhcNMTcwODIwMTgxNzQyWjA+MQwwCgYDVQQDDANnZWQx
16
16
  GTAXBgoJkiaJk/IsZAEZFglGYWVyaWVNVUQxEzARBgoJkiaJk/IsZAEZFgNvcmcw
17
- ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDb92mkyYwuGBg1oRxt2tkH
18
- +Uo3LAsaL/APBfSLzy8o3+B3AUHKCjMUaVeBoZdWtMHB75X3VQlvXfZMyBxj59Vo
19
- cDthr3zdao4HnyrzAIQf7BO5Y8KBwVD+yyXCD/N65TTwqsQnO3ie7U5/9ut1rnNr
20
- OkOzAscMwkfQxBkXDzjvAWa6UF4c5c9kR/T79iA21kDx9+bUMentU59aCJtUcbxa
21
- 7kcKJhPEYsk4OdxR9q2dphNMFDQsIdRO8rywX5FRHvcb+qnXC17RvxLHtOjysPtp
22
- EWsYoZMxyCDJpUqbwoeiM+tAHoz2ABMv3Ahie3Qeb6+MZNAtMmaWfBx3dg2u+/WN
23
- AgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBSZ0hCV
24
- qoHr122fGKelqffzEQBhszANBgkqhkiG9w0BAQUFAAOCAQEAF2XCzjfTFxkcVvuj
25
- hhBezFkZnMDYtWezg4QCkR0RHg4sl1LdXjpvvI59SIgD/evD1hOteGKsXqD8t0E4
26
- OPAWWv/z+JRma72zeYsBZLSDRPIUvBoul6qCpvY0MiWTh496mFwOxT5lvSAUoh+U
27
- pQ/MQeH/yC6hbGp7IYska6J8T4z5XkYqafYZ3eKQ8H+xPd/z+gYx+jd0PfkWf1Wk
28
- QQdziL01SKBHf33OAH/p/puCpwS+ZDfgnNx5oMijWbc671UXkrt7zjD0kGakq+9I
29
- hnfm736z8j1wvWddqf45++gwPpDr1E4zoAq2PgRl/WBNyR0hfoZLpi3TnHu3eC0x
30
- uALKNA==
17
+ ggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC/JWGRHO+USzR97vXjkFgt
18
+ 83qeNf2KHkcvrRTSnR64i6um/ziin0I0oX23H7VYrDJC9A/uoUa5nGRJS5Zw/+wW
19
+ ENcvWVZS4iUzi4dsYJGY6yEOsXh2CcF46+QevV8iE+UmbkU75V7Dy1JCaUOyizEt
20
+ TH5UHsOtUU7k9TYARt/TgYZKuaoAMZZd5qyVqhF1vV+7/Qzmp89NGflXf2xYP26a
21
+ 4MAX2qqKX/FKXqmFO+AGsbwYTEds1mksBF3fGsFgsQWxftG8GfZQ9+Cyu2+l1eOw
22
+ cZ+lPcg834G9DrqW2zhqUoLr1MTly4pqxYGb7XoDhoR7dd1kFE2a067+DzWC/ADt
23
+ +QkcqWUm5oh1fN0eqr7NsZlVJDulFgdiiYPQiIN7UNsii4Wc9aZqBoGcYfBeQNPZ
24
+ soo/6za/bWajOKUmDhpqvaiRv9EDpVLzuj53uDoukMMwxCMfgb04+ckQ0t2G7wqc
25
+ /D+K9JW9DDs3Yjgv9k4h7YMhW5gftosd+NkNC/+Y2CkCAwEAAaN1MHMwCQYDVR0T
26
+ BAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFHKN/nkRusdqCJEuq3lgB3fJvyTg
27
+ MBwGA1UdEQQVMBOBEWdlZEBGYWVyaWVNVUQub3JnMBwGA1UdEgQVMBOBEWdlZEBG
28
+ YWVyaWVNVUQub3JnMA0GCSqGSIb3DQEBCwUAA4IBgQAPJzKiT0zBU7kpqe0aS2qb
29
+ FI0PJ4y5I8buU4IZGUD5NEt/N7pZNfOyBxkrZkXhS44Fp+xwBH5ebLbq/WY78Bqd
30
+ db0z6ZgW4LMYMpWFfbXsRbd9TU2f52L8oMAhxOvF7Of5qJMVWuFQ8FPagk2iHrdH
31
+ inYLQagqAF6goWTXgAJCdPd6SNeeSNqA6vlY7CV1Jh5kfNJJ6xu/CVij1GzCLu/5
32
+ DMOr26DBv+qLJRRC/2h34uX71q5QgeOyxvMg+7V3u/Q06DXyQ2VgeeqiwDFFpEH0
33
+ PFkdPO6ZqbTRcLfNH7mFgCBJjsfSjJrn0sPBlYyOXgCoByfZnZyrIMH/UY+lgQqS
34
+ 6Von1VDsfQm0eJh5zYZD64ZF86phSR7mUX3mXItwH04HrZwkWpvgd871DZVR3i1n
35
+ w8aNA5re5+Rt/Vvjxj5AcEnZnZiz5x959NaddQocX32Z1unHw44pzRNUur1GInfW
36
+ p4vpx2kUSFSAGjtCbDGTNV2AH8w9OU4xEmNz8c5lyoA=
31
37
  -----END CERTIFICATE-----
32
- date: 2016-06-02 00:00:00.000000000 Z
38
+ date: 2016-10-28 00:00:00.000000000 Z
33
39
  dependencies:
34
40
  - !ruby/object:Gem::Dependency
35
41
  name: loggability
@@ -102,61 +108,61 @@ dependencies:
102
108
  - !ruby/object:Gem::Version
103
109
  version: '0.2'
104
110
  - !ruby/object:Gem::Dependency
105
- name: rdoc
111
+ name: faker
106
112
  requirement: !ruby/object:Gem::Requirement
107
113
  requirements:
108
114
  - - "~>"
109
115
  - !ruby/object:Gem::Version
110
- version: '4.0'
116
+ version: '1.6'
111
117
  type: :development
112
118
  prerelease: false
113
119
  version_requirements: !ruby/object:Gem::Requirement
114
120
  requirements:
115
121
  - - "~>"
116
122
  - !ruby/object:Gem::Version
117
- version: '4.0'
123
+ version: '1.6'
118
124
  - !ruby/object:Gem::Dependency
119
- name: faker
125
+ name: simplecov
120
126
  requirement: !ruby/object:Gem::Requirement
121
127
  requirements:
122
128
  - - "~>"
123
129
  - !ruby/object:Gem::Version
124
- version: '1.6'
130
+ version: '0.7'
125
131
  type: :development
126
132
  prerelease: false
127
133
  version_requirements: !ruby/object:Gem::Requirement
128
134
  requirements:
129
135
  - - "~>"
130
136
  - !ruby/object:Gem::Version
131
- version: '1.6'
137
+ version: '0.7'
132
138
  - !ruby/object:Gem::Dependency
133
- name: simplecov
139
+ name: rdoc-generator-fivefish
134
140
  requirement: !ruby/object:Gem::Requirement
135
141
  requirements:
136
142
  - - "~>"
137
143
  - !ruby/object:Gem::Version
138
- version: '0.7'
144
+ version: '0.1'
139
145
  type: :development
140
146
  prerelease: false
141
147
  version_requirements: !ruby/object:Gem::Requirement
142
148
  requirements:
143
149
  - - "~>"
144
150
  - !ruby/object:Gem::Version
145
- version: '0.7'
151
+ version: '0.1'
146
152
  - !ruby/object:Gem::Dependency
147
- name: rdoc-generator-fivefish
153
+ name: rdoc
148
154
  requirement: !ruby/object:Gem::Requirement
149
155
  requirements:
150
156
  - - "~>"
151
157
  - !ruby/object:Gem::Version
152
- version: '0.1'
158
+ version: '4.0'
153
159
  type: :development
154
160
  prerelease: false
155
161
  version_requirements: !ruby/object:Gem::Requirement
156
162
  requirements:
157
163
  - - "~>"
158
164
  - !ruby/object:Gem::Version
159
- version: '0.1'
165
+ version: '4.0'
160
166
  - !ruby/object:Gem::Dependency
161
167
  name: hoe
162
168
  requirement: !ruby/object:Gem::Requirement
@@ -172,30 +178,34 @@ dependencies:
172
178
  - !ruby/object:Gem::Version
173
179
  version: '3.15'
174
180
  description: |-
175
- A toolkit for building a collection of composable testing fixtures with a fluent interface.
181
+ FluentFixtures is a toolkit for building testing objects with a fluent interface.
182
+
183
+ It allows testers to describe test data via composition rather than setting up fragile monolithic datasets.
184
+
185
+ To see a walkthrough of how you might set your own fixtures up, check out the [The Setup](TheSetup_md.html).
176
186
 
177
- To get started using the library, check out the [Getting Started](GettingStarted_md.html) guide.
187
+ If you're already on your way and just want some API docs, [we got those, too](FluentFixtures.html).
178
188
  email:
179
189
  - ged@FaerieMUD.org
180
190
  executables: []
181
191
  extensions: []
182
192
  extra_rdoc_files:
183
- - GettingStarted.md
184
193
  - History.md
185
194
  - LICENSE.txt
186
195
  - Manifest.txt
187
196
  - README.md
197
+ - TheSetup.md
188
198
  files:
189
199
  - ".document"
190
200
  - ".rdoc_options"
191
201
  - ".simplecov"
192
202
  - ChangeLog
193
- - GettingStarted.md
194
203
  - History.md
195
204
  - LICENSE.txt
196
205
  - Manifest.txt
197
206
  - README.md
198
207
  - Rakefile
208
+ - TheSetup.md
199
209
  - lib/fluent_fixtures.rb
200
210
  - lib/fluent_fixtures/collection.rb
201
211
  - lib/fluent_fixtures/dsl.rb
@@ -227,9 +237,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
237
  version: '0'
228
238
  requirements: []
229
239
  rubyforge_project:
230
- rubygems_version: 2.6.2
240
+ rubygems_version: 2.5.1
231
241
  signing_key:
232
242
  specification_version: 4
233
- summary: A toolkit for building a collection of composable testing fixtures with a
234
- fluent interface
243
+ summary: FluentFixtures is a toolkit for building testing objects with a fluent interface
235
244
  test_files: []
metadata.gz.sig CHANGED
Binary file
data/GettingStarted.md DELETED
@@ -1,26 +0,0 @@
1
- # Getting Started With Fluent Fixtures
2
-
3
- Declare a module that will act as a collection of fixtures:
4
-
5
- # lib/acme/fixtures.rb
6
- require 'fluent_fixtures'
7
- module Acme::Fixtures
8
- extend FluentFixtures::Collection
9
- fixture_path_prefix 'acme/fixtures'
10
- end
11
-
12
- This module will act as the main interface to all of ACME's fixtures.
13
-
14
- First, we'll add a bare-bones `user` fixture for creating instances of a hypothetical `Acme::User` class:
15
-
16
- # lib/acme/fixtures/users.rb
17
- require 'acme/fixtures'
18
- require 'acme/user
19
- module Acme::Fixtures::Users
20
- extend Acme::Fixtures
21
- fixtured_class Acme::User
22
- end
23
-
24
- [...more soon]
25
-
26
-