roadie-rails 1.0.3 → 1.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6af45ff8198c174ab196aa56d43b41c9a6fe4beb
4
- data.tar.gz: 1dccbfa2e869c0e4bdac53aa5216d7dc943586a6
3
+ metadata.gz: efaf6815da593d05a20328278f909f231dc8bbd6
4
+ data.tar.gz: a10608ebd49ff20b563c91bf2ec12ff897ea1504
5
5
  SHA512:
6
- metadata.gz: abc12ed74b832165ae530fd1a177e543ee09aafca39674923d52479aa0d916f9385e9a233a6de436e0bf73b1ca2f7d19ce31816f88432c0ab99f20eb49e337c2
7
- data.tar.gz: 5c5863831c581517ab0c7e6f1a6cc3623f3690e2c5538e305184c9bac0ad2e2c184e119e4019918f7c222fc8653924b1d66f4ba039125650e6c78136373b38e2
6
+ metadata.gz: 9dd71e5444a0301a31bad73ad028022e97fbefefb4c88fc396b58b2fe17be612f4e17164c9243d7a2e6cb765eaba3f218c54d523f93238a4afafa0dc6a80f4c0
7
+ data.tar.gz: 282668f5b404bc3dbadeb3d401aef896768d37a189a482fc15303a6adf9264a1ee55dd7cd10f0b9d5db4e43122c1a0516dcc069233278240526dbd86331c529b
data/Changelog.md CHANGED
@@ -1,12 +1,19 @@
1
1
  ### development version
2
2
 
3
- [full changelog](https://github.com/Mange/roadie/compare/v1.0.3...master)
3
+ [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.4...master)
4
4
 
5
- * Nothing yet
5
+ * Nothing yet.
6
+
7
+ ### 1.0.4
8
+
9
+ [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.3...v1.0.4)
10
+
11
+ * Enhancements:
12
+ * Support for Rails 4.2 — [Ryunosuke SATO (tricknotes)](https://github.com/tricknotes)
6
13
 
7
14
  ### 1.0.3
8
15
 
9
- [full changelog](https://github.com/Mange/roadie/compare/v1.0.2...v1.0.3)
16
+ [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.2...v1.0.3)
10
17
 
11
18
  * Bug fixes
12
19
  * Don't change `asset_providers` of a `Roadie::Document` when applying Options with no `asset_providers` set.
@@ -16,26 +23,26 @@
16
23
 
17
24
  ### 1.0.2
18
25
 
19
- [full changelog](https://github.com/Mange/roadie/compare/v1.0.1...v1.0.2)
26
+ [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.1...v1.0.2)
20
27
 
21
28
  * Bug fixes
22
29
  * Don't crash on `nil` `roadie_options`
23
30
 
24
31
  ### 1.0.1
25
32
 
26
- [full changelog](https://github.com/Mange/roadie/compare/v1.0.0...v1.0.1)
33
+ [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.0...v1.0.1)
27
34
 
28
35
  * Bug fixes
29
36
  * Inline HTML in emails without a plaintext part
30
37
 
31
38
  ### 1.0.0
32
39
 
33
- [full changelog](https://github.com/Mange/roadie/compare/v1.0.0.pre1...v1.0.0)
40
+ [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.0.pre1...v1.0.0)
34
41
 
35
42
  * Use released version of Roadie 3.0.0
36
43
 
37
44
  ### 1.0.0.pre1
38
45
 
39
- [full changelog](https://github.com/Mange/roadie/compare/0000000...v1.0.0.pre1)
46
+ [full changelog](https://github.com/Mange/roadie-rails/compare/0000000...v1.0.0.pre1)
40
47
 
41
48
  * First implementation
data/README.md CHANGED
@@ -247,8 +247,8 @@ class Admin::EmailsController < AdminController
247
247
  private
248
248
  def render_email(email)
249
249
  respond_to do |format|
250
- format.html { render html: email.html_body.decoded }
251
- format.text { render text: email.text_body.decoded }
250
+ format.html { render html: email.html_part.decoded }
251
+ format.text { render text: email.text_part.decoded }
252
252
  end
253
253
  end
254
254
  end
@@ -285,6 +285,7 @@ Tested with [Travis CI](http://travis-ci.org) using [almost all combinations of]
285
285
  * 3.2
286
286
  * 4.0
287
287
  * 4.1
288
+ * 4.2
288
289
 
289
290
  Let me know if you want any other combination supported officially.
290
291
 
@@ -1,5 +1,5 @@
1
1
  module Roadie
2
2
  module Rails
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  end
data/roadie-rails.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_dependency "roadie", "~> 3.0"
23
- spec.add_dependency "rails", ">= 3.0", "< 4.2"
23
+ spec.add_dependency "rails", ">= 3.0", "< 4.3"
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 1.6"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
@@ -15,6 +15,7 @@ describe "Integrations" do
15
15
  RailsApp.new("Rails 4.0.x", 'rails_40', runner: :bin, asset_pipeline: true),
16
16
  RailsApp.new("Rails 4.0.x (without asset pipeline)", 'rails_40_no_pipeline', runner: :bin, asset_pipeline: false),
17
17
  RailsApp.new("Rails 4.1.x", 'rails_41', runner: :bin, asset_pipeline: true),
18
+ RailsApp.new("Rails 4.2.x", 'rails_42', runner: :bin, asset_pipeline: true),
18
19
  ].each do |app|
19
20
  describe "with #{app}" do
20
21
  before { app.reset }
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
- gem 'rails', '4.0.0'
2
+ gem 'rails', '4.1.0'
3
3
  gem 'sass-rails', '~> 4.0.0'
4
4
 
5
5
  gem 'roadie-rails', :path => '../../..'
@@ -0,0 +1,16 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+ /db/*.sqlite3-journal
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*.log
16
+ /tmp
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+ gem 'rails', '4.2.0'
3
+ gem 'sass-rails'
4
+
5
+ gem 'roadie-rails', :path => '../../..'
@@ -0,0 +1,2 @@
1
+ body { background-color: green; }
2
+ .image { background: image-url("rails.png"); }
@@ -0,0 +1,27 @@
1
+ class AutoMailer < ActionMailer::Base
2
+ include Roadie::Rails::Automatic
3
+
4
+ default from: 'john@example.com'
5
+
6
+ def normal_email
7
+ generate_email
8
+ end
9
+
10
+ def disabled_email
11
+ generate_email
12
+ end
13
+
14
+ private
15
+ def roadie_options
16
+ unless action_name =~ /disabled/
17
+ super.combine(url_options: {protocol: "https"})
18
+ end
19
+ end
20
+
21
+ def generate_email
22
+ mail(to: 'example@example.org', subject: "Notification for you") do |format|
23
+ format.html { render :normal_email }
24
+ format.text { render :normal_email }
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,17 @@
1
+ class Mailer < ActionMailer::Base
2
+ include Roadie::Rails::Mailer
3
+
4
+ default from: 'john@example.com'
5
+
6
+ def normal_email
7
+ roadie_mail(to: 'example@example.org', subject: "Notification for you") do |format|
8
+ format.html
9
+ format.text
10
+ end
11
+ end
12
+
13
+ private
14
+ def roadie_options
15
+ super.combine(url_options: {protocol: "https"})
16
+ end
17
+ end
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
5
+ <%= stylesheet_link_tag "email" %>
6
+ </head>
7
+ <body>
8
+ <h1>Normal email</h1>
9
+ <div class="image"></div>
10
+ </body>
11
+ </html>
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
5
+ <%= stylesheet_link_tag "email" %>
6
+ </head>
7
+ <body>
8
+ <h1>Normal email</h1>
9
+ <div class="image"></div>
10
+ </body>
11
+ </html>
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -0,0 +1,13 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require "action_controller/railtie"
4
+ require "action_mailer/railtie"
5
+ require "sprockets/railtie"
6
+
7
+ Bundler.require(:default, Rails.env)
8
+
9
+ module Rails42
10
+ class Application < Rails::Application
11
+ config.roadie.url_options = {host: 'example.app.org'}
12
+ end
13
+ end
@@ -0,0 +1,4 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Rails42::Application.initialize!
@@ -0,0 +1,9 @@
1
+ Rails42::Application.configure do
2
+ config.cache_classes = false
3
+ config.eager_load = false
4
+ config.consider_all_requests_local = true
5
+ config.action_controller.perform_caching = false
6
+ config.action_mailer.raise_delivery_errors = false
7
+ config.active_support.deprecation = :log
8
+ config.assets.debug = true
9
+ end
@@ -0,0 +1 @@
1
+ Rails42::Application.config.secret_key_base = '4fc45a45fecece06ff370f3271d9c2f29cdd0b029bde255d77318418e5066681d42c706f5e504b9298f2b5ccbd2c013c39d474e6521ef4c4f056b1368ce22c8f'
@@ -0,0 +1 @@
1
+ Rails42::Application.config.session_store :cookie_store, key: '_rails_42_session'
@@ -0,0 +1,2 @@
1
+ Rails42::Application.routes.draw do
2
+ 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: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus Bergmark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-25 00:00:00.000000000 Z
11
+ date: 2014-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roadie
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '3.0'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '4.2'
36
+ version: '4.3'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '3.0'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '4.2'
46
+ version: '4.3'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -270,6 +270,25 @@ files:
270
270
  - spec/railsapps/rails_41/config/initializers/secret_token.rb
271
271
  - spec/railsapps/rails_41/config/initializers/session_store.rb
272
272
  - spec/railsapps/rails_41/config/routes.rb
273
+ - spec/railsapps/rails_42/.gitignore
274
+ - spec/railsapps/rails_42/Gemfile
275
+ - spec/railsapps/rails_42/app/assets/images/rails.png
276
+ - spec/railsapps/rails_42/app/assets/stylesheets/email.css.scss
277
+ - spec/railsapps/rails_42/app/mailers/auto_mailer.rb
278
+ - spec/railsapps/rails_42/app/mailers/mailer.rb
279
+ - spec/railsapps/rails_42/app/views/auto_mailer/normal_email.html.erb
280
+ - spec/railsapps/rails_42/app/views/auto_mailer/normal_email.text
281
+ - spec/railsapps/rails_42/app/views/mailer/normal_email.html.erb
282
+ - spec/railsapps/rails_42/app/views/mailer/normal_email.text
283
+ - spec/railsapps/rails_42/bin/rails
284
+ - spec/railsapps/rails_42/config.ru
285
+ - spec/railsapps/rails_42/config/application.rb
286
+ - spec/railsapps/rails_42/config/boot.rb
287
+ - spec/railsapps/rails_42/config/environment.rb
288
+ - spec/railsapps/rails_42/config/environments/development.rb
289
+ - spec/railsapps/rails_42/config/initializers/secret_token.rb
290
+ - spec/railsapps/rails_42/config/initializers/session_store.rb
291
+ - spec/railsapps/rails_42/config/routes.rb
273
292
  - spec/spec_helper.rb
274
293
  - spec/support/have_no_styling_matcher.rb
275
294
  - spec/support/have_selector_matcher.rb
@@ -438,6 +457,25 @@ test_files:
438
457
  - spec/railsapps/rails_41/config/initializers/secret_token.rb
439
458
  - spec/railsapps/rails_41/config/initializers/session_store.rb
440
459
  - spec/railsapps/rails_41/config/routes.rb
460
+ - spec/railsapps/rails_42/.gitignore
461
+ - spec/railsapps/rails_42/Gemfile
462
+ - spec/railsapps/rails_42/app/assets/images/rails.png
463
+ - spec/railsapps/rails_42/app/assets/stylesheets/email.css.scss
464
+ - spec/railsapps/rails_42/app/mailers/auto_mailer.rb
465
+ - spec/railsapps/rails_42/app/mailers/mailer.rb
466
+ - spec/railsapps/rails_42/app/views/auto_mailer/normal_email.html.erb
467
+ - spec/railsapps/rails_42/app/views/auto_mailer/normal_email.text
468
+ - spec/railsapps/rails_42/app/views/mailer/normal_email.html.erb
469
+ - spec/railsapps/rails_42/app/views/mailer/normal_email.text
470
+ - spec/railsapps/rails_42/bin/rails
471
+ - spec/railsapps/rails_42/config.ru
472
+ - spec/railsapps/rails_42/config/application.rb
473
+ - spec/railsapps/rails_42/config/boot.rb
474
+ - spec/railsapps/rails_42/config/environment.rb
475
+ - spec/railsapps/rails_42/config/environments/development.rb
476
+ - spec/railsapps/rails_42/config/initializers/secret_token.rb
477
+ - spec/railsapps/rails_42/config/initializers/session_store.rb
478
+ - spec/railsapps/rails_42/config/routes.rb
441
479
  - spec/spec_helper.rb
442
480
  - spec/support/have_no_styling_matcher.rb
443
481
  - spec/support/have_selector_matcher.rb