roadie-rails 3.0.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 +33 -8
- data/.standard.yml +2 -0
- data/Changelog.md +20 -1
- data/README.md +3 -10
- data/lib/roadie/rails/asset_pipeline_provider.rb +1 -1
- 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 +5 -3
- metadata +24 -8
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]
|
@@ -11,15 +21,21 @@ on:
|
|
11
21
|
jobs:
|
12
22
|
base:
|
13
23
|
name: Ruby ${{ matrix.ruby }}
|
14
|
-
runs-on: ubuntu-
|
24
|
+
runs-on: ubuntu-latest
|
15
25
|
strategy:
|
16
26
|
fail-fast: false
|
17
27
|
matrix:
|
18
|
-
ruby:
|
28
|
+
ruby:
|
29
|
+
- "2.6"
|
30
|
+
- "2.7"
|
31
|
+
- "3.0"
|
32
|
+
- "3.1"
|
33
|
+
- "3.2"
|
34
|
+
- "3.3"
|
19
35
|
|
20
36
|
steps:
|
21
37
|
- name: Checkout code
|
22
|
-
uses: actions/checkout@
|
38
|
+
uses: actions/checkout@v4
|
23
39
|
|
24
40
|
# This setup is not compatible with the way Travis CI was
|
25
41
|
# setup, so the cache will only work for the root folder.
|
@@ -30,14 +46,23 @@ jobs:
|
|
30
46
|
bundler-cache: true
|
31
47
|
|
32
48
|
- name: Rake
|
33
|
-
run: rake
|
49
|
+
run: bundle exec rake
|
34
50
|
|
35
|
-
- uses: codecov/codecov-action@
|
51
|
+
- uses: codecov/codecov-action@v4
|
36
52
|
|
37
53
|
lint:
|
38
54
|
runs-on: ubuntu-latest
|
39
55
|
steps:
|
56
|
+
- name: Checkout code
|
57
|
+
uses: actions/checkout@v4
|
58
|
+
|
59
|
+
# This setup is not compatible with the way Travis CI was
|
60
|
+
# setup, so the cache will only work for the root folder.
|
61
|
+
- name: Setup Ruby
|
62
|
+
uses: ruby/setup-ruby@v1
|
63
|
+
with:
|
64
|
+
ruby-version: "3.3"
|
65
|
+
bundler-cache: true
|
66
|
+
|
40
67
|
- name: standardrb
|
41
|
-
|
42
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
43
|
-
uses: amoeba/standardrb-action@v2
|
68
|
+
run: bundle exec standardrb
|
data/.standard.yml
ADDED
data/Changelog.md
CHANGED
@@ -1,6 +1,25 @@
|
|
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).
|
12
|
+
|
13
|
+
### 3.1.0
|
14
|
+
|
15
|
+
[full changelog](https://github.com/Mange/roadie-rails/compare/v3.0.0...v3.1.0)
|
16
|
+
|
17
|
+
* Support Rails 7.1 - [Frederik Spang](https://github.com/frederikspang)
|
18
|
+
* Add support for Ruby 3.2.
|
19
|
+
|
20
|
+
Development changes:
|
21
|
+
|
22
|
+
* Fix Github CI lint job with standardrb.
|
4
23
|
|
5
24
|
### 3.0.0
|
6
25
|
|
data/README.md
CHANGED
@@ -20,7 +20,7 @@ This gem hooks up your Rails application with Roadie to help you generate HTML e
|
|
20
20
|
[Add this gem to your Gemfile as recommended by Rubygems][gem] and run `bundle install`.
|
21
21
|
|
22
22
|
```ruby
|
23
|
-
gem 'roadie-rails'
|
23
|
+
gem 'roadie-rails'
|
24
24
|
```
|
25
25
|
|
26
26
|
## Usage ##
|
@@ -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
@@ -18,16 +18,18 @@ Gem::Specification.new do |spec|
|
|
18
18
|
|
19
19
|
spec.files = `git ls-files | grep -v ^spec`.split($INPUT_RECORD_SEPARATOR)
|
20
20
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
21
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
22
21
|
spec.extra_rdoc_files = %w[README.md Changelog.md LICENSE.txt]
|
23
22
|
spec.require_paths = ["lib"]
|
24
23
|
|
25
|
-
spec.add_dependency "railties", ">= 5.1", "<
|
24
|
+
spec.add_dependency "railties", ">= 5.1", "< 8.0"
|
26
25
|
spec.add_dependency "roadie", "~> 5.0"
|
27
26
|
|
28
27
|
spec.add_development_dependency "bundler", "~> 2.2"
|
29
|
-
spec.add_development_dependency "rails", ">= 5.1", "<
|
28
|
+
spec.add_development_dependency "rails", ">= 5.1", "< 8.0"
|
30
29
|
spec.add_development_dependency "rspec", "~> 3.10"
|
31
30
|
spec.add_development_dependency "rspec-collection_matchers"
|
32
31
|
spec.add_development_dependency "rspec-rails"
|
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
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '5.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '8.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '5.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '8.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: roadie
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
version: '5.1'
|
68
68
|
- - "<"
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: '
|
70
|
+
version: '8.0'
|
71
71
|
type: :development
|
72
72
|
prerelease: false
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -77,7 +77,7 @@ dependencies:
|
|
77
77
|
version: '5.1'
|
78
78
|
- - "<"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
80
|
+
version: '8.0'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: rspec
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,6 +120,20 @@ dependencies:
|
|
120
120
|
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: standard
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
type: :development
|
131
|
+
prerelease: false
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
123
137
|
description: Hooks Roadie into your Rails application to help with email generation.
|
124
138
|
email:
|
125
139
|
- magnus.bergmark@gmail.com
|
@@ -134,6 +148,7 @@ files:
|
|
134
148
|
- ".gitignore"
|
135
149
|
- ".rubocop.yml"
|
136
150
|
- ".solargraph.yml"
|
151
|
+
- ".standard.yml"
|
137
152
|
- Changelog.md
|
138
153
|
- Gemfile
|
139
154
|
- LICENSE.txt
|
@@ -144,6 +159,7 @@ files:
|
|
144
159
|
- lib/roadie-rails.rb
|
145
160
|
- lib/roadie/rails.rb
|
146
161
|
- lib/roadie/rails/asset_pipeline_provider.rb
|
162
|
+
- lib/roadie/rails/asset_propshaft_provider.rb
|
147
163
|
- lib/roadie/rails/automatic.rb
|
148
164
|
- lib/roadie/rails/document_builder.rb
|
149
165
|
- lib/roadie/rails/inline_on_delivery.rb
|
@@ -159,7 +175,7 @@ homepage: http://github.com/Mange/roadie-rails
|
|
159
175
|
licenses:
|
160
176
|
- MIT
|
161
177
|
metadata: {}
|
162
|
-
post_install_message:
|
178
|
+
post_install_message: This would be the last version that supports ruby 2.6
|
163
179
|
rdoc_options: []
|
164
180
|
require_paths:
|
165
181
|
- lib
|
@@ -174,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
190
|
- !ruby/object:Gem::Version
|
175
191
|
version: '0'
|
176
192
|
requirements: []
|
177
|
-
rubygems_version: 3.
|
193
|
+
rubygems_version: 3.5.10
|
178
194
|
signing_key:
|
179
195
|
specification_version: 4
|
180
196
|
summary: Making HTML emails comfortable for the Rails rockstars
|