courier 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,10 +28,12 @@ Gemfile:
28
28
  Courier.init do |d|
29
29
  d.services :active_mailer, :gritter_notice, :facebook
30
30
  d.template :import_complete, :off, :on, :off
31
- d.template :avatar_loaded, :on, :off, :on
32
- d.template :weekly_subscription, :on, :on, :on
31
+ d.template :avatar_loaded, :on, :off, :disabled
32
+ d.template :weekly_subscription, :on, :on, :disabled
33
33
  end
34
34
 
35
+ Где :on и :off это значения по умолчанию, а :disabled - полный запрет на установку этого параметра пользователем (:off по умолчанию)
36
+
35
37
  В модели пользователя:
36
38
 
37
39
  class User << ActiveRecord::Base
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{courier}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Danil Pismenny"]
@@ -67,7 +67,7 @@ Gem::Specification.new do |s|
67
67
  s.homepage = %q{http://github.com/dapi/courier}
68
68
  s.licenses = ["MIT"]
69
69
  s.require_paths = ["lib"]
70
- s.rubygems_version = %q{1.5.0}
70
+ s.rubygems_version = %q{1.6.1}
71
71
  s.summary = %q{Система управления пользовательскими оповещениями и подписками}
72
72
  s.test_files = [
73
73
  "spec/controllers/courier_settings_controller_spec.rb",
@@ -18,7 +18,7 @@ class Courier::Service::GritterNotice < Courier::Service::Base
18
18
  #
19
19
 
20
20
  def message(owner, template, options)
21
- scope = [:courier, :services, :gritter_notice]
21
+ scope = [:courier, :services, :gritter_notice, :templates]
22
22
  opt = I18n::translate(template.name, :scope=>scope)
23
23
  opt.merge!(options)
24
24
  opt[:text]||=I18n::translate([template.name,:text], opt.merge(:scope=>scope) )
@@ -7,7 +7,7 @@ describe Courier::Service::GritterNotice do
7
7
  args={:a=>1}
8
8
  owner = double
9
9
  template = double :name=>:template_key
10
- I18n.should_receive(:translate).with(template.name, :scope=>[:courier, :services, :gritter_notice]) {{:text=>'text of translation', :level=>:warning} }
10
+ I18n.should_receive(:translate).with(template.name, :scope=>[:courier, :services, :gritter_notice, :templates]) {{:text=>'text of translation', :level=>:warning} }
11
11
  owner.should_receive(:gritter_notice).with(template.name, {:text=>"text of translation", :a=>1, :level=>:warning})
12
12
  subject.message owner, template, args
13
13
  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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Danil Pismenny
@@ -19,8 +19,7 @@ date: 2011-04-05 00:00:00 +04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: rails
23
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ requirement: &id001 !ruby/object:Gem::Requirement
24
23
  none: false
25
24
  requirements:
26
25
  - - ~>
@@ -30,12 +29,12 @@ dependencies:
30
29
  - 3
31
30
  - 0
32
31
  version: "3.0"
32
+ version_requirements: *id001
33
+ name: rails
33
34
  prerelease: false
34
35
  type: :runtime
35
- requirement: *id001
36
36
  - !ruby/object:Gem::Dependency
37
- name: state_machine
38
- version_requirements: &id002 !ruby/object:Gem::Requirement
37
+ requirement: &id002 !ruby/object:Gem::Requirement
39
38
  none: false
40
39
  requirements:
41
40
  - - ~>
@@ -46,12 +45,12 @@ dependencies:
46
45
  - 10
47
46
  - 2
48
47
  version: 0.10.2
48
+ version_requirements: *id002
49
+ name: state_machine
49
50
  prerelease: false
50
51
  type: :runtime
51
- requirement: *id002
52
52
  - !ruby/object:Gem::Dependency
53
- name: pg
54
- version_requirements: &id003 !ruby/object:Gem::Requirement
53
+ requirement: &id003 !ruby/object:Gem::Requirement
55
54
  none: false
56
55
  requirements:
57
56
  - - ">="
@@ -60,12 +59,12 @@ dependencies:
60
59
  segments:
61
60
  - 0
62
61
  version: "0"
62
+ version_requirements: *id003
63
+ name: pg
63
64
  prerelease: false
64
65
  type: :development
65
- requirement: *id003
66
66
  - !ruby/object:Gem::Dependency
67
- name: ruby-debug
68
- version_requirements: &id004 !ruby/object:Gem::Requirement
67
+ requirement: &id004 !ruby/object:Gem::Requirement
69
68
  none: false
70
69
  requirements:
71
70
  - - ">="
@@ -74,12 +73,12 @@ dependencies:
74
73
  segments:
75
74
  - 0
76
75
  version: "0"
76
+ version_requirements: *id004
77
+ name: ruby-debug
77
78
  prerelease: false
78
79
  type: :development
79
- requirement: *id004
80
80
  - !ruby/object:Gem::Dependency
81
- name: watchr
82
- version_requirements: &id005 !ruby/object:Gem::Requirement
81
+ requirement: &id005 !ruby/object:Gem::Requirement
83
82
  none: false
84
83
  requirements:
85
84
  - - ">="
@@ -88,12 +87,12 @@ dependencies:
88
87
  segments:
89
88
  - 0
90
89
  version: "0"
90
+ version_requirements: *id005
91
+ name: watchr
91
92
  prerelease: false
92
93
  type: :development
93
- requirement: *id005
94
94
  - !ruby/object:Gem::Dependency
95
- name: sqlite3
96
- version_requirements: &id006 !ruby/object:Gem::Requirement
95
+ requirement: &id006 !ruby/object:Gem::Requirement
97
96
  none: false
98
97
  requirements:
99
98
  - - ">="
@@ -102,12 +101,12 @@ dependencies:
102
101
  segments:
103
102
  - 0
104
103
  version: "0"
104
+ version_requirements: *id006
105
+ name: sqlite3
105
106
  prerelease: false
106
107
  type: :development
107
- requirement: *id006
108
108
  - !ruby/object:Gem::Dependency
109
- name: factory_girl
110
- version_requirements: &id007 !ruby/object:Gem::Requirement
109
+ requirement: &id007 !ruby/object:Gem::Requirement
111
110
  none: false
112
111
  requirements:
113
112
  - - ">="
@@ -116,12 +115,12 @@ dependencies:
116
115
  segments:
117
116
  - 0
118
117
  version: "0"
118
+ version_requirements: *id007
119
+ name: factory_girl
119
120
  prerelease: false
120
121
  type: :development
121
- requirement: *id007
122
122
  - !ruby/object:Gem::Dependency
123
- name: shoulda
124
- version_requirements: &id008 !ruby/object:Gem::Requirement
123
+ requirement: &id008 !ruby/object:Gem::Requirement
125
124
  none: false
126
125
  requirements:
127
126
  - - ">="
@@ -130,12 +129,12 @@ dependencies:
130
129
  segments:
131
130
  - 0
132
131
  version: "0"
132
+ version_requirements: *id008
133
+ name: shoulda
133
134
  prerelease: false
134
135
  type: :development
135
- requirement: *id008
136
136
  - !ruby/object:Gem::Dependency
137
- name: rspec
138
- version_requirements: &id009 !ruby/object:Gem::Requirement
137
+ requirement: &id009 !ruby/object:Gem::Requirement
139
138
  none: false
140
139
  requirements:
141
140
  - - ~>
@@ -145,12 +144,12 @@ dependencies:
145
144
  - 2
146
145
  - 5
147
146
  version: "2.5"
147
+ version_requirements: *id009
148
+ name: rspec
148
149
  prerelease: false
149
150
  type: :development
150
- requirement: *id009
151
151
  - !ruby/object:Gem::Dependency
152
- name: rspec-rails
153
- version_requirements: &id010 !ruby/object:Gem::Requirement
152
+ requirement: &id010 !ruby/object:Gem::Requirement
154
153
  none: false
155
154
  requirements:
156
155
  - - ">="
@@ -159,12 +158,12 @@ dependencies:
159
158
  segments:
160
159
  - 0
161
160
  version: "0"
161
+ version_requirements: *id010
162
+ name: rspec-rails
162
163
  prerelease: false
163
164
  type: :development
164
- requirement: *id010
165
165
  - !ruby/object:Gem::Dependency
166
- name: bundler
167
- version_requirements: &id011 !ruby/object:Gem::Requirement
166
+ requirement: &id011 !ruby/object:Gem::Requirement
168
167
  none: false
169
168
  requirements:
170
169
  - - ~>
@@ -175,12 +174,12 @@ dependencies:
175
174
  - 0
176
175
  - 0
177
176
  version: 1.0.0
177
+ version_requirements: *id011
178
+ name: bundler
178
179
  prerelease: false
179
180
  type: :development
180
- requirement: *id011
181
181
  - !ruby/object:Gem::Dependency
182
- name: jeweler
183
- version_requirements: &id012 !ruby/object:Gem::Requirement
182
+ requirement: &id012 !ruby/object:Gem::Requirement
184
183
  none: false
185
184
  requirements:
186
185
  - - ~>
@@ -191,12 +190,12 @@ dependencies:
191
190
  - 5
192
191
  - 2
193
192
  version: 1.5.2
193
+ version_requirements: *id012
194
+ name: jeweler
194
195
  prerelease: false
195
196
  type: :development
196
- requirement: *id012
197
197
  - !ruby/object:Gem::Dependency
198
- name: rcov
199
- version_requirements: &id013 !ruby/object:Gem::Requirement
198
+ requirement: &id013 !ruby/object:Gem::Requirement
200
199
  none: false
201
200
  requirements:
202
201
  - - ">="
@@ -205,9 +204,10 @@ dependencies:
205
204
  segments:
206
205
  - 0
207
206
  version: "0"
207
+ version_requirements: *id013
208
+ name: rcov
208
209
  prerelease: false
209
210
  type: :development
210
- requirement: *id013
211
211
  description: !binary |
212
212
  0KHQuNGB0YLQtdC80LAg0YPQv9GA0LDQstC70LXQvdC40Y8g0L/QvtC70YzQ
213
213
  t9C+0LLQsNGC0LXQu9GM0YHQutC40LzQuCDQvtC/0L7QstC10YnQtdC90LjR
@@ -298,7 +298,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
298
298
  requirements: []
299
299
 
300
300
  rubyforge_project:
301
- rubygems_version: 1.5.0
301
+ rubygems_version: 1.6.1
302
302
  signing_key:
303
303
  specification_version: 3
304
304
  summary: !binary |