roadie-rails 2.3.0 → 3.0.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 +15 -1
- data/.solargraph.yml +16 -0
- data/Changelog.md +11 -2
- data/Gemfile +4 -0
- data/README.md +5 -2
- data/lib/roadie/rails/asset_pipeline_provider.rb +2 -1
- 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 +13 -13
- metadata +6 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3763b68398678ce8340c842702ed7321dce653b992c336c5d646e554696f2e83
|
4
|
+
data.tar.gz: a09a2aa1df722ddb5d13635ea1efaab6756c44f9a50258e27c2042b71e4dd8dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb6f168beb438f59455e2b04ce07e6face9b4db9f226e5603bbe20bdaf0568ea2870ace9d6edde1884fbe0e09958d74f19b5a6c565d08b572459a60aee8ce203
|
7
|
+
data.tar.gz: e0b3f1146229dc609018db1d77d544ef4f9e9c3644e6a834b38dd7b00adcdafef02d79e248c914b24db1622beaacdffefbcc863383fd1b9005763bdab8ad3cd1
|
data/.github/workflows/main.yml
CHANGED
@@ -1,6 +1,12 @@
|
|
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:
|
@@ -9,7 +15,7 @@ jobs:
|
|
9
15
|
strategy:
|
10
16
|
fail-fast: false
|
11
17
|
matrix:
|
12
|
-
ruby: ["2.6
|
18
|
+
ruby: ["2.6", "2.7", "3.0", "3.1"]
|
13
19
|
|
14
20
|
steps:
|
15
21
|
- name: Checkout code
|
@@ -27,3 +33,11 @@ jobs:
|
|
27
33
|
run: rake
|
28
34
|
|
29
35
|
- uses: codecov/codecov-action@v2
|
36
|
+
|
37
|
+
lint:
|
38
|
+
runs-on: ubuntu-latest
|
39
|
+
steps:
|
40
|
+
- name: standardrb
|
41
|
+
env:
|
42
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
43
|
+
uses: amoeba/standardrb-action@v2
|
data/.solargraph.yml
ADDED
data/Changelog.md
CHANGED
@@ -1,8 +1,17 @@
|
|
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.0.0...master)
|
4
4
|
|
5
|
-
|
5
|
+
### 3.0.0
|
6
|
+
|
7
|
+
[full changelog](https://github.com/Mange/roadie-rails/compare/v2.3.0...v3.0.0)
|
8
|
+
|
9
|
+
* Drop support for Ruby versions < 2.6.
|
10
|
+
* Add support for Ruby 3.0 and 3.1.
|
11
|
+
|
12
|
+
Development changes:
|
13
|
+
|
14
|
+
* Replace Travis CI with Github CI.
|
6
15
|
|
7
16
|
### 2.3.0
|
8
17
|
|
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', '~> 3.0'
|
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
|
@@ -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,25 +5,25 @@ $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
|
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) }
|
21
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
22
22
|
spec.extra_rdoc_files = %w[README.md Changelog.md LICENSE.txt]
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
25
|
spec.add_dependency "railties", ">= 5.1", "< 7.1"
|
26
|
-
spec.add_dependency "roadie", "
|
26
|
+
spec.add_dependency "roadie", "~> 5.0"
|
27
27
|
|
28
28
|
spec.add_development_dependency "bundler", "~> 2.2"
|
29
29
|
spec.add_development_dependency "rails", ">= 5.1", "< 7.1"
|
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.0.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: 2022-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -34,20 +34,14 @@ dependencies:
|
|
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
|
@@ -139,6 +133,7 @@ files:
|
|
139
133
|
- ".github/workflows/main.yml"
|
140
134
|
- ".gitignore"
|
141
135
|
- ".rubocop.yml"
|
136
|
+
- ".solargraph.yml"
|
142
137
|
- Changelog.md
|
143
138
|
- Gemfile
|
144
139
|
- LICENSE.txt
|
@@ -172,7 +167,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
167
|
requirements:
|
173
168
|
- - ">="
|
174
169
|
- !ruby/object:Gem::Version
|
175
|
-
version: '2.
|
170
|
+
version: '2.6'
|
176
171
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
172
|
requirements:
|
178
173
|
- - ">="
|