blocks 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +0 -2
- data/VERSION +1 -1
- data/blocks.gemspec +2 -23
- data/lib/blocks/base.rb +10 -1
- data/lib/blocks/container.rb +1 -1
- metadata +11 -117
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.1
|
data/blocks.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "blocks"
|
8
|
-
s.version = "2.2.
|
8
|
+
s.version = "2.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andrew Hunter"]
|
12
|
-
s.date = "2013-08-
|
12
|
+
s.date = "2013-08-20"
|
13
13
|
s.description = "Blocks goes beyond blocks and partials"
|
14
14
|
s.email = "hunterae@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -48,42 +48,21 @@ Gem::Specification.new do |s|
|
|
48
48
|
s.specification_version = 3
|
49
49
|
|
50
50
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
51
|
-
s.add_runtime_dependency(%q<blocks>, [">= 0"])
|
52
51
|
s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
|
53
52
|
s.add_development_dependency(%q<bundler>, ["~> 1.1.5"])
|
54
53
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
55
54
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
56
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.1.5"])
|
57
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
58
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
59
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.1.5"])
|
60
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
61
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
62
55
|
else
|
63
|
-
s.add_dependency(%q<blocks>, [">= 0"])
|
64
56
|
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
65
57
|
s.add_dependency(%q<bundler>, ["~> 1.1.5"])
|
66
58
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
67
59
|
s.add_dependency(%q<rcov>, [">= 0"])
|
68
|
-
s.add_dependency(%q<bundler>, ["~> 1.1.5"])
|
69
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
70
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
71
|
-
s.add_dependency(%q<bundler>, ["~> 1.1.5"])
|
72
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
73
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
74
60
|
end
|
75
61
|
else
|
76
|
-
s.add_dependency(%q<blocks>, [">= 0"])
|
77
62
|
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
78
63
|
s.add_dependency(%q<bundler>, ["~> 1.1.5"])
|
79
64
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
80
65
|
s.add_dependency(%q<rcov>, [">= 0"])
|
81
|
-
s.add_dependency(%q<bundler>, ["~> 1.1.5"])
|
82
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
83
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
84
|
-
s.add_dependency(%q<bundler>, ["~> 1.1.5"])
|
85
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
86
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
87
66
|
end
|
88
67
|
end
|
89
68
|
|
data/lib/blocks/base.rb
CHANGED
@@ -619,11 +619,20 @@ module Blocks
|
|
619
619
|
# Build a Blocks::Container object given the passed in arguments
|
620
620
|
def build_block_container(*args, &block)
|
621
621
|
options = args.extract_options!
|
622
|
-
|
622
|
+
|
623
|
+
anonymous = false
|
624
|
+
if args.first
|
625
|
+
name = args.shift
|
626
|
+
else
|
627
|
+
name = self.anonymous_block_name
|
628
|
+
anonymous = true
|
629
|
+
end
|
630
|
+
|
623
631
|
block_container = Blocks::Container.new
|
624
632
|
block_container.name = name.to_sym
|
625
633
|
block_container.options = options
|
626
634
|
block_container.block = block
|
635
|
+
block_container.anonymous = anonymous
|
627
636
|
block_container
|
628
637
|
end
|
629
638
|
|
data/lib/blocks/container.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blocks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 2.2.
|
9
|
+
- 1
|
10
|
+
version: 2.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrew Hunter
|
@@ -15,24 +15,10 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-08-
|
18
|
+
date: 2013-08-20 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
22
|
-
none: false
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
hash: 3
|
27
|
-
segments:
|
28
|
-
- 0
|
29
|
-
version: "0"
|
30
|
-
requirement: *id001
|
31
|
-
prerelease: false
|
32
|
-
name: blocks
|
33
|
-
type: :runtime
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
version_requirements: &id002 !ruby/object:Gem::Requirement
|
36
22
|
none: false
|
37
23
|
requirements:
|
38
24
|
- - ">="
|
@@ -43,104 +29,12 @@ dependencies:
|
|
43
29
|
- 0
|
44
30
|
- 0
|
45
31
|
version: 3.0.0
|
46
|
-
requirement: *
|
32
|
+
requirement: *id001
|
47
33
|
prerelease: false
|
48
34
|
name: rails
|
49
35
|
type: :runtime
|
50
36
|
- !ruby/object:Gem::Dependency
|
51
|
-
version_requirements: &
|
52
|
-
none: false
|
53
|
-
requirements:
|
54
|
-
- - ~>
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
hash: 25
|
57
|
-
segments:
|
58
|
-
- 1
|
59
|
-
- 1
|
60
|
-
- 5
|
61
|
-
version: 1.1.5
|
62
|
-
requirement: *id003
|
63
|
-
prerelease: false
|
64
|
-
name: bundler
|
65
|
-
type: :development
|
66
|
-
- !ruby/object:Gem::Dependency
|
67
|
-
version_requirements: &id004 !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
|
-
requirements:
|
70
|
-
- - ~>
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
hash: 7
|
73
|
-
segments:
|
74
|
-
- 1
|
75
|
-
- 6
|
76
|
-
- 4
|
77
|
-
version: 1.6.4
|
78
|
-
requirement: *id004
|
79
|
-
prerelease: false
|
80
|
-
name: jeweler
|
81
|
-
type: :development
|
82
|
-
- !ruby/object:Gem::Dependency
|
83
|
-
version_requirements: &id005 !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
|
-
requirements:
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
hash: 3
|
89
|
-
segments:
|
90
|
-
- 0
|
91
|
-
version: "0"
|
92
|
-
requirement: *id005
|
93
|
-
prerelease: false
|
94
|
-
name: rcov
|
95
|
-
type: :development
|
96
|
-
- !ruby/object:Gem::Dependency
|
97
|
-
version_requirements: &id006 !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
|
-
requirements:
|
100
|
-
- - ~>
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
hash: 25
|
103
|
-
segments:
|
104
|
-
- 1
|
105
|
-
- 1
|
106
|
-
- 5
|
107
|
-
version: 1.1.5
|
108
|
-
requirement: *id006
|
109
|
-
prerelease: false
|
110
|
-
name: bundler
|
111
|
-
type: :development
|
112
|
-
- !ruby/object:Gem::Dependency
|
113
|
-
version_requirements: &id007 !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
|
-
requirements:
|
116
|
-
- - ~>
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
hash: 7
|
119
|
-
segments:
|
120
|
-
- 1
|
121
|
-
- 6
|
122
|
-
- 4
|
123
|
-
version: 1.6.4
|
124
|
-
requirement: *id007
|
125
|
-
prerelease: false
|
126
|
-
name: jeweler
|
127
|
-
type: :development
|
128
|
-
- !ruby/object:Gem::Dependency
|
129
|
-
version_requirements: &id008 !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
|
-
requirements:
|
132
|
-
- - ">="
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
hash: 3
|
135
|
-
segments:
|
136
|
-
- 0
|
137
|
-
version: "0"
|
138
|
-
requirement: *id008
|
139
|
-
prerelease: false
|
140
|
-
name: rcov
|
141
|
-
type: :development
|
142
|
-
- !ruby/object:Gem::Dependency
|
143
|
-
version_requirements: &id009 !ruby/object:Gem::Requirement
|
37
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
144
38
|
none: false
|
145
39
|
requirements:
|
146
40
|
- - ~>
|
@@ -151,12 +45,12 @@ dependencies:
|
|
151
45
|
- 1
|
152
46
|
- 5
|
153
47
|
version: 1.1.5
|
154
|
-
requirement: *
|
48
|
+
requirement: *id002
|
155
49
|
prerelease: false
|
156
50
|
name: bundler
|
157
51
|
type: :development
|
158
52
|
- !ruby/object:Gem::Dependency
|
159
|
-
version_requirements: &
|
53
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
160
54
|
none: false
|
161
55
|
requirements:
|
162
56
|
- - ~>
|
@@ -167,12 +61,12 @@ dependencies:
|
|
167
61
|
- 6
|
168
62
|
- 4
|
169
63
|
version: 1.6.4
|
170
|
-
requirement: *
|
64
|
+
requirement: *id003
|
171
65
|
prerelease: false
|
172
66
|
name: jeweler
|
173
67
|
type: :development
|
174
68
|
- !ruby/object:Gem::Dependency
|
175
|
-
version_requirements: &
|
69
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
176
70
|
none: false
|
177
71
|
requirements:
|
178
72
|
- - ">="
|
@@ -181,7 +75,7 @@ dependencies:
|
|
181
75
|
segments:
|
182
76
|
- 0
|
183
77
|
version: "0"
|
184
|
-
requirement: *
|
78
|
+
requirement: *id004
|
185
79
|
prerelease: false
|
186
80
|
name: rcov
|
187
81
|
type: :development
|