wlang 2.3.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ # 2.3.1 / 2014-10-23
2
+
3
+ * Fix bug (empty? not defined) when using an object as sinatra's locals
4
+
1
5
  # 2.3.0 / 2014-08-04
2
6
 
3
7
  * Allowed Citrus to 3.0
@@ -60,9 +60,14 @@ module WLang
60
60
  end
61
61
 
62
62
  def call_args_conventions(args)
63
+ # Ensure a buffer as lat argument
63
64
  args << '' unless args.last.respond_to?(:<<)
64
65
  buffer = args.pop
66
+
67
+ # puts locals if any
65
68
  args << self.locals unless self.locals.empty?
69
+
70
+ # create a scope now
66
71
  scope = WLang::Scope.chain(args)
67
72
  [scope, buffer]
68
73
  end
@@ -34,8 +34,10 @@ module Tilt
34
34
  end
35
35
 
36
36
  def evaluate(scope, locals, &block)
37
- locals[:yield] = block if block
38
- @engine.render(scope, locals.empty? ? nil : locals)
37
+ args = [scope]
38
+ args << locals if locals && !(locals.respond_to?(:empty?) && locals.empty?)
39
+ args << { :yield => block } if block
40
+ @engine.render(*args)
39
41
  end
40
42
 
41
43
  end
@@ -3,7 +3,7 @@ module WLang
3
3
 
4
4
  MAJOR = 2
5
5
  MINOR = 3
6
- TINY = 0
6
+ TINY = 1
7
7
 
8
8
  def self.to_s
9
9
  [ MAJOR, MINOR, TINY ].join('.')
@@ -12,7 +12,7 @@ variables:
12
12
  upper:
13
13
  WLang
14
14
  version:
15
- 2.3.0
15
+ 2.3.1
16
16
  summary: |-
17
17
  WLang is a powerful code generation and templating engine
18
18
  description: |-
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wlang
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Bernard Lambeau
@@ -9,189 +10,220 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2014-08-04 00:00:00.000000000 Z
13
+ date: 2014-10-23 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: awesome_print
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
- - - "~>"
20
+ - - ~>
19
21
  - !ruby/object:Gem::Version
20
22
  version: 1.0.2
21
23
  type: :development
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
- - - "~>"
28
+ - - ~>
26
29
  - !ruby/object:Gem::Version
27
30
  version: 1.0.2
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: tilt
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
- - - "~>"
36
+ - - ~>
33
37
  - !ruby/object:Gem::Version
34
38
  version: '1.3'
35
39
  type: :development
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
- - - "~>"
44
+ - - ~>
40
45
  - !ruby/object:Gem::Version
41
46
  version: '1.3'
42
47
  - !ruby/object:Gem::Dependency
43
48
  name: rake
44
49
  requirement: !ruby/object:Gem::Requirement
50
+ none: false
45
51
  requirements:
46
- - - "~>"
52
+ - - ~>
47
53
  - !ruby/object:Gem::Version
48
54
  version: 0.9.2
49
55
  type: :development
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
52
59
  requirements:
53
- - - "~>"
60
+ - - ~>
54
61
  - !ruby/object:Gem::Version
55
62
  version: 0.9.2
56
63
  - !ruby/object:Gem::Dependency
57
64
  name: bundler
58
65
  requirement: !ruby/object:Gem::Requirement
66
+ none: false
59
67
  requirements:
60
- - - "~>"
68
+ - - ~>
61
69
  - !ruby/object:Gem::Version
62
70
  version: '1.0'
63
71
  type: :development
64
72
  prerelease: false
65
73
  version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
66
75
  requirements:
67
- - - "~>"
76
+ - - ~>
68
77
  - !ruby/object:Gem::Version
69
78
  version: '1.0'
70
79
  - !ruby/object:Gem::Dependency
71
80
  name: rspec
72
81
  requirement: !ruby/object:Gem::Requirement
82
+ none: false
73
83
  requirements:
74
- - - "~>"
84
+ - - ~>
75
85
  - !ruby/object:Gem::Version
76
86
  version: 2.10.0
77
87
  type: :development
78
88
  prerelease: false
79
89
  version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
80
91
  requirements:
81
- - - "~>"
92
+ - - ~>
82
93
  - !ruby/object:Gem::Version
83
94
  version: 2.10.0
84
95
  - !ruby/object:Gem::Dependency
85
96
  name: sinatra
86
97
  requirement: !ruby/object:Gem::Requirement
98
+ none: false
87
99
  requirements:
88
- - - ">="
100
+ - - ! '>='
89
101
  - !ruby/object:Gem::Version
90
102
  version: '1.4'
91
103
  type: :development
92
104
  prerelease: false
93
105
  version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
94
107
  requirements:
95
- - - ">="
108
+ - - ! '>='
96
109
  - !ruby/object:Gem::Version
97
110
  version: '1.4'
98
111
  - !ruby/object:Gem::Dependency
99
112
  name: rack-test
100
113
  requirement: !ruby/object:Gem::Requirement
114
+ none: false
101
115
  requirements:
102
- - - "~>"
116
+ - - ~>
103
117
  - !ruby/object:Gem::Version
104
118
  version: '0.6'
105
119
  type: :development
106
120
  prerelease: false
107
121
  version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
108
123
  requirements:
109
- - - "~>"
124
+ - - ~>
110
125
  - !ruby/object:Gem::Version
111
126
  version: '0.6'
112
127
  - !ruby/object:Gem::Dependency
113
128
  name: citrus
114
129
  requirement: !ruby/object:Gem::Requirement
130
+ none: false
115
131
  requirements:
116
- - - ">="
132
+ - - ! '>='
117
133
  - !ruby/object:Gem::Version
118
134
  version: '2.4'
119
- - - "<"
135
+ - - <
120
136
  - !ruby/object:Gem::Version
121
137
  version: '4.0'
122
138
  type: :runtime
123
139
  prerelease: false
124
140
  version_requirements: !ruby/object:Gem::Requirement
141
+ none: false
125
142
  requirements:
126
- - - ">="
143
+ - - ! '>='
127
144
  - !ruby/object:Gem::Version
128
145
  version: '2.4'
129
- - - "<"
146
+ - - <
130
147
  - !ruby/object:Gem::Version
131
148
  version: '4.0'
132
149
  - !ruby/object:Gem::Dependency
133
150
  name: temple
134
151
  requirement: !ruby/object:Gem::Requirement
152
+ none: false
135
153
  requirements:
136
- - - "~>"
154
+ - - ~>
137
155
  - !ruby/object:Gem::Version
138
156
  version: '0.6'
139
157
  type: :runtime
140
158
  prerelease: false
141
159
  version_requirements: !ruby/object:Gem::Requirement
160
+ none: false
142
161
  requirements:
143
- - - "~>"
162
+ - - ~>
144
163
  - !ruby/object:Gem::Version
145
164
  version: '0.6'
146
165
  - !ruby/object:Gem::Dependency
147
166
  name: quickl
148
167
  requirement: !ruby/object:Gem::Requirement
168
+ none: false
149
169
  requirements:
150
- - - "~>"
170
+ - - ~>
151
171
  - !ruby/object:Gem::Version
152
172
  version: 0.4.3
153
173
  type: :runtime
154
174
  prerelease: false
155
175
  version_requirements: !ruby/object:Gem::Requirement
176
+ none: false
156
177
  requirements:
157
- - - "~>"
178
+ - - ~>
158
179
  - !ruby/object:Gem::Version
159
180
  version: 0.4.3
160
181
  - !ruby/object:Gem::Dependency
161
182
  name: path
162
183
  requirement: !ruby/object:Gem::Requirement
184
+ none: false
163
185
  requirements:
164
- - - "~>"
186
+ - - ~>
165
187
  - !ruby/object:Gem::Version
166
188
  version: '1.3'
167
189
  type: :runtime
168
190
  prerelease: false
169
191
  version_requirements: !ruby/object:Gem::Requirement
192
+ none: false
170
193
  requirements:
171
- - - "~>"
194
+ - - ~>
172
195
  - !ruby/object:Gem::Version
173
196
  version: '1.3'
174
197
  - !ruby/object:Gem::Dependency
175
198
  name: backports
176
199
  requirement: !ruby/object:Gem::Requirement
200
+ none: false
177
201
  requirements:
178
- - - "~>"
202
+ - - ~>
179
203
  - !ruby/object:Gem::Version
180
204
  version: '2.6'
181
205
  type: :runtime
182
206
  prerelease: false
183
207
  version_requirements: !ruby/object:Gem::Requirement
208
+ none: false
184
209
  requirements:
185
- - - "~>"
210
+ - - ~>
186
211
  - !ruby/object:Gem::Version
187
212
  version: '2.6'
188
- description: |-
189
- WLang is a general-purpose *code generation*/*templating engine*. It's main aim is to
190
- help you generating web pages, sql queries, ruby code (that is, generating text in
213
+ description: ! 'WLang is a general-purpose *code generation*/*templating engine*.
214
+ It''s main aim is to
215
+
216
+ help you generating web pages, sql queries, ruby code (that is, generating text
217
+ in
218
+
191
219
  general) without having to worry too much about html entities encoding, sql back
192
- quoting, string escaping and the like. WLang proposes a generic engine that you can
220
+
221
+ quoting, string escaping and the like. WLang proposes a generic engine that you
222
+ can
223
+
193
224
  easily extend to fit your needs. It also proposes standard instantiations of this
194
- engine for common tasks such as rendering HTML web pages.
225
+
226
+ engine for common tasks such as rendering HTML web pages.'
195
227
  email:
196
228
  - blambeau@gmail.com
197
229
  - llambeau@gmail.com
@@ -203,17 +235,13 @@ extra_rdoc_files:
203
235
  - CHANGELOG.md
204
236
  - LICENCE.md
205
237
  files:
238
+ - wlang.gemspec
239
+ - wlang.noespec
206
240
  - CHANGELOG.md
207
241
  - Gemfile
208
242
  - Gemfile.lock
209
- - LICENCE.md
210
- - Manifest.txt
211
- - README.md
212
- - Rakefile
213
243
  - bin/wlang
214
- - lib/wlang.rb
215
244
  - lib/wlang/command.rb
216
- - lib/wlang/compiler.rb
217
245
  - lib/wlang/compiler/autospacing.rb
218
246
  - lib/wlang/compiler/dialect_enforcer.rb
219
247
  - lib/wlang/compiler/filter.rb
@@ -224,22 +252,28 @@ files:
224
252
  - lib/wlang/compiler/strconcat_flattener.rb
225
253
  - lib/wlang/compiler/to_ruby_abstraction.rb
226
254
  - lib/wlang/compiler/to_ruby_code.rb
255
+ - lib/wlang/compiler.rb
227
256
  - lib/wlang/dialect.rb
228
257
  - lib/wlang/dummy.rb
229
258
  - lib/wlang/html.rb
230
259
  - lib/wlang/loader.rb
231
- - lib/wlang/scope.rb
232
260
  - lib/wlang/scope/binding_scope.rb
233
261
  - lib/wlang/scope/null_scope.rb
234
262
  - lib/wlang/scope/object_scope.rb
235
263
  - lib/wlang/scope/proc_scope.rb
236
264
  - lib/wlang/scope/sinatra_scope.rb
237
- - lib/wlang/source.rb
265
+ - lib/wlang/scope.rb
238
266
  - lib/wlang/source/front_matter.rb
267
+ - lib/wlang/source.rb
239
268
  - lib/wlang/template.rb
240
- - lib/wlang/tilt.rb
241
269
  - lib/wlang/tilt/wlang_template.rb
270
+ - lib/wlang/tilt.rb
242
271
  - lib/wlang/version.rb
272
+ - lib/wlang.rb
273
+ - LICENCE.md
274
+ - Manifest.txt
275
+ - Rakefile
276
+ - README.md
243
277
  - spec/assumptions/test_core.rb
244
278
  - spec/fixtures/dialect/foobar.rb
245
279
  - spec/fixtures/dialect/upcasing.rb
@@ -324,30 +358,32 @@ files:
324
358
  - tasks/spec_test.rake
325
359
  - tasks/unit_test.rake
326
360
  - tasks/yard.rake
327
- - wlang.gemspec
328
- - wlang.noespec
329
361
  homepage: http://github.com/blambeau/wlang
330
362
  licenses: []
331
- metadata: {}
332
363
  post_install_message:
333
364
  rdoc_options: []
334
365
  require_paths:
335
366
  - lib
336
367
  required_ruby_version: !ruby/object:Gem::Requirement
368
+ none: false
337
369
  requirements:
338
- - - ">="
370
+ - - ! '>='
339
371
  - !ruby/object:Gem::Version
340
372
  version: '0'
373
+ segments:
374
+ - 0
375
+ hash: -3753041427578485044
341
376
  required_rubygems_version: !ruby/object:Gem::Requirement
377
+ none: false
342
378
  requirements:
343
- - - ">="
379
+ - - ! '>='
344
380
  - !ruby/object:Gem::Version
345
381
  version: '0'
346
382
  requirements: []
347
383
  rubyforge_project:
348
- rubygems_version: 2.2.2
384
+ rubygems_version: 1.8.25
349
385
  signing_key:
350
- specification_version: 4
386
+ specification_version: 3
351
387
  summary: WLang is a powerful code generation and templating engine
352
388
  test_files:
353
389
  - spec/assumptions/test_core.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 71039c878ff8645cc90bf2816c0eeca42beb706d
4
- data.tar.gz: 95621510303a81919d9fe290b92247c7206828bd
5
- SHA512:
6
- metadata.gz: 7a555793c51b2d25b26b4fe08ffd8758c28f937d942b25960883dca1e540bc9c4ca8bca745d0a9703cbcfed65971891d71a57206b352eb3a492fccee67182024
7
- data.tar.gz: 99a375c1e46504dd7bfb2f161a3fbc384ffe7d8541302866fb341005ef7be0513df37cd9f2cd4c760f65658520e7c95afe6433773660d9b5db843b35ea827c06