hyouki 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/hyouki_controller.rb +6 -8
- data/hyouki.gemspec +3 -0
- data/lib/hyouki/version.rb +1 -1
- metadata +24 -2
@@ -4,16 +4,14 @@ class HyoukiController < ApplicationController
|
|
4
4
|
def show
|
5
5
|
klass = params[:class].classify.gsub(/::(\w)/) { |s| s.upcase }.constantize
|
6
6
|
args = params[:args].split(',').collect { |a| eval(a) }
|
7
|
-
@mail = klass.send(params[:method], *args)
|
8
|
-
|
9
|
-
@type = params[:type] || 'plain'
|
10
7
|
|
11
|
-
@
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
@type = params[:type] || 'html'
|
9
|
+
@mail = klass.send(params[:method], *args)
|
10
|
+
@parts = PremailerRails::Hook.delivering_email(@mail)
|
11
|
+
@body = if @parts.count > 1
|
12
|
+
@parts.select { |part| part.content_type =~ /#{@type}/ }.first.body.to_s
|
15
13
|
else
|
16
|
-
@
|
14
|
+
@parts.first.body.to_s
|
17
15
|
end
|
18
16
|
end
|
19
17
|
end
|
data/hyouki.gemspec
CHANGED
data/lib/hyouki/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyouki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,29 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
date: 2012-05-18 00:00:00.000000000Z
|
13
|
-
dependencies:
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: premailer-rails3
|
16
|
+
requirement: &70247243831080 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70247243831080
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rails
|
27
|
+
requirement: &70247243829440 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70247243829440
|
14
36
|
description: A better way to view and design emails.
|
15
37
|
email:
|
16
38
|
- russ@bashme.org
|