locomotivecms_wagon 2.2.0.rc1 → 2.2.0.rc2
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.
- checksums.yaml +4 -4
- data/lib/locomotive/wagon/commands/pull_sub_commands/pull_pages_command.rb +1 -0
- data/lib/locomotive/wagon/commands/push_sub_commands/push_pages_command.rb +5 -2
- data/lib/locomotive/wagon/decorators/page_decorator.rb +2 -2
- data/lib/locomotive/wagon/version.rb +1 -1
- data/locomotivecms_wagon.gemspec +1 -1
- data/spec/unit/commands/push_sub_commands/push_pages_command_spec.rb +10 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 52fd2b1db00c64e0a1378a8ece082374ac3b7f14
|
|
4
|
+
data.tar.gz: 2c6357e45921c7655bcbec88b4576d295bcae1a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e3ad48fc103305f876cb47e0179f83b2450289504ff59454e8494008396977605327f8bc2979993521d0844b20b5b1958a28a8eb8ee584c1320d6d7d1ce963d7
|
|
7
|
+
data.tar.gz: 851e04f5cf06181e9b53e12a7d52929dddd8becd6aa00f5073db54d8cbccd1881ca51ae50af2d473a17338150073eb1d0b193e9b119221aebfbd2a0f0d64c1e9
|
|
@@ -49,7 +49,10 @@ module Locomotive::Wagon
|
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
def can_update?(local_entity)
|
|
52
|
-
if
|
|
52
|
+
# checking pathes only if the current locale is the default one
|
|
53
|
+
if local_entity.__locale__.to_s == default_locale.to_s &&
|
|
54
|
+
local_entity.handle &&
|
|
55
|
+
id = remote_entity_id_from_handle(local_entity)
|
|
53
56
|
remote_entity_folder_path(id) == local_entity.folder_path
|
|
54
57
|
else
|
|
55
58
|
true
|
|
@@ -79,7 +82,7 @@ module Locomotive::Wagon
|
|
|
79
82
|
|
|
80
83
|
@remote_entities = {}.tap do |hash|
|
|
81
84
|
api_client.pages.fullpaths(default_locale).each do |entity|
|
|
82
|
-
hash[entity.fullpath]
|
|
85
|
+
hash[entity.fullpath] = entity._id
|
|
83
86
|
|
|
84
87
|
if entity.respond_to?(:handle) && entity.handle.present?
|
|
85
88
|
# to_sym: trick to not have conflicts with fullpaths
|
|
@@ -8,10 +8,10 @@ module Locomotive
|
|
|
8
8
|
|
|
9
9
|
attr_accessor :__content_assets_pusher__, :__persist_content__
|
|
10
10
|
|
|
11
|
-
def initialize(object, locale
|
|
11
|
+
def initialize(object, locale, content_assets_pusher, persist_content)
|
|
12
12
|
self.__content_assets_pusher__ = content_assets_pusher
|
|
13
13
|
self.__persist_content__ = persist_content
|
|
14
|
-
super(object, locale, nil)
|
|
14
|
+
super(object, locale, nil) # we don't need a fallback to the default locale
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def __attributes__
|
data/locomotivecms_wagon.gemspec
CHANGED
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |gem|
|
|
|
28
28
|
|
|
29
29
|
gem.add_dependency 'locomotivecms_common', '~> 0.2.0'
|
|
30
30
|
gem.add_dependency 'locomotivecms_coal', '~> 1.3.0.rc1'
|
|
31
|
-
gem.add_dependency 'locomotivecms_steam', '~> 1.2.0.
|
|
31
|
+
gem.add_dependency 'locomotivecms_steam', '~> 1.2.0.rc2'
|
|
32
32
|
|
|
33
33
|
gem.add_dependency 'haml', '~> 4.0.7'
|
|
34
34
|
gem.add_dependency 'listen', '~> 3.0.4'
|
|
@@ -86,7 +86,8 @@ describe Locomotive::Wagon::PushPagesCommand do
|
|
|
86
86
|
|
|
87
87
|
let(:handle) { nil }
|
|
88
88
|
let(:folder) { '' }
|
|
89
|
-
let(:
|
|
89
|
+
let(:locale) { :en }
|
|
90
|
+
let(:page) { instance_double('Page', fullpath: 'modified-about-us', folder_path: folder, handle: handle, __locale__: locale, __default_locale__: :en) }
|
|
90
91
|
|
|
91
92
|
subject { command.send(:can_update?, page) }
|
|
92
93
|
|
|
@@ -111,6 +112,14 @@ describe Locomotive::Wagon::PushPagesCommand do
|
|
|
111
112
|
|
|
112
113
|
end
|
|
113
114
|
|
|
115
|
+
context 'another locale' do
|
|
116
|
+
|
|
117
|
+
let(:locale) { :fr }
|
|
118
|
+
|
|
119
|
+
it { is_expected.to eq true }
|
|
120
|
+
|
|
121
|
+
end
|
|
122
|
+
|
|
114
123
|
end
|
|
115
124
|
|
|
116
125
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: locomotivecms_wagon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.2.0.
|
|
4
|
+
version: 2.2.0.rc2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Didier Lafforgue
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-
|
|
12
|
+
date: 2016-09-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rake
|
|
@@ -115,14 +115,14 @@ dependencies:
|
|
|
115
115
|
requirements:
|
|
116
116
|
- - "~>"
|
|
117
117
|
- !ruby/object:Gem::Version
|
|
118
|
-
version: 1.2.0.
|
|
118
|
+
version: 1.2.0.rc2
|
|
119
119
|
type: :runtime
|
|
120
120
|
prerelease: false
|
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
|
122
122
|
requirements:
|
|
123
123
|
- - "~>"
|
|
124
124
|
- !ruby/object:Gem::Version
|
|
125
|
-
version: 1.2.0.
|
|
125
|
+
version: 1.2.0.rc2
|
|
126
126
|
- !ruby/object:Gem::Dependency
|
|
127
127
|
name: haml
|
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|