locomotivecms_mounter 1.2.1 → 1.2.2
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/lib/locomotive/mounter/engine_api.rb +2 -0
- data/lib/locomotive/mounter/models/content_entry.rb +1 -1
- data/lib/locomotive/mounter/models/page.rb +8 -3
- data/lib/locomotive/mounter/version.rb +1 -1
- data/lib/locomotive/mounter/writer/file_system/theme_assets_writer.rb +1 -1
- data/lib/locomotive/mounter.rb +1 -0
- metadata +23 -7
|
@@ -29,6 +29,8 @@ module Locomotive
|
|
|
29
29
|
if response.code < 400
|
|
30
30
|
self.default_params auth_token: response['token']
|
|
31
31
|
response['token']
|
|
32
|
+
elsif response.code == 404 # ssl option missing
|
|
33
|
+
raise WrongCredentials.new("#{uri}/tokens.json does not respond. Perhaps, the ssl option is missing in your config/deploy.yml file")
|
|
32
34
|
else
|
|
33
35
|
raise WrongCredentials.new("#{response['message']} (#{response.code})")
|
|
34
36
|
end
|
|
@@ -207,8 +207,11 @@ module Locomotive
|
|
|
207
207
|
|
|
208
208
|
attributes.to_a.each do |_attributes|
|
|
209
209
|
if _attributes.is_a?(Array) # attributes is maybe a Hash
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
_splashed = _attributes.first.split('/')
|
|
211
|
+
|
|
212
|
+
block, slug = _splashed[0..-2].join('/'), _splashed.last
|
|
213
|
+
block = nil if block.blank?
|
|
214
|
+
|
|
212
215
|
_attributes = { 'block' => block, 'slug' => slug, 'content' => _attributes.last }
|
|
213
216
|
end
|
|
214
217
|
|
|
@@ -320,7 +323,9 @@ module Locomotive
|
|
|
320
323
|
def to_yaml
|
|
321
324
|
fields = %w(title slug redirect_url redirect_type handle published listed cache_strategy response_type position seo_title meta_description meta_keywords)
|
|
322
325
|
|
|
323
|
-
_attributes = self.attributes.delete_if
|
|
326
|
+
_attributes = self.attributes.delete_if do |k, v|
|
|
327
|
+
!fields.include?(k.to_s) || (!v.is_a?(FalseClass) && v.blank?)
|
|
328
|
+
end.deep_stringify_keys
|
|
324
329
|
|
|
325
330
|
# useless attributes
|
|
326
331
|
_attributes.delete('redirect_type') if self.redirect_url.blank?
|
|
@@ -41,7 +41,7 @@ module Locomotive
|
|
|
41
41
|
#
|
|
42
42
|
def replace_asset_urls(content)
|
|
43
43
|
return if content.blank?
|
|
44
|
-
content.force_encoding('utf-8').gsub!(/[("']([^)"']*)\/sites\/[0-9a-f]{24}\/theme\/(([^;.]+)\/)*([a-zA-Z_\-0-9]+\.[a-z]{2,3})[)"']/) do |path|
|
|
44
|
+
content.force_encoding('utf-8').gsub!(/[("']([^)"';]*)\/sites\/[0-9a-f]{24}\/theme\/(([^;.]+)\/)*([a-zA-Z_\-0-9]+\.[a-z]{2,3})[)"']/) do |path|
|
|
45
45
|
"#{path.first}/#{$2 + $4}#{path.last}"
|
|
46
46
|
end
|
|
47
47
|
end
|
data/lib/locomotive/mounter.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: locomotivecms_mounter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-07-
|
|
12
|
+
date: 2013-07-28 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: tilt
|
|
@@ -32,17 +32,17 @@ dependencies:
|
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
|
33
33
|
none: false
|
|
34
34
|
requirements:
|
|
35
|
-
- -
|
|
35
|
+
- - ~>
|
|
36
36
|
- !ruby/object:Gem::Version
|
|
37
|
-
version:
|
|
37
|
+
version: 4.0.3
|
|
38
38
|
type: :runtime
|
|
39
39
|
prerelease: false
|
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
|
41
41
|
none: false
|
|
42
42
|
requirements:
|
|
43
|
-
- -
|
|
43
|
+
- - ~>
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
|
-
version:
|
|
45
|
+
version: 4.0.3
|
|
46
46
|
- !ruby/object:Gem::Dependency
|
|
47
47
|
name: sass
|
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -123,6 +123,22 @@ dependencies:
|
|
|
123
123
|
- - ~>
|
|
124
124
|
- !ruby/object:Gem::Version
|
|
125
125
|
version: 4.2.3
|
|
126
|
+
- !ruby/object:Gem::Dependency
|
|
127
|
+
name: chronic
|
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
|
129
|
+
none: false
|
|
130
|
+
requirements:
|
|
131
|
+
- - ~>
|
|
132
|
+
- !ruby/object:Gem::Version
|
|
133
|
+
version: 0.9.1
|
|
134
|
+
type: :runtime
|
|
135
|
+
prerelease: false
|
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
137
|
+
none: false
|
|
138
|
+
requirements:
|
|
139
|
+
- - ~>
|
|
140
|
+
- !ruby/object:Gem::Version
|
|
141
|
+
version: 0.9.1
|
|
126
142
|
- !ruby/object:Gem::Dependency
|
|
127
143
|
name: activesupport
|
|
128
144
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -504,7 +520,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
504
520
|
version: '0'
|
|
505
521
|
segments:
|
|
506
522
|
- 0
|
|
507
|
-
hash:
|
|
523
|
+
hash: 1068346951777047981
|
|
508
524
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
509
525
|
none: false
|
|
510
526
|
requirements:
|