acts_as_notifier 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +22 -0
  3. data/README.md +186 -0
  4. data/Rakefile +36 -0
  5. data/lib/acts_as_notifier.rb +185 -0
  6. data/lib/acts_as_notifier/config.rb +5 -0
  7. data/lib/acts_as_notifier/version.rb +3 -0
  8. data/test/acts_as_notifier/acts_as_notifier_test.rb +44 -0
  9. data/test/acts_as_notifier/conditions_test.rb +42 -0
  10. data/test/acts_as_notifier/config_test.rb +37 -0
  11. data/test/acts_as_notifier/mailer_test.rb +46 -0
  12. data/test/acts_as_notifier/recipients_test.rb +51 -0
  13. data/test/dummy/README.rdoc +261 -0
  14. data/test/dummy/Rakefile +7 -0
  15. data/test/dummy/app/assets/javascripts/application.js +15 -0
  16. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  17. data/test/dummy/app/controllers/application_controller.rb +3 -0
  18. data/test/dummy/app/helpers/application_helper.rb +2 -0
  19. data/test/dummy/app/mailers/my_mailer.rb +27 -0
  20. data/test/dummy/app/models/widget.rb +65 -0
  21. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  22. data/test/dummy/config.ru +4 -0
  23. data/test/dummy/config/application.rb +59 -0
  24. data/test/dummy/config/boot.rb +10 -0
  25. data/test/dummy/config/database.yml +25 -0
  26. data/test/dummy/config/environment.rb +5 -0
  27. data/test/dummy/config/environments/development.rb +37 -0
  28. data/test/dummy/config/environments/production.rb +67 -0
  29. data/test/dummy/config/environments/test.rb +37 -0
  30. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  31. data/test/dummy/config/initializers/inflections.rb +15 -0
  32. data/test/dummy/config/initializers/mime_types.rb +5 -0
  33. data/test/dummy/config/initializers/secret_token.rb +7 -0
  34. data/test/dummy/config/initializers/session_store.rb +8 -0
  35. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  36. data/test/dummy/config/locales/en.yml +5 -0
  37. data/test/dummy/config/routes.rb +58 -0
  38. data/test/dummy/db/migrate/20131229201627_create_widgets.rb +9 -0
  39. data/test/dummy/db/schema.rb +22 -0
  40. data/test/dummy/db/test.sqlite3 +0 -0
  41. data/test/dummy/log/development.log +21 -0
  42. data/test/dummy/log/test.log +41137 -0
  43. data/test/dummy/public/404.html +26 -0
  44. data/test/dummy/public/422.html +26 -0
  45. data/test/dummy/public/500.html +25 -0
  46. data/test/dummy/public/favicon.ico +0 -0
  47. data/test/dummy/script/rails +6 -0
  48. data/test/test_helper.rb +17 -0
  49. metadata +232 -0
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,17 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
+ end
16
+
17
+ require 'mocha/setup'
metadata ADDED
@@ -0,0 +1,232 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: acts_as_notifier
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - mtjhax
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-01-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 3.2.16
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 3.2.16
55
+ - !ruby/object:Gem::Dependency
56
+ name: sqlite3
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: mocha
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: activesupport
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: 3.2.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: 3.2.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: activerecord
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: 3.2.0
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: 3.2.0
111
+ description: |2
112
+ acts_as_notifier is an add-on for ActiveRecord models used to notify users of new and updated records
113
+ via ActionMailer emails. The notifications can be make conditional and recipient lists can be specified
114
+ at runtime using a proc or method name. acts_as_notifier can be configured to send emails via DelayedJob.
115
+ email:
116
+ executables: []
117
+ extensions: []
118
+ extra_rdoc_files: []
119
+ files:
120
+ - lib/acts_as_notifier/config.rb
121
+ - lib/acts_as_notifier/version.rb
122
+ - lib/acts_as_notifier.rb
123
+ - LICENSE.txt
124
+ - Rakefile
125
+ - README.md
126
+ - test/acts_as_notifier/acts_as_notifier_test.rb
127
+ - test/acts_as_notifier/conditions_test.rb
128
+ - test/acts_as_notifier/config_test.rb
129
+ - test/acts_as_notifier/mailer_test.rb
130
+ - test/acts_as_notifier/recipients_test.rb
131
+ - test/dummy/app/assets/javascripts/application.js
132
+ - test/dummy/app/assets/stylesheets/application.css
133
+ - test/dummy/app/controllers/application_controller.rb
134
+ - test/dummy/app/helpers/application_helper.rb
135
+ - test/dummy/app/mailers/my_mailer.rb
136
+ - test/dummy/app/models/widget.rb
137
+ - test/dummy/app/views/layouts/application.html.erb
138
+ - test/dummy/config/application.rb
139
+ - test/dummy/config/boot.rb
140
+ - test/dummy/config/database.yml
141
+ - test/dummy/config/environment.rb
142
+ - test/dummy/config/environments/development.rb
143
+ - test/dummy/config/environments/production.rb
144
+ - test/dummy/config/environments/test.rb
145
+ - test/dummy/config/initializers/backtrace_silencers.rb
146
+ - test/dummy/config/initializers/inflections.rb
147
+ - test/dummy/config/initializers/mime_types.rb
148
+ - test/dummy/config/initializers/secret_token.rb
149
+ - test/dummy/config/initializers/session_store.rb
150
+ - test/dummy/config/initializers/wrap_parameters.rb
151
+ - test/dummy/config/locales/en.yml
152
+ - test/dummy/config/routes.rb
153
+ - test/dummy/config.ru
154
+ - test/dummy/db/migrate/20131229201627_create_widgets.rb
155
+ - test/dummy/db/schema.rb
156
+ - test/dummy/db/test.sqlite3
157
+ - test/dummy/log/development.log
158
+ - test/dummy/log/test.log
159
+ - test/dummy/public/404.html
160
+ - test/dummy/public/422.html
161
+ - test/dummy/public/500.html
162
+ - test/dummy/public/favicon.ico
163
+ - test/dummy/Rakefile
164
+ - test/dummy/README.rdoc
165
+ - test/dummy/script/rails
166
+ - test/test_helper.rb
167
+ homepage:
168
+ licenses:
169
+ - MIT
170
+ metadata: {}
171
+ post_install_message:
172
+ rdoc_options: []
173
+ require_paths:
174
+ - lib
175
+ required_ruby_version: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - '>='
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
180
+ required_rubygems_version: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - '>='
183
+ - !ruby/object:Gem::Version
184
+ version: '0'
185
+ requirements: []
186
+ rubyforge_project:
187
+ rubygems_version: 2.0.6
188
+ signing_key:
189
+ specification_version: 4
190
+ summary: Easily define ActiveRecord callbacks that notify users of changes via email.
191
+ test_files:
192
+ - test/acts_as_notifier/acts_as_notifier_test.rb
193
+ - test/acts_as_notifier/conditions_test.rb
194
+ - test/acts_as_notifier/config_test.rb
195
+ - test/acts_as_notifier/mailer_test.rb
196
+ - test/acts_as_notifier/recipients_test.rb
197
+ - test/dummy/app/assets/javascripts/application.js
198
+ - test/dummy/app/assets/stylesheets/application.css
199
+ - test/dummy/app/controllers/application_controller.rb
200
+ - test/dummy/app/helpers/application_helper.rb
201
+ - test/dummy/app/mailers/my_mailer.rb
202
+ - test/dummy/app/models/widget.rb
203
+ - test/dummy/app/views/layouts/application.html.erb
204
+ - test/dummy/config/application.rb
205
+ - test/dummy/config/boot.rb
206
+ - test/dummy/config/database.yml
207
+ - test/dummy/config/environment.rb
208
+ - test/dummy/config/environments/development.rb
209
+ - test/dummy/config/environments/production.rb
210
+ - test/dummy/config/environments/test.rb
211
+ - test/dummy/config/initializers/backtrace_silencers.rb
212
+ - test/dummy/config/initializers/inflections.rb
213
+ - test/dummy/config/initializers/mime_types.rb
214
+ - test/dummy/config/initializers/secret_token.rb
215
+ - test/dummy/config/initializers/session_store.rb
216
+ - test/dummy/config/initializers/wrap_parameters.rb
217
+ - test/dummy/config/locales/en.yml
218
+ - test/dummy/config/routes.rb
219
+ - test/dummy/config.ru
220
+ - test/dummy/db/migrate/20131229201627_create_widgets.rb
221
+ - test/dummy/db/schema.rb
222
+ - test/dummy/db/test.sqlite3
223
+ - test/dummy/log/development.log
224
+ - test/dummy/log/test.log
225
+ - test/dummy/public/404.html
226
+ - test/dummy/public/422.html
227
+ - test/dummy/public/500.html
228
+ - test/dummy/public/favicon.ico
229
+ - test/dummy/Rakefile
230
+ - test/dummy/README.rdoc
231
+ - test/dummy/script/rails
232
+ - test/test_helper.rb