wlang 2.2.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +16 -0
- data/Gemfile +1 -21
- data/Gemfile.lock +34 -38
- data/LICENCE.md +17 -19
- data/README.md +26 -64
- data/lib/wlang.rb +0 -9
- data/lib/wlang/compiler/dialect_enforcer.rb +2 -0
- data/lib/wlang/compiler/grammar.citrus +6 -6
- data/lib/wlang/compiler/to_ruby_code.rb +2 -0
- data/lib/wlang/dialect.rb +1 -1
- data/lib/wlang/html.rb +1 -1
- data/lib/wlang/loader.rb +0 -1
- data/lib/wlang/scope.rb +0 -2
- data/lib/wlang/template.rb +14 -13
- data/lib/wlang/version.rb +3 -3
- data/spec/fixtures/templates/front_matter.wlang +4 -0
- data/spec/spec_helper.rb +0 -7
- data/spec/unit/compiler/test_to_ruby_code.rb +2 -2
- data/spec/unit/scope/test_coerce.rb +0 -4
- data/spec/unit/source/test_path.rb +3 -3
- data/spec/unit/source/test_template_content.rb +1 -1
- data/spec/unit/template/test_path.rb +2 -2
- data/spec/unit/template/test_to_ruby_code.rb +1 -1
- data/spec/unit/test_assumptions.rb +1 -1
- data/tasks/test.rake +17 -0
- data/wlang.gemspec +5 -169
- metadata +114 -249
- data/lib/wlang/scope/sinatra_scope.rb +0 -44
- data/lib/wlang/tilt.rb +0 -3
- data/lib/wlang/tilt/wlang_template.rb +0 -43
- data/spec/integration/sinatra/test_partials.rb +0 -35
- data/spec/integration/tilt/test_wlang_template.rb +0 -13
- data/spec/unit/scope/sinatra_scope/test_fetch.rb +0 -28
- data/spec/unit/tilt/test_wlang_template.rb +0 -65
- data/tasks/debug_mail.rake +0 -75
- data/tasks/debug_mail.txt +0 -13
- data/tasks/spec_test.rake +0 -71
- data/tasks/unit_test.rake +0 -76
- data/tasks/yard.rake +0 -51
- data/wlang.noespec +0 -45
data/lib/wlang/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
require 'path'
|
2
2
|
$root_folder ||= Path.backfind('.[Rakefile]')
|
3
3
|
|
4
|
-
require 'tilt'
|
5
|
-
require 'sinatra/base'
|
6
|
-
|
7
4
|
# Require wlang
|
8
5
|
$LOAD_PATH.unshift(($root_folder/:lib).to_s)
|
9
6
|
require 'wlang'
|
@@ -56,10 +53,6 @@ module Helpers
|
|
56
53
|
end
|
57
54
|
end
|
58
55
|
|
59
|
-
def sinatra_app(&block)
|
60
|
-
Sinatra.new(Sinatra::Base, &block).new!
|
61
|
-
end
|
62
|
-
|
63
56
|
end
|
64
57
|
include Helpers
|
65
58
|
|
@@ -9,13 +9,13 @@ module WLang
|
|
9
9
|
|
10
10
|
it 'compiles [:proc, ...]' do
|
11
11
|
source = [:proc, [:static, "Hello world"]]
|
12
|
-
expected = %q{Proc.new{|d1,b1| b1 << ("Hello world") }}
|
12
|
+
expected = %q{Proc.new{|d1,b1| b1 << ("Hello world".freeze) }}
|
13
13
|
generate(source).should eq(expected)
|
14
14
|
end
|
15
15
|
|
16
16
|
it 'compiles [:dispatch, ...]' do
|
17
17
|
source = [:dispatch, :_tag_36, [:proc, [:static, "Hello world"]]]
|
18
|
-
expected = %q{d0._tag_36(b0, Proc.new{|d1,b1| b1 << ("Hello world") })}
|
18
|
+
expected = %q{d0._tag_36(b0, Proc.new{|d1,b1| b1 << ("Hello world".freeze) })}
|
19
19
|
generate(source).should eq(expected)
|
20
20
|
end
|
21
21
|
|
@@ -10,10 +10,6 @@ module WLang
|
|
10
10
|
Scope.coerce(lambda{}).should be_a(Scope::ProcScope)
|
11
11
|
end
|
12
12
|
|
13
|
-
it 'recognizes Sinatra applications' do
|
14
|
-
Scope.coerce(sinatra_app).should be_a(Scope::SinatraScope)
|
15
|
-
end
|
16
|
-
|
17
13
|
it 'falls back to ObjectScope on Hash' do
|
18
14
|
Scope.coerce({}).should be_a(Scope::ObjectScope)
|
19
15
|
end
|
@@ -10,17 +10,17 @@ module WLang
|
|
10
10
|
end
|
11
11
|
|
12
12
|
context 'on a Path' do
|
13
|
-
let(:source){ Path.
|
13
|
+
let(:source){ Path.file }
|
14
14
|
it{ should eq(source.to_s) }
|
15
15
|
end
|
16
16
|
|
17
17
|
context 'on a File' do
|
18
|
-
let(:source){ File.open(Path.
|
18
|
+
let(:source){ File.open(Path.file.to_s) }
|
19
19
|
it{ should eq(__FILE__) }
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'is aliased as to_path' do
|
23
|
-
Source.new(Path.
|
23
|
+
Source.new(Path.file).to_path.should eq(__FILE__)
|
24
24
|
end
|
25
25
|
|
26
26
|
end
|
@@ -10,7 +10,7 @@ module WLang
|
|
10
10
|
end
|
11
11
|
|
12
12
|
context 'when a Path and no option' do
|
13
|
-
let(:template){ Template.new(Path.
|
13
|
+
let(:template){ Template.new(Path.file) }
|
14
14
|
it{ should eq(__FILE__) }
|
15
15
|
end
|
16
16
|
|
@@ -20,7 +20,7 @@ module WLang
|
|
20
20
|
end
|
21
21
|
|
22
22
|
context 'when a path an an option' do
|
23
|
-
let(:template){ Template.new(Path.
|
23
|
+
let(:template){ Template.new(Path.file, :path => __FILE__) }
|
24
24
|
it{ should eq(__FILE__) }
|
25
25
|
end
|
26
26
|
|
@@ -5,7 +5,7 @@ module WLang
|
|
5
5
|
let(:template){ Template.new("Hello ${who}!") }
|
6
6
|
|
7
7
|
it 'it returns some ruby code' do
|
8
|
-
expected = %q{Proc.new{|d1,b1| b1 << ("Hello "); d1._tag_36(b1, "who"); b1 << ("!") }}
|
8
|
+
expected = %q{Proc.new{|d1,b1| b1 << ("Hello ".freeze); d1._tag_36(b1, "who"); b1 << ("!".freeze) }}
|
9
9
|
template.to_ruby_code.should eq(expected)
|
10
10
|
end
|
11
11
|
|
data/tasks/test.rake
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
namespace :test do
|
2
|
+
require "rspec/core/rake_task"
|
3
|
+
|
4
|
+
tests = []
|
5
|
+
|
6
|
+
desc "Runs unit tests"
|
7
|
+
RSpec::Core::RakeTask.new(:unit) do |t|
|
8
|
+
t.pattern = "spec/unit/**/test_*.rb"
|
9
|
+
t.rspec_opts = ["-Ilib", "-Ispec", "--color", "--backtrace", "--format=progress"]
|
10
|
+
end
|
11
|
+
tests << :unit
|
12
|
+
|
13
|
+
task :all => tests
|
14
|
+
end
|
15
|
+
|
16
|
+
desc "Runs all tests"
|
17
|
+
task :test => :'test:all'
|
data/wlang.gemspec
CHANGED
@@ -1,195 +1,31 @@
|
|
1
|
-
# We require your library, mainly to have access to the VERSION number.
|
2
|
-
# Feel free to set $version manually.
|
3
1
|
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
|
4
2
|
require "wlang/version"
|
5
3
|
$version = WLang::Version.to_s
|
6
4
|
|
7
|
-
#
|
8
|
-
# This is your Gem specification. Default values are provided so that your library
|
9
|
-
# should be correctly packaged given what you have described in the .noespec file.
|
10
|
-
#
|
11
5
|
Gem::Specification.new do |s|
|
12
|
-
|
13
|
-
################################################################### ABOUT YOUR GEM
|
14
|
-
|
15
|
-
# Gem name (required)
|
16
6
|
s.name = "wlang"
|
17
|
-
|
18
|
-
# Gem version (required)
|
19
7
|
s.version = $version
|
20
|
-
|
21
|
-
# A short summary of this gem
|
22
|
-
#
|
23
|
-
# This is displayed in `gem list -d`.
|
24
8
|
s.summary = "WLang is a powerful code generation and templating engine"
|
25
|
-
|
26
|
-
# A long description of this gem (required)
|
27
|
-
#
|
28
|
-
# The description should be more detailed than the summary. For example,
|
29
|
-
# you might wish to copy the entire README into the description.
|
30
9
|
s.description = "WLang is a general-purpose *code generation*/*templating engine*. It's main aim is to\nhelp you generating web pages, sql queries, ruby code (that is, generating text in\ngeneral) without having to worry too much about html entities encoding, sql back\nquoting, string escaping and the like. WLang proposes a generic engine that you can\neasily extend to fit your needs. It also proposes standard instantiations of this\nengine for common tasks such as rendering HTML web pages."
|
31
|
-
|
32
|
-
# The URL of this gem home page (optional)
|
33
10
|
s.homepage = "http://github.com/blambeau/wlang"
|
34
|
-
|
35
|
-
# Gem publication date (required but auto)
|
36
|
-
#
|
37
|
-
# Today is automatically used by default, uncomment only if
|
38
|
-
# you know what you do!
|
39
|
-
#
|
40
|
-
# s.date = Time.now.strftime('%Y-%m-%d')
|
41
|
-
|
42
|
-
# The license(s) for the library. Each license must be a short name, no
|
43
|
-
# more than 64 characters.
|
44
|
-
#
|
45
|
-
# s.licences = %w{}
|
46
|
-
|
47
|
-
# The rubyforge project this gem lives under (optional)
|
48
|
-
#
|
49
|
-
# s.rubyforge_project = nil
|
50
|
-
|
51
|
-
################################################################### ABOUT THE AUTHORS
|
52
|
-
|
53
|
-
# The list of author names who wrote this gem.
|
54
|
-
#
|
55
|
-
# If you are providing multiple authors and multiple emails they should be
|
56
|
-
# in the same order.
|
57
|
-
#
|
58
11
|
s.authors = ["Bernard Lambeau", "Louis Lambeau"]
|
59
|
-
|
60
|
-
# Contact emails for this gem
|
61
|
-
#
|
62
|
-
# If you are providing multiple authors and multiple emails they should be
|
63
|
-
# in the same order.
|
64
|
-
#
|
65
|
-
# NOTE: Somewhat strangly this attribute is always singular!
|
66
|
-
# Don't replace by s.emails = ...
|
67
12
|
s.email = ["blambeau@gmail.com", "llambeau@gmail.com"]
|
68
|
-
|
69
|
-
################################################################### PATHS, FILES, BINARIES
|
70
|
-
|
71
|
-
# Paths in the gem to add to $LOAD_PATH when this gem is
|
72
|
-
# activated (required).
|
73
|
-
#
|
74
|
-
# The default 'lib' is typically sufficient.
|
75
13
|
s.require_paths = ["lib"]
|
76
|
-
|
77
|
-
# Files included in this gem.
|
78
|
-
#
|
79
|
-
# By default, we take all files included in the Manifest.txt file on root
|
80
|
-
# of the project. Entries of the manifest are interpreted as Dir[...]
|
81
|
-
# patterns so that lazy people may use wilcards like lib/**/*
|
82
|
-
#
|
83
14
|
here = File.expand_path(File.dirname(__FILE__))
|
84
15
|
s.files = File.readlines(File.join(here, 'Manifest.txt')).
|
85
16
|
inject([]){|files, pattern| files + Dir[File.join(here, pattern.strip)]}.
|
86
17
|
collect{|x| x[(1+here.size)..-1]}
|
87
|
-
|
88
|
-
# Test files included in this gem.
|
89
|
-
#
|
90
18
|
s.test_files = Dir["test/**/*"] + Dir["spec/**/*"]
|
91
|
-
|
92
|
-
# The path in the gem for executable scripts (optional)
|
93
|
-
#
|
94
19
|
s.bindir = "bin"
|
95
|
-
|
96
|
-
# Executables included in the gem.
|
97
|
-
#
|
98
20
|
s.executables = (Dir["bin/*"]).collect{|f| File.basename(f)}
|
99
21
|
|
100
|
-
|
101
|
-
|
102
|
-
# = Equals version
|
103
|
-
# != Not equal to version
|
104
|
-
# > Greater than version
|
105
|
-
# < Less than version
|
106
|
-
# >= Greater than or equal to
|
107
|
-
# <= Less than or equal to
|
108
|
-
# ~> Approximately greater than
|
109
|
-
#
|
110
|
-
# Don't forget to have a look at http://lmgtfy.com/?q=Ruby+Versioning+Policies
|
111
|
-
# for setting your gem version.
|
112
|
-
#
|
113
|
-
# For your requirements to other gems, remember that
|
114
|
-
# ">= 2.2.0" (optimistic: specify minimal version)
|
115
|
-
# ">= 2.2.0", "< 3.0" (pessimistic: not greater than the next major)
|
116
|
-
# "~> 2.2" (shortcut for ">= 2.2.0", "< 3.0")
|
117
|
-
# "~> 2.2.0" (shortcut for ">= 2.2.0", "< 2.3.0")
|
118
|
-
#
|
22
|
+
s.add_development_dependency("rake", "~> 13.0")
|
23
|
+
s.add_development_dependency("rspec", "~> 3.0")
|
119
24
|
|
120
|
-
|
121
|
-
# One call to add_dependency('gem_name', 'gem version requirement') for each
|
122
|
-
# runtime dependency. These gems will be installed with your gem.
|
123
|
-
# One call to add_development_dependency('gem_name', 'gem version requirement')
|
124
|
-
# for each development dependency. These gems are required for developers
|
125
|
-
#
|
126
|
-
s.add_development_dependency("awesome_print", "~> 1.0.2")
|
127
|
-
s.add_development_dependency("tilt", "~> 1.3")
|
128
|
-
s.add_development_dependency("rake", "~> 0.9.2")
|
129
|
-
s.add_development_dependency("bundler", "~> 1.0")
|
130
|
-
s.add_development_dependency("rspec", "~> 2.10.0")
|
131
|
-
s.add_development_dependency("sinatra", ">= 1.4")
|
132
|
-
s.add_development_dependency("rack-test", "~> 0.6")
|
133
|
-
s.add_dependency("citrus", "~> 2.4.1")
|
134
|
-
s.add_dependency("temple", "~> 0.4.0")
|
25
|
+
s.add_dependency("citrus", "~> 3.0")
|
135
26
|
s.add_dependency("quickl", "~> 0.4.3")
|
136
|
-
s.add_dependency("path", "~>
|
137
|
-
s.add_dependency("
|
138
|
-
|
139
|
-
# The version of ruby required by this gem
|
140
|
-
#
|
141
|
-
# Uncomment and set this if your gem requires specific ruby versions.
|
142
|
-
#
|
143
|
-
# s.required_ruby_version = ">= 0"
|
144
|
-
|
145
|
-
# The RubyGems version required by this gem
|
146
|
-
#
|
147
|
-
# s.required_rubygems_version = ">= 0"
|
148
|
-
|
149
|
-
# The platform this gem runs on. See Gem::Platform for details.
|
150
|
-
#
|
151
|
-
# s.platform = nil
|
152
|
-
|
153
|
-
# Extensions to build when installing the gem.
|
154
|
-
#
|
155
|
-
# Valid types of extensions are extconf.rb files, configure scripts
|
156
|
-
# and rakefiles or mkrf_conf files.
|
157
|
-
#
|
158
|
-
s.extensions = []
|
159
|
-
|
160
|
-
# External (to RubyGems) requirements that must be met for this gem to work.
|
161
|
-
# It’s simply information for the user.
|
162
|
-
#
|
163
|
-
s.requirements = nil
|
27
|
+
s.add_dependency("path", "~> 2.0")
|
28
|
+
s.add_dependency("temple", "~> 0.6")
|
164
29
|
|
165
|
-
# A message that gets displayed after the gem is installed
|
166
|
-
#
|
167
|
-
# Uncomment and set this if you want to say something to the user
|
168
|
-
# after gem installation
|
169
|
-
#
|
170
|
-
s.post_install_message = nil
|
171
|
-
|
172
|
-
################################################################### SECURITY
|
173
|
-
|
174
|
-
# The key used to sign this gem. See Gem::Security for details.
|
175
|
-
#
|
176
|
-
# s.signing_key = nil
|
177
|
-
|
178
|
-
# The certificate chain used to sign this gem. See Gem::Security for
|
179
|
-
# details.
|
180
|
-
#
|
181
|
-
# s.cert_chain = []
|
182
|
-
|
183
|
-
################################################################### RDOC
|
184
|
-
|
185
|
-
# An ARGV style array of options to RDoc
|
186
|
-
#
|
187
|
-
# See 'rdoc --help' about this
|
188
|
-
#
|
189
|
-
s.rdoc_options = []
|
190
|
-
|
191
|
-
# Extra files to add to RDoc such as README
|
192
|
-
#
|
193
30
|
s.extra_rdoc_files = Dir["README.md"] + Dir["CHANGELOG.md"] + Dir["LICENCE.md"]
|
194
|
-
|
195
31
|
end
|
metadata
CHANGED
@@ -1,223 +1,107 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wlang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 3.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Bernard Lambeau
|
9
8
|
- Louis Lambeau
|
10
|
-
autorequire:
|
9
|
+
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2020-12-29 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: awesome_print
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
|
-
requirements:
|
20
|
-
- - ~>
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 1.0.2
|
23
|
-
type: :development
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
|
-
requirements:
|
28
|
-
- - ~>
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: 1.0.2
|
31
|
-
- !ruby/object:Gem::Dependency
|
32
|
-
name: tilt
|
33
|
-
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
|
-
requirements:
|
36
|
-
- - ~>
|
37
|
-
- !ruby/object:Gem::Version
|
38
|
-
version: '1.3'
|
39
|
-
type: :development
|
40
|
-
prerelease: false
|
41
|
-
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
|
-
requirements:
|
44
|
-
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '1.3'
|
47
14
|
- !ruby/object:Gem::Dependency
|
48
15
|
name: rake
|
49
16
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
|
-
requirements:
|
52
|
-
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 0.9.2
|
55
|
-
type: :development
|
56
|
-
prerelease: false
|
57
|
-
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
|
-
requirements:
|
60
|
-
- - ~>
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 0.9.2
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: bundler
|
65
|
-
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
17
|
requirements:
|
68
|
-
- - ~>
|
18
|
+
- - "~>"
|
69
19
|
- !ruby/object:Gem::Version
|
70
|
-
version: '
|
20
|
+
version: '13.0'
|
71
21
|
type: :development
|
72
22
|
prerelease: false
|
73
23
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
24
|
requirements:
|
76
|
-
- - ~>
|
25
|
+
- - "~>"
|
77
26
|
- !ruby/object:Gem::Version
|
78
|
-
version: '
|
27
|
+
version: '13.0'
|
79
28
|
- !ruby/object:Gem::Dependency
|
80
29
|
name: rspec
|
81
30
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
|
-
requirements:
|
84
|
-
- - ~>
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: 2.10.0
|
87
|
-
type: :development
|
88
|
-
prerelease: false
|
89
|
-
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
|
-
requirements:
|
92
|
-
- - ~>
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: 2.10.0
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: sinatra
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
|
-
requirements:
|
100
|
-
- - ! '>='
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '1.4'
|
103
|
-
type: :development
|
104
|
-
prerelease: false
|
105
|
-
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
|
-
requirements:
|
108
|
-
- - ! '>='
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '1.4'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rack-test
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
31
|
requirements:
|
116
|
-
- - ~>
|
32
|
+
- - "~>"
|
117
33
|
- !ruby/object:Gem::Version
|
118
|
-
version: '0
|
34
|
+
version: '3.0'
|
119
35
|
type: :development
|
120
36
|
prerelease: false
|
121
37
|
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
38
|
requirements:
|
124
|
-
- - ~>
|
39
|
+
- - "~>"
|
125
40
|
- !ruby/object:Gem::Version
|
126
|
-
version: '0
|
41
|
+
version: '3.0'
|
127
42
|
- !ruby/object:Gem::Dependency
|
128
43
|
name: citrus
|
129
44
|
requirement: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
45
|
requirements:
|
132
|
-
- - ~>
|
46
|
+
- - "~>"
|
133
47
|
- !ruby/object:Gem::Version
|
134
|
-
version:
|
48
|
+
version: '3.0'
|
135
49
|
type: :runtime
|
136
50
|
prerelease: false
|
137
51
|
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
52
|
requirements:
|
140
|
-
- - ~>
|
53
|
+
- - "~>"
|
141
54
|
- !ruby/object:Gem::Version
|
142
|
-
version:
|
143
|
-
- !ruby/object:Gem::Dependency
|
144
|
-
name: temple
|
145
|
-
requirement: !ruby/object:Gem::Requirement
|
146
|
-
none: false
|
147
|
-
requirements:
|
148
|
-
- - ~>
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: 0.4.0
|
151
|
-
type: :runtime
|
152
|
-
prerelease: false
|
153
|
-
version_requirements: !ruby/object:Gem::Requirement
|
154
|
-
none: false
|
155
|
-
requirements:
|
156
|
-
- - ~>
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: 0.4.0
|
55
|
+
version: '3.0'
|
159
56
|
- !ruby/object:Gem::Dependency
|
160
57
|
name: quickl
|
161
58
|
requirement: !ruby/object:Gem::Requirement
|
162
|
-
none: false
|
163
59
|
requirements:
|
164
|
-
- - ~>
|
60
|
+
- - "~>"
|
165
61
|
- !ruby/object:Gem::Version
|
166
62
|
version: 0.4.3
|
167
63
|
type: :runtime
|
168
64
|
prerelease: false
|
169
65
|
version_requirements: !ruby/object:Gem::Requirement
|
170
|
-
none: false
|
171
66
|
requirements:
|
172
|
-
- - ~>
|
67
|
+
- - "~>"
|
173
68
|
- !ruby/object:Gem::Version
|
174
69
|
version: 0.4.3
|
175
70
|
- !ruby/object:Gem::Dependency
|
176
71
|
name: path
|
177
72
|
requirement: !ruby/object:Gem::Requirement
|
178
|
-
none: false
|
179
73
|
requirements:
|
180
|
-
- - ~>
|
74
|
+
- - "~>"
|
181
75
|
- !ruby/object:Gem::Version
|
182
|
-
version: '
|
76
|
+
version: '2.0'
|
183
77
|
type: :runtime
|
184
78
|
prerelease: false
|
185
79
|
version_requirements: !ruby/object:Gem::Requirement
|
186
|
-
none: false
|
187
80
|
requirements:
|
188
|
-
- - ~>
|
81
|
+
- - "~>"
|
189
82
|
- !ruby/object:Gem::Version
|
190
|
-
version: '
|
83
|
+
version: '2.0'
|
191
84
|
- !ruby/object:Gem::Dependency
|
192
|
-
name:
|
85
|
+
name: temple
|
193
86
|
requirement: !ruby/object:Gem::Requirement
|
194
|
-
none: false
|
195
87
|
requirements:
|
196
|
-
- - ~>
|
88
|
+
- - "~>"
|
197
89
|
- !ruby/object:Gem::Version
|
198
|
-
version: '
|
90
|
+
version: '0.6'
|
199
91
|
type: :runtime
|
200
92
|
prerelease: false
|
201
93
|
version_requirements: !ruby/object:Gem::Requirement
|
202
|
-
none: false
|
203
94
|
requirements:
|
204
|
-
- - ~>
|
95
|
+
- - "~>"
|
205
96
|
- !ruby/object:Gem::Version
|
206
|
-
version: '
|
207
|
-
description:
|
208
|
-
It'
|
209
|
-
|
210
|
-
help you generating web pages, sql queries, ruby code (that is, generating text
|
211
|
-
in
|
212
|
-
|
97
|
+
version: '0.6'
|
98
|
+
description: |-
|
99
|
+
WLang is a general-purpose *code generation*/*templating engine*. It's main aim is to
|
100
|
+
help you generating web pages, sql queries, ruby code (that is, generating text in
|
213
101
|
general) without having to worry too much about html entities encoding, sql back
|
214
|
-
|
215
|
-
quoting, string escaping and the like. WLang proposes a generic engine that you
|
216
|
-
can
|
217
|
-
|
102
|
+
quoting, string escaping and the like. WLang proposes a generic engine that you can
|
218
103
|
easily extend to fit your needs. It also proposes standard instantiations of this
|
219
|
-
|
220
|
-
engine for common tasks such as rendering HTML web pages.'
|
104
|
+
engine for common tasks such as rendering HTML web pages.
|
221
105
|
email:
|
222
106
|
- blambeau@gmail.com
|
223
107
|
- llambeau@gmail.com
|
@@ -229,13 +113,17 @@ extra_rdoc_files:
|
|
229
113
|
- CHANGELOG.md
|
230
114
|
- LICENCE.md
|
231
115
|
files:
|
232
|
-
- wlang.gemspec
|
233
|
-
- wlang.noespec
|
234
116
|
- CHANGELOG.md
|
235
117
|
- Gemfile
|
236
118
|
- Gemfile.lock
|
119
|
+
- LICENCE.md
|
120
|
+
- Manifest.txt
|
121
|
+
- README.md
|
122
|
+
- Rakefile
|
237
123
|
- bin/wlang
|
124
|
+
- lib/wlang.rb
|
238
125
|
- lib/wlang/command.rb
|
126
|
+
- lib/wlang/compiler.rb
|
239
127
|
- lib/wlang/compiler/autospacing.rb
|
240
128
|
- lib/wlang/compiler/dialect_enforcer.rb
|
241
129
|
- lib/wlang/compiler/filter.rb
|
@@ -246,31 +134,23 @@ files:
|
|
246
134
|
- lib/wlang/compiler/strconcat_flattener.rb
|
247
135
|
- lib/wlang/compiler/to_ruby_abstraction.rb
|
248
136
|
- lib/wlang/compiler/to_ruby_code.rb
|
249
|
-
- lib/wlang/compiler.rb
|
250
137
|
- lib/wlang/dialect.rb
|
251
138
|
- lib/wlang/dummy.rb
|
252
139
|
- lib/wlang/html.rb
|
253
140
|
- lib/wlang/loader.rb
|
141
|
+
- lib/wlang/scope.rb
|
254
142
|
- lib/wlang/scope/binding_scope.rb
|
255
143
|
- lib/wlang/scope/null_scope.rb
|
256
144
|
- lib/wlang/scope/object_scope.rb
|
257
145
|
- lib/wlang/scope/proc_scope.rb
|
258
|
-
- lib/wlang/scope/sinatra_scope.rb
|
259
|
-
- lib/wlang/scope.rb
|
260
|
-
- lib/wlang/source/front_matter.rb
|
261
146
|
- lib/wlang/source.rb
|
147
|
+
- lib/wlang/source/front_matter.rb
|
262
148
|
- lib/wlang/template.rb
|
263
|
-
- lib/wlang/tilt/wlang_template.rb
|
264
|
-
- lib/wlang/tilt.rb
|
265
149
|
- lib/wlang/version.rb
|
266
|
-
- lib/wlang.rb
|
267
|
-
- LICENCE.md
|
268
|
-
- Manifest.txt
|
269
|
-
- Rakefile
|
270
|
-
- README.md
|
271
150
|
- spec/assumptions/test_core.rb
|
272
151
|
- spec/fixtures/dialect/foobar.rb
|
273
152
|
- spec/fixtures/dialect/upcasing.rb
|
153
|
+
- spec/fixtures/templates/front_matter.wlang
|
274
154
|
- spec/fixtures/templates/hello.wlang
|
275
155
|
- spec/fixtures/templates/hello_from_sinatra.wlang
|
276
156
|
- spec/fixtures/templates/hello_with_data.wlang
|
@@ -292,12 +172,10 @@ files:
|
|
292
172
|
- spec/integration/html/test_sharp.rb
|
293
173
|
- spec/integration/html/test_slash.rb
|
294
174
|
- spec/integration/html/test_star.rb
|
295
|
-
- spec/integration/sinatra/test_partials.rb
|
296
175
|
- spec/integration/test_dummy.rb
|
297
176
|
- spec/integration/test_examples.rb
|
298
177
|
- spec/integration/test_readme.rb
|
299
178
|
- spec/integration/test_upcasing.rb
|
300
|
-
- spec/integration/tilt/test_wlang_template.rb
|
301
179
|
- spec/spec_helper.rb
|
302
180
|
- spec/test_wlang.rb
|
303
181
|
- spec/unit/command/test_install.rb
|
@@ -320,7 +198,6 @@ files:
|
|
320
198
|
- spec/unit/dialect/test_tag.rb
|
321
199
|
- spec/unit/dialect/test_tag_dispatching_name.rb
|
322
200
|
- spec/unit/dialect/test_with_scope.rb
|
323
|
-
- spec/unit/scope/sinatra_scope/test_fetch.rb
|
324
201
|
- spec/unit/scope/test_binding_scope.rb
|
325
202
|
- spec/unit/scope/test_chain.rb
|
326
203
|
- spec/unit/scope/test_coerce.rb
|
@@ -345,116 +222,104 @@ files:
|
|
345
222
|
- spec/unit/template/test_yaml_front_matter.rb
|
346
223
|
- spec/unit/test_assumptions.rb
|
347
224
|
- spec/unit/test_scope.rb
|
348
|
-
- spec/unit/tilt/test_wlang_template.rb
|
349
|
-
- tasks/debug_mail.rake
|
350
|
-
- tasks/debug_mail.txt
|
351
225
|
- tasks/gem.rake
|
352
|
-
- tasks/
|
353
|
-
-
|
354
|
-
- tasks/yard.rake
|
226
|
+
- tasks/test.rake
|
227
|
+
- wlang.gemspec
|
355
228
|
homepage: http://github.com/blambeau/wlang
|
356
229
|
licenses: []
|
357
|
-
|
230
|
+
metadata: {}
|
231
|
+
post_install_message:
|
358
232
|
rdoc_options: []
|
359
233
|
require_paths:
|
360
234
|
- lib
|
361
235
|
required_ruby_version: !ruby/object:Gem::Requirement
|
362
|
-
none: false
|
363
236
|
requirements:
|
364
|
-
- -
|
237
|
+
- - ">="
|
365
238
|
- !ruby/object:Gem::Version
|
366
239
|
version: '0'
|
367
|
-
segments:
|
368
|
-
- 0
|
369
|
-
hash: 4259108141907788869
|
370
240
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
371
|
-
none: false
|
372
241
|
requirements:
|
373
|
-
- -
|
242
|
+
- - ">="
|
374
243
|
- !ruby/object:Gem::Version
|
375
244
|
version: '0'
|
376
245
|
requirements: []
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
specification_version: 3
|
246
|
+
rubygems_version: 3.1.4
|
247
|
+
signing_key:
|
248
|
+
specification_version: 4
|
381
249
|
summary: WLang is a powerful code generation and templating engine
|
382
250
|
test_files:
|
383
|
-
- spec/assumptions/test_core.rb
|
384
|
-
- spec/fixtures/dialect/foobar.rb
|
385
|
-
- spec/fixtures/dialect/upcasing.rb
|
386
|
-
- spec/fixtures/templates/hello.wlang
|
387
|
-
- spec/fixtures/templates/hello_from_sinatra.wlang
|
388
|
-
- spec/fixtures/templates/hello_with_data.wlang
|
389
|
-
- spec/fixtures/templates/hello_with_explicit_locals.wlang
|
390
|
-
- spec/fixtures/templates/hello_with_partials.wlang
|
391
|
-
- spec/integration/examples/1-html-intro/1-basics.md
|
392
|
-
- spec/integration/examples/1-html-intro/2-imperative.md
|
393
|
-
- spec/integration/examples/1-html-intro/3-partials.md
|
394
|
-
- spec/integration/examples/1-html-intro/4-recursion.md
|
395
|
-
- spec/integration/examples/1-html-intro/5-polymorphism.md
|
396
|
-
- spec/integration/html/test_ampersand.rb
|
397
|
-
- spec/integration/html/test_bang.rb
|
398
|
-
- spec/integration/html/test_caret.rb
|
399
|
-
- spec/integration/html/test_dollar.rb
|
400
|
-
- spec/integration/html/test_greater.rb
|
401
|
-
- spec/integration/html/test_modulo.rb
|
402
|
-
- spec/integration/html/test_plus.rb
|
403
|
-
- spec/integration/html/test_question.rb
|
404
|
-
- spec/integration/html/test_sharp.rb
|
405
|
-
- spec/integration/html/test_slash.rb
|
406
|
-
- spec/integration/html/test_star.rb
|
407
|
-
- spec/integration/sinatra/test_partials.rb
|
408
|
-
- spec/integration/test_dummy.rb
|
409
|
-
- spec/integration/test_examples.rb
|
410
|
-
- spec/integration/test_readme.rb
|
411
|
-
- spec/integration/test_upcasing.rb
|
412
|
-
- spec/integration/tilt/test_wlang_template.rb
|
413
251
|
- spec/spec_helper.rb
|
414
|
-
- spec/test_wlang.rb
|
415
|
-
- spec/unit/command/test_install.rb
|
416
|
-
- spec/unit/compiler/autospacing/test_right_strip.rb
|
417
|
-
- spec/unit/compiler/autospacing/test_unindent.rb
|
418
|
-
- spec/unit/compiler/test_dialect_enforcer.rb
|
419
|
-
- spec/unit/compiler/test_grammar.rb
|
420
|
-
- spec/unit/compiler/test_parser.rb
|
421
|
-
- spec/unit/compiler/test_proc_call_removal.rb
|
422
|
-
- spec/unit/compiler/test_static_merger.rb
|
423
|
-
- spec/unit/compiler/test_strconcat_flattener.rb
|
424
|
-
- spec/unit/compiler/test_to_ruby_abstraction.rb
|
425
|
-
- spec/unit/compiler/test_to_ruby_code.rb
|
426
|
-
- spec/unit/compiler/test_to_ruby_proc.rb
|
427
|
-
- spec/unit/dialect/test_compile.rb
|
428
|
-
- spec/unit/dialect/test_context.rb
|
429
|
-
- spec/unit/dialect/test_evaluate.rb
|
430
|
-
- spec/unit/dialect/test_new.rb
|
431
|
-
- spec/unit/dialect/test_render.rb
|
432
|
-
- spec/unit/dialect/test_tag.rb
|
433
|
-
- spec/unit/dialect/test_tag_dispatching_name.rb
|
434
|
-
- spec/unit/dialect/test_with_scope.rb
|
435
|
-
- spec/unit/scope/sinatra_scope/test_fetch.rb
|
436
|
-
- spec/unit/scope/test_binding_scope.rb
|
437
|
-
- spec/unit/scope/test_chain.rb
|
438
|
-
- spec/unit/scope/test_coerce.rb
|
439
|
-
- spec/unit/scope/test_null_scope.rb
|
440
|
-
- spec/unit/scope/test_object_scope.rb
|
441
|
-
- spec/unit/scope/test_proc_scope.rb
|
442
|
-
- spec/unit/scope/test_push.rb
|
443
|
-
- spec/unit/source/front_matter/test_locals.rb
|
444
252
|
- spec/unit/source/front_matter/test_template_content.rb
|
445
|
-
- spec/unit/source/test_locals.rb
|
446
|
-
- spec/unit/source/test_path.rb
|
253
|
+
- spec/unit/source/front_matter/test_locals.rb
|
447
254
|
- spec/unit/source/test_template_content.rb
|
255
|
+
- spec/unit/source/test_path.rb
|
448
256
|
- spec/unit/source/test_with_front_matter.rb
|
257
|
+
- spec/unit/source/test_locals.rb
|
258
|
+
- spec/unit/test_assumptions.rb
|
449
259
|
- spec/unit/template/test_call.rb
|
450
|
-
- spec/unit/template/test_call_args_conventions.rb
|
451
|
-
- spec/unit/template/test_new.rb
|
452
|
-
- spec/unit/template/test_path.rb
|
453
|
-
- spec/unit/template/test_render.rb
|
454
260
|
- spec/unit/template/test_to_ast.rb
|
455
261
|
- spec/unit/template/test_to_ruby_code.rb
|
262
|
+
- spec/unit/template/test_new.rb
|
263
|
+
- spec/unit/template/test_path.rb
|
456
264
|
- spec/unit/template/test_to_ruby_proc.rb
|
265
|
+
- spec/unit/template/test_render.rb
|
457
266
|
- spec/unit/template/test_yaml_front_matter.rb
|
458
|
-
- spec/unit/
|
267
|
+
- spec/unit/template/test_call_args_conventions.rb
|
268
|
+
- spec/unit/scope/test_chain.rb
|
269
|
+
- spec/unit/scope/test_push.rb
|
270
|
+
- spec/unit/scope/test_object_scope.rb
|
271
|
+
- spec/unit/scope/test_binding_scope.rb
|
272
|
+
- spec/unit/scope/test_proc_scope.rb
|
273
|
+
- spec/unit/scope/test_null_scope.rb
|
274
|
+
- spec/unit/scope/test_coerce.rb
|
459
275
|
- spec/unit/test_scope.rb
|
460
|
-
- spec/unit/
|
276
|
+
- spec/unit/command/test_install.rb
|
277
|
+
- spec/unit/dialect/test_new.rb
|
278
|
+
- spec/unit/dialect/test_render.rb
|
279
|
+
- spec/unit/dialect/test_context.rb
|
280
|
+
- spec/unit/dialect/test_tag.rb
|
281
|
+
- spec/unit/dialect/test_evaluate.rb
|
282
|
+
- spec/unit/dialect/test_compile.rb
|
283
|
+
- spec/unit/dialect/test_with_scope.rb
|
284
|
+
- spec/unit/dialect/test_tag_dispatching_name.rb
|
285
|
+
- spec/unit/compiler/test_to_ruby_code.rb
|
286
|
+
- spec/unit/compiler/test_proc_call_removal.rb
|
287
|
+
- spec/unit/compiler/test_to_ruby_proc.rb
|
288
|
+
- spec/unit/compiler/test_strconcat_flattener.rb
|
289
|
+
- spec/unit/compiler/test_dialect_enforcer.rb
|
290
|
+
- spec/unit/compiler/test_to_ruby_abstraction.rb
|
291
|
+
- spec/unit/compiler/test_grammar.rb
|
292
|
+
- spec/unit/compiler/test_parser.rb
|
293
|
+
- spec/unit/compiler/autospacing/test_right_strip.rb
|
294
|
+
- spec/unit/compiler/autospacing/test_unindent.rb
|
295
|
+
- spec/unit/compiler/test_static_merger.rb
|
296
|
+
- spec/integration/test_examples.rb
|
297
|
+
- spec/integration/test_readme.rb
|
298
|
+
- spec/integration/html/test_greater.rb
|
299
|
+
- spec/integration/html/test_ampersand.rb
|
300
|
+
- spec/integration/html/test_bang.rb
|
301
|
+
- spec/integration/html/test_slash.rb
|
302
|
+
- spec/integration/html/test_sharp.rb
|
303
|
+
- spec/integration/html/test_star.rb
|
304
|
+
- spec/integration/html/test_caret.rb
|
305
|
+
- spec/integration/html/test_question.rb
|
306
|
+
- spec/integration/html/test_modulo.rb
|
307
|
+
- spec/integration/html/test_dollar.rb
|
308
|
+
- spec/integration/html/test_plus.rb
|
309
|
+
- spec/integration/test_dummy.rb
|
310
|
+
- spec/integration/test_upcasing.rb
|
311
|
+
- spec/integration/examples/1-html-intro/5-polymorphism.md
|
312
|
+
- spec/integration/examples/1-html-intro/2-imperative.md
|
313
|
+
- spec/integration/examples/1-html-intro/1-basics.md
|
314
|
+
- spec/integration/examples/1-html-intro/3-partials.md
|
315
|
+
- spec/integration/examples/1-html-intro/4-recursion.md
|
316
|
+
- spec/assumptions/test_core.rb
|
317
|
+
- spec/test_wlang.rb
|
318
|
+
- spec/fixtures/templates/hello_with_explicit_locals.wlang
|
319
|
+
- spec/fixtures/templates/hello_from_sinatra.wlang
|
320
|
+
- spec/fixtures/templates/front_matter.wlang
|
321
|
+
- spec/fixtures/templates/hello.wlang
|
322
|
+
- spec/fixtures/templates/hello_with_partials.wlang
|
323
|
+
- spec/fixtures/templates/hello_with_data.wlang
|
324
|
+
- spec/fixtures/dialect/foobar.rb
|
325
|
+
- spec/fixtures/dialect/upcasing.rb
|