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.
@@ -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 do
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.2
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-07 00:00:00.000000000 Z
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