roadie-rails 2.3.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +33 -5
- data/.solargraph.yml +16 -0
- data/Changelog.md +22 -2
- data/Gemfile +4 -0
- data/README.md +5 -2
- data/lib/roadie/rails/asset_pipeline_provider.rb +3 -2
- data/lib/roadie/rails/mail_inliner.rb +2 -1
- data/lib/roadie/rails/options.rb +5 -4
- data/lib/roadie/rails/railtie.rb +1 -1
- data/lib/roadie/rails/utils.rb +1 -0
- data/lib/roadie/rails/version.rb +1 -1
- data/roadie-rails.gemspec +15 -15
- metadata +25 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16580bfa2467fceffbbc8e06e701098916fbcbb9bee06837939bdd8e8b8ee32c
|
4
|
+
data.tar.gz: f0ef8c91dfb32a406a3a4e3d705fd0ccfc7a49b939e378acb1296a58e03c2314
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38c8fcad0c0b77105922656042f8f5e0ff515bcca6cad7f65b0f6817bffdd02920a7a1184d61a993ea54d6287b78f641726937d3c53d2784e319b3be4049b57f
|
7
|
+
data.tar.gz: 1e35117740bbec441a9e7f443176695982db10e245b9d00491350a277fcbf66100e384798df04bfd6789478fdc3feaf85565b0581981b2078e689a4ea98405fa
|
data/.github/workflows/main.yml
CHANGED
@@ -1,19 +1,30 @@
|
|
1
1
|
name: Main
|
2
2
|
on:
|
3
3
|
push:
|
4
|
+
branches:
|
5
|
+
- main
|
6
|
+
- master
|
7
|
+
|
8
|
+
pull_request:
|
9
|
+
types: [opened, synchronize, reopened]
|
4
10
|
|
5
11
|
jobs:
|
6
12
|
base:
|
7
13
|
name: Ruby ${{ matrix.ruby }}
|
8
|
-
runs-on: ubuntu-
|
14
|
+
runs-on: ubuntu-latest
|
9
15
|
strategy:
|
10
16
|
fail-fast: false
|
11
17
|
matrix:
|
12
|
-
ruby:
|
18
|
+
ruby:
|
19
|
+
- "2.6"
|
20
|
+
- "2.7"
|
21
|
+
- "3.0"
|
22
|
+
- "3.1"
|
23
|
+
- "3.2"
|
13
24
|
|
14
25
|
steps:
|
15
26
|
- name: Checkout code
|
16
|
-
uses: actions/checkout@
|
27
|
+
uses: actions/checkout@v4
|
17
28
|
|
18
29
|
# This setup is not compatible with the way Travis CI was
|
19
30
|
# setup, so the cache will only work for the root folder.
|
@@ -24,6 +35,23 @@ jobs:
|
|
24
35
|
bundler-cache: true
|
25
36
|
|
26
37
|
- name: Rake
|
27
|
-
run: rake
|
38
|
+
run: bundle exec rake
|
39
|
+
|
40
|
+
- uses: codecov/codecov-action@v3
|
41
|
+
|
42
|
+
lint:
|
43
|
+
runs-on: ubuntu-latest
|
44
|
+
steps:
|
45
|
+
- name: Checkout code
|
46
|
+
uses: actions/checkout@v4
|
47
|
+
|
48
|
+
# This setup is not compatible with the way Travis CI was
|
49
|
+
# setup, so the cache will only work for the root folder.
|
50
|
+
- name: Setup Ruby
|
51
|
+
uses: ruby/setup-ruby@v1
|
52
|
+
with:
|
53
|
+
ruby-version: "3.2"
|
54
|
+
bundler-cache: true
|
28
55
|
|
29
|
-
-
|
56
|
+
- name: standardrb
|
57
|
+
run: bundle exec standardrb
|
data/.solargraph.yml
ADDED
data/Changelog.md
CHANGED
@@ -1,8 +1,28 @@
|
|
1
1
|
### development version
|
2
2
|
|
3
|
-
[full changelog](https://github.com/Mange/roadie-rails/compare/
|
3
|
+
[full changelog](https://github.com/Mange/roadie-rails/compare/v3.1.0...master)
|
4
4
|
|
5
|
-
|
5
|
+
### 3.1.0
|
6
|
+
|
7
|
+
[full changelog](https://github.com/Mange/roadie-rails/compare/v3.0.0...v3.1.0)
|
8
|
+
|
9
|
+
* Support Rails 7.1 - [Frederik Spang](https://github.com/frederikspang)
|
10
|
+
* Add support for Ruby 3.2.
|
11
|
+
|
12
|
+
Development changes:
|
13
|
+
|
14
|
+
* Fix Github CI lint job with standardrb.
|
15
|
+
|
16
|
+
### 3.0.0
|
17
|
+
|
18
|
+
[full changelog](https://github.com/Mange/roadie-rails/compare/v2.3.0...v3.0.0)
|
19
|
+
|
20
|
+
* Drop support for Ruby versions < 2.6.
|
21
|
+
* Add support for Ruby 3.0 and 3.1.
|
22
|
+
|
23
|
+
Development changes:
|
24
|
+
|
25
|
+
* Replace Travis CI with Github CI.
|
6
26
|
|
7
27
|
### 2.3.0
|
8
28
|
|
data/Gemfile
CHANGED
@@ -8,3 +8,7 @@ gemspec
|
|
8
8
|
# Added here so it does not show up on the Gemspec; I only want it for CI builds
|
9
9
|
gem "simplecov", group: :test, require: false
|
10
10
|
gem "simplecov-cobertura", group: :test, require: false
|
11
|
+
|
12
|
+
# Not actually required to run the tests for the gem, but a real convenience
|
13
|
+
# for local development.
|
14
|
+
gem "standard", group: [:test, :development], require: false
|
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 ##
|
@@ -284,12 +284,15 @@ Tested with Github Actions on multiple Ruby and Rails versions:
|
|
284
284
|
* MRI 2.6
|
285
285
|
* MRI 2.7
|
286
286
|
* MRI 3.0
|
287
|
+
* MRI 3.1
|
287
288
|
* Rails
|
288
289
|
* 5.1
|
289
290
|
* 5.2
|
290
291
|
* 6.0
|
292
|
+
* 6.1
|
291
293
|
* 7.0
|
292
294
|
|
295
|
+
Please note that [all Rails-versions are not compatible with all Ruby-versions](https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html).
|
293
296
|
Let me know if you want any other combination supported officially.
|
294
297
|
|
295
298
|
### Versioning ###
|
@@ -316,7 +319,7 @@ After running `rake` for the first time and you want to keep running tests witho
|
|
316
319
|
|
317
320
|
(The MIT License)
|
318
321
|
|
319
|
-
Copyright © 2013-
|
322
|
+
Copyright © 2013-2022 [Magnus Bergmark](https://github.com/Mange) <magnus.bergmark@gmail.com>, et. al.
|
320
323
|
|
321
324
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
322
325
|
|
@@ -10,7 +10,7 @@ module Roadie
|
|
10
10
|
unless pipeline
|
11
11
|
raise(
|
12
12
|
ArgumentError,
|
13
|
-
"You need to pass a pipeline to initialize AssetPipelineProvider"
|
13
|
+
"You need to pass a pipeline to initialize AssetPipelineProvider"
|
14
14
|
)
|
15
15
|
end
|
16
16
|
|
@@ -25,6 +25,7 @@ module Roadie
|
|
25
25
|
end
|
26
26
|
|
27
27
|
private
|
28
|
+
|
28
29
|
def filename(asset)
|
29
30
|
if asset.respond_to?(:filename) # sprockets 4 or later
|
30
31
|
asset.filename
|
@@ -50,7 +51,7 @@ module Roadie
|
|
50
51
|
[a-z0-9]{64} # New style is 64 characters
|
51
52
|
)
|
52
53
|
\. # Dot for the file extension
|
53
|
-
/x
|
54
|
+
/x
|
54
55
|
|
55
56
|
def remove_asset_digest(path)
|
56
57
|
path.gsub(DIGEST_PATTERN, ".")
|
@@ -12,13 +12,14 @@ module Roadie
|
|
12
12
|
|
13
13
|
def execute
|
14
14
|
if options
|
15
|
-
improve_body if
|
15
|
+
improve_body if %r{^text/html}.match?(email.content_type)
|
16
16
|
improve_html_part(email.html_part) if email.html_part
|
17
17
|
end
|
18
18
|
email
|
19
19
|
end
|
20
20
|
|
21
21
|
private
|
22
|
+
|
22
23
|
def improve_body
|
23
24
|
email.body = transform_html(email.body.decoded)
|
24
25
|
end
|
data/lib/roadie/rails/options.rb
CHANGED
@@ -18,7 +18,7 @@ module Roadie
|
|
18
18
|
:url_options,
|
19
19
|
:before_transformation,
|
20
20
|
:after_transformation,
|
21
|
-
:keep_uninlinable_css
|
21
|
+
:keep_uninlinable_css
|
22
22
|
)
|
23
23
|
|
24
24
|
def initialize(options = {})
|
@@ -75,7 +75,7 @@ module Roadie
|
|
75
75
|
dup.combine! options
|
76
76
|
end
|
77
77
|
|
78
|
-
def combine!(options)
|
78
|
+
def combine!(options)
|
79
79
|
%i[after_transformation before_transformation].each do |name|
|
80
80
|
self[name] = Utils.combine_callable(self[name], options[name])
|
81
81
|
end
|
@@ -90,7 +90,7 @@ module Roadie
|
|
90
90
|
|
91
91
|
self.url_options = Utils.combine_hash(
|
92
92
|
url_options,
|
93
|
-
options[:url_options]
|
93
|
+
options[:url_options]
|
94
94
|
)
|
95
95
|
|
96
96
|
self
|
@@ -113,13 +113,14 @@ module Roadie
|
|
113
113
|
end
|
114
114
|
|
115
115
|
private
|
116
|
+
|
116
117
|
def complain_about_unknown_keys(keys)
|
117
118
|
invalid_keys = keys - ATTRIBUTE_NAMES
|
118
119
|
unless invalid_keys.empty?
|
119
120
|
raise(
|
120
121
|
ArgumentError,
|
121
122
|
"Unknown configuration parameters: #{invalid_keys}",
|
122
|
-
caller(1)
|
123
|
+
caller(1)
|
123
124
|
)
|
124
125
|
end
|
125
126
|
end
|
data/lib/roadie/rails/railtie.rb
CHANGED
@@ -9,7 +9,7 @@ module Roadie
|
|
9
9
|
|
10
10
|
initializer "roadie-rails.setup" do |app|
|
11
11
|
config.roadie.asset_providers = [
|
12
|
-
Roadie::FilesystemProvider.new(::Rails.root.join("public").to_s)
|
12
|
+
Roadie::FilesystemProvider.new(::Rails.root.join("public").to_s)
|
13
13
|
]
|
14
14
|
|
15
15
|
if app.config.respond_to?(:assets) && app.config.assets
|
data/lib/roadie/rails/utils.rb
CHANGED
data/lib/roadie/rails/version.rb
CHANGED
data/roadie-rails.gemspec
CHANGED
@@ -5,29 +5,29 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
require "roadie/rails/version"
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
|
-
spec.name
|
9
|
-
spec.version
|
10
|
-
spec.authors
|
11
|
-
spec.email
|
12
|
-
spec.homepage
|
13
|
-
spec.summary
|
14
|
-
spec.description
|
15
|
-
spec.license
|
8
|
+
spec.name = "roadie-rails"
|
9
|
+
spec.version = Roadie::Rails::VERSION
|
10
|
+
spec.authors = ["Magnus Bergmark"]
|
11
|
+
spec.email = ["magnus.bergmark@gmail.com"]
|
12
|
+
spec.homepage = "http://github.com/Mange/roadie-rails"
|
13
|
+
spec.summary = "Making HTML emails comfortable for the Rails rockstars"
|
14
|
+
spec.description = "Hooks Roadie into your Rails application to help with email generation."
|
15
|
+
spec.license = "MIT"
|
16
16
|
|
17
|
-
spec.required_ruby_version = ">= 2.
|
17
|
+
spec.required_ruby_version = ">= 2.6"
|
18
18
|
|
19
|
-
spec.files
|
20
|
-
spec.executables
|
21
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.files = `git ls-files | grep -v ^spec`.split($INPUT_RECORD_SEPARATOR)
|
20
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
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", "<
|
26
|
-
spec.add_dependency "roadie", "
|
24
|
+
spec.add_dependency "railties", ">= 5.1", "< 8.0"
|
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
33
|
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:
|
4
|
+
version: 3.1.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: 2023-10-19 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,25 +29,19 @@ 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
|
36
36
|
requirements:
|
37
|
-
- - "
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '3.1'
|
40
|
-
- - "<"
|
37
|
+
- - "~>"
|
41
38
|
- !ruby/object:Gem::Version
|
42
39
|
version: '5.0'
|
43
40
|
type: :runtime
|
44
41
|
prerelease: false
|
45
42
|
version_requirements: !ruby/object:Gem::Requirement
|
46
43
|
requirements:
|
47
|
-
- - "
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '3.1'
|
50
|
-
- - "<"
|
44
|
+
- - "~>"
|
51
45
|
- !ruby/object:Gem::Version
|
52
46
|
version: '5.0'
|
53
47
|
- !ruby/object:Gem::Dependency
|
@@ -73,7 +67,7 @@ dependencies:
|
|
73
67
|
version: '5.1'
|
74
68
|
- - "<"
|
75
69
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
70
|
+
version: '8.0'
|
77
71
|
type: :development
|
78
72
|
prerelease: false
|
79
73
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -83,7 +77,7 @@ dependencies:
|
|
83
77
|
version: '5.1'
|
84
78
|
- - "<"
|
85
79
|
- !ruby/object:Gem::Version
|
86
|
-
version: '
|
80
|
+
version: '8.0'
|
87
81
|
- !ruby/object:Gem::Dependency
|
88
82
|
name: rspec
|
89
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,6 +120,20 @@ dependencies:
|
|
126
120
|
- - ">="
|
127
121
|
- !ruby/object:Gem::Version
|
128
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'
|
129
137
|
description: Hooks Roadie into your Rails application to help with email generation.
|
130
138
|
email:
|
131
139
|
- magnus.bergmark@gmail.com
|
@@ -139,6 +147,7 @@ files:
|
|
139
147
|
- ".github/workflows/main.yml"
|
140
148
|
- ".gitignore"
|
141
149
|
- ".rubocop.yml"
|
150
|
+
- ".solargraph.yml"
|
142
151
|
- Changelog.md
|
143
152
|
- Gemfile
|
144
153
|
- LICENSE.txt
|
@@ -172,14 +181,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
181
|
requirements:
|
173
182
|
- - ">="
|
174
183
|
- !ruby/object:Gem::Version
|
175
|
-
version: '2.
|
184
|
+
version: '2.6'
|
176
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
186
|
requirements:
|
178
187
|
- - ">="
|
179
188
|
- !ruby/object:Gem::Version
|
180
189
|
version: '0'
|
181
190
|
requirements: []
|
182
|
-
rubygems_version: 3.
|
191
|
+
rubygems_version: 3.4.21
|
183
192
|
signing_key:
|
184
193
|
specification_version: 4
|
185
194
|
summary: Making HTML emails comfortable for the Rails rockstars
|