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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3d1d4fb6f37c6612f565f809c51f5d1b1a9aea2a469ec431d1c180aadd19e46
4
- data.tar.gz: 1d198927ae248450f45120f9c32d0af1eacaeed690ff18f78f819b0aadbe0a4c
3
+ metadata.gz: 16580bfa2467fceffbbc8e06e701098916fbcbb9bee06837939bdd8e8b8ee32c
4
+ data.tar.gz: f0ef8c91dfb32a406a3a4e3d705fd0ccfc7a49b939e378acb1296a58e03c2314
5
5
  SHA512:
6
- metadata.gz: 6354732056b71a05443197cedbe8e42efef99c535b0debc63abc7271dd581b87c29d5dd3ac605c0332baa7bc9b8a12870093b8d77838e5a5386a3984d778f8e9
7
- data.tar.gz: 3e617ef0ba8330db2802212c41b44bcda55b8548110195f8d45b99f1c58cb6ec8991ad6de93433d9b3104c116f53b9d0d9d16ac9be9eca3ddc08c85ccda9a6da
6
+ metadata.gz: 38c8fcad0c0b77105922656042f8f5e0ff515bcca6cad7f65b0f6817bffdd02920a7a1184d61a993ea54d6287b78f641726937d3c53d2784e319b3be4049b57f
7
+ data.tar.gz: 1e35117740bbec441a9e7f443176695982db10e245b9d00491350a277fcbf66100e384798df04bfd6789478fdc3feaf85565b0581981b2078e689a4ea98405fa
@@ -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-20.04
14
+ runs-on: ubuntu-latest
9
15
  strategy:
10
16
  fail-fast: false
11
17
  matrix:
12
- ruby: ["2.6.9", "2.7.2", "3.0.3"]
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@v2
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
- - uses: codecov/codecov-action@v2
56
+ - name: standardrb
57
+ run: bundle exec standardrb
data/.solargraph.yml ADDED
@@ -0,0 +1,16 @@
1
+ ---
2
+ include:
3
+ - "**/*.rb"
4
+ exclude:
5
+ - spec/**/*
6
+ - test/**/*
7
+ - vendor/**/*
8
+ - ".bundle/**/*"
9
+ require: []
10
+ domains: []
11
+ plugins:
12
+ - solargraph-standardrb
13
+ reporters:
14
+ - standardrb
15
+ require_paths: []
16
+ max_files: 5000
data/Changelog.md CHANGED
@@ -1,8 +1,28 @@
1
1
  ### development version
2
2
 
3
- [full changelog](https://github.com/Mange/roadie-rails/compare/v2.3.0...master)
3
+ [full changelog](https://github.com/Mange/roadie-rails/compare/v3.1.0...master)
4
4
 
5
- * Nothing yet.
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', '~> 2.3'
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-2021 [Magnus Bergmark](https://github.com/Mange) <magnus.bergmark@gmail.com>, et. al.
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.freeze
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 email.content_type =~ %r{^text/html}
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
@@ -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) # rubocop:disable Metrics/MethodLength
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
@@ -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
@@ -4,6 +4,7 @@ module Roadie
4
4
  module Rails
5
5
  module Utils
6
6
  module_function
7
+
7
8
  # Combine two hashes, or return the non-nil hash if either is nil.
8
9
  # Returns nil if both are nil.
9
10
  def combine_hash(first, second)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Roadie
4
4
  module Rails
5
- VERSION = "2.3.0"
5
+ VERSION = "3.1.0"
6
6
  end
7
7
  end
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 = "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"
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.5"
17
+ spec.required_ruby_version = ">= 2.6"
18
18
 
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)/})
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", "< 7.1"
26
- spec.add_dependency "roadie", ">= 3.1", "< 5.0"
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", "< 7.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: 2.3.0
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: 2021-12-22 00:00:00.000000000 Z
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: '7.1'
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: '7.1'
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: '7.1'
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: '7.1'
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.5'
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.0.9
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