no_notifier_needed 2.2.4 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,74 +1,76 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- actionmailer (3.2.11)
5
- actionpack (= 3.2.11)
6
- mail (~> 2.4.4)
7
- actionpack (3.2.11)
8
- activemodel (= 3.2.11)
9
- activesupport (= 3.2.11)
4
+ actionmailer (3.2.13)
5
+ actionpack (= 3.2.13)
6
+ mail (~> 2.5.3)
7
+ actionpack (3.2.13)
8
+ activemodel (= 3.2.13)
9
+ activesupport (= 3.2.13)
10
10
  builder (~> 3.0.0)
11
11
  erubis (~> 2.7.0)
12
12
  journey (~> 1.0.4)
13
- rack (~> 1.4.0)
13
+ rack (~> 1.4.5)
14
14
  rack-cache (~> 1.2)
15
15
  rack-test (~> 0.6.1)
16
16
  sprockets (~> 2.2.1)
17
- activemodel (3.2.11)
18
- activesupport (= 3.2.11)
17
+ activemodel (3.2.13)
18
+ activesupport (= 3.2.13)
19
19
  builder (~> 3.0.0)
20
- activerecord (3.2.11)
21
- activemodel (= 3.2.11)
22
- activesupport (= 3.2.11)
20
+ activerecord (3.2.13)
21
+ activemodel (= 3.2.13)
22
+ activesupport (= 3.2.13)
23
23
  arel (~> 3.0.2)
24
24
  tzinfo (~> 0.3.29)
25
- activeresource (3.2.11)
26
- activemodel (= 3.2.11)
27
- activesupport (= 3.2.11)
28
- activesupport (3.2.11)
29
- i18n (~> 0.6)
25
+ activeresource (3.2.13)
26
+ activemodel (= 3.2.13)
27
+ activesupport (= 3.2.13)
28
+ activesupport (3.2.13)
29
+ i18n (= 0.6.1)
30
30
  multi_json (~> 1.0)
31
31
  arel (3.0.2)
32
32
  arrayfields (4.7.4)
33
+ awesome_print (1.1.0)
33
34
  bluff (0.1.0)
34
- bourne (1.1.2)
35
- mocha (= 0.10.5)
35
+ bourne (1.4.0)
36
+ mocha (~> 0.13.2)
36
37
  builder (3.0.4)
37
- chronic (0.9.0)
38
- churn (0.0.25)
38
+ cane (2.5.2)
39
+ parallel
40
+ chronic (0.9.1)
41
+ churn (0.0.28)
39
42
  chronic (>= 0.2.3)
40
43
  hirb
41
44
  json_pure
42
45
  main
43
- ruby_parser (~> 2.3)
44
- sexp_processor (~> 3.0)
45
- coderay (1.0.8)
46
+ ruby_parser (~> 3.0)
47
+ sexp_processor (~> 4.1)
48
+ code_analyzer (0.3.1)
49
+ sexp_processor
50
+ coderay (1.0.9)
46
51
  colored (1.2)
47
52
  columnize (0.3.6)
48
- debugger (1.2.4)
53
+ debugger (1.5.0)
49
54
  columnize (>= 0.3.1)
50
- debugger-linecache (~> 1.1.1)
51
- debugger-ruby_core_source (~> 1.1.7)
52
- debugger-linecache (1.1.2)
53
- debugger-ruby_core_source (>= 1.1.1)
54
- debugger-ruby_core_source (1.1.7)
55
+ debugger-linecache (~> 1.2.0)
56
+ debugger-ruby_core_source (~> 1.2.0)
57
+ debugger-linecache (1.2.0)
58
+ debugger-ruby_core_source (1.2.0)
55
59
  erubis (2.7.0)
56
60
  facets (2.9.3)
57
61
  fattr (2.2.1)
58
- flay (1.2.1)
59
- hoe (>= 1.11.0)
60
- ruby_parser (>= 1.1.0)
61
- sexp_processor (>= 3.0.0)
62
- flog (2.3.0)
63
- ruby_parser (~> 2.0)
64
- sexp_processor (~> 3.0)
62
+ flay (2.0.1)
63
+ ruby_parser (~> 3.0)
64
+ sexp_processor (~> 4.0)
65
+ flog (3.2.2)
66
+ ruby_parser (~> 3.1, > 3.1.0)
67
+ sexp_processor (~> 4.0)
65
68
  git (1.2.5)
66
69
  googlecharts (1.6.8)
67
- haml (3.1.7)
70
+ haml (4.0.2)
71
+ tilt
68
72
  hike (1.2.1)
69
73
  hirb (0.7.1)
70
- hoe (3.5.0)
71
- rake (>= 0.8, < 11.0)
72
74
  i18n (0.6.1)
73
75
  japgolly-Saikuro (1.1.1.0)
74
76
  jeweler (1.8.4)
@@ -77,99 +79,99 @@ GEM
77
79
  rake
78
80
  rdoc
79
81
  journey (1.0.4)
80
- json (1.7.6)
81
- json_pure (1.7.6)
82
- mail (2.4.4)
82
+ json (1.7.7)
83
+ json_pure (1.7.7)
84
+ mail (2.5.3)
83
85
  i18n (>= 0.4.0)
84
86
  mime-types (~> 1.16)
85
87
  treetop (~> 1.4.8)
86
- main (5.1.1)
88
+ main (5.2.0)
87
89
  arrayfields (>= 4.7.4)
88
90
  chronic (>= 0.6.2)
89
91
  fattr (>= 2.2.0)
90
92
  map (>= 5.1.0)
91
93
  map (6.2.0)
92
94
  metaclass (0.0.1)
93
- metric_fu (2.1.3.7.19)
95
+ metric_fu (4.1.0)
94
96
  activesupport (>= 2.0.0)
95
97
  arrayfields (= 4.7.4)
96
98
  bluff
97
- churn (= 0.0.25)
99
+ cane (= 2.5.2)
100
+ churn (= 0.0.28)
98
101
  coderay
99
102
  fattr (= 2.2.1)
100
- flay (= 1.2.1)
101
- flog (= 2.3.0)
103
+ flay (= 2.0.1)
104
+ flog (= 3.2.2)
102
105
  googlecharts
103
106
  japgolly-Saikuro (>= 1.1.1.0)
104
107
  map (= 6.2.0)
105
- metric_fu-roodi (>= 2.2.0)
106
- rails_best_practices (~> 0.10.1)
107
- rcov (~> 0.8)
108
- reek (= 1.2.12)
109
- sexp_processor (~> 3.0.3)
110
- metric_fu-roodi (2.2.0)
108
+ metric_fu-roodi (>= 2.2.1)
109
+ parallel (= 0.6.2)
110
+ rails_best_practices (= 1.13.2)
111
+ reek (= 1.3.1)
112
+ ruby2ruby (= 2.0.2)
113
+ ruby_parser (~> 3.0, >= 3.1.1)
114
+ sexp_processor (~> 4.0)
115
+ metric_fu-roodi (2.2.1)
111
116
  ruby_parser
112
- mime-types (1.19)
113
- mocha (0.10.5)
117
+ mime-types (1.22)
118
+ mocha (0.13.3)
114
119
  metaclass (~> 0.0.1)
115
- multi_json (1.5.0)
120
+ multi_json (1.7.2)
121
+ parallel (0.6.2)
116
122
  polyglot (0.3.3)
117
- rack (1.4.4)
123
+ progressbar (0.20.0)
124
+ rack (1.4.5)
118
125
  rack-cache (1.2)
119
126
  rack (>= 0.4)
120
- rack-ssl (1.3.2)
127
+ rack-ssl (1.3.3)
121
128
  rack
122
129
  rack-test (0.6.2)
123
130
  rack (>= 1.0)
124
- rails (3.2.11)
125
- actionmailer (= 3.2.11)
126
- actionpack (= 3.2.11)
127
- activerecord (= 3.2.11)
128
- activeresource (= 3.2.11)
129
- activesupport (= 3.2.11)
131
+ rails (3.2.13)
132
+ actionmailer (= 3.2.13)
133
+ actionpack (= 3.2.13)
134
+ activerecord (= 3.2.13)
135
+ activeresource (= 3.2.13)
136
+ activesupport (= 3.2.13)
130
137
  bundler (~> 1.0)
131
- railties (= 3.2.11)
138
+ railties (= 3.2.13)
132
139
  rails-pry (0.0.1)
133
- rails_best_practices (0.10.1)
140
+ rails_best_practices (1.13.2)
134
141
  activesupport
142
+ awesome_print
143
+ code_analyzer
135
144
  colored
136
145
  erubis
137
- haml
138
146
  i18n
139
- ruby-progressbar
140
- ruby_parser
141
- railties (3.2.11)
142
- actionpack (= 3.2.11)
143
- activesupport (= 3.2.11)
147
+ progressbar
148
+ railties (3.2.13)
149
+ actionpack (= 3.2.13)
150
+ activesupport (= 3.2.13)
144
151
  rack-ssl (~> 1.3.2)
145
152
  rake (>= 0.8.7)
146
153
  rdoc (~> 3.4)
147
154
  thor (>= 0.14.6, < 2.0)
148
- rake (10.0.3)
149
- rcov (0.9.11)
150
- rdoc (3.12)
155
+ rake (10.0.4)
156
+ rdoc (3.12.2)
151
157
  json (~> 1.4)
152
- reek (1.2.12)
153
- ripper_ruby_parser (~> 0.0.7)
154
- ruby2ruby (~> 1.2.5)
155
- ruby_parser (~> 2.0)
156
- sexp_processor (~> 3.0)
157
- ripper_ruby_parser (0.0.8)
158
- sexp_processor (~> 3.0)
159
- ruby-progressbar (1.0.2)
160
- ruby2ruby (1.2.5)
161
- ruby_parser (~> 2.0)
162
- sexp_processor (~> 3.0)
163
- ruby_parser (2.3.1)
164
- sexp_processor (~> 3.0)
165
- sexp_processor (3.0.10)
166
- shoulda (3.3.2)
167
- shoulda-context (~> 1.0.1)
168
- shoulda-matchers (~> 1.4.1)
169
- shoulda-context (1.0.2)
170
- shoulda-matchers (1.4.2)
158
+ reek (1.3.1)
159
+ ruby2ruby (~> 2.0.2)
160
+ ruby_parser (~> 3.1.1)
161
+ sexp_processor
162
+ ruby2ruby (2.0.2)
163
+ ruby_parser (~> 3.1)
164
+ sexp_processor (~> 4.0)
165
+ ruby_parser (3.1.2)
166
+ sexp_processor (~> 4.1)
167
+ sexp_processor (4.2.0)
168
+ shoulda (3.4.0)
169
+ shoulda-context (~> 1.0, >= 1.0.1)
170
+ shoulda-matchers (~> 1.0, >= 1.4.1)
171
+ shoulda-context (1.1.0)
172
+ shoulda-matchers (1.5.6)
171
173
  activesupport (>= 3.0.0)
172
- bourne (~> 1.1.2)
174
+ bourne (~> 1.3)
173
175
  simplecov (0.7.1)
174
176
  multi_json (~> 1.0)
175
177
  simplecov-html (~> 0.7.1)
@@ -180,12 +182,12 @@ GEM
180
182
  rack (~> 1.0)
181
183
  tilt (~> 1.1, != 1.3.0)
182
184
  sqlite3 (1.3.7)
183
- thor (0.17.0)
184
- tilt (1.3.3)
185
+ thor (0.18.1)
186
+ tilt (1.3.6)
185
187
  treetop (1.4.12)
186
188
  polyglot
187
189
  polyglot (>= 0.3.1)
188
- tzinfo (0.3.35)
190
+ tzinfo (0.3.37)
189
191
 
190
192
  PLATFORMS
191
193
  ruby
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.4
1
+ 2.3.0
@@ -11,7 +11,9 @@ module NoNotifierNeeded
11
11
  :action,
12
12
  :mandrill_user_name,
13
13
  :mandrill_password,
14
- :mandrill_port
14
+ :mandrill_port,
15
+ :current_user_model,
16
+ :current_user_id_method,
15
17
  ].freeze
16
18
 
17
19
  # @private
@@ -13,6 +13,7 @@ module NoNotifierNeeded
13
13
  def send_at(what_time, which_email, *args)
14
14
  email_hash = translate_to_hash(which_email, args)
15
15
  time_from_now = what_time.is_a?(Time) ? what_time : Chronic.parse(what_time)
16
+ raise ActionDispatch::Request.new(ENV).session.inspect
16
17
  Resque.enqueue_at(time_from_now, EmailProcessor, email_hash)
17
18
  end
18
19
 
@@ -29,6 +30,10 @@ module NoNotifierNeeded
29
30
  th = {}
30
31
  th[:which_email] = which_email
31
32
 
33
+ if NoNotifierNeeded.send(:current_user_model)
34
+ th[:current_user] = instance_eval(NoNotifierNeeded.send(:current_user_id_method))
35
+ end
36
+
32
37
  args = args.flatten if args.respond_to?(:flatten)
33
38
  args.each do |a|
34
39
  next if a.blank?
@@ -6,8 +6,6 @@ module NoNotifierNeeded
6
6
  send_hash[k] = NoNotifierNeeded.send(k)
7
7
  end
8
8
 
9
-
10
-
11
9
  send_hash[:subject] = render_template_subject_type(@template)
12
10
 
13
11
  send_hash[:to] = @to if @to
@@ -29,6 +27,7 @@ module NoNotifierNeeded
29
27
  def args_to_instance_vars(args)
30
28
  #take each key, if a model, make it an @#{model} = model.find(value)
31
29
  #else make it a @#{name}=#{value}
30
+
32
31
  args.each do |k,v|
33
32
  if Object.const_defined?(k.classify) && known_models.include?(k.classify.constantize)
34
33
  self.instance_eval("@#{k}= #{k.classify}.find(#{v})")
@@ -40,6 +39,11 @@ module NoNotifierNeeded
40
39
  end
41
40
  end
42
41
  end
42
+
43
+ if args.has_key?("current_user")
44
+ k = NoNotifierNeeded.send(:current_user_model)
45
+ self.instance_eval("@current_user = #{k.classify}.find(#{args['current_user']})")
46
+ end
43
47
  end
44
48
 
45
49
  def known_models
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "no_notifier_needed"
8
- s.version = "2.2.4"
8
+ s.version = "2.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Robert R. Meyer"]
12
- s.date = "2013-03-27"
12
+ s.date = "2013-04-08"
13
13
  s.description = "A work in progress: Replace ActionMailer::Base class redundency. Temlating using haml or erb."
14
14
  s.email = "Blue.Dog.Archolite@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -84,7 +84,7 @@ Gem::Specification.new do |s|
84
84
  s.homepage = "http://github.com/Blue-Dog-Archolite/no_notifier_needed"
85
85
  s.licenses = ["MIT"]
86
86
  s.require_paths = ["lib"]
87
- s.rubygems_version = "1.8.24"
87
+ s.rubygems_version = "1.8.25"
88
88
  s.summary = "A Gem used to remove ActionMailer::Base class and and provide Templates"
89
89
 
90
90
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: no_notifier_needed
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-27 00:00:00.000000000 Z
12
+ date: 2013-04-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: haml
@@ -256,9 +256,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
256
256
  - - ! '>='
257
257
  - !ruby/object:Gem::Version
258
258
  version: '0'
259
- segments:
260
- - 0
261
- hash: -1858574740547094975
262
259
  required_rubygems_version: !ruby/object:Gem::Requirement
263
260
  none: false
264
261
  requirements:
@@ -267,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
267
264
  version: '0'
268
265
  requirements: []
269
266
  rubyforge_project:
270
- rubygems_version: 1.8.24
267
+ rubygems_version: 1.8.25
271
268
  signing_key:
272
269
  specification_version: 3
273
270
  summary: A Gem used to remove ActionMailer::Base class and and provide Templates