locomotivecms_wagon 3.2.0.alpha1 → 3.2.0.alpha2
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/cli.rb +1 -1
- data/lib/locomotive/wagon/commands/pull_sub_commands/concerns/assets_concern.rb +1 -1
- data/lib/locomotive/wagon/commands/pull_sub_commands/pull_base_command.rb +2 -2
- data/lib/locomotive/wagon/commands/serve_command.rb +2 -2
- data/lib/locomotive/wagon/decorators/site_decorator.rb +1 -1
- data/lib/locomotive/wagon/generators/relationship.rb +2 -2
- data/lib/locomotive/wagon/generators/section.rb +2 -2
- data/lib/locomotive/wagon/generators/site.rb +1 -1
- data/lib/locomotive/wagon/version.rb +1 -1
- data/locomotivecms_wagon.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a0a9b567d83067dc20a30af98839354b7133485296ee5c1f5d1453e891cab362
|
|
4
|
+
data.tar.gz: 4885df5290423f696c3174f780fabe7080b9289ae0aadc63541eb0a15c14c162
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 387002c374963eab9f2614e4895b2f96f046fe8083d45809d645cb7a9643890d341397cb83af6a004728ebdfbb1211e5b0e4f206117d5419b15d28a3ca5071e5
|
|
7
|
+
data.tar.gz: c4a79a201524a74911233dc41169aef27cc15666b5aa5a3262c49fff1da6df63e29c88c1bac50195505d93d9ee72e4dc60e3c372c782e3bb17ad912e788109bd
|
data/lib/locomotive/wagon/cli.rb
CHANGED
|
@@ -21,7 +21,7 @@ module Locomotive
|
|
|
21
21
|
|
|
22
22
|
path = path == '.' ? Dir.pwd : File.expand_path(path)
|
|
23
23
|
|
|
24
|
-
site_or_deploy_file = File.
|
|
24
|
+
site_or_deploy_file = File.exist?(File.join(path, 'config', 'site.yml')) || File.exist?(File.join(path, 'config', 'deploy.yml'))
|
|
25
25
|
|
|
26
26
|
(site_or_deploy_file ? path : nil).tap do |_path|
|
|
27
27
|
if _path.nil?
|
|
@@ -50,7 +50,7 @@ module Locomotive::Wagon
|
|
|
50
50
|
private
|
|
51
51
|
|
|
52
52
|
def find_unique_filepath(filepath, binary_file, index = 1)
|
|
53
|
-
if File.
|
|
53
|
+
if File.exist?(filepath) && File.file?(filepath)
|
|
54
54
|
# required because we need to make sure we use the content of file from its start
|
|
55
55
|
binary_file.rewind
|
|
56
56
|
|
|
@@ -51,7 +51,7 @@ module Locomotive::Wagon
|
|
|
51
51
|
|
|
52
52
|
folder = File.dirname(_filepath)
|
|
53
53
|
|
|
54
|
-
FileUtils.mkdir_p(folder) unless File.
|
|
54
|
+
FileUtils.mkdir_p(folder) unless File.exist?(folder)
|
|
55
55
|
|
|
56
56
|
File.open(_filepath, mode) do |file|
|
|
57
57
|
if content
|
|
@@ -66,7 +66,7 @@ module Locomotive::Wagon
|
|
|
66
66
|
|
|
67
67
|
def reset_file(filepath)
|
|
68
68
|
_filepath = File.join(path, filepath)
|
|
69
|
-
FileUtils.rm(_filepath) if File.
|
|
69
|
+
FileUtils.rm(_filepath) if File.exist?(_filepath)
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
def instrument_base_name
|
|
@@ -46,7 +46,7 @@ module Locomotive::Wagon
|
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def stop(force = false)
|
|
49
|
-
unless File.
|
|
49
|
+
unless File.exist?(server_pid_file)
|
|
50
50
|
shell.say "No Wagon server is running.", :red
|
|
51
51
|
return
|
|
52
52
|
end
|
|
@@ -140,7 +140,7 @@ module Locomotive::Wagon
|
|
|
140
140
|
|
|
141
141
|
filepath = File.join(File.expand_path(path), 'app', 'views', 'pages', fullpath + (locale != default_locale ? ".#{locale}" : '') + '.liquid')
|
|
142
142
|
|
|
143
|
-
message = if File.
|
|
143
|
+
message = if File.exist?(filepath)
|
|
144
144
|
"[Warning]".red + ' by default and unless you override the slug in the YAML header of your page, Wagon will replace underscores by dashes in your page slug. Try this instead: ' + fullpath.dasherize.light_white
|
|
145
145
|
else
|
|
146
146
|
"[Tip]".light_white + " add a new page in your Wagon site at this location: " + filepath.light_white
|
|
@@ -17,11 +17,11 @@ module Locomotive
|
|
|
17
17
|
argument :target_path # path to the site
|
|
18
18
|
|
|
19
19
|
def content_types_must_exist
|
|
20
|
-
unless File.
|
|
20
|
+
unless File.exist?(File.join(destination_root, source_path))
|
|
21
21
|
fail Thor::Error, "The #{source} content type does not exist"
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
unless File.
|
|
24
|
+
unless File.exist?(File.join(destination_root, target_path))
|
|
25
25
|
fail Thor::Error, "The #{target} content type does not exist"
|
|
26
26
|
end
|
|
27
27
|
end
|
|
@@ -56,7 +56,7 @@ module Locomotive
|
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
def create_javascript_file
|
|
59
|
-
if File.
|
|
59
|
+
if File.exist?(sections_js_path)
|
|
60
60
|
js_class_name = @options[:type].classify
|
|
61
61
|
file_path = File.join(sections_js_path, @options[:type])
|
|
62
62
|
|
|
@@ -73,7 +73,7 @@ export { default as #{js_class_name} } from './#{@options[:type]}';
|
|
|
73
73
|
end
|
|
74
74
|
|
|
75
75
|
def create_stylesheet_file
|
|
76
|
-
if File.
|
|
76
|
+
if File.exist?(sections_css_path)
|
|
77
77
|
css_class_name = "#{@options[:type].dasherize}-section"
|
|
78
78
|
file_path = File.join(sections_css_path, @options[:type])
|
|
79
79
|
|
|
@@ -108,7 +108,7 @@ module Locomotive
|
|
|
108
108
|
name: template.name,
|
|
109
109
|
description: template.description,
|
|
110
110
|
path: path,
|
|
111
|
-
icon: icon && File.
|
|
111
|
+
icon: icon && File.exist?(icon) ? icon : nil,
|
|
112
112
|
options: class_options_to_json(template)
|
|
113
113
|
}
|
|
114
114
|
end.to_json
|
data/locomotivecms_wagon.gemspec
CHANGED
|
@@ -34,7 +34,7 @@ Gem::Specification.new do |gem|
|
|
|
34
34
|
|
|
35
35
|
gem.add_dependency 'locomotivecms_common', '~> 0.6.0.alpha1'
|
|
36
36
|
gem.add_dependency 'locomotivecms_coal', '~> 1.8.0.alpha1'
|
|
37
|
-
gem.add_dependency 'locomotivecms_steam', '~> 1.8.0.
|
|
37
|
+
gem.add_dependency 'locomotivecms_steam', '~> 1.8.0.alpha2'
|
|
38
38
|
|
|
39
39
|
gem.add_dependency 'haml', '~> 6.2.3'
|
|
40
40
|
gem.add_dependency 'listen', '~> 3.8.0'
|
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: 3.2.0.
|
|
4
|
+
version: 3.2.0.alpha2
|
|
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: 2024-
|
|
12
|
+
date: 2024-06-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rake
|
|
@@ -129,14 +129,14 @@ dependencies:
|
|
|
129
129
|
requirements:
|
|
130
130
|
- - "~>"
|
|
131
131
|
- !ruby/object:Gem::Version
|
|
132
|
-
version: 1.8.0.
|
|
132
|
+
version: 1.8.0.alpha2
|
|
133
133
|
type: :runtime
|
|
134
134
|
prerelease: false
|
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
|
136
136
|
requirements:
|
|
137
137
|
- - "~>"
|
|
138
138
|
- !ruby/object:Gem::Version
|
|
139
|
-
version: 1.8.0.
|
|
139
|
+
version: 1.8.0.alpha2
|
|
140
140
|
- !ruby/object:Gem::Dependency
|
|
141
141
|
name: haml
|
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -375,7 +375,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
375
375
|
- !ruby/object:Gem::Version
|
|
376
376
|
version: '0'
|
|
377
377
|
requirements: []
|
|
378
|
-
rubygems_version: 3.5.
|
|
378
|
+
rubygems_version: 3.5.7
|
|
379
379
|
signing_key:
|
|
380
380
|
specification_version: 4
|
|
381
381
|
summary: Wagon is a site generator for the LocomotiveCMS engine powered by all the
|