rails_email_preview 1.0.2 → 1.0.3

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
  SHA1:
3
- metadata.gz: fb483eef3dca29f0660e456e2b5c4e327def3394
4
- data.tar.gz: 85c05ec8ffdb336744078bfe7f10be0f32ef6061
3
+ metadata.gz: 506d608b1ee447ce0e09e421c24c3bcbe15fbed8
4
+ data.tar.gz: aba0f6d204539b565542510f4514a9fe93e7d5b4
5
5
  SHA512:
6
- metadata.gz: bde6d1ceea594ab03d87817db53116d75cf97daec3c24a0a5f6d6a9ee7aab0fc632031030877ae34c7ae95869368c107f712c714d4f6c9134d8291d01b7da51c
7
- data.tar.gz: 06e69d00ce78b449a669423cc041ff108515fa2ed500f427f903c23101e19666b989b00d366ee6b8cd28216b19ea595c02933e6c918ac3173d6fe5173bcf5eb5
6
+ metadata.gz: 5eccad495eded901b7a85c23b10f21e4d27d31be9e0d5be40b1f950f6d1df4afcc4ac1101b29e9d212f50a59c14f85ed114bd56c6566f434311a8161f165dc4d
7
+ data.tar.gz: ac8e6ac1b99baf80ef6a8d80739d00a14c0526844745839375fbb2651a1b1f9f1d1b866b53cd5b73717a5a990d8f8e53a28e47c51c5043f1e327a0db11bb04f6
data/README.md CHANGED
@@ -17,7 +17,7 @@ REP comes with two themes: a simple standalone theme, and a theme that uses [Boo
17
17
  Add [![Gem Version][gem-badge]][gem] to Gemfile:
18
18
 
19
19
  ```ruby
20
- gem 'rails_email_preview', '~> 1.0.2'
20
+ gem 'rails_email_preview', '~> 1.0.3'
21
21
  ```
22
22
 
23
23
  Add an initializer and the routes:
@@ -29,7 +29,7 @@ module RailsEmailPreview
29
29
 
30
30
  # Really deliver an email
31
31
  def test_deliver
32
- redirect_url = rails_email_preview.rep_email_url(params.slice(:preview_id, :email_locale))
32
+ redirect_url = rails_email_preview.rep_email_url(preview_params.except(:recipient_email))
33
33
  if (address = params[:recipient_email]).blank? || address !~ /@/
34
34
  redirect_to redirect_url, alert: t('rep.test_deliver.provide_email')
35
35
  return
@@ -74,7 +74,11 @@ module RailsEmailPreview
74
74
  private
75
75
 
76
76
  def preview_params
77
- params.except(*(request.path_parameters.keys - [:email_locale]))
77
+ if Rails::VERSION::MAJOR >= 5
78
+ params.to_unsafe_h.except(*(request.path_parameters.keys - [:email_locale]))
79
+ else
80
+ params.except(*(request.path_parameters.keys - [:email_locale]))
81
+ end
78
82
  end
79
83
 
80
84
  def deliver_email!(mail)
@@ -1,3 +1,3 @@
1
1
  module RailsEmailPreview
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_email_preview
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Mazovetskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-08 00:00:00.000000000 Z
11
+ date: 2016-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -94,34 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: 2.3.0
97
- - !ruby/object:Gem::Dependency
98
- name: rspec
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '3.4'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '3.4'
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: rspec-rails
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
101
  - - ">="
116
102
  - !ruby/object:Gem::Version
117
- version: '0'
103
+ version: '3.4'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
108
  - - ">="
123
109
  - !ruby/object:Gem::Version
124
- version: '0'
110
+ version: '3.4'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: poltergeist
127
113
  requirement: !ruby/object:Gem::Requirement