roadie-rails 3.1.0 → 3.2.0
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/.github/workflows/main.yml +13 -2
- data/.standard.yml +2 -0
- data/Changelog.md +9 -1
- data/README.md +2 -9
- data/lib/roadie/rails/asset_propshaft_provider.rb +41 -0
- data/lib/roadie/rails/options.rb +1 -1
- data/lib/roadie/rails/railtie.rb +5 -2
- data/lib/roadie/rails/version.rb +1 -1
- data/lib/roadie/rails.rb +1 -0
- data/roadie-rails.gemspec +2 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3adee731af7278bfca961e1573c6ed2b6dcb666bbf862b42995d241d1558799c
|
4
|
+
data.tar.gz: 8dc5dbf397cbefe8465754dc609987cb3abf3f24b495b340e072bcef38d8313c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8ab3af161873b9a05e887b5a0556094450d34b69b89d8703df9cc5f2cf8c48b248ea6ed23e28acca0fef274c5102b3ff7a7c47ab175ccaf619ed692239c5d8c
|
7
|
+
data.tar.gz: 5caf0748d8c9aadf006e3e3a7a21bd36b41214e1ecf83d7d6d387dc02cac0e82a5d6652865f29aace10cec05c25d5d87606193b59a5d22d08475f4e166a0b5a0
|
data/.github/workflows/main.yml
CHANGED
@@ -1,9 +1,19 @@
|
|
1
1
|
name: Main
|
2
2
|
on:
|
3
|
+
schedule:
|
4
|
+
# Run on the first day of every month
|
5
|
+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
|
6
|
+
- cron: '0 0 1 * *'
|
7
|
+
# Allow running manually
|
8
|
+
# For more details: https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow?tool=webui
|
9
|
+
workflow_dispatch:
|
3
10
|
push:
|
4
11
|
branches:
|
5
12
|
- main
|
6
13
|
- master
|
14
|
+
paths-ignore:
|
15
|
+
- '**.md'
|
16
|
+
- '**.txt'
|
7
17
|
|
8
18
|
pull_request:
|
9
19
|
types: [opened, synchronize, reopened]
|
@@ -21,6 +31,7 @@ jobs:
|
|
21
31
|
- "3.0"
|
22
32
|
- "3.1"
|
23
33
|
- "3.2"
|
34
|
+
- "3.3"
|
24
35
|
|
25
36
|
steps:
|
26
37
|
- name: Checkout code
|
@@ -37,7 +48,7 @@ jobs:
|
|
37
48
|
- name: Rake
|
38
49
|
run: bundle exec rake
|
39
50
|
|
40
|
-
- uses: codecov/codecov-action@
|
51
|
+
- uses: codecov/codecov-action@v4
|
41
52
|
|
42
53
|
lint:
|
43
54
|
runs-on: ubuntu-latest
|
@@ -50,7 +61,7 @@ jobs:
|
|
50
61
|
- name: Setup Ruby
|
51
62
|
uses: ruby/setup-ruby@v1
|
52
63
|
with:
|
53
|
-
ruby-version: "3.
|
64
|
+
ruby-version: "3.3"
|
54
65
|
bundler-cache: true
|
55
66
|
|
56
67
|
- name: standardrb
|
data/.standard.yml
ADDED
data/Changelog.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
### development version
|
2
2
|
|
3
|
-
[full changelog](https://github.com/Mange/roadie-rails/compare/v3.
|
3
|
+
[full changelog](https://github.com/Mange/roadie-rails/compare/v3.2.0...master)
|
4
|
+
|
5
|
+
### 3.2.0
|
6
|
+
|
7
|
+
[full changelog](https://github.com/Mange/roadie-rails/compare/v3.1.0...v3.2.0)
|
8
|
+
|
9
|
+
* Support [Propshaft](https://github.com/rails/propshaft) - [Juani Villarejo](https://github.com/jvillarejo) [#114](https://github.com/Mange/roadie-rails/pull/114)
|
10
|
+
* Add support (CI) for Ruby 3.3.
|
11
|
+
* Last version for supporting Ruby 2.6 (EoL).
|
4
12
|
|
5
13
|
### 3.1.0
|
6
14
|
|
data/README.md
CHANGED
@@ -281,16 +281,9 @@ end
|
|
281
281
|
Tested with Github Actions on multiple Ruby and Rails versions:
|
282
282
|
|
283
283
|
* Ruby:
|
284
|
-
|
285
|
-
* MRI 2.7
|
286
|
-
* MRI 3.0
|
287
|
-
* MRI 3.1
|
284
|
+
See [Workflow Matrix](/.github/workflows/main.yml)
|
288
285
|
* Rails
|
289
|
-
|
290
|
-
* 5.2
|
291
|
-
* 6.0
|
292
|
-
* 6.1
|
293
|
-
* 7.0
|
286
|
+
See [Integration Spec File](/spec/integration_spec.rb)
|
294
287
|
|
295
288
|
Please note that [all Rails-versions are not compatible with all Ruby-versions](https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html).
|
296
289
|
Let me know if you want any other combination supported officially.
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Roadie
|
4
|
+
module Rails
|
5
|
+
class AssetPropshaftProvider
|
6
|
+
include Roadie::AssetProvider
|
7
|
+
|
8
|
+
def initialize(assembly)
|
9
|
+
@assembly = assembly
|
10
|
+
@stylesheets = {}
|
11
|
+
end
|
12
|
+
|
13
|
+
def find_stylesheet(stylesheet_asset_path)
|
14
|
+
stylesheet = @stylesheets[stylesheet_asset_path]
|
15
|
+
return stylesheet if stylesheet.present?
|
16
|
+
|
17
|
+
path, digest = extract_path_and_digest(stylesheet_asset_path)
|
18
|
+
|
19
|
+
asset = @assembly.load_path.find(path)
|
20
|
+
if asset.present? && asset.fresh?(digest)
|
21
|
+
compiled_content = @assembly.compilers.compile(asset)
|
22
|
+
|
23
|
+
stylesheet = Stylesheet.new(stylesheet_asset_path, compiled_content.force_encoding("UTF-8"))
|
24
|
+
@stylesheets[stylesheet_asset_path] = stylesheet
|
25
|
+
end
|
26
|
+
|
27
|
+
stylesheet
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def extract_path_and_digest(stylesheet_asset_path)
|
33
|
+
full_path = stylesheet_asset_path.sub(%r{#{::Rails.configuration.assets.prefix}/}, "")
|
34
|
+
digest = full_path[/-([0-9a-zA-Z]{7,128})\.(?!digested)[^.]+\z/, 1]
|
35
|
+
path = digest ? full_path.sub("-#{digest}", "") : full_path
|
36
|
+
|
37
|
+
[path, digest]
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/lib/roadie/rails/options.rb
CHANGED
data/lib/roadie/rails/railtie.rb
CHANGED
@@ -14,8 +14,11 @@ module Roadie
|
|
14
14
|
|
15
15
|
if app.config.respond_to?(:assets) && app.config.assets
|
16
16
|
if app.assets
|
17
|
-
config.roadie.asset_providers <<
|
18
|
-
|
17
|
+
config.roadie.asset_providers << AssetPipelineProvider.new(app.assets)
|
18
|
+
elsif defined?(Propshaft)
|
19
|
+
config.after_initialize do |app|
|
20
|
+
config.roadie.asset_providers << AssetPropshaftProvider.new(app.assets)
|
21
|
+
end
|
19
22
|
else
|
20
23
|
app.config.assets.configure do |env|
|
21
24
|
config.roadie.asset_providers <<
|
data/lib/roadie/rails/version.rb
CHANGED
data/lib/roadie/rails.rb
CHANGED
data/roadie-rails.gemspec
CHANGED
@@ -30,4 +30,6 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency "rspec-collection_matchers"
|
31
31
|
spec.add_development_dependency "rspec-rails"
|
32
32
|
spec.add_development_dependency "standard"
|
33
|
+
|
34
|
+
spec.post_install_message = "This would be the last version that supports ruby 2.6"
|
33
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roadie-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Magnus Bergmark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -148,6 +148,7 @@ files:
|
|
148
148
|
- ".gitignore"
|
149
149
|
- ".rubocop.yml"
|
150
150
|
- ".solargraph.yml"
|
151
|
+
- ".standard.yml"
|
151
152
|
- Changelog.md
|
152
153
|
- Gemfile
|
153
154
|
- LICENSE.txt
|
@@ -158,6 +159,7 @@ files:
|
|
158
159
|
- lib/roadie-rails.rb
|
159
160
|
- lib/roadie/rails.rb
|
160
161
|
- lib/roadie/rails/asset_pipeline_provider.rb
|
162
|
+
- lib/roadie/rails/asset_propshaft_provider.rb
|
161
163
|
- lib/roadie/rails/automatic.rb
|
162
164
|
- lib/roadie/rails/document_builder.rb
|
163
165
|
- lib/roadie/rails/inline_on_delivery.rb
|
@@ -173,7 +175,7 @@ homepage: http://github.com/Mange/roadie-rails
|
|
173
175
|
licenses:
|
174
176
|
- MIT
|
175
177
|
metadata: {}
|
176
|
-
post_install_message:
|
178
|
+
post_install_message: This would be the last version that supports ruby 2.6
|
177
179
|
rdoc_options: []
|
178
180
|
require_paths:
|
179
181
|
- lib
|
@@ -188,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
190
|
- !ruby/object:Gem::Version
|
189
191
|
version: '0'
|
190
192
|
requirements: []
|
191
|
-
rubygems_version: 3.
|
193
|
+
rubygems_version: 3.5.10
|
192
194
|
signing_key:
|
193
195
|
specification_version: 4
|
194
196
|
summary: Making HTML emails comfortable for the Rails rockstars
|