locomotive_liquid 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +10 -14
- data/lib/liquid/tags/default_content.rb +21 -0
- data/lib/liquid/tags/raw.rb +20 -0
- metadata +27 -43
data/Rakefile
CHANGED
|
@@ -1,31 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
require 'rubygems'
|
|
3
|
-
|
|
4
|
-
require "bundler"
|
|
5
|
-
Bundler.setup
|
|
3
|
+
require 'bundler/setup'
|
|
6
4
|
|
|
7
5
|
require 'rake'
|
|
8
|
-
require '
|
|
9
|
-
|
|
10
|
-
require
|
|
11
|
-
require "rspec/core/rake_task"
|
|
6
|
+
require 'rspec'
|
|
7
|
+
require 'rspec/core/rake_task'
|
|
8
|
+
require 'rubygems/package_task'
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
RSpec::Core::RakeTask.new("spec") do |spec|
|
|
14
11
|
spec.pattern = "spec/**/*_spec.rb"
|
|
15
12
|
end
|
|
16
13
|
|
|
17
14
|
desc "Run the Integration Specs (rendering)"
|
|
18
|
-
|
|
15
|
+
RSpec::Core::RakeTask.new("spec:integration") do |spec|
|
|
19
16
|
spec.pattern = "spec/unit/*_spec.rb"
|
|
20
17
|
end
|
|
21
18
|
|
|
22
19
|
desc "Run the Unit Specs"
|
|
23
|
-
|
|
20
|
+
RSpec::Core::RakeTask.new("spec:unit") do |spec|
|
|
24
21
|
spec.pattern = "spec/unit/*_spec.rb"
|
|
25
22
|
end
|
|
26
23
|
|
|
27
24
|
desc "Run all the specs without all the verbose spec output"
|
|
28
|
-
|
|
25
|
+
RSpec::Core::RakeTask.new('spec:progress') do |spec|
|
|
29
26
|
spec.rspec_opts = %w(--format progress)
|
|
30
27
|
spec.pattern = "spec/**/*_spec.rb"
|
|
31
28
|
end
|
|
@@ -33,19 +30,18 @@ end
|
|
|
33
30
|
task :default => :spec
|
|
34
31
|
|
|
35
32
|
gemspec = eval(File.read('locomotive_liquid.gemspec'))
|
|
36
|
-
|
|
33
|
+
Gem::PackageTask.new(gemspec) do |pkg|
|
|
37
34
|
pkg.gem_spec = gemspec
|
|
38
35
|
end
|
|
39
36
|
|
|
40
37
|
desc "build the gem and release it to rubygems.org"
|
|
41
38
|
task :release => :gem do
|
|
42
39
|
puts "Tagging #{gemspec.version}..."
|
|
43
|
-
require 'ruby-debug';debugger
|
|
44
40
|
system "git tag -a #{gemspec.version} -m 'Tagging #{gemspec.version}'"
|
|
45
41
|
puts "Pushing to Github..."
|
|
46
42
|
system "git push --tags"
|
|
47
43
|
puts "Pushing to rubygems.org..."
|
|
48
|
-
system "gem push pkg
|
|
44
|
+
system "gem push pkg/#{gemspec.name}-#{gemspec.version}.gem"
|
|
49
45
|
end
|
|
50
46
|
|
|
51
47
|
namespace :profile do
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module Liquid
|
|
2
|
+
|
|
3
|
+
# InheritedContent pulls out the content from child templates that isnt defined in blocks
|
|
4
|
+
#
|
|
5
|
+
# {% defaultcontent %}
|
|
6
|
+
#
|
|
7
|
+
class DefaultContent < Tag
|
|
8
|
+
def initialize(tag_name, markup, tokens, context)
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def render(context)
|
|
13
|
+
context.stack do
|
|
14
|
+
"HELLO"
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Template.register_tag('defaultcontent', DefaultContent)
|
|
21
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module Liquid
|
|
2
|
+
class Raw < Block
|
|
3
|
+
def parse(tokens)
|
|
4
|
+
@nodelist ||= []
|
|
5
|
+
@nodelist.clear
|
|
6
|
+
|
|
7
|
+
while token = tokens.shift
|
|
8
|
+
if token =~ FullToken
|
|
9
|
+
if block_delimiter == $1
|
|
10
|
+
end_tag
|
|
11
|
+
return
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
@nodelist << token if not token.empty?
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
Template.register_tag('raw', Raw)
|
|
20
|
+
end
|
metadata
CHANGED
|
@@ -1,39 +1,30 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: locomotive_liquid
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
5
|
-
prerelease:
|
|
6
|
-
segments:
|
|
7
|
-
- 2
|
|
8
|
-
- 2
|
|
9
|
-
- 2
|
|
10
|
-
version: 2.2.2
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 2.2.3
|
|
5
|
+
prerelease:
|
|
11
6
|
platform: ruby
|
|
12
|
-
authors:
|
|
7
|
+
authors:
|
|
13
8
|
- Tobias Luetke
|
|
14
9
|
- Didier Lafforgue
|
|
15
10
|
- Jacques Crocker
|
|
16
11
|
autorequire:
|
|
17
12
|
bindir: bin
|
|
18
13
|
cert_chain: []
|
|
19
|
-
|
|
20
|
-
date: 2010-10-01 00:00:00 -07:00
|
|
21
|
-
default_executable:
|
|
14
|
+
date: 2012-07-26 00:00:00.000000000 Z
|
|
22
15
|
dependencies: []
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
email:
|
|
16
|
+
description: A secure, non-evaling end user template engine with aesthetic markup.
|
|
17
|
+
Extended with liquid template inheritance for use in LocomotiveCMS
|
|
18
|
+
email:
|
|
26
19
|
- tobi@leetsoft.com
|
|
27
20
|
- didier@nocoffee.fr
|
|
28
21
|
- railsjedi@gmail.com
|
|
29
22
|
executables: []
|
|
30
|
-
|
|
31
23
|
extensions: []
|
|
32
|
-
|
|
33
|
-
extra_rdoc_files:
|
|
24
|
+
extra_rdoc_files:
|
|
34
25
|
- History.txt
|
|
35
26
|
- README.md
|
|
36
|
-
files:
|
|
27
|
+
files:
|
|
37
28
|
- CHANGELOG
|
|
38
29
|
- History.txt
|
|
39
30
|
- MIT-LICENSE
|
|
@@ -59,6 +50,7 @@ files:
|
|
|
59
50
|
- lib/liquid/tags/case.rb
|
|
60
51
|
- lib/liquid/tags/comment.rb
|
|
61
52
|
- lib/liquid/tags/cycle.rb
|
|
53
|
+
- lib/liquid/tags/default_content.rb
|
|
62
54
|
- lib/liquid/tags/extends.rb
|
|
63
55
|
- lib/liquid/tags/for.rb
|
|
64
56
|
- lib/liquid/tags/if.rb
|
|
@@ -66,47 +58,39 @@ files:
|
|
|
66
58
|
- lib/liquid/tags/include.rb
|
|
67
59
|
- lib/liquid/tags/inherited_block.rb
|
|
68
60
|
- lib/liquid/tags/literal.rb
|
|
61
|
+
- lib/liquid/tags/raw.rb
|
|
69
62
|
- lib/liquid/tags/unless.rb
|
|
70
63
|
- lib/liquid/template.rb
|
|
71
64
|
- lib/liquid/variable.rb
|
|
72
65
|
- lib/liquid.rb
|
|
73
66
|
- lib/locomotive_liquid.rb
|
|
74
|
-
has_rdoc: true
|
|
75
67
|
homepage: http://www.locomotiveapp.org
|
|
76
68
|
licenses: []
|
|
77
|
-
|
|
78
69
|
post_install_message:
|
|
79
|
-
rdoc_options:
|
|
70
|
+
rdoc_options:
|
|
80
71
|
- --main
|
|
81
72
|
- README.md
|
|
82
|
-
require_paths:
|
|
73
|
+
require_paths:
|
|
83
74
|
- lib
|
|
84
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
85
76
|
none: false
|
|
86
|
-
requirements:
|
|
87
|
-
- -
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
|
|
90
|
-
segments:
|
|
77
|
+
requirements:
|
|
78
|
+
- - ! '>='
|
|
79
|
+
- !ruby/object:Gem::Version
|
|
80
|
+
version: '0'
|
|
81
|
+
segments:
|
|
91
82
|
- 0
|
|
92
|
-
|
|
93
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
|
+
hash: -19558078934527762
|
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
85
|
none: false
|
|
95
|
-
requirements:
|
|
96
|
-
- -
|
|
97
|
-
- !ruby/object:Gem::Version
|
|
98
|
-
hash: 23
|
|
99
|
-
segments:
|
|
100
|
-
- 1
|
|
101
|
-
- 3
|
|
102
|
-
- 6
|
|
86
|
+
requirements:
|
|
87
|
+
- - ! '>='
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
103
89
|
version: 1.3.6
|
|
104
90
|
requirements: []
|
|
105
|
-
|
|
106
91
|
rubyforge_project: locomotive_liquid
|
|
107
|
-
rubygems_version: 1.
|
|
92
|
+
rubygems_version: 1.8.24
|
|
108
93
|
signing_key:
|
|
109
94
|
specification_version: 3
|
|
110
95
|
summary: A secure, non-evaling end user template engine with aesthetic markup.
|
|
111
96
|
test_files: []
|
|
112
|
-
|