locomotivecms_wagon 3.1.1 → 3.2.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 899cb917d33c9f96cff7040c74ab3eb5cdb8dc260f853049837d13aef67b1b73
4
- data.tar.gz: 742fcc8cf7296a44a7b28f08841056b4449c1561e60b8f99f222732f4aa035f9
3
+ metadata.gz: 4989933329a3ed841b17a6cd68e8b60f026f6f2b569f0779e213b377ae77d793
4
+ data.tar.gz: a83d14f2d765fff9438a0e674552bd217daab8a269c253ce61452b14b9278b06
5
5
  SHA512:
6
- metadata.gz: 825827f36be71a50cdb76fef76003919c7ee6b6ee5ca1e16aea16f2495e6b10c43adab06c8e3feeaa3d62eace8f4e39df687f388b7a29f5130419547800289e7
7
- data.tar.gz: d4e33cca3199a9b22bca46ec445939f8ecc7770c4cd91290de08c1fbb10b47b20c9f0e378a0161cac2ef437efedff649c634db574dd69fd3d2559793c0a6a488
6
+ metadata.gz: 9f3dca0320820b3e2da4c5480a33a50281f6a9b1eef4a1fbb4d8ebdbb7ccd0f377b2c19fc26d660876824843c51bce31dbdd1f3f7f149be1e7f0e60ac2396527
7
+ data.tar.gz: dbf49bc078b6e8fd3e515e2813d39d8b89b89f5d71f6a3a8100e3dda96cdf1ca754ecb414e1be44a2a2b4b3d3481cb332299bfd5c262a98c28dfcdaebcbab7f8
@@ -11,7 +11,6 @@ module Locomotive::Wagon
11
11
  config.mode = :test
12
12
  config.adapter = { name: :filesystem, path: path, env: options[:env]&.to_sym || :local }
13
13
  config.asset_path = File.expand_path(File.join(path, 'public'))
14
- config.minify_assets = false
15
14
  end
16
15
 
17
16
  @steam_services = Locomotive::Steam::Services.build_instance.tap do |services|
@@ -67,7 +67,7 @@ module Locomotive::Wagon
67
67
  locales.each do |locale|
68
68
  next if locale != default_locale && content_type.localized_names.empty?
69
69
 
70
- (_entries = api_client.content_entries(content_type).all(nil, { page: page, order_by: 'created asc' }, locale)).each do |entry|
70
+ (_entries = api_client.content_entries(content_type).all(nil, { page: page, order_by: 'created_at asc' }, locale)).each do |entry|
71
71
  (entries[entry._id] ||= {})[locale] = entry
72
72
  end
73
73
 
@@ -4,8 +4,6 @@ module Locomotive::Wagon
4
4
 
5
5
  class PushThemeAssetsCommand < PushBaseCommand
6
6
 
7
- WEBPACK_BUNDLED_ASSETS = ['stylesheets/bundle.css', 'javascripts/bundle.js'].freeze
8
-
9
7
  def entities
10
8
  repositories.theme_asset.all.map do |entity|
11
9
  next if skip?(entity)
@@ -42,7 +40,7 @@ module Locomotive::Wagon
42
40
  return unless entity.stylesheet_or_javascript?
43
41
 
44
42
  Tempfile.new(entity.realname).tap do |file|
45
- content = compress_and_minify(entity)
43
+ content = read_content(entity)
46
44
 
47
45
  # replace paths to images or fonts by the absolute URL used in the Engine
48
46
  content = replace_assets(content)
@@ -87,23 +85,13 @@ module Locomotive::Wagon
87
85
  @remote_urls[resource.local_path] = "#{resource.url}?#{resource.checksum}"
88
86
  end
89
87
 
90
- def compress_and_minify(entity)
91
- begin
92
- if WEBPACK_BUNDLED_ASSETS.include?(entity.short_relative_url)
93
- raise 'already compressed and minified by Webpack'
94
- end
95
-
96
- sprockets_env[entity.short_relative_url].to_s
97
- rescue Exception => e
98
- instrument :warning, message: "Unable to compress and minify it, error: #{e.message}"
99
- # use the original file instead"
100
- File.read(File.join(path, entity.source))
101
- end
102
- end
103
-
104
- def sprockets_env
105
- @sprockets_env ||= Locomotive::Steam::SprocketsEnvironment.new(File.join(path, 'public'),
106
- minify: ENV['WAGON_NO_MINIFY_ASSETS'].present? ? false : true)
88
+ def read_content(entity)
89
+ File.read(
90
+ File.join(
91
+ Locomotive::Steam.configuration.asset_path,
92
+ entity.relative_url
93
+ )
94
+ )
107
95
  end
108
96
 
109
97
  def skip?(entity)
@@ -76,7 +76,6 @@ module Locomotive::Wagon
76
76
  config.mode = :test
77
77
  config.adapter = { name: :filesystem, path: File.expand_path(path), env: options[:env]&.to_sym || :local }
78
78
  config.asset_path = File.expand_path(File.join(path, 'public'))
79
- config.minify_assets = false
80
79
 
81
80
  config.middleware.insert_before Rack::Lint, Locomotive::Wagon::Middlewares::ErrorPage
82
81
 
@@ -108,9 +107,10 @@ module Locomotive::Wagon
108
107
  end
109
108
 
110
109
  def build_puma_server
110
+ require 'rackup'
111
111
  require 'rack/handler/puma'
112
112
 
113
- Rack::Handler::Puma.run(Locomotive::Steam.to_app, {
113
+ Rackup::Handler::Puma.run(Locomotive::Steam.to_app,
114
114
  daemon: options[:daemonize],
115
115
  pidfile: server_pid_file,
116
116
  redirect_stdout: options[:daemonize] ? server_log_file : nil,
@@ -119,7 +119,7 @@ module Locomotive::Wagon
119
119
  Port: options[:port],
120
120
  Verbose: ENV['PUMA_DEBUG_ON'] || false,
121
121
  Silent: true
122
- })
122
+ )
123
123
  end
124
124
 
125
125
  def configure_logger
@@ -1,5 +1,5 @@
1
1
  module Locomotive
2
2
  module Wagon
3
- VERSION = '3.1.1'
3
+ VERSION = '3.2.0.alpha1'
4
4
  end
5
5
  end
@@ -24,18 +24,21 @@ Gem::Specification.new do |gem|
24
24
 
25
25
  gem.add_development_dependency 'rake', '~> 13.0.1'
26
26
 
27
- gem.add_dependency 'thor', '~> 0.20.3'
28
- gem.add_dependency 'puma', '~> 5.0.4'
27
+ gem.add_dependency 'thor', '~> 1.3.0'
28
+
29
+ gem.add_dependency 'puma', '~> 6.4.0'
30
+ gem.add_dependency 'rackup', '~> 2.1.0'
31
+
29
32
  gem.add_dependency 'netrc', '~> 0.11.0'
30
- gem.add_dependency 'oj', '~> 3.10.16'
33
+ gem.add_dependency 'oj', '~> 3.16.1'
31
34
 
32
- gem.add_dependency 'locomotivecms_common', '~> 0.4.0'
33
- gem.add_dependency 'locomotivecms_coal', '~> 1.7.0'
34
- gem.add_dependency 'locomotivecms_steam', '~> 1.6.1'
35
+ gem.add_dependency 'locomotivecms_common', '~> 0.6.0.alpha1'
36
+ gem.add_dependency 'locomotivecms_coal', '~> 1.8.0.alpha1'
37
+ gem.add_dependency 'locomotivecms_steam', '~> 1.8.0.alpha1'
35
38
 
36
- gem.add_dependency 'haml', '~> 5.1.2'
37
- gem.add_dependency 'listen', '~> 3.3.1'
38
- gem.add_dependency 'neatjson', '~> 0.9'
39
+ gem.add_dependency 'haml', '~> 6.2.3'
40
+ gem.add_dependency 'listen', '~> 3.8.0'
41
+ gem.add_dependency 'neatjson', '~> 0.10'
39
42
 
40
- gem.add_dependency 'faker', '~> 1.6'
43
+ gem.add_dependency 'faker', '~> 3.2'
41
44
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locomotivecms_wagon
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.2.0.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didier Lafforgue
8
8
  - Rodrigo Alvarez
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-10-13 00:00:00.000000000 Z
12
+ date: 2024-03-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -31,28 +31,42 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.20.3
34
+ version: 1.3.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.20.3
41
+ version: 1.3.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: puma
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 5.0.4
48
+ version: 6.4.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 5.0.4
55
+ version: 6.4.0
56
+ - !ruby/object:Gem::Dependency
57
+ name: rackup
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: 2.1.0
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: 2.1.0
56
70
  - !ruby/object:Gem::Dependency
57
71
  name: netrc
58
72
  requirement: !ruby/object:Gem::Requirement
@@ -73,112 +87,112 @@ dependencies:
73
87
  requirements:
74
88
  - - "~>"
75
89
  - !ruby/object:Gem::Version
76
- version: 3.10.16
90
+ version: 3.16.1
77
91
  type: :runtime
78
92
  prerelease: false
79
93
  version_requirements: !ruby/object:Gem::Requirement
80
94
  requirements:
81
95
  - - "~>"
82
96
  - !ruby/object:Gem::Version
83
- version: 3.10.16
97
+ version: 3.16.1
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: locomotivecms_common
86
100
  requirement: !ruby/object:Gem::Requirement
87
101
  requirements:
88
102
  - - "~>"
89
103
  - !ruby/object:Gem::Version
90
- version: 0.4.0
104
+ version: 0.6.0.alpha1
91
105
  type: :runtime
92
106
  prerelease: false
93
107
  version_requirements: !ruby/object:Gem::Requirement
94
108
  requirements:
95
109
  - - "~>"
96
110
  - !ruby/object:Gem::Version
97
- version: 0.4.0
111
+ version: 0.6.0.alpha1
98
112
  - !ruby/object:Gem::Dependency
99
113
  name: locomotivecms_coal
100
114
  requirement: !ruby/object:Gem::Requirement
101
115
  requirements:
102
116
  - - "~>"
103
117
  - !ruby/object:Gem::Version
104
- version: 1.7.0
118
+ version: 1.8.0.alpha1
105
119
  type: :runtime
106
120
  prerelease: false
107
121
  version_requirements: !ruby/object:Gem::Requirement
108
122
  requirements:
109
123
  - - "~>"
110
124
  - !ruby/object:Gem::Version
111
- version: 1.7.0
125
+ version: 1.8.0.alpha1
112
126
  - !ruby/object:Gem::Dependency
113
127
  name: locomotivecms_steam
114
128
  requirement: !ruby/object:Gem::Requirement
115
129
  requirements:
116
130
  - - "~>"
117
131
  - !ruby/object:Gem::Version
118
- version: 1.6.1
132
+ version: 1.8.0.alpha1
119
133
  type: :runtime
120
134
  prerelease: false
121
135
  version_requirements: !ruby/object:Gem::Requirement
122
136
  requirements:
123
137
  - - "~>"
124
138
  - !ruby/object:Gem::Version
125
- version: 1.6.1
139
+ version: 1.8.0.alpha1
126
140
  - !ruby/object:Gem::Dependency
127
141
  name: haml
128
142
  requirement: !ruby/object:Gem::Requirement
129
143
  requirements:
130
144
  - - "~>"
131
145
  - !ruby/object:Gem::Version
132
- version: 5.1.2
146
+ version: 6.2.3
133
147
  type: :runtime
134
148
  prerelease: false
135
149
  version_requirements: !ruby/object:Gem::Requirement
136
150
  requirements:
137
151
  - - "~>"
138
152
  - !ruby/object:Gem::Version
139
- version: 5.1.2
153
+ version: 6.2.3
140
154
  - !ruby/object:Gem::Dependency
141
155
  name: listen
142
156
  requirement: !ruby/object:Gem::Requirement
143
157
  requirements:
144
158
  - - "~>"
145
159
  - !ruby/object:Gem::Version
146
- version: 3.3.1
160
+ version: 3.8.0
147
161
  type: :runtime
148
162
  prerelease: false
149
163
  version_requirements: !ruby/object:Gem::Requirement
150
164
  requirements:
151
165
  - - "~>"
152
166
  - !ruby/object:Gem::Version
153
- version: 3.3.1
167
+ version: 3.8.0
154
168
  - !ruby/object:Gem::Dependency
155
169
  name: neatjson
156
170
  requirement: !ruby/object:Gem::Requirement
157
171
  requirements:
158
172
  - - "~>"
159
173
  - !ruby/object:Gem::Version
160
- version: '0.9'
174
+ version: '0.10'
161
175
  type: :runtime
162
176
  prerelease: false
163
177
  version_requirements: !ruby/object:Gem::Requirement
164
178
  requirements:
165
179
  - - "~>"
166
180
  - !ruby/object:Gem::Version
167
- version: '0.9'
181
+ version: '0.10'
168
182
  - !ruby/object:Gem::Dependency
169
183
  name: faker
170
184
  requirement: !ruby/object:Gem::Requirement
171
185
  requirements:
172
186
  - - "~>"
173
187
  - !ruby/object:Gem::Version
174
- version: '1.6'
188
+ version: '3.2'
175
189
  type: :runtime
176
190
  prerelease: false
177
191
  version_requirements: !ruby/object:Gem::Requirement
178
192
  requirements:
179
193
  - - "~>"
180
194
  - !ruby/object:Gem::Version
181
- version: '1.6'
195
+ version: '3.2'
182
196
  description: Wagon is a site generator for the LocomotiveCMS engine
183
197
  email:
184
198
  - did@locomotivecms.com
@@ -346,7 +360,7 @@ homepage: https://www.locomotivecms.com
346
360
  licenses:
347
361
  - MIT
348
362
  metadata: {}
349
- post_install_message:
363
+ post_install_message:
350
364
  rdoc_options: []
351
365
  require_paths:
352
366
  - lib
@@ -361,8 +375,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
361
375
  - !ruby/object:Gem::Version
362
376
  version: '0'
363
377
  requirements: []
364
- rubygems_version: 3.1.6
365
- signing_key:
378
+ rubygems_version: 3.5.4
379
+ signing_key:
366
380
  specification_version: 4
367
381
  summary: Wagon is a site generator for the LocomotiveCMS engine powered by all the
368
382
  efficient and modern HTML development tools (SASS, Webpack, ...etc).