letter_opener_web 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +14 -7
- data/app/controllers/letter_opener_web/letters_controller.rb +6 -5
- data/lib/letter_opener_web/delivery_method.rb +1 -1
- data/lib/letter_opener_web/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bbf11cbd296887063a7375ac18b4d9b42f5eac5
|
4
|
+
data.tar.gz: acf61512d9bce3f98624705042ab254334cb1567
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1b1e7c448ec52d8f57514e38019067859ae0ad992f18547d52f4c4223fbc793d436bfee8b6f2dd4ca11f684ecddbab57d2150bf082ff1da80337e04c0800acc
|
7
|
+
data.tar.gz: 29d25a8263fc9d300029ad74fd880ab885d3f6335633821c8a697a48483f0a73665f47201fb6009aa3772f89357bada89f0199a0e4c9dbecff9932857153e37f
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## [1.3.1](https://github.com/fgrehm/letter_opener_web/compare/v1.3.0...v1.3.1) (Feb 04, 2017)
|
2
|
+
|
3
|
+
- Remove warnings about unused variables [#45](https://github.com/fgrehm/letter_opener_web/pull/45)
|
4
|
+
- Remove Rails 5 deprecation warnings [#54](https://github.com/fgrehm/letter_opener_web/pull/54)
|
5
|
+
|
1
6
|
## [1.3.0](https://github.com/fgrehm/letter_opener_web/compare/v1.2.3...v1.3.0) (Feb 02, 2015)
|
2
7
|
|
3
8
|
- Depend on `railties` and `actionmailer` [#38](https://github.com/fgrehm/letter_opener_web/pull/38)
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
letter_opener_web (1.3.
|
4
|
+
letter_opener_web (1.3.1)
|
5
5
|
actionmailer (>= 3.2)
|
6
6
|
letter_opener (~> 1.0)
|
7
7
|
railties (>= 3.2)
|
@@ -37,7 +37,8 @@ GEM
|
|
37
37
|
minitest (~> 5.1)
|
38
38
|
thread_safe (~> 0.3, >= 0.3.4)
|
39
39
|
tzinfo (~> 1.1)
|
40
|
-
addressable (2.
|
40
|
+
addressable (2.5.0)
|
41
|
+
public_suffix (~> 2.0, >= 2.0.2)
|
41
42
|
builder (3.2.2)
|
42
43
|
celluloid (0.16.0)
|
43
44
|
timers (~> 4.0.0)
|
@@ -50,7 +51,7 @@ GEM
|
|
50
51
|
erubis (2.7.0)
|
51
52
|
ffi (1.9.6)
|
52
53
|
formatador (0.2.5)
|
53
|
-
globalid (0.3.
|
54
|
+
globalid (0.3.7)
|
54
55
|
activesupport (>= 4.1.0)
|
55
56
|
guard (2.11.1)
|
56
57
|
formatador (>= 0.2.4)
|
@@ -71,7 +72,7 @@ GEM
|
|
71
72
|
json (1.8.2)
|
72
73
|
launchy (2.4.3)
|
73
74
|
addressable (~> 2.3)
|
74
|
-
letter_opener (1.
|
75
|
+
letter_opener (1.4.1)
|
75
76
|
launchy (~> 2.2)
|
76
77
|
listen (2.8.5)
|
77
78
|
celluloid (>= 0.15.2)
|
@@ -80,10 +81,12 @@ GEM
|
|
80
81
|
loofah (2.0.1)
|
81
82
|
nokogiri (>= 1.5.9)
|
82
83
|
lumberjack (1.0.9)
|
83
|
-
mail (2.6.
|
84
|
-
mime-types (>= 1.16, <
|
84
|
+
mail (2.6.4)
|
85
|
+
mime-types (>= 1.16, < 4)
|
85
86
|
method_source (0.8.2)
|
86
|
-
mime-types (
|
87
|
+
mime-types (3.1)
|
88
|
+
mime-types-data (~> 3.2015)
|
89
|
+
mime-types-data (3.2016.0521)
|
87
90
|
mini_portile (0.6.2)
|
88
91
|
minitest (5.5.1)
|
89
92
|
nenv (0.2.0)
|
@@ -96,6 +99,7 @@ GEM
|
|
96
99
|
coderay (~> 1.1.0)
|
97
100
|
method_source (~> 0.8.1)
|
98
101
|
slop (~> 3.4)
|
102
|
+
public_suffix (2.0.5)
|
99
103
|
rack (1.6.0)
|
100
104
|
rack-test (0.6.3)
|
101
105
|
rack (>= 1.0)
|
@@ -158,3 +162,6 @@ DEPENDENCIES
|
|
158
162
|
rb-inotify
|
159
163
|
rspec-rails (~> 3.0)
|
160
164
|
shoulda-matchers (~> 2.5)
|
165
|
+
|
166
|
+
BUNDLED WITH
|
167
|
+
1.12.5
|
@@ -2,8 +2,8 @@ require_dependency "letter_opener_web/application_controller"
|
|
2
2
|
|
3
3
|
module LetterOpenerWeb
|
4
4
|
class LettersController < ApplicationController
|
5
|
-
|
6
|
-
|
5
|
+
before_action :check_style, :only => [:show]
|
6
|
+
before_action :load_letter, :only => [:show, :attachment, :destroy]
|
7
7
|
|
8
8
|
def index
|
9
9
|
@letters = Letter.search
|
@@ -13,7 +13,8 @@ module LetterOpenerWeb
|
|
13
13
|
text = @letter.send("#{params[:style]}_text").
|
14
14
|
gsub(/"plain\.html"/, "\"#{LetterOpenerWeb.railtie_routes_url_helpers.letter_path(:id => @letter.id, :style => 'plain')}\"").
|
15
15
|
gsub(/"rich\.html"/, "\"#{LetterOpenerWeb.railtie_routes_url_helpers.letter_path(:id => @letter.id, :style => 'rich')}\"")
|
16
|
-
|
16
|
+
|
17
|
+
render :html => text.html_safe
|
17
18
|
end
|
18
19
|
|
19
20
|
def attachment
|
@@ -23,7 +24,7 @@ module LetterOpenerWeb
|
|
23
24
|
if file = @letter.attachments[filename]
|
24
25
|
send_file(file, :filename => filename, :disposition => 'inline')
|
25
26
|
else
|
26
|
-
render :
|
27
|
+
render :plain => 'Attachment not found!', :status => 404
|
27
28
|
end
|
28
29
|
end
|
29
30
|
|
@@ -47,7 +48,7 @@ module LetterOpenerWeb
|
|
47
48
|
def load_letter
|
48
49
|
if params[:id]
|
49
50
|
@letter = Letter.find(params[:id])
|
50
|
-
|
51
|
+
head :not_found unless @letter.exists?
|
51
52
|
end
|
52
53
|
end
|
53
54
|
end
|
@@ -4,7 +4,7 @@ module LetterOpenerWeb
|
|
4
4
|
class DeliveryMethod < LetterOpener::DeliveryMethod
|
5
5
|
def deliver!(mail)
|
6
6
|
location = File.join(settings[:location], "#{Time.now.to_i}_#{Digest::SHA1.hexdigest(mail.encoded)[0..6]}")
|
7
|
-
|
7
|
+
LetterOpener::Message.rendered_messages(location, mail)
|
8
8
|
# Launchy.open(URI.parse(URI.escape(messages.first.filepath)))
|
9
9
|
end
|
10
10
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: letter_opener_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Rehm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -162,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
164
|
rubyforge_project:
|
165
|
-
rubygems_version: 2.
|
165
|
+
rubygems_version: 2.5.1
|
166
166
|
signing_key:
|
167
167
|
specification_version: 4
|
168
168
|
summary: Gives letter_opener an interface for browsing sent emails
|