inversion 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/ChangeLog CHANGED
@@ -1,8 +1,40 @@
1
+ 2012-03-16 Michael Granger <ged@FaerieMUD.org>
2
+
3
+ * .hgtags:
4
+ Added tag v0.6.1 for changeset e839621aac29
5
+ [63e1a917c7ad] [tip]
6
+
7
+ * .hgsigs:
8
+ Added signature for changeset 1947a577fae1
9
+ [e839621aac29] [v0.6.1]
10
+
11
+ * History.rdoc, lib/inversion.rb:
12
+ Bump the patch version and update History.
13
+ [1947a577fae1]
14
+
15
+ 2012-03-15 Michael Granger <ged@FaerieMUD.org>
16
+
17
+ * experiments/fivefish-profile1.graffle, experiments/fivefish-
18
+ profile2.graffle, experiments/fivefish-profile3.graffle, experiments
19
+ /fivefish-profile4.graffle, lib/inversion/renderstate.rb,
20
+ lib/inversion/template/attrtag.rb,
21
+ lib/inversion/template/importtag.rb:
22
+ Comment out some of the slowest debugging and add profile graphs.
23
+ [c0c5f6da6144]
24
+
1
25
  2012-03-13 Michael Granger <ged@FaerieMUD.org>
2
26
 
27
+ * .hgtags:
28
+ Added tag v0.6.0 for changeset c07de9868874
29
+ [fe598279830a]
30
+
31
+ * .hgsigs:
32
+ Added signature for changeset 2397134edcb3
33
+ [c07de9868874] [v0.6.0]
34
+
3
35
  * History.rdoc, lib/inversion.rb:
4
36
  Bump the minor version, update History.
5
- [2397134edcb3] [tip]
37
+ [2397134edcb3]
6
38
 
7
39
  * lib/inversion/template/fortag.rb, manual/src/tags.page,
8
40
  spec/inversion/template/fortag_spec.rb:
@@ -13,14 +45,14 @@
13
45
 
14
46
  * .rvm.gems, .rvmrc:
15
47
  Update .rvm files
16
- [6fb2d6971357] [github/master]
48
+ [6fb2d6971357]
17
49
 
18
50
  2012-03-05 Mahlon E. Smith <mahlon@martini.nu>
19
51
 
20
52
  * lib/inversion/template.rb, spec/inversion/template_spec.rb:
21
53
  Err, no. Lets try that again. 10,000 monkeys pounding away at
22
54
  keyboards are responsible. Or maybe just one.
23
- [7c42e6b20c11]
55
+ [7c42e6b20c11] [github/master]
24
56
 
25
57
  * lib/inversion/template.rb, manual/src/templates.page,
26
58
  spec/inversion/template_spec.rb:
data/History.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ == v0.6.1 [2012-03-16] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ - Commented out some of the more expensive debug logging for an order
4
+ of magnitude increase in render speed.
5
+
6
+
1
7
  == v0.6.0 [2012-03-13] Michael Granger <ged@FaerieMUD.org>
2
8
 
3
9
  - Fix a bug with "for" tag iteration over complex data structures
data/lib/inversion.rb CHANGED
@@ -26,10 +26,10 @@ module Inversion
26
26
  require 'inversion/monkeypatches'
27
27
 
28
28
  # Library version constant
29
- VERSION = '0.6.0'
29
+ VERSION = '0.6.1'
30
30
 
31
31
  # Version-control revision constant
32
- REVISION = %q$Revision: 2397134edcb3 $
32
+ REVISION = %q$Revision: 1947a577fae1 $
33
33
 
34
34
  #
35
35
  # Logging
@@ -22,8 +22,8 @@ class Inversion::RenderState
22
22
  containerstate = nil
23
23
  end
24
24
 
25
- self.log.debug "Creating a render state with attributes: %p" %
26
- [ initial_attributes ]
25
+ # self.log.debug "Creating a render state with attributes: %p" %
26
+ # [ initial_attributes ]
27
27
 
28
28
  @start_time = Time.now
29
29
  @containerstate = containerstate
@@ -189,7 +189,7 @@ class Inversion::RenderState
189
189
  ### the return value will be appended instead. This will continue until the returned
190
190
  ### object either doesn't respond to #render or #renders as itself.
191
191
  def <<( node )
192
- self.log.debug "Appending a %p to %p" % [ node.class, self ]
192
+ # self.log.debug "Appending a %p to %p" % [ node.class, self ]
193
193
  original_node = node
194
194
  original_node.before_rendering( self )
195
195
 
@@ -200,17 +200,17 @@ class Inversion::RenderState
200
200
  begin
201
201
  # Allow render to be delegated to subobjects
202
202
  while node.respond_to?( :render ) && node != previous_node
203
- self.log.debug " delegated rendering to: %p" % [ node ]
203
+ # self.log.debug " delegated rendering to: %p" % [ node ]
204
204
  previous_node = node
205
205
  node = node.render( self )
206
206
  end
207
207
 
208
- self.log.debug " adding a %p to the destination (%p)" %
209
- [ node.class, self.destination.class ]
208
+ # self.log.debug " adding a %p to the destination (%p)" %
209
+ # [ node.class, self.destination.class ]
210
210
  self.destination << node
211
- self.log.debug " just appended %p to %p" % [ node, self.destination ]
211
+ # self.log.debug " just appended %p to %p" % [ node, self.destination ]
212
212
  rescue ::StandardError => err
213
- self.log.debug " handling a %p while rendering: %s" % [ err.class, err.message ]
213
+ # self.log.debug " handling a %p while rendering: %s" % [ err.class, err.message ]
214
214
  self.destination << self.handle_render_error( original_node, err )
215
215
  end
216
216
  end
@@ -376,7 +376,7 @@ class Inversion::RenderState
376
376
 
377
377
  ### Recursively copy the specified +obj+ and return the result.
378
378
  def deep_copy( obj )
379
- Inversion.log.debug "Deep copying: %p" % [ obj ]
379
+ # Inversion.log.debug "Deep copying: %p" % [ obj ]
380
380
 
381
381
  # Handle mocks during testing
382
382
  return obj if obj.class.name == 'RSpec::Mocks::Mock'
@@ -79,7 +79,7 @@ class Inversion::Template::AttrTag < Inversion::Template::CodeTag
79
79
 
80
80
  ### Render the tag attributes of the specified +renderstate+ and return them.
81
81
  def render( renderstate )
82
- self.log.debug "Rendering %p with state: %p" % [ self, renderstate ]
82
+ # self.log.debug "Rendering %p with state: %p" % [ self, renderstate ]
83
83
 
84
84
  # Evaluate the tag body and return either false value
85
85
  value = self.evaluate( renderstate ) or return value
@@ -97,17 +97,17 @@ class Inversion::Template::AttrTag < Inversion::Template::CodeTag
97
97
  def evaluate( renderstate )
98
98
  value = nil
99
99
  attribute = renderstate.attributes[ self.name.to_sym ]
100
- self.log.debug " initial attribute: %p" % [ attribute ]
100
+ # self.log.debug " initial attribute: %p" % [ attribute ]
101
101
 
102
102
  # Evaluate the method chain (if there is one) against the attribute
103
103
  if self.methodchain
104
104
  methodchain = "self" + self.methodchain
105
- self.log.debug " evaling methodchain: %p on: %p" % [ methodchain, attribute ]
105
+ # self.log.debug " evaling methodchain: %p on: %p" % [ methodchain, attribute ]
106
106
  value = attribute.instance_eval( methodchain )
107
107
  else
108
108
  value = attribute
109
109
  end
110
- self.log.debug " evaluated value: %p" % [ value ]
110
+ # self.log.debug " evaluated value: %p" % [ value ]
111
111
 
112
112
  return value
113
113
  end
@@ -34,8 +34,8 @@ class Inversion::Template::ImportTag < Inversion::Template::Tag
34
34
  ### Merge the inherited renderstate into the current template's +renderstate+.
35
35
  def render( renderstate )
36
36
  if (( cstate = renderstate.containerstate ))
37
- self.log.debug "Importing inherited attributes: %p from %p" %
38
- [ @attributes, cstate.attributes ]
37
+ # self.log.debug "Importing inherited attributes: %p from %p" %
38
+ # [ @attributes, cstate.attributes ]
39
39
 
40
40
  # Pick out the attributes that are being imported
41
41
  inherited_attrs = @attributes.inject( {} ) do |attrs, key|
@@ -46,10 +46,10 @@ class Inversion::Template::ImportTag < Inversion::Template::Tag
46
46
  # Merge, but overwrite unset values with inherited ones
47
47
  renderstate.attributes.merge!( inherited_attrs ) do |key, oldval, newval|
48
48
  if oldval.nil?
49
- self.log.debug "Importing attribute %p: %p" % [ key, newval ]
49
+ # self.log.debug "Importing attribute %p: %p" % [ key, newval ]
50
50
  newval
51
51
  else
52
- self.log.debug "Not importing attribute %p: already set to %p" % [ key, oldval ]
52
+ # self.log.debug "Not importing attribute %p: already set to %p" % [ key, oldval ]
53
53
  oldval
54
54
  end
55
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inversion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -37,11 +37,11 @@ cert_chain:
37
37
  YUhDS0xaZFNLai9SSHVUT3QrZ2JsUmV4OEZBaDhOZUEKY21saFhlNDZwWk5K
38
38
  Z1dLYnhaYWg4NWpJang5NWhSOHZPSStOQU01aUg5a09xSzEzRHJ4YWNUS1Bo
39
39
  cWo1UGp3RgotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
40
- date: 2012-03-14 00:00:00.000000000 Z
40
+ date: 2012-03-16 00:00:00.000000000 Z
41
41
  dependencies:
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: hoe-mercurial
44
- requirement: &70276480362560 !ruby/object:Gem::Requirement
44
+ requirement: &70264152436760 !ruby/object:Gem::Requirement
45
45
  none: false
46
46
  requirements:
47
47
  - - ~>
@@ -49,10 +49,10 @@ dependencies:
49
49
  version: 1.3.1
50
50
  type: :development
51
51
  prerelease: false
52
- version_requirements: *70276480362560
52
+ version_requirements: *70264152436760
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: hoe-manualgen
55
- requirement: &70276480378460 !ruby/object:Gem::Requirement
55
+ requirement: &70264152436060 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
58
58
  - - ~>
@@ -60,10 +60,10 @@ dependencies:
60
60
  version: 0.2.0
61
61
  type: :development
62
62
  prerelease: false
63
- version_requirements: *70276480378460
63
+ version_requirements: *70264152436060
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: hoe-highline
66
- requirement: &70276480377960 !ruby/object:Gem::Requirement
66
+ requirement: &70264152435540 !ruby/object:Gem::Requirement
67
67
  none: false
68
68
  requirements:
69
69
  - - ~>
@@ -71,10 +71,10 @@ dependencies:
71
71
  version: 0.0.1
72
72
  type: :development
73
73
  prerelease: false
74
- version_requirements: *70276480377960
74
+ version_requirements: *70264152435540
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rdoc
77
- requirement: &70276480377180 !ruby/object:Gem::Requirement
77
+ requirement: &70264152478140 !ruby/object:Gem::Requirement
78
78
  none: false
79
79
  requirements:
80
80
  - - ~>
@@ -82,10 +82,10 @@ dependencies:
82
82
  version: '3.12'
83
83
  type: :development
84
84
  prerelease: false
85
- version_requirements: *70276480377180
85
+ version_requirements: *70264152478140
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: rspec
88
- requirement: &70276480376360 !ruby/object:Gem::Requirement
88
+ requirement: &70264152477360 !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
91
  - - ~>
@@ -93,10 +93,10 @@ dependencies:
93
93
  version: '2.8'
94
94
  type: :development
95
95
  prerelease: false
96
- version_requirements: *70276480376360
96
+ version_requirements: *70264152477360
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: tilt
99
- requirement: &70276480375580 !ruby/object:Gem::Requirement
99
+ requirement: &70264152476740 !ruby/object:Gem::Requirement
100
100
  none: false
101
101
  requirements:
102
102
  - - ~>
@@ -104,10 +104,10 @@ dependencies:
104
104
  version: '1.3'
105
105
  type: :development
106
106
  prerelease: false
107
- version_requirements: *70276480375580
107
+ version_requirements: *70264152476740
108
108
  - !ruby/object:Gem::Dependency
109
109
  name: sinatra
110
- requirement: &70276480374200 !ruby/object:Gem::Requirement
110
+ requirement: &70264152475940 !ruby/object:Gem::Requirement
111
111
  none: false
112
112
  requirements:
113
113
  - - ~>
@@ -115,10 +115,10 @@ dependencies:
115
115
  version: '1.2'
116
116
  type: :development
117
117
  prerelease: false
118
- version_requirements: *70276480374200
118
+ version_requirements: *70264152475940
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: rack-test
121
- requirement: &70276480373760 !ruby/object:Gem::Requirement
121
+ requirement: &70264152474980 !ruby/object:Gem::Requirement
122
122
  none: false
123
123
  requirements:
124
124
  - - ~>
@@ -126,10 +126,10 @@ dependencies:
126
126
  version: '0.6'
127
127
  type: :development
128
128
  prerelease: false
129
- version_requirements: *70276480373760
129
+ version_requirements: *70264152474980
130
130
  - !ruby/object:Gem::Dependency
131
131
  name: simplecov
132
- requirement: &70276480372880 !ruby/object:Gem::Requirement
132
+ requirement: &70264152474040 !ruby/object:Gem::Requirement
133
133
  none: false
134
134
  requirements:
135
135
  - - ~>
@@ -137,21 +137,10 @@ dependencies:
137
137
  version: '0.4'
138
138
  type: :development
139
139
  prerelease: false
140
- version_requirements: *70276480372880
141
- - !ruby/object:Gem::Dependency
142
- name: hoe-manualgen
143
- requirement: &70276480372420 !ruby/object:Gem::Requirement
144
- none: false
145
- requirements:
146
- - - ~>
147
- - !ruby/object:Gem::Version
148
- version: '0.2'
149
- type: :development
150
- prerelease: false
151
- version_requirements: *70276480372420
140
+ version_requirements: *70264152474040
152
141
  - !ruby/object:Gem::Dependency
153
142
  name: trollop
154
- requirement: &70276480372000 !ruby/object:Gem::Requirement
143
+ requirement: &70264152472820 !ruby/object:Gem::Requirement
155
144
  none: false
156
145
  requirements:
157
146
  - - ~>
@@ -159,10 +148,10 @@ dependencies:
159
148
  version: '1.16'
160
149
  type: :development
161
150
  prerelease: false
162
- version_requirements: *70276480372000
151
+ version_requirements: *70264152472820
163
152
  - !ruby/object:Gem::Dependency
164
153
  name: highline
165
- requirement: &70276480371560 !ruby/object:Gem::Requirement
154
+ requirement: &70264152471760 !ruby/object:Gem::Requirement
166
155
  none: false
167
156
  requirements:
168
157
  - - ~>
@@ -170,10 +159,10 @@ dependencies:
170
159
  version: '1.6'
171
160
  type: :development
172
161
  prerelease: false
173
- version_requirements: *70276480371560
162
+ version_requirements: *70264152471760
174
163
  - !ruby/object:Gem::Dependency
175
164
  name: sysexits
176
- requirement: &70276480371140 !ruby/object:Gem::Requirement
165
+ requirement: &70264152471180 !ruby/object:Gem::Requirement
177
166
  none: false
178
167
  requirements:
179
168
  - - ~>
@@ -181,29 +170,18 @@ dependencies:
181
170
  version: '1.0'
182
171
  type: :development
183
172
  prerelease: false
184
- version_requirements: *70276480371140
185
- - !ruby/object:Gem::Dependency
186
- name: rdoc
187
- requirement: &70276480370680 !ruby/object:Gem::Requirement
188
- none: false
189
- requirements:
190
- - - ~>
191
- - !ruby/object:Gem::Version
192
- version: '3.10'
193
- type: :development
194
- prerelease: false
195
- version_requirements: *70276480370680
173
+ version_requirements: *70264152471180
196
174
  - !ruby/object:Gem::Dependency
197
175
  name: hoe
198
- requirement: &70276480221500 !ruby/object:Gem::Requirement
176
+ requirement: &70264152486800 !ruby/object:Gem::Requirement
199
177
  none: false
200
178
  requirements:
201
179
  - - ~>
202
180
  - !ruby/object:Gem::Version
203
- version: '2.13'
181
+ version: '2.16'
204
182
  type: :development
205
183
  prerelease: false
206
- version_requirements: *70276480221500
184
+ version_requirements: *70264152486800
207
185
  description: ! 'Inversion is a templating system for Ruby. It uses the "Inversion
208
186
  of Control"
209
187
 
@@ -219,9 +197,9 @@ executables:
219
197
  - inversion
220
198
  extensions: []
221
199
  extra_rdoc_files:
200
+ - History.rdoc
222
201
  - Manifest.txt
223
202
  - README.rdoc
224
- - History.rdoc
225
203
  files:
226
204
  - ChangeLog
227
205
  - History.rdoc
metadata.gz.sig CHANGED
Binary file