miniskirt 1.1.1 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/miniskirt.rb +3 -3
  2. data/miniskirt_test.rb +1 -5
  3. metadata +34 -8
@@ -21,9 +21,9 @@ class Miniskirt < Struct.new(:__klass__)
21
21
  end
22
22
 
23
23
  def build name, attrs = {}
24
- (h, opts, n = @@attrs[name = name.to_s]) and klass = opts[:class] || name
25
- p = opts[:parent] and (h, klass = @@attrs[p = p.to_s][0].merge(h), p)
26
- (m = klass.is_a?(Class) ? klass : klass.to_s.classify.constantize).new do |r|
24
+ (h, opts, n = @@attrs[name = name.to_s]) and m = opts[:class] || name
25
+ p = opts[:parent] and (h, m = @@attrs[p = p.to_s][0].merge(h), p)
26
+ (m = m.is_a?(Class) ? m : m.to_s.classify.constantize).new.tap do |r|
27
27
  attrs.symbolize_keys!.reverse_update(h).each do |k, v|
28
28
  r.send "#{k}=", case v when String # Sequence and interpolate.
29
29
  v.sub(/%\d*d/) {|d| d % n ||= (
@@ -92,10 +92,6 @@ class Mock
92
92
  @@maximum
93
93
  end
94
94
 
95
- def initialize
96
- yield self
97
- end
98
-
99
95
  def save!
100
96
  @@maximum = @@maximum.to_i + 1 unless @saved
101
97
  @saved = true
@@ -130,4 +126,4 @@ end
130
126
 
131
127
  Miniskirt.define :guest, :class => :user do |f|
132
128
  f.login "guest"
133
- end
129
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miniskirt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: '1.2'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-21 00:00:00.000000000 Z
12
+ date: 2012-08-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70258719447420 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,18 +21,44 @@ dependencies:
21
21
  version: '2.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70258719447420
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '2.2'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rake
27
- requirement: &70258719446060 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 0.9.2.2
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 0.9.2.2
46
+ - !ruby/object:Gem::Dependency
47
+ name: i18n
48
+ requirement: !ruby/object:Gem::Requirement
28
49
  none: false
29
50
  requirements:
30
51
  - - ~>
31
52
  - !ruby/object:Gem::Version
32
- version: 0.9.2
53
+ version: 0.6.0
33
54
  type: :development
34
55
  prerelease: false
35
- version_requirements: *70258719446060
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 0.6.0
36
62
  description: Test::Unit begot MiniTest; factory_girl begets Miniskirt.
37
63
  email: stephen@stephencelis.com
38
64
  executables: []
@@ -61,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
87
  version: '0'
62
88
  requirements: []
63
89
  rubyforge_project:
64
- rubygems_version: 1.8.11
90
+ rubygems_version: 1.8.23
65
91
  signing_key:
66
92
  specification_version: 3
67
93
  summary: factory_girl, relaxed