dfl-factories-and-workers 0.1.5 → 0.1.6
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.
- data/CHANGELOG +5 -0
- data/README.rdoc +3 -1
- data/lib/factories-and-workers.rb +1 -1
- data/lib/factories-and-workers/factory_worker.rb +1 -0
- data/rails/init.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
* [12/10/2008] - 0.1.6
|
2
|
+
|
3
|
+
Disabling Workers for now because the method missing causes problems with ./script/generate,
|
4
|
+
and workers are not that useful in their current state.
|
5
|
+
|
1
6
|
* [10/22/2008] - 0.1.4
|
2
7
|
|
3
8
|
Prevent rails/init from loading factories.rb, etc. if inside rake db:*
|
data/README.rdoc
CHANGED
@@ -95,7 +95,9 @@ Factories also really come in handy in the development console. The plugin and f
|
|
95
95
|
|
96
96
|
=The FactoryWorker
|
97
97
|
|
98
|
-
The FactoryWorker is a work in progress
|
98
|
+
The FactoryWorker is a work in progress and is not automatically loaded with init.rb.
|
99
|
+
Ideally it would behave sort of like a fixture scenario. Anyone want to help make this happen?
|
100
|
+
It currently doesn't execute in the same scope/binding as where it's called from, which means instance variables aren't shared :(
|
99
101
|
|
100
102
|
If you create a file named 'factory_workers.rb' in either your spec or test directory, you can define snippets of code that can be ran at anytime, anywhere in your tests (this may not be true in the future, I may limit where it can be run, iono).
|
101
103
|
|
@@ -1,4 +1,4 @@
|
|
1
1
|
require 'active_support/core_ext' # for returning() and HashWithIndifferentAccess
|
2
2
|
require 'factories-and-workers/factory_builder'
|
3
|
-
require 'factories-and-workers/factory_worker'
|
3
|
+
# require 'factories-and-workers/factory_worker'
|
4
4
|
require 'factories-and-workers/factory_generator'
|
@@ -11,6 +11,7 @@ module FactoriesAndWorkers
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
+
# FIXME TODO: remove this method missing... it's terrible to use with an Object-level mixin
|
14
15
|
def self.included( base )
|
15
16
|
base.extend ClassMethods
|
16
17
|
# factory_worker methods are defined as class methods; this delegation will allow them to also be called as instance methods
|
data/rails/init.rb
CHANGED
@@ -13,7 +13,7 @@ config.after_initialize do
|
|
13
13
|
|
14
14
|
# mixin plugin
|
15
15
|
obj.send :include, FactoriesAndWorkers::Factory
|
16
|
-
obj.send :include, FactoriesAndWorkers::Worker
|
16
|
+
# obj.send :include, FactoriesAndWorkers::Worker
|
17
17
|
|
18
18
|
# load factory and worker definition files if they exist
|
19
19
|
%w(spec/factories.rb spec/factory_workers.rb test/factories.rb test/factory_workers.rb).each do |file|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dfl-factories-and-workers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Herald
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2008-10
|
14
|
+
date: 2008-12-10 00:00:00 -08:00
|
15
15
|
default_executable:
|
16
16
|
dependencies: []
|
17
17
|
|