test_dummy 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/lib/test_dummy.rb +3 -1
  3. data/test_dummy.gemspec +24 -32
  4. metadata +25 -44
  5. data/.gitignore +0 -19
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.6
1
+ 0.2.7
data/lib/test_dummy.rb CHANGED
@@ -124,7 +124,9 @@ module TestDummy
124
124
  def build_dummy(with_attributes = nil)
125
125
  load_dummy_declaration!
126
126
 
127
- model = new(TestDummy::Support.combine_attributes(scoped.scope_for_create, with_attributes))
127
+ build_scope = (method(:scoped).arity == 1) ? scoped(nil).scope(:create) : scoped.scope_for_create
128
+
129
+ model = new(TestDummy::Support.combine_attributes(build_scope, with_attributes))
128
130
 
129
131
  yield(model) if (block_given?)
130
132
 
data/test_dummy.gemspec CHANGED
@@ -1,52 +1,44 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{test_dummy}
8
- s.version = "0.2.6"
7
+ s.name = "test_dummy"
8
+ s.version = "0.2.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["tadman"]
12
- s.date = %q{2010-11-23}
13
- s.description = %q{Test Dummy allows you to define how to fake models automatically so that you can use dummy data for testing instead of fixtures. Dummy models are always generated using the current schema and don't need to me migrated like fixtures.}
14
- s.email = %q{github@tadman.ca}
12
+ s.date = "2011-09-21"
13
+ s.description = "Test Dummy allows you to define how to fake models automatically so that you can use dummy data for testing instead of fixtures. Dummy models are always generated using the current schema and don't need to me migrated like fixtures."
14
+ s.email = "github@tadman.ca"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "lib/test_dummy.rb",
27
- "lib/test_dummy/helper.rb",
28
- "lib/test_dummy/railtie.rb",
29
- "lib/test_dummy/test_helper.rb",
30
- "test/config/database.yml",
31
- "test/db/.gitignore",
32
- "test/helper.rb",
33
- "test/models/simple.rb",
34
- "test/test_test_dummy.rb",
35
- "test_dummy.gemspec"
36
- ]
37
- s.homepage = %q{http://github.com/tadman/test_dummy}
38
- s.rdoc_options = ["--charset=UTF-8"]
39
- s.require_paths = ["lib"]
40
- s.rubygems_version = %q{1.3.7}
41
- s.summary = %q{Quick test data generator and fake model maker}
42
- s.test_files = [
21
+ "LICENSE",
22
+ "README.rdoc",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "lib/test_dummy.rb",
26
+ "lib/test_dummy/helper.rb",
27
+ "lib/test_dummy/railtie.rb",
28
+ "lib/test_dummy/test_helper.rb",
29
+ "test/config/database.yml",
30
+ "test/db/.gitignore",
43
31
  "test/helper.rb",
44
- "test/models/simple.rb",
45
- "test/test_test_dummy.rb"
32
+ "test/models/simple.rb",
33
+ "test/test_test_dummy.rb",
34
+ "test_dummy.gemspec"
46
35
  ]
36
+ s.homepage = "http://github.com/tadman/test_dummy"
37
+ s.require_paths = ["lib"]
38
+ s.rubygems_version = "1.8.10"
39
+ s.summary = "Quick test data generator and fake model maker"
47
40
 
48
41
  if s.respond_to? :specification_version then
49
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
50
42
  s.specification_version = 3
51
43
 
52
44
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,35 +1,27 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: test_dummy
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 2
8
- - 6
9
- version: 0.2.6
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.7
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - tadman
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2010-11-23 00:00:00 -05:00
18
- default_executable:
12
+ date: 2011-09-21 00:00:00.000000000Z
19
13
  dependencies: []
20
-
21
- description: Test Dummy allows you to define how to fake models automatically so that you can use dummy data for testing instead of fixtures. Dummy models are always generated using the current schema and don't need to me migrated like fixtures.
14
+ description: Test Dummy allows you to define how to fake models automatically so that
15
+ you can use dummy data for testing instead of fixtures. Dummy models are always
16
+ generated using the current schema and don't need to me migrated like fixtures.
22
17
  email: github@tadman.ca
23
18
  executables: []
24
-
25
19
  extensions: []
26
-
27
- extra_rdoc_files:
20
+ extra_rdoc_files:
28
21
  - LICENSE
29
22
  - README.rdoc
30
- files:
23
+ files:
31
24
  - .document
32
- - .gitignore
33
25
  - LICENSE
34
26
  - README.rdoc
35
27
  - Rakefile
@@ -44,39 +36,28 @@ files:
44
36
  - test/models/simple.rb
45
37
  - test/test_test_dummy.rb
46
38
  - test_dummy.gemspec
47
- has_rdoc: true
48
39
  homepage: http://github.com/tadman/test_dummy
49
40
  licenses: []
50
-
51
41
  post_install_message:
52
- rdoc_options:
53
- - --charset=UTF-8
54
- require_paths:
42
+ rdoc_options: []
43
+ require_paths:
55
44
  - lib
56
- required_ruby_version: !ruby/object:Gem::Requirement
45
+ required_ruby_version: !ruby/object:Gem::Requirement
57
46
  none: false
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- segments:
62
- - 0
63
- version: "0"
64
- required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ! '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
52
  none: false
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- segments:
70
- - 0
71
- version: "0"
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
72
57
  requirements: []
73
-
74
58
  rubyforge_project:
75
- rubygems_version: 1.3.7
59
+ rubygems_version: 1.8.10
76
60
  signing_key:
77
61
  specification_version: 3
78
62
  summary: Quick test data generator and fake model maker
79
- test_files:
80
- - test/helper.rb
81
- - test/models/simple.rb
82
- - test/test_test_dummy.rb
63
+ test_files: []
data/.gitignore DELETED
@@ -1,19 +0,0 @@
1
- .DS_Store
2
-
3
- *.gem
4
-
5
- *.tmproj
6
- tmtags
7
-
8
- test/log
9
-
10
- *~
11
- \#*
12
- .\#*
13
-
14
- *.swp
15
-
16
- coverage
17
- rdoc
18
- pkg
19
-