From fd502e417d9d9623d509d3363f81d536ac50f5c8 Mon Sep 17 00:00:00 2001 From: Henk Date: Fri, 26 Mar 2021 15:52:17 +0100 Subject: [PATCH] Remove rails dependency and add actionmailer railties dependency --- Gemfile.lock | 72 ++++------------------------------ lib/sparkpost_rails/railtie.rb | 2 + sparkpost_rails.gemspec | 4 +- spec/spec_helper.rb | 1 - 4 files changed, 13 insertions(+), 66 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index fb2a40f..701fd56 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,24 +1,13 @@ PATH remote: . specs: - sparkpost_rails (1.5.4) - rails (>= 4.0, < 6.2) + sparkpost_rails (1.5.5) + actionmailer (>= 4.0, < 6.2) + railties (>= 4.0, < 6.2) GEM remote: http://rubygems.org/ specs: - actioncable (6.1.3) - actionpack (= 6.1.3) - activesupport (= 6.1.3) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - actionmailbox (6.1.3) - actionpack (= 6.1.3) - activejob (= 6.1.3) - activerecord (= 6.1.3) - activestorage (= 6.1.3) - activesupport (= 6.1.3) - mail (>= 2.7.1) actionmailer (6.1.3) actionpack (= 6.1.3) actionview (= 6.1.3) @@ -33,12 +22,6 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.3) - actionpack (= 6.1.3) - activerecord (= 6.1.3) - activestorage (= 6.1.3) - activesupport (= 6.1.3) - nokogiri (>= 1.8.5) actionview (6.1.3) activesupport (= 6.1.3) builder (~> 3.1) @@ -48,18 +31,6 @@ GEM activejob (6.1.3) activesupport (= 6.1.3) globalid (>= 0.3.6) - activemodel (6.1.3) - activesupport (= 6.1.3) - activerecord (6.1.3) - activemodel (= 6.1.3) - activesupport (= 6.1.3) - activestorage (6.1.3) - actionpack (= 6.1.3) - activejob (= 6.1.3) - activerecord (= 6.1.3) - activesupport (= 6.1.3) - marcel (~> 0.3.1) - mimemagic (~> 0.3.2) activesupport (6.1.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) @@ -85,37 +56,20 @@ GEM nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) method_source (1.0.0) - mimemagic (0.3.5) - mini_mime (1.0.2) + mini_mime (1.0.3) mini_portile2 (2.5.0) minitest (5.14.4) - nio4r (2.5.5) - nokogiri (1.11.1) + nokogiri (1.11.2) mini_portile2 (~> 2.5.0) racc (~> 1.4) + nokogiri (1.11.2-x86_64-darwin) + racc (~> 1.4) public_suffix (4.0.6) racc (1.5.2) rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.3) - actioncable (= 6.1.3) - actionmailbox (= 6.1.3) - actionmailer (= 6.1.3) - actionpack (= 6.1.3) - actiontext (= 6.1.3) - actionview (= 6.1.3) - activejob (= 6.1.3) - activemodel (= 6.1.3) - activerecord (= 6.1.3) - activestorage (= 6.1.3) - activesupport (= 6.1.3) - bundler (>= 1.15.0) - railties (= 6.1.3) - sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) @@ -142,13 +96,6 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) rspec-support (3.10.2) - sprockets (4.0.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) thor (1.1.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) @@ -156,9 +103,6 @@ GEM addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket-driver (0.7.3) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) zeitwerk (2.4.2) PLATFORMS @@ -171,4 +115,4 @@ DEPENDENCIES webmock (>= 1.24.2) BUNDLED WITH - 2.2.4 + 2.2.15 diff --git a/lib/sparkpost_rails/railtie.rb b/lib/sparkpost_rails/railtie.rb index 0d369f1..a6d92f1 100644 --- a/lib/sparkpost_rails/railtie.rb +++ b/lib/sparkpost_rails/railtie.rb @@ -1,3 +1,5 @@ +require 'rails/railtie' + module SparkPostRails class Railtie < Rails::Railtie initializer "sparkpost_rails.add_delivery_method" do diff --git a/sparkpost_rails.gemspec b/sparkpost_rails.gemspec index 5559634..cbb0056 100644 --- a/sparkpost_rails.gemspec +++ b/sparkpost_rails.gemspec @@ -15,7 +15,9 @@ Gem::Specification.new do |s| s.files = Dir["{lib}/**/*"] + ["LICENSE", "README.md"] s.test_files = Dir["{spec}/**/*"] - s.add_dependency 'rails', '>= 4.0', '< 6.2' + %w[actionmailer railties].each do |rails_gem| + s.add_dependency rails_gem, '>= 4.0', '< 6.2' + end s.add_development_dependency "rspec", '>= 3.4.0' s.add_development_dependency "webmock", '>= 1.24.2' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index fe61dac..706c8db 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,4 @@ require 'webmock/rspec' -require 'rails' require 'action_mailer' require "sparkpost_rails" require "active_support/core_ext/integer/time"