makers 4.0.0.2 → 4.0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/generators/makers/install/install_generator.rb +1 -1
- data/lib/makers.rb +6 -0
- data/lib/makers/definitions.rb +9 -9
- data/lib/makers/dsl/maker.rb +14 -7
- data/lib/makers/dsl/trait.rb +11 -0
- data/lib/makers/maker.rb +6 -4
- data/lib/makers/proxy.rb +4 -0
- data/lib/makers/railtie.rb +11 -13
- data/lib/makers/traits.rb +27 -0
- data/lib/makers/version.rb +1 -1
- data/test/dummy/config/database.yml +5 -2
- data/test/dummy/db/schema.rb +2 -4
- data/test/dummy/log/development.log +76 -0
- data/test/dummy/log/test.log +1618 -0
- data/test/dummy/test/makers.rb +5 -3
- metadata +4 -2
data/test/dummy/test/makers.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
Makers.define do
|
2
2
|
|
3
|
+
trait :user do
|
4
|
+
association :user, maker: :owner
|
5
|
+
end
|
6
|
+
|
3
7
|
maker :user, aliases: :owner do
|
4
8
|
name 'name'
|
5
9
|
sequence(:username) { name }
|
@@ -15,8 +19,6 @@ Makers.define do
|
|
15
19
|
end
|
16
20
|
end
|
17
21
|
|
18
|
-
maker :post
|
19
|
-
association :user, maker: :owner
|
20
|
-
end
|
22
|
+
maker :post, traits: :user
|
21
23
|
|
22
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: makers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mmontossi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -59,10 +59,12 @@ files:
|
|
59
59
|
- lib/makers.rb
|
60
60
|
- lib/makers/definitions.rb
|
61
61
|
- lib/makers/dsl/maker.rb
|
62
|
+
- lib/makers/dsl/trait.rb
|
62
63
|
- lib/makers/extensions/active_support/test_case.rb
|
63
64
|
- lib/makers/maker.rb
|
64
65
|
- lib/makers/proxy.rb
|
65
66
|
- lib/makers/railtie.rb
|
67
|
+
- lib/makers/traits.rb
|
66
68
|
- lib/makers/version.rb
|
67
69
|
- test/dummy/Rakefile
|
68
70
|
- test/dummy/app/assets/javascripts/application.js
|