courier 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/courier.gemspec +1 -1
- data/lib/courier/service/gritter_notice.rb +5 -2
- data/spec/courier/service/gritter_notice_spec.rb +2 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
data/courier.gemspec
CHANGED
@@ -18,8 +18,11 @@ class Courier::Service::GritterNotice < Courier::Service::Base
|
|
18
18
|
#
|
19
19
|
|
20
20
|
def message(owner, template, options)
|
21
|
-
|
22
|
-
|
21
|
+
scope = [:courier, :gritter_notice]
|
22
|
+
opt = I18n::translate(template.name, :scope=>scope)
|
23
|
+
opt.merge!(options)
|
24
|
+
opt[:text]||=I18n::translate([template.name,:text], opt.merge(:scope=>scope) )
|
25
|
+
owner.gritter_notice template.name, opt
|
23
26
|
end
|
24
27
|
|
25
28
|
def deliver!
|
@@ -7,7 +7,8 @@ describe Courier::Service::GritterNotice do
|
|
7
7
|
args={:a=>1}
|
8
8
|
owner = double
|
9
9
|
template = double :name=>:template_key
|
10
|
-
|
10
|
+
I18n.should_receive(:translate).with(template.name, :scope=>[:courier, :gritter_notice]) {{:text=>'text of translation', :level=>:warning} }
|
11
|
+
owner.should_receive(:gritter_notice).with(template.name, {:text=>"text of translation", :a=>1, :level=>:warning})
|
11
12
|
subject.message owner, template, args
|
12
13
|
end
|
13
14
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: courier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Danil Pismenny
|