locomotivecms_steam 1.0.0.rc9 → 1.0.0.rc10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -4
- data/Gemfile.lock +50 -50
- data/lib/locomotive/steam/entities/content_entry.rb +8 -1
- data/lib/locomotive/steam/initializers/sprockets.rb +14 -4
- data/lib/locomotive/steam/liquid/filters/translate.rb +8 -2
- data/lib/locomotive/steam/liquid/patches.rb +1 -0
- data/lib/locomotive/steam/liquid/tags/consume.rb +2 -2
- data/lib/locomotive/steam/liquid/tags/editable/base.rb +18 -10
- data/lib/locomotive/steam/liquid/tags/editable/file.rb +31 -3
- data/lib/locomotive/steam/liquid/tags/editable/text.rb +0 -4
- data/lib/locomotive/steam/middlewares/dynamic_assets.rb +7 -1
- data/lib/locomotive/steam/middlewares/renderer.rb +1 -1
- data/lib/locomotive/steam/services/translator_service.rb +22 -5
- data/lib/locomotive/steam/version.rb +1 -1
- data/locomotivecms_steam.gemspec +9 -7
- data/spec/integration/liquid/filters/translate_spec.rb +63 -0
- data/spec/unit/entities/content_entry_spec.rb +1 -0
- data/spec/unit/liquid/tags/consume_spec.rb +8 -0
- data/spec/unit/liquid/tags/editable/file_spec.rb +33 -2
- data/spec/unit/services/translator_service_spec.rb +65 -7
- metadata +48 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08118e0a2969d025bcffcd655e906bc397f8a2f1
|
4
|
+
data.tar.gz: 80fad7857d84473f15b614900b7a6350bc132732
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 297db1a5512db9cbc9b34c1646b09f1445cf6a07942b93298ea5386bfaafaa85a26e8d12512ff4097131e619c348d6950cb6cc679c5c5d83c546ef07716f42ec
|
7
|
+
data.tar.gz: 179a3cc3ba5eea81689127242d9e53e53efe389314ac3ab2cbf9d6e0c786bb42aadcc1e25f1108ac5ef9a6b4097c927411202540b204d9382c0f6a0f35ccbbd0
|
data/Gemfile
CHANGED
@@ -9,7 +9,6 @@ group :development do
|
|
9
9
|
# gem 'locomotivecms-liquid', path: '/Users/didier/Documents/LocomotiveCMS/gems/liquid'
|
10
10
|
# gem 'thin'
|
11
11
|
gem 'puma'
|
12
|
-
# gem 'sprockets-sass', '~> 1.2.0'
|
13
12
|
gem 'yui-compressor', '~> 0.12.0'
|
14
13
|
|
15
14
|
gem 'rack-mini-profiler'
|
@@ -19,13 +18,13 @@ group :development do
|
|
19
18
|
end
|
20
19
|
|
21
20
|
group :test do
|
22
|
-
gem 'rspec', '~> 3.
|
21
|
+
gem 'rspec', '~> 3.4.0'
|
23
22
|
gem 'json_spec', '~> 1.1.4'
|
24
23
|
gem 'i18n-spec', '~> 0.6.0'
|
25
24
|
|
26
|
-
gem 'timecop', '~> 0.
|
25
|
+
gem 'timecop', '~> 0.8.0'
|
27
26
|
|
28
|
-
gem 'pry-byebug', '~> 3.
|
27
|
+
gem 'pry-byebug', '~> 3.3.0'
|
29
28
|
|
30
29
|
gem 'rack-test', '~> 0.6.3'
|
31
30
|
|
data/Gemfile.lock
CHANGED
@@ -1,31 +1,33 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
locomotivecms_steam (1.0.0.
|
4
|
+
locomotivecms_steam (1.0.0.rc10)
|
5
5
|
RedCloth (~> 4.2.9)
|
6
|
+
autoprefixer-rails (~> 6.2.3)
|
6
7
|
chronic (~> 0.10.2)
|
7
8
|
coffee-script (~> 2.4.1)
|
8
9
|
compass (~> 1.0.3)
|
9
10
|
dragonfly (~> 1.0.12)
|
10
11
|
haml (~> 4.0.6)
|
11
12
|
httparty (~> 0.13.6)
|
12
|
-
kramdown (~> 1.
|
13
|
+
kramdown (~> 1.9.0)
|
14
|
+
less (~> 2.6.0)
|
13
15
|
locomotivecms-solid (~> 4.0.1)
|
14
16
|
locomotivecms_common (~> 0.0.5)
|
15
17
|
mime-types (~> 2.6.1)
|
16
18
|
mimetype-fu (~> 0.1.2)
|
17
19
|
moneta (~> 0.8.0)
|
18
|
-
mongo (~> 2.1
|
20
|
+
mongo (~> 2.2.1)
|
19
21
|
morphine (~> 0.1.1)
|
20
|
-
nokogiri (~> 1.6.
|
22
|
+
nokogiri (~> 1.6.7.1)
|
21
23
|
origin (~> 2.1.1)
|
22
24
|
rack-cache (~> 1.2)
|
23
25
|
rack-rewrite (~> 1.5.1)
|
24
26
|
rack_csrf (~> 2.5.0)
|
25
|
-
sanitize (~> 4.0.
|
26
|
-
|
27
|
-
sprockets
|
28
|
-
|
27
|
+
sanitize (~> 4.0.1)
|
28
|
+
sass (~> 3.4.20)
|
29
|
+
sprockets (~> 3.5.2)
|
30
|
+
therubyracer (~> 0.12.2)
|
29
31
|
|
30
32
|
GEM
|
31
33
|
remote: https://rubygems.org/
|
@@ -39,9 +41,11 @@ GEM
|
|
39
41
|
tzinfo (~> 1.1)
|
40
42
|
addressable (2.4.0)
|
41
43
|
attr_extras (4.4.0)
|
42
|
-
|
43
|
-
|
44
|
-
|
44
|
+
autoprefixer-rails (6.2.3)
|
45
|
+
execjs
|
46
|
+
json
|
47
|
+
bson (4.0.0)
|
48
|
+
byebug (8.2.1)
|
45
49
|
chronic (0.10.2)
|
46
50
|
chunky_png (1.3.5)
|
47
51
|
codeclimate-test-reporter (0.4.8)
|
@@ -52,7 +56,6 @@ GEM
|
|
52
56
|
execjs
|
53
57
|
coffee-script-source (1.10.0)
|
54
58
|
colorize (0.7.7)
|
55
|
-
columnize (0.9.0)
|
56
59
|
commonjs (0.2.7)
|
57
60
|
compass (1.0.3)
|
58
61
|
chunky_png (~> 1.2)
|
@@ -66,6 +69,7 @@ GEM
|
|
66
69
|
sass (>= 3.3.0, < 3.5)
|
67
70
|
compass-import-once (1.0.5)
|
68
71
|
sass (>= 3.2, < 3.5)
|
72
|
+
concurrent-ruby (1.0.0)
|
69
73
|
coveralls (0.8.10)
|
70
74
|
json (~> 1.8)
|
71
75
|
rest-client (>= 1.6.8, < 2)
|
@@ -91,7 +95,6 @@ GEM
|
|
91
95
|
fast_stack
|
92
96
|
haml (4.0.7)
|
93
97
|
tilt
|
94
|
-
hike (1.2.3)
|
95
98
|
http-cookie (1.0.2)
|
96
99
|
domain_name (~> 0.5)
|
97
100
|
httparty (0.13.7)
|
@@ -106,9 +109,10 @@ GEM
|
|
106
109
|
json_spec (1.1.4)
|
107
110
|
multi_json (~> 1.0)
|
108
111
|
rspec (>= 2.0, < 4.0)
|
109
|
-
kramdown (1.
|
112
|
+
kramdown (1.9.0)
|
110
113
|
less (2.6.0)
|
111
114
|
commonjs (~> 0.2.7)
|
115
|
+
libv8 (3.16.14.13)
|
112
116
|
locomotivecms-liquid (4.0.0)
|
113
117
|
locomotivecms-solid (4.0.1)
|
114
118
|
locomotivecms-liquid (~> 4.0.0)
|
@@ -121,26 +125,26 @@ GEM
|
|
121
125
|
method_source (0.8.2)
|
122
126
|
mime-types (2.6.2)
|
123
127
|
mimetype-fu (0.1.2)
|
124
|
-
|
128
|
+
mini_portile2 (2.0.0)
|
125
129
|
minitest (5.8.3)
|
126
130
|
moneta (0.8.0)
|
127
|
-
mongo (2.1
|
128
|
-
bson (~>
|
131
|
+
mongo (2.2.1)
|
132
|
+
bson (~> 4.0)
|
129
133
|
morphine (0.1.1)
|
130
134
|
multi_json (1.11.2)
|
131
135
|
multi_xml (0.5.5)
|
132
136
|
netrc (0.11.0)
|
133
|
-
nokogiri (1.6.
|
134
|
-
|
135
|
-
nokogumbo (1.4.
|
137
|
+
nokogiri (1.6.7.1)
|
138
|
+
mini_portile2 (~> 2.0.0.rc2)
|
139
|
+
nokogumbo (1.4.7)
|
136
140
|
nokogiri
|
137
141
|
origin (2.1.1)
|
138
142
|
pry (0.10.3)
|
139
143
|
coderay (~> 1.1.0)
|
140
144
|
method_source (~> 0.8.1)
|
141
145
|
slop (~> 3.4)
|
142
|
-
pry-byebug (3.
|
143
|
-
byebug (~>
|
146
|
+
pry-byebug (3.3.0)
|
147
|
+
byebug (~> 8.0)
|
144
148
|
pry (~> 0.10)
|
145
149
|
puma (2.15.3)
|
146
150
|
rack (1.6.4)
|
@@ -156,26 +160,27 @@ GEM
|
|
156
160
|
rake (10.4.2)
|
157
161
|
rake-compiler (0.9.5)
|
158
162
|
rake
|
159
|
-
rb-fsevent (0.9.
|
163
|
+
rb-fsevent (0.9.7)
|
160
164
|
rb-inotify (0.9.5)
|
161
165
|
ffi (>= 0.5.0)
|
166
|
+
ref (2.0.0)
|
162
167
|
rest-client (1.8.0)
|
163
168
|
http-cookie (>= 1.0.2, < 2.0)
|
164
169
|
mime-types (>= 1.16, < 3.0)
|
165
170
|
netrc (~> 0.7)
|
166
|
-
rspec (3.
|
167
|
-
rspec-core (~> 3.
|
168
|
-
rspec-expectations (~> 3.
|
169
|
-
rspec-mocks (~> 3.
|
170
|
-
rspec-core (3.
|
171
|
-
rspec-support (~> 3.
|
172
|
-
rspec-expectations (3.
|
171
|
+
rspec (3.4.0)
|
172
|
+
rspec-core (~> 3.4.0)
|
173
|
+
rspec-expectations (~> 3.4.0)
|
174
|
+
rspec-mocks (~> 3.4.0)
|
175
|
+
rspec-core (3.4.1)
|
176
|
+
rspec-support (~> 3.4.0)
|
177
|
+
rspec-expectations (3.4.0)
|
173
178
|
diff-lcs (>= 1.2.0, < 2.0)
|
174
|
-
rspec-support (~> 3.
|
175
|
-
rspec-mocks (3.
|
179
|
+
rspec-support (~> 3.4.0)
|
180
|
+
rspec-mocks (3.4.0)
|
176
181
|
diff-lcs (>= 1.2.0, < 2.0)
|
177
|
-
rspec-support (~> 3.
|
178
|
-
rspec-support (3.
|
182
|
+
rspec-support (~> 3.4.0)
|
183
|
+
rspec-support (3.4.1)
|
179
184
|
sanitize (4.0.1)
|
180
185
|
crass (~> 1.0.2)
|
181
186
|
nokogiri (>= 1.4.4)
|
@@ -187,25 +192,20 @@ GEM
|
|
187
192
|
simplecov-html (~> 0.10.0)
|
188
193
|
simplecov-html (0.10.0)
|
189
194
|
slop (3.6.0)
|
190
|
-
sprockets (
|
191
|
-
|
192
|
-
|
193
|
-
rack (~> 1.0)
|
194
|
-
tilt (~> 1.1, != 1.3.0)
|
195
|
-
sprockets-less (0.6.1)
|
196
|
-
less (~> 2.4)
|
197
|
-
tilt (~> 1.1)
|
198
|
-
sprockets-sass (1.3.1)
|
199
|
-
sprockets (~> 2.0)
|
200
|
-
tilt (~> 1.1)
|
195
|
+
sprockets (3.5.2)
|
196
|
+
concurrent-ruby (~> 1.0)
|
197
|
+
rack (> 1, < 3)
|
201
198
|
stackprof (0.2.7)
|
202
199
|
stringex (2.5.2)
|
203
200
|
term-ansicolor (1.3.2)
|
204
201
|
tins (~> 1.0)
|
202
|
+
therubyracer (0.12.2)
|
203
|
+
libv8 (~> 3.16.14.0)
|
204
|
+
ref
|
205
205
|
thor (0.19.1)
|
206
206
|
thread_safe (0.3.5)
|
207
|
-
tilt (
|
208
|
-
timecop (0.
|
207
|
+
tilt (2.0.1)
|
208
|
+
timecop (0.8.0)
|
209
209
|
tins (1.6.0)
|
210
210
|
tzinfo (1.2.2)
|
211
211
|
thread_safe (~> 0.1)
|
@@ -226,14 +226,14 @@ DEPENDENCIES
|
|
226
226
|
json_spec (~> 1.1.4)
|
227
227
|
locomotivecms_steam!
|
228
228
|
memory_profiler
|
229
|
-
pry-byebug (~> 3.
|
229
|
+
pry-byebug (~> 3.3.0)
|
230
230
|
puma
|
231
231
|
rack-mini-profiler
|
232
232
|
rack-test (~> 0.6.3)
|
233
233
|
rake (~> 10.4.2)
|
234
|
-
rspec (~> 3.
|
234
|
+
rspec (~> 3.4.0)
|
235
235
|
stackprof
|
236
|
-
timecop (~> 0.
|
236
|
+
timecop (~> 0.8.0)
|
237
237
|
yui-compressor (~> 0.12.0)
|
238
238
|
|
239
239
|
BUNDLED WITH
|
@@ -144,7 +144,14 @@ module Locomotive::Steam
|
|
144
144
|
|
145
145
|
def _cast_time(field, end_method)
|
146
146
|
_cast_convertor(field.name) do |value|
|
147
|
-
value.is_a?(String)
|
147
|
+
if value.is_a?(String)
|
148
|
+
# context: time from a YAML file (String).
|
149
|
+
# In that case, use the timezone defined by the site.
|
150
|
+
Chronic.time_class = Time.zone
|
151
|
+
Chronic.parse(value).send(end_method)
|
152
|
+
else
|
153
|
+
value
|
154
|
+
end
|
148
155
|
end
|
149
156
|
end
|
150
157
|
|
@@ -1,10 +1,9 @@
|
|
1
1
|
require 'sprockets'
|
2
|
-
require '
|
3
|
-
require '
|
2
|
+
require 'sass'
|
3
|
+
require 'less'
|
4
4
|
require 'coffee_script'
|
5
5
|
require 'compass'
|
6
|
-
|
7
|
-
Sprockets::Sass.add_sass_functions = false
|
6
|
+
require 'autoprefixer-rails'
|
8
7
|
|
9
8
|
module Locomotive::Steam
|
10
9
|
|
@@ -18,6 +17,8 @@ module Locomotive::Steam
|
|
18
17
|
append_steam_paths
|
19
18
|
|
20
19
|
install_yui_compressor(options)
|
20
|
+
|
21
|
+
install_autoprefixer
|
21
22
|
end
|
22
23
|
|
23
24
|
private
|
@@ -26,6 +27,8 @@ module Locomotive::Steam
|
|
26
27
|
%w(fonts stylesheets javascripts).each do |name|
|
27
28
|
append_path File.join(@steam_path, name)
|
28
29
|
end
|
30
|
+
|
31
|
+
Compass::Frameworks::ALL.each { |f| append_path(f.stylesheets_directory) }
|
29
32
|
end
|
30
33
|
|
31
34
|
def install_yui_compressor(options)
|
@@ -44,6 +47,13 @@ module Locomotive::Steam
|
|
44
47
|
end
|
45
48
|
end
|
46
49
|
|
50
|
+
def install_autoprefixer
|
51
|
+
file = File.join(root, '..', 'config', 'autoprefixer.yml')
|
52
|
+
params = (File.exist?(file) ? ::YAML.load_file(file) : {}).symbolize_keys
|
53
|
+
|
54
|
+
AutoprefixerRails.install(self, params)
|
55
|
+
end
|
56
|
+
|
47
57
|
def is_java_installed?
|
48
58
|
`which java` != '' && (!ENV['JAVA_HOME'].blank? && File.exists?(ENV['JAVA_HOME']))
|
49
59
|
end
|
@@ -5,8 +5,14 @@ module Locomotive
|
|
5
5
|
|
6
6
|
module Translate
|
7
7
|
|
8
|
-
def translate(input,
|
9
|
-
|
8
|
+
def translate(input, options = nil, legacy_scope = nil)
|
9
|
+
options ||= {}
|
10
|
+
|
11
|
+
unless options.respond_to?(:values) # String
|
12
|
+
options = { 'locale' => options, 'scope' => legacy_scope }
|
13
|
+
end
|
14
|
+
|
15
|
+
@context.registers[:services].translator.translate(input, options) || input
|
10
16
|
end
|
11
17
|
|
12
18
|
end
|
@@ -22,7 +22,7 @@ module Locomotive
|
|
22
22
|
@name = $1.to_s
|
23
23
|
|
24
24
|
self.prepare_url($2)
|
25
|
-
@
|
25
|
+
@default_api_options = parse_options_from_string($3)
|
26
26
|
else
|
27
27
|
raise ::Liquid::SyntaxError.new("Syntax Error in 'consume' - Valid syntax: consume <var> from \"<url>\" [username: value, password: value]")
|
28
28
|
end
|
@@ -51,7 +51,7 @@ module Locomotive
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def set_api_options(context)
|
54
|
-
@api_options = interpolate_options(@
|
54
|
+
@api_options = interpolate_options(@default_api_options, context)
|
55
55
|
@expires_in = @api_options.delete(:expires_in) || 0
|
56
56
|
end
|
57
57
|
|
@@ -49,6 +49,24 @@ module Locomotive
|
|
49
49
|
|
50
50
|
protected
|
51
51
|
|
52
|
+
def render_default_content
|
53
|
+
begin
|
54
|
+
if nodelist.all? { |n| n.is_a? String }
|
55
|
+
@body.render(::Liquid::Context.new)
|
56
|
+
else
|
57
|
+
raise ::Liquid::SyntaxError.new("No liquid tags are allowed inside the #{@tag_name} \"#{@slug}\" (block: #{current_inherited_block_name || 'default'})")
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def editable?(context, element = nil)
|
63
|
+
!(
|
64
|
+
element.try(:inline_editing) == false ||
|
65
|
+
[false, 'false'].include?(default_element_attributes[:inline_editing]) ||
|
66
|
+
context.registers[:live_editing].blank?
|
67
|
+
)
|
68
|
+
end
|
69
|
+
|
52
70
|
def fetch_page(context)
|
53
71
|
page = context.registers[:page]
|
54
72
|
|
@@ -102,16 +120,6 @@ module Locomotive
|
|
102
120
|
options[:inherited_blocks].try(:[], :nested).try(:last)
|
103
121
|
end
|
104
122
|
|
105
|
-
def render_default_content
|
106
|
-
begin
|
107
|
-
if nodelist.all? { |n| n.is_a? String }
|
108
|
-
@body.render(::Liquid::Context.new)
|
109
|
-
else
|
110
|
-
raise ::Liquid::SyntaxError.new("No liquid tags are allowed inside the #{@tag_name} \"#{@slug}\" (block: #{current_inherited_block_name || 'default'})")
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
123
|
#:nocov:
|
116
124
|
def render_element(element)
|
117
125
|
raise 'FIXME: has to be overidden'
|
@@ -5,15 +5,31 @@ module Locomotive
|
|
5
5
|
module Editable
|
6
6
|
class File < Base
|
7
7
|
|
8
|
+
def parse(tokens)
|
9
|
+
super.tap do
|
10
|
+
@path = [current_inherited_block_name, @slug].compact.join('--').gsub('/', '--')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def render(context)
|
15
|
+
apply_transformation(super, context)
|
16
|
+
end
|
17
|
+
|
8
18
|
protected
|
9
19
|
|
10
20
|
def default_element_attributes
|
11
21
|
super.merge({
|
12
|
-
default_source_url: render_default_content.strip
|
22
|
+
default_source_url: render_default_content.strip,
|
23
|
+
resize_format: @element_options[:resize]
|
13
24
|
})
|
14
25
|
end
|
15
26
|
|
16
27
|
def render_element(context, element)
|
28
|
+
url, timestamp = url_with_timestamp(context, element)
|
29
|
+
context.registers[:services].asset_host.compute(url, timestamp)
|
30
|
+
end
|
31
|
+
|
32
|
+
def url_with_timestamp(context, element)
|
17
33
|
default_timestamp = context.registers[:page].updated_at.to_i
|
18
34
|
|
19
35
|
url, timestamp = (if element.source
|
@@ -25,8 +41,6 @@ module Locomotive
|
|
25
41
|
[render_default_content, nil]
|
26
42
|
end
|
27
43
|
end)
|
28
|
-
|
29
|
-
context.registers[:services].asset_host.compute(url, timestamp)
|
30
44
|
end
|
31
45
|
|
32
46
|
def source_url(element)
|
@@ -38,6 +52,20 @@ module Locomotive
|
|
38
52
|
end
|
39
53
|
end
|
40
54
|
|
55
|
+
def apply_transformation(url, context)
|
56
|
+
# resize image with the image_resizer service?
|
57
|
+
if (format = @element_options[:resize]).present?
|
58
|
+
url = context.registers[:services].image_resizer.resize(url, format) || url
|
59
|
+
end
|
60
|
+
|
61
|
+
# in the live editing mode, tag all the images with their editable path (block + slug)
|
62
|
+
if editable?(context)
|
63
|
+
url = url + (url.include?('?') ? '&' : '?') + 'editable-path=' + @path
|
64
|
+
end
|
65
|
+
|
66
|
+
url
|
67
|
+
end
|
68
|
+
|
41
69
|
end
|
42
70
|
|
43
71
|
::Liquid::Template.register_tag('editable_file'.freeze, File)
|
@@ -5,11 +5,13 @@ module Locomotive::Steam
|
|
5
5
|
|
6
6
|
REGEXP = /^\/(javascripts|stylesheets)\/(.*)$/o
|
7
7
|
|
8
|
+
@@sprocket_environments = {}
|
9
|
+
|
8
10
|
attr_reader :app, :assets
|
9
11
|
|
10
12
|
def initialize(app, options)
|
11
13
|
@app = app
|
12
|
-
@assets =
|
14
|
+
@assets = self.class.sprocket_environment(options[:root], options)
|
13
15
|
end
|
14
16
|
|
15
17
|
def call(env)
|
@@ -21,6 +23,10 @@ module Locomotive::Steam
|
|
21
23
|
end
|
22
24
|
end
|
23
25
|
|
26
|
+
def self.sprocket_environment(root, options)
|
27
|
+
@@sprocket_environments[root] ||= Locomotive::Steam::SprocketsEnvironment.new(root, options)
|
28
|
+
end
|
29
|
+
|
24
30
|
end
|
25
31
|
|
26
32
|
end
|
@@ -8,21 +8,23 @@ module Locomotive
|
|
8
8
|
# Return the translation described by a key.
|
9
9
|
#
|
10
10
|
# @param [ String ] key The key of the translation.
|
11
|
-
# @param [
|
12
|
-
# @param [ String ] scope If specified, instead of looking in the translations, it will use I18n instead.
|
11
|
+
# @param [ Hash ] options This includes the following options: count, locale (The locale we want the translation in), scope (If specified, instead of looking in the translations, it will use I18n instead)
|
13
12
|
#
|
14
13
|
# @return [ String ] the translated text or nil if not found
|
15
14
|
#
|
16
|
-
def translate(input,
|
17
|
-
locale
|
15
|
+
def translate(input, options = {})
|
16
|
+
locale = options['locale'] || self.current_locale
|
17
|
+
scope = options.delete('scope')
|
18
18
|
|
19
19
|
if scope.blank?
|
20
|
+
input = "#{input}_#{pluralize_prefix(options['count'])}" if options['count']
|
21
|
+
|
20
22
|
values = repository.by_key(input).try(:values) || {}
|
21
23
|
|
22
24
|
# FIXME: important to check if the returned value is nil (instead of nil + false)
|
23
25
|
# false being reserved for an existing key but without provided translation)
|
24
26
|
if (translation = values[locale.to_s]).present?
|
25
|
-
translation
|
27
|
+
_translate(translation, options)
|
26
28
|
else
|
27
29
|
Locomotive::Common::Logger.warn "Missing translation '#{input}' for the '#{locale}' locale".yellow
|
28
30
|
ActiveSupport::Notifications.instrument('steam.missing_translation', input: input, locale: locale)
|
@@ -33,6 +35,21 @@ module Locomotive
|
|
33
35
|
end
|
34
36
|
end
|
35
37
|
|
38
|
+
private
|
39
|
+
|
40
|
+
def _translate(string, options)
|
41
|
+
::Liquid::Template.parse(string).render(options)
|
42
|
+
end
|
43
|
+
|
44
|
+
def pluralize_prefix(count)
|
45
|
+
case count.to_i
|
46
|
+
when 0 then 'zero'
|
47
|
+
when 1 then 'one'
|
48
|
+
when 2 then 'two'
|
49
|
+
else 'other'
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
36
53
|
end
|
37
54
|
|
38
55
|
end
|
data/locomotivecms_steam.gemspec
CHANGED
@@ -18,11 +18,11 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
19
19
|
spec.add_development_dependency 'rake', '~> 10.4.2'
|
20
20
|
|
21
|
-
spec.add_dependency 'mongo', '~> 2.1
|
21
|
+
spec.add_dependency 'mongo', '~> 2.2.1'
|
22
22
|
spec.add_dependency 'origin', '~> 2.1.1'
|
23
23
|
|
24
|
-
spec.add_dependency 'nokogiri', '~> 1.6.
|
25
|
-
spec.add_dependency 'sanitize', '~> 4.0.
|
24
|
+
spec.add_dependency 'nokogiri', '~> 1.6.7.1'
|
25
|
+
spec.add_dependency 'sanitize', '~> 4.0.1'
|
26
26
|
spec.add_dependency 'morphine', '~> 0.1.1'
|
27
27
|
spec.add_dependency 'httparty', '~> 0.13.6'
|
28
28
|
spec.add_dependency 'chronic', '~> 0.10.2'
|
@@ -33,13 +33,15 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_dependency 'moneta', '~> 0.8.0'
|
34
34
|
spec.add_dependency 'rack_csrf', '~> 2.5.0'
|
35
35
|
|
36
|
-
spec.add_dependency 'sprockets', '~>
|
37
|
-
spec.add_dependency '
|
38
|
-
spec.add_dependency '
|
36
|
+
spec.add_dependency 'sprockets', '~> 3.5.2'
|
37
|
+
spec.add_dependency 'sass', '~> 3.4.20'
|
38
|
+
spec.add_dependency 'less', '~> 2.6.0'
|
39
|
+
spec.add_dependency 'therubyracer', '~> 0.12.2'
|
39
40
|
spec.add_dependency 'coffee-script', '~> 2.4.1'
|
40
41
|
spec.add_dependency 'compass', '~> 1.0.3'
|
42
|
+
spec.add_dependency 'autoprefixer-rails', '~> 6.2.3'
|
41
43
|
|
42
|
-
spec.add_dependency 'kramdown', '~> 1.
|
44
|
+
spec.add_dependency 'kramdown', '~> 1.9.0'
|
43
45
|
spec.add_dependency 'RedCloth', '~> 4.2.9'
|
44
46
|
spec.add_dependency 'haml', '~> 4.0.6'
|
45
47
|
spec.add_dependency 'mimetype-fu', '~> 0.1.2'
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Locomotive::Steam::Liquid::Filters::Translate do
|
4
|
+
|
5
|
+
let(:source) { "{{ 'welcome_message' | translate }}" }
|
6
|
+
|
7
|
+
let(:site) { Locomotive::Steam::Site.new(_id: site_id, locales: %w(en fr nb)) }
|
8
|
+
let(:services) { Locomotive::Steam::Services.build_instance }
|
9
|
+
let(:translator) { services.translator }
|
10
|
+
let(:assigns) { {} }
|
11
|
+
let(:context) { ::Liquid::Context.new(assigns, {}, { services: services }) }
|
12
|
+
|
13
|
+
before { services.locale = :en }
|
14
|
+
|
15
|
+
subject { render_template(source, context) }
|
16
|
+
|
17
|
+
context 'missing translation' do
|
18
|
+
|
19
|
+
before { allow(translator).to receive(:translate).and_return(nil) }
|
20
|
+
|
21
|
+
it { is_expected.to eq 'welcome_message' }
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
context 'existing translation' do
|
26
|
+
|
27
|
+
before { allow(translator).to receive(:translate).and_return('Hello world') }
|
28
|
+
|
29
|
+
it { is_expected.to eq 'Hello world' }
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
describe 'passing a locale and a scope' do
|
34
|
+
|
35
|
+
before { allow(translator).to receive(:translate).and_return('Bonjour monde') }
|
36
|
+
|
37
|
+
describe 'legacy syntax' do
|
38
|
+
|
39
|
+
let(:source) { "{{ 'welcome_message' | translate: 'fr', 'locomotive.default' }}" }
|
40
|
+
it { expect(translator).to receive(:translate).with('welcome_message', 'locale' => 'fr', 'scope' => 'locomotive.default'); subject }
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
describe 'new syntax' do
|
45
|
+
|
46
|
+
let(:source) { "{{ 'welcome_message' | translate: locale: 'fr', scope: 'locomotive.default' }}" }
|
47
|
+
it { expect(translator).to receive(:translate).with('welcome_message', 'locale' => 'fr', 'scope' => 'locomotive.default'); subject }
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'pluralization' do
|
54
|
+
|
55
|
+
let(:translation) { instance_double('Translation', values: { 'en' => '{{ name }} has {{ count }} articles' }) }
|
56
|
+
before { expect(translator.repository).to receive(:by_key).with('post_count_two').and_return(translation) }
|
57
|
+
|
58
|
+
let(:source) { "{{ 'post_count' | translate: count: 2, name: 'John' }}" }
|
59
|
+
it { expect(subject).to eq('John has 2 articles') }
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
@@ -155,6 +155,7 @@ describe Locomotive::Steam::ContentEntry do
|
|
155
155
|
end
|
156
156
|
|
157
157
|
context 'a date time' do
|
158
|
+
before { Time.zone = 'UTC' }
|
158
159
|
let(:field_type) { :date_time }
|
159
160
|
let(:value) { '2007/06/29 10:00:00' }
|
160
161
|
let(:datetime) { DateTime.parse('2007/06/29 10:00:00') }
|
@@ -63,6 +63,14 @@ describe Locomotive::Steam::Liquid::Tags::Consume do
|
|
63
63
|
|
64
64
|
end
|
65
65
|
|
66
|
+
describe 'inside a loop' do
|
67
|
+
|
68
|
+
let(:assigns) { { 'urls' => ['http://blog.locomotiveapp.org/api/read', 'http://blog.locomotiveapp.org/api/read'] } }
|
69
|
+
let(:source) { "{% for url in urls %}{% consume blog from url %}{{ blog.title }}{% endconsume %}{% endfor %}" }
|
70
|
+
it { is_expected.to eq 'Locomotive rocks!Locomotive rocks!' }
|
71
|
+
|
72
|
+
end
|
73
|
+
|
66
74
|
end
|
67
75
|
|
68
76
|
describe 'timeout' do
|
@@ -68,12 +68,12 @@ describe Locomotive::Steam::Liquid::Tags::Editable::File do
|
|
68
68
|
|
69
69
|
describe 'rendering' do
|
70
70
|
|
71
|
-
let(:
|
71
|
+
let(:live_editing) { false }
|
72
72
|
|
73
73
|
let(:page) { instance_double('Page', fullpath: 'hello-world', updated_at: DateTime.parse('2007-06-29 21:00:00')) }
|
74
74
|
let(:element) { instance_double('EditableFile', id: 42, default_source_url: nil, source?: false, source: nil, content: nil, base_url: '') }
|
75
75
|
let(:services) { Locomotive::Steam::Services.build_instance }
|
76
|
-
let(:context) { ::Liquid::Context.new({}, {}, { page: page, services: services }) }
|
76
|
+
let(:context) { ::Liquid::Context.new({}, {}, { page: page, services: services, live_editing: live_editing }) }
|
77
77
|
|
78
78
|
before { allow(services).to receive(:current_site).and_return(nil) }
|
79
79
|
|
@@ -83,6 +83,22 @@ describe Locomotive::Steam::Liquid::Tags::Editable::File do
|
|
83
83
|
|
84
84
|
it { is_expected.to eq 'http://www.placehold.it/500x500' }
|
85
85
|
|
86
|
+
context 'live editing' do
|
87
|
+
|
88
|
+
let(:live_editing) { true }
|
89
|
+
|
90
|
+
it { is_expected.to eq 'http://www.placehold.it/500x500?editable-path=banner' }
|
91
|
+
|
92
|
+
context 'inside a block' do
|
93
|
+
|
94
|
+
let(:source) { "{% block head %}{% editable_file banner, hint: 'some text' %}http://www.placehold.it/500x500?123456{% endeditable_file %}{% endblock %}" }
|
95
|
+
|
96
|
+
it { is_expected.to include('http://www.placehold.it/500x500?123456&editable-path=head--banner') }
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
end
|
101
|
+
|
86
102
|
context 'no element found, render the default content' do
|
87
103
|
|
88
104
|
let(:element) { nil }
|
@@ -114,6 +130,21 @@ describe Locomotive::Steam::Liquid::Tags::Editable::File do
|
|
114
130
|
|
115
131
|
end
|
116
132
|
|
133
|
+
context 'resize image' do
|
134
|
+
|
135
|
+
let(:source) { "{% block header %}{% editable_file banner, hint: 'some text', resize: '500x100#' %}http://www.placehold.it/500x500{% endeditable_file %}{% endblock %}" }
|
136
|
+
it { is_expected.to eq '/steam/dynamic/W1siZnUiLCJodHRwOi8vd3d3LnBsYWNlaG9sZC5pdC81MDB4NTAwIl0sWyJwIiwidGh1bWIiLCI1MDB4MTAwIyJdXQ/1c79f4581f33aae4/500x500' }
|
137
|
+
|
138
|
+
context 'live editing on' do
|
139
|
+
|
140
|
+
let(:live_editing) { true }
|
141
|
+
|
142
|
+
it { is_expected.to eq '<span class="locomotive-block-anchor" data-element-id="header" style="visibility: hidden"></span>/steam/dynamic/W1siZnUiLCJodHRwOi8vd3d3LnBsYWNlaG9sZC5pdC81MDB4NTAwIl0sWyJwIiwidGh1bWIiLCI1MDB4MTAwIyJdXQ/1c79f4581f33aae4/500x500?editable-path=header--banner' }
|
143
|
+
|
144
|
+
end
|
145
|
+
|
146
|
+
end
|
147
|
+
|
117
148
|
end
|
118
149
|
|
119
150
|
end
|
@@ -8,15 +8,16 @@ describe Locomotive::Steam::TranslatorService do
|
|
8
8
|
|
9
9
|
describe '#translate' do
|
10
10
|
|
11
|
-
let(:input)
|
12
|
-
let(:locale)
|
13
|
-
let(:scope)
|
11
|
+
let(:input) { 'example_test' }
|
12
|
+
let(:locale) { nil }
|
13
|
+
let(:scope) { nil }
|
14
|
+
let(:interpolation) { {} }
|
14
15
|
|
15
16
|
before do
|
16
17
|
allow(repository).to receive(:by_key).with('example_test').and_return(translation)
|
17
18
|
end
|
18
19
|
|
19
|
-
subject { service.translate(input, locale, scope) }
|
20
|
+
subject { service.translate(input, interpolation.merge('locale' => locale, 'scope' => scope)) }
|
20
21
|
|
21
22
|
describe 'existing translation' do
|
22
23
|
|
@@ -24,14 +25,14 @@ describe Locomotive::Steam::TranslatorService do
|
|
24
25
|
|
25
26
|
it { is_expected.to eq 'Example text' }
|
26
27
|
|
27
|
-
|
28
|
+
describe 'specifying a locale' do
|
28
29
|
|
29
30
|
let(:locale) { 'es' }
|
30
31
|
it { is_expected.to eq 'Texto de ejemplo' }
|
31
32
|
|
32
33
|
end
|
33
34
|
|
34
|
-
|
35
|
+
describe "specifying a locale that doesn't exist" do
|
35
36
|
|
36
37
|
let(:locale) { 'nl' }
|
37
38
|
|
@@ -41,7 +42,7 @@ describe Locomotive::Steam::TranslatorService do
|
|
41
42
|
|
42
43
|
end
|
43
44
|
|
44
|
-
context '
|
45
|
+
context 'with a scope' do
|
45
46
|
|
46
47
|
let(:input) { 'fr' }
|
47
48
|
let(:locale) { 'en' }
|
@@ -51,6 +52,63 @@ describe Locomotive::Steam::TranslatorService do
|
|
51
52
|
|
52
53
|
end
|
53
54
|
|
55
|
+
describe 'interpolation' do
|
56
|
+
|
57
|
+
let(:interpolation) { { 'name' => 'John' } }
|
58
|
+
let(:translation) { instance_double('Translation', values: { 'en' => 'Hello {{ name }}', 'es' => 'Texto de ejemplo' }) }
|
59
|
+
|
60
|
+
it { is_expected.to eq 'Hello John' }
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
describe 'pluralization' do
|
65
|
+
|
66
|
+
context 'zero' do
|
67
|
+
|
68
|
+
let(:interpolation) { { 'count' => '0' } }
|
69
|
+
let(:translation) { instance_double('Translation', values: { 'en' => 'No posts' }) }
|
70
|
+
|
71
|
+
before { expect(repository).to receive(:by_key).with('example_test_zero').and_return(translation) }
|
72
|
+
|
73
|
+
it { is_expected.to eq 'No posts' }
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
context 'one' do
|
78
|
+
|
79
|
+
let(:interpolation) { { 'count' => '1' } }
|
80
|
+
let(:translation) { instance_double('Translation', values: { 'en' => '1 post' }) }
|
81
|
+
|
82
|
+
before { expect(repository).to receive(:by_key).with('example_test_one').and_return(translation) }
|
83
|
+
|
84
|
+
it { is_expected.to eq '1 post' }
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
context 'two' do
|
89
|
+
|
90
|
+
let(:interpolation) { { 'count' => 2 } }
|
91
|
+
let(:translation) { instance_double('Translation', values: { 'en' => '2 posts' }) }
|
92
|
+
|
93
|
+
before { expect(repository).to receive(:by_key).with('example_test_two').and_return(translation) }
|
94
|
+
|
95
|
+
it { is_expected.to eq '2 posts' }
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
context 'other' do
|
100
|
+
|
101
|
+
let(:interpolation) { { 'count' => 42 } }
|
102
|
+
let(:translation) { instance_double('Translation', values: { 'en' => '{{ count }} posts' }) }
|
103
|
+
|
104
|
+
before { expect(repository).to receive(:by_key).with('example_test_other').and_return(translation) }
|
105
|
+
|
106
|
+
it { is_expected.to eq '42 posts' }
|
107
|
+
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
111
|
+
|
54
112
|
end
|
55
113
|
|
56
114
|
describe 'missing translation' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locomotivecms_steam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Didier Lafforgue
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2016-01-05 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -47,14 +47,14 @@ dependencies:
|
|
47
47
|
requirements:
|
48
48
|
- - "~>"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 2.1
|
50
|
+
version: 2.2.1
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - "~>"
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 2.1
|
57
|
+
version: 2.2.1
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: origin
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,28 +75,28 @@ dependencies:
|
|
75
75
|
requirements:
|
76
76
|
- - "~>"
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version: 1.6.
|
78
|
+
version: 1.6.7.1
|
79
79
|
type: :runtime
|
80
80
|
prerelease: false
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
83
|
- - "~>"
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 1.6.
|
85
|
+
version: 1.6.7.1
|
86
86
|
- !ruby/object:Gem::Dependency
|
87
87
|
name: sanitize
|
88
88
|
requirement: !ruby/object:Gem::Requirement
|
89
89
|
requirements:
|
90
90
|
- - "~>"
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: 4.0.
|
92
|
+
version: 4.0.1
|
93
93
|
type: :runtime
|
94
94
|
prerelease: false
|
95
95
|
version_requirements: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
97
|
- - "~>"
|
98
98
|
- !ruby/object:Gem::Version
|
99
|
-
version: 4.0.
|
99
|
+
version: 4.0.1
|
100
100
|
- !ruby/object:Gem::Dependency
|
101
101
|
name: morphine
|
102
102
|
requirement: !ruby/object:Gem::Requirement
|
@@ -215,42 +215,56 @@ dependencies:
|
|
215
215
|
requirements:
|
216
216
|
- - "~>"
|
217
217
|
- !ruby/object:Gem::Version
|
218
|
-
version:
|
218
|
+
version: 3.5.2
|
219
|
+
type: :runtime
|
220
|
+
prerelease: false
|
221
|
+
version_requirements: !ruby/object:Gem::Requirement
|
222
|
+
requirements:
|
223
|
+
- - "~>"
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
version: 3.5.2
|
226
|
+
- !ruby/object:Gem::Dependency
|
227
|
+
name: sass
|
228
|
+
requirement: !ruby/object:Gem::Requirement
|
229
|
+
requirements:
|
230
|
+
- - "~>"
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
version: 3.4.20
|
219
233
|
type: :runtime
|
220
234
|
prerelease: false
|
221
235
|
version_requirements: !ruby/object:Gem::Requirement
|
222
236
|
requirements:
|
223
237
|
- - "~>"
|
224
238
|
- !ruby/object:Gem::Version
|
225
|
-
version:
|
239
|
+
version: 3.4.20
|
226
240
|
- !ruby/object:Gem::Dependency
|
227
|
-
name:
|
241
|
+
name: less
|
228
242
|
requirement: !ruby/object:Gem::Requirement
|
229
243
|
requirements:
|
230
244
|
- - "~>"
|
231
245
|
- !ruby/object:Gem::Version
|
232
|
-
version:
|
246
|
+
version: 2.6.0
|
233
247
|
type: :runtime
|
234
248
|
prerelease: false
|
235
249
|
version_requirements: !ruby/object:Gem::Requirement
|
236
250
|
requirements:
|
237
251
|
- - "~>"
|
238
252
|
- !ruby/object:Gem::Version
|
239
|
-
version:
|
253
|
+
version: 2.6.0
|
240
254
|
- !ruby/object:Gem::Dependency
|
241
|
-
name:
|
255
|
+
name: therubyracer
|
242
256
|
requirement: !ruby/object:Gem::Requirement
|
243
257
|
requirements:
|
244
258
|
- - "~>"
|
245
259
|
- !ruby/object:Gem::Version
|
246
|
-
version: 0.
|
260
|
+
version: 0.12.2
|
247
261
|
type: :runtime
|
248
262
|
prerelease: false
|
249
263
|
version_requirements: !ruby/object:Gem::Requirement
|
250
264
|
requirements:
|
251
265
|
- - "~>"
|
252
266
|
- !ruby/object:Gem::Version
|
253
|
-
version: 0.
|
267
|
+
version: 0.12.2
|
254
268
|
- !ruby/object:Gem::Dependency
|
255
269
|
name: coffee-script
|
256
270
|
requirement: !ruby/object:Gem::Requirement
|
@@ -279,20 +293,34 @@ dependencies:
|
|
279
293
|
- - "~>"
|
280
294
|
- !ruby/object:Gem::Version
|
281
295
|
version: 1.0.3
|
296
|
+
- !ruby/object:Gem::Dependency
|
297
|
+
name: autoprefixer-rails
|
298
|
+
requirement: !ruby/object:Gem::Requirement
|
299
|
+
requirements:
|
300
|
+
- - "~>"
|
301
|
+
- !ruby/object:Gem::Version
|
302
|
+
version: 6.2.3
|
303
|
+
type: :runtime
|
304
|
+
prerelease: false
|
305
|
+
version_requirements: !ruby/object:Gem::Requirement
|
306
|
+
requirements:
|
307
|
+
- - "~>"
|
308
|
+
- !ruby/object:Gem::Version
|
309
|
+
version: 6.2.3
|
282
310
|
- !ruby/object:Gem::Dependency
|
283
311
|
name: kramdown
|
284
312
|
requirement: !ruby/object:Gem::Requirement
|
285
313
|
requirements:
|
286
314
|
- - "~>"
|
287
315
|
- !ruby/object:Gem::Version
|
288
|
-
version: 1.
|
316
|
+
version: 1.9.0
|
289
317
|
type: :runtime
|
290
318
|
prerelease: false
|
291
319
|
version_requirements: !ruby/object:Gem::Requirement
|
292
320
|
requirements:
|
293
321
|
- - "~>"
|
294
322
|
- !ruby/object:Gem::Version
|
295
|
-
version: 1.
|
323
|
+
version: 1.9.0
|
296
324
|
- !ruby/object:Gem::Dependency
|
297
325
|
name: RedCloth
|
298
326
|
requirement: !ruby/object:Gem::Requirement
|
@@ -666,6 +694,7 @@ files:
|
|
666
694
|
- spec/fixtures/mongodb/system.indexes.bson
|
667
695
|
- spec/integration/integration_helper.rb
|
668
696
|
- spec/integration/liquid/drops/page_spec.rb
|
697
|
+
- spec/integration/liquid/filters/translate_spec.rb
|
669
698
|
- spec/integration/liquid/tags/paginate_spec.rb
|
670
699
|
- spec/integration/repositories/content_entry_repository_spec.rb
|
671
700
|
- spec/integration/repositories/content_type_repository_spec.rb
|
@@ -910,6 +939,7 @@ test_files:
|
|
910
939
|
- spec/fixtures/mongodb/system.indexes.bson
|
911
940
|
- spec/integration/integration_helper.rb
|
912
941
|
- spec/integration/liquid/drops/page_spec.rb
|
942
|
+
- spec/integration/liquid/filters/translate_spec.rb
|
913
943
|
- spec/integration/liquid/tags/paginate_spec.rb
|
914
944
|
- spec/integration/repositories/content_entry_repository_spec.rb
|
915
945
|
- spec/integration/repositories/content_type_repository_spec.rb
|