notify_user 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +12 -0
- data/app/assets/javascripts/notify_user/application.js +15 -0
- data/app/assets/stylesheets/notify_user/application.css +13 -0
- data/app/controllers/notify_user/notifications_controller.rb +33 -0
- data/app/helpers/notify_user/application_helper.rb +4 -0
- data/app/mailers/notify_user/notification_mailer.rb +28 -0
- data/app/models/notify_user/base_notification.rb +187 -0
- data/app/serializers/notify_user/notification_serializer.rb +15 -0
- data/app/views/layouts/notify_user/application.html.erb +14 -0
- data/app/views/notify_user/action_mailer/aggregate_notification.html.erb +5 -0
- data/app/views/notify_user/action_mailer/notification.html.erb +1 -0
- data/config/routes.rb +6 -0
- data/lib/generators/notify_user/install/USAGE +8 -0
- data/lib/generators/notify_user/install/install_generator.rb +28 -0
- data/lib/generators/notify_user/install/templates/initializer.rb +12 -0
- data/lib/generators/notify_user/install/templates/migration.rb +13 -0
- data/lib/generators/notify_user/notification/USAGE +8 -0
- data/lib/generators/notify_user/notification/notification_generator.rb +16 -0
- data/lib/generators/notify_user/notification/templates/email_layout_template.html.erb.erb +33 -0
- data/lib/generators/notify_user/notification/templates/email_template.html.erb.erb +1 -0
- data/lib/generators/notify_user/notification/templates/mobile_sdk_template.html.erb.erb +1 -0
- data/lib/generators/notify_user/notification/templates/notification.rb.erb +10 -0
- data/lib/notify_user/channels/action_mailer/action_mailer_channel.rb +24 -0
- data/lib/notify_user/engine.rb +11 -0
- data/lib/notify_user/version.rb +3 -0
- data/lib/notify_user.rb +26 -0
- data/spec/controllers/notify_user/notifications_controller_spec.rb +54 -0
- data/spec/dummy/rails-4.0.2/Gemfile +45 -0
- data/spec/dummy/rails-4.0.2/README.rdoc +28 -0
- data/spec/dummy/rails-4.0.2/Rakefile +6 -0
- data/spec/dummy/rails-4.0.2/app/assets/javascripts/application.js +16 -0
- data/spec/dummy/rails-4.0.2/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/rails-4.0.2/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/rails-4.0.2/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/rails-4.0.2/app/models/user.rb +2 -0
- data/spec/dummy/rails-4.0.2/app/notifications/new_post_notification.rb +10 -0
- data/spec/dummy/rails-4.0.2/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/rails-4.0.2/app/views/notify_user/layouts/action_mailer.html.erb +33 -0
- data/spec/dummy/rails-4.0.2/app/views/notify_user/new_post_notification/action_mailer/notification.html.erb +1 -0
- data/spec/dummy/rails-4.0.2/app/views/notify_user/new_post_notification/mobile_sdk/notification.html.erb +1 -0
- data/spec/dummy/rails-4.0.2/bin/bundle +3 -0
- data/spec/dummy/rails-4.0.2/bin/rails +4 -0
- data/spec/dummy/rails-4.0.2/bin/rake +4 -0
- data/spec/dummy/rails-4.0.2/config/application.rb +23 -0
- data/spec/dummy/rails-4.0.2/config/boot.rb +4 -0
- data/spec/dummy/rails-4.0.2/config/database.yml +25 -0
- data/spec/dummy/rails-4.0.2/config/environment.rb +5 -0
- data/spec/dummy/rails-4.0.2/config/environments/development.rb +29 -0
- data/spec/dummy/rails-4.0.2/config/environments/production.rb +80 -0
- data/spec/dummy/rails-4.0.2/config/environments/test.rb +36 -0
- data/spec/dummy/rails-4.0.2/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/rails-4.0.2/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/rails-4.0.2/config/initializers/inflections.rb +16 -0
- data/spec/dummy/rails-4.0.2/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/rails-4.0.2/config/initializers/notify_user.rb +12 -0
- data/spec/dummy/rails-4.0.2/config/initializers/secret_token.rb +12 -0
- data/spec/dummy/rails-4.0.2/config/initializers/session_store.rb +3 -0
- data/spec/dummy/rails-4.0.2/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/rails-4.0.2/config/locales/en.yml +23 -0
- data/spec/dummy/rails-4.0.2/config/routes.rb +56 -0
- data/spec/dummy/rails-4.0.2/config.ru +4 -0
- data/spec/dummy/rails-4.0.2/db/migrate/20140105070446_create_users.rb +9 -0
- data/spec/dummy/rails-4.0.2/db/migrate/20140105070448_create_notify_user_notifications.rb +13 -0
- data/spec/dummy/rails-4.0.2/db/schema.rb +32 -0
- data/spec/dummy/rails-4.0.2/db/seeds.rb +7 -0
- data/spec/dummy/rails-4.0.2/db/test.sqlite3 +0 -0
- data/spec/dummy/rails-4.0.2/log/test.log +1701 -0
- data/spec/dummy/rails-4.0.2/public/404.html +58 -0
- data/spec/dummy/rails-4.0.2/public/422.html +58 -0
- data/spec/dummy/rails-4.0.2/public/500.html +57 -0
- data/spec/dummy/rails-4.0.2/public/favicon.ico +0 -0
- data/spec/dummy/rails-4.0.2/public/robots.txt +5 -0
- data/spec/dummy/rails-4.0.2/test/fixtures/users.yml +7 -0
- data/spec/dummy/rails-4.0.2/test/models/user_test.rb +7 -0
- data/spec/dummy/rails-4.0.2/test/test_helper.rb +15 -0
- data/spec/factories/notify_user_notifications.rb +10 -0
- data/spec/fixtures/notify_user/notification_mailer/notification_email +3 -0
- data/spec/mailers/notify_user/notification_mailer_spec.rb +31 -0
- data/spec/models/notify_user/notification_spec.rb +71 -0
- data/spec/serializers/notify_user/notification_serializer_spec.rb +10 -0
- data/spec/setup_spec.rb +17 -0
- data/spec/spec_helper.rb +46 -0
- data/spec/support/rails_template.rb +8 -0
- metadata +289 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/404.html -->
|
52
|
+
<div class="dialog">
|
53
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
54
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
55
|
+
</div>
|
56
|
+
<p>If you are the application owner check the logs for more information.</p>
|
57
|
+
</body>
|
58
|
+
</html>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/422.html -->
|
52
|
+
<div class="dialog">
|
53
|
+
<h1>The change you wanted was rejected.</h1>
|
54
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
55
|
+
</div>
|
56
|
+
<p>If you are the application owner check the logs for more information.</p>
|
57
|
+
</body>
|
58
|
+
</html>
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/500.html -->
|
52
|
+
<div class="dialog">
|
53
|
+
<h1>We're sorry, but something went wrong.</h1>
|
54
|
+
</div>
|
55
|
+
<p>If you are the application owner check the logs for more information.</p>
|
56
|
+
</body>
|
57
|
+
</html>
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
ENV["RAILS_ENV"] ||= "test"
|
2
|
+
require File.expand_path('../../config/environment', __FILE__)
|
3
|
+
require 'rails/test_help'
|
4
|
+
|
5
|
+
class ActiveSupport::TestCase
|
6
|
+
ActiveRecord::Migration.check_pending!
|
7
|
+
|
8
|
+
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
9
|
+
#
|
10
|
+
# Note: You'll currently still have to declare fixtures explicitly in integration tests
|
11
|
+
# -- they do not yet inherit this setting
|
12
|
+
fixtures :all
|
13
|
+
|
14
|
+
# Add more helper methods to be used by all tests here...
|
15
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe NotifyUser::NotificationMailer do
|
4
|
+
describe "notification_email" do
|
5
|
+
|
6
|
+
let(:user) { User.new({email: "user@example.com" })}
|
7
|
+
let(:notification) { NewPostNotification.new({target: user}) }
|
8
|
+
let(:mailer) { NotifyUser::NotificationMailer.send(:new, 'notification_email', notification, ActionMailerChannel.default_options) }
|
9
|
+
let(:mail) { mailer.notification_email(notification, ActionMailerChannel.default_options) }
|
10
|
+
|
11
|
+
before :each do
|
12
|
+
NotifyUser::BaseNotification.stub(:find).and_return(notification)
|
13
|
+
end
|
14
|
+
|
15
|
+
it "renders the headers" do
|
16
|
+
mail.subject.should eq(ActionMailerChannel.default_options[:subject])
|
17
|
+
mail.to.should eq([user.email])
|
18
|
+
mail.from.should eq([NotifyUser.mailer_sender])
|
19
|
+
end
|
20
|
+
|
21
|
+
it "renders a template to render the notification's template as a partial" do
|
22
|
+
mailer_should_render_template(mailer, "notify_user/action_mailer/notification")
|
23
|
+
mail
|
24
|
+
end
|
25
|
+
|
26
|
+
it "renders with a layout" do
|
27
|
+
mail.body.raw_source.should include "This is the default generated layout"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module NotifyUser
|
4
|
+
describe BaseNotification do
|
5
|
+
|
6
|
+
let(:user) { User.create({email: "user@example.com" })}
|
7
|
+
let(:notification) { NewPostNotification.create({target: user}) }
|
8
|
+
|
9
|
+
describe "#notify" do
|
10
|
+
|
11
|
+
it "raises an exception if the notification is not valid" do
|
12
|
+
notification.target = nil
|
13
|
+
expect { notification.notify }.to raise_error
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "with aggregation enabled" do
|
17
|
+
|
18
|
+
it "schedules a job to wait for more notifications to aggregate if there is not one already" do
|
19
|
+
BaseNotification.should_receive(:delay_for)
|
20
|
+
.with(notification.class.aggregate_per)
|
21
|
+
.and_call_original
|
22
|
+
ActionMailerChannel.should_receive(:deliver)
|
23
|
+
notification.notify
|
24
|
+
end
|
25
|
+
|
26
|
+
it "does not schedule an aggregation job if there is one already" do
|
27
|
+
Sidekiq::Testing.fake!
|
28
|
+
|
29
|
+
notification.notify
|
30
|
+
|
31
|
+
another_notification = NewPostNotification.new({target: user})
|
32
|
+
|
33
|
+
BaseNotification.should_not_receive(:delay_for)
|
34
|
+
another_notification.notify
|
35
|
+
end
|
36
|
+
|
37
|
+
describe ".notify_aggregated" do
|
38
|
+
|
39
|
+
it "sends an aggregated email if more than one notification queued up" do
|
40
|
+
Sidekiq::Testing.inline!
|
41
|
+
|
42
|
+
NewPostNotification.create({target: user})
|
43
|
+
|
44
|
+
NotificationMailer.should_receive(:aggregate_notifications_email).with(BaseNotification.pending_aggregation_with(notification), anything).and_call_original
|
45
|
+
BaseNotification.notify_aggregated(notification.id)
|
46
|
+
end
|
47
|
+
|
48
|
+
it "sends a singular email if no more notifications were queued since the original was delayed" do
|
49
|
+
Sidekiq::Testing.inline!
|
50
|
+
|
51
|
+
NotificationMailer.should_receive(:notification_email).with(notification, anything).and_call_original
|
52
|
+
BaseNotification.notify_aggregated(notification.id)
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
describe "#notify!" do
|
61
|
+
|
62
|
+
it "sends immediately, ignoring aggregation" do
|
63
|
+
BaseNotification.should_not_receive(:delay_for)
|
64
|
+
ActionMailerChannel.should_receive(:deliver)
|
65
|
+
notification.notify!
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
end
|
data/spec/setup_spec.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "setup initializer" do
|
4
|
+
|
5
|
+
it "sets a default mailer_sender" do
|
6
|
+
NotifyUser.mailer_sender.should eq "please-change-me-at-config-initializers-notify-user@example.com"
|
7
|
+
end
|
8
|
+
|
9
|
+
it "sets an authentication method" do
|
10
|
+
NotifyUser.authentication_method.should eq :authenticate_user!
|
11
|
+
end
|
12
|
+
|
13
|
+
it "sets a current user method" do
|
14
|
+
NotifyUser.current_user_method.should eq :current_user
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH << File.expand_path('../support', __FILE__)
|
3
|
+
|
4
|
+
# Use Rails 4 by default if you just do 'rspec spec'
|
5
|
+
ENV['BUNDLE_GEMFILE'] ||= 'gemfiles/rails40.gemfile'
|
6
|
+
|
7
|
+
ENV['BUNDLE_GEMFILE'] = File.expand_path(ENV['BUNDLE_GEMFILE'])
|
8
|
+
require "bundler"
|
9
|
+
Bundler.setup
|
10
|
+
|
11
|
+
ENV['RAILS_ENV'] = 'test'
|
12
|
+
ENV['RAILS_ROOT'] = File.expand_path("../dummy/rails-#{ENV['RAILS_VERSION']}", __FILE__)
|
13
|
+
|
14
|
+
# Create the test app if it doesn't exists
|
15
|
+
unless File.exists?(ENV['RAILS_ROOT'])
|
16
|
+
system 'rake setup'
|
17
|
+
end
|
18
|
+
|
19
|
+
require 'rails/all'
|
20
|
+
require 'sidekiq'
|
21
|
+
require File.expand_path("#{ENV['RAILS_ROOT']}/config/environment.rb", __FILE__)
|
22
|
+
|
23
|
+
puts "Testing with Rails #{Rails::VERSION::STRING} and Ruby #{RUBY_VERSION}"
|
24
|
+
|
25
|
+
require 'rspec/rails'
|
26
|
+
require 'factory_girl_rails'
|
27
|
+
require 'sidekiq/testing'
|
28
|
+
Sidekiq::Testing.inline!
|
29
|
+
|
30
|
+
RSpec.configure do |config|
|
31
|
+
config.infer_base_class_for_anonymous_controllers = false
|
32
|
+
config.use_transactional_fixtures = true
|
33
|
+
|
34
|
+
def mailer_should_render_template(mailer, template)
|
35
|
+
original_method = mailer.method(:_render_template)
|
36
|
+
mailer.should_receive(:_render_template) do |arg|
|
37
|
+
arg[:template].virtual_path.should eq template
|
38
|
+
original_method.call(arg)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def json
|
43
|
+
JSON.parse(response.body).with_indifferent_access
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
metadata
ADDED
@@ -0,0 +1,289 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: notify_user
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Tom Spacek
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-01-15 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rails
|
16
|
+
requirement: &70361717136460 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.2'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70361717136460
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: state_machine
|
27
|
+
requirement: &70361717135940 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70361717135940
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: sidekiq
|
38
|
+
requirement: &70361717135380 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70361717135380
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: kaminari
|
49
|
+
requirement: &70361717134840 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70361717134840
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: active_model_serializers
|
60
|
+
requirement: &70361717134340 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
type: :runtime
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70361717134340
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: sqlite3
|
71
|
+
requirement: &70361717133820 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *70361717133820
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: rspec-rails
|
82
|
+
requirement: &70361717133300 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *70361717133300
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: rspec-sidekiq
|
93
|
+
requirement: &70361717132760 !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
type: :development
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: *70361717132760
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: factory_girl_rails
|
104
|
+
requirement: &70361717132260 !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: *70361717132260
|
113
|
+
description: Drop-in solution for user notifications. Handles notifying by email,
|
114
|
+
SMS and APNS, plus per-user notification frequency settings and views for checking
|
115
|
+
new notifications.
|
116
|
+
email:
|
117
|
+
- ts@papercloud.com.au
|
118
|
+
executables: []
|
119
|
+
extensions: []
|
120
|
+
extra_rdoc_files: []
|
121
|
+
files:
|
122
|
+
- app/assets/javascripts/notify_user/application.js
|
123
|
+
- app/assets/stylesheets/notify_user/application.css
|
124
|
+
- app/controllers/notify_user/notifications_controller.rb
|
125
|
+
- app/helpers/notify_user/application_helper.rb
|
126
|
+
- app/mailers/notify_user/notification_mailer.rb
|
127
|
+
- app/models/notify_user/base_notification.rb
|
128
|
+
- app/serializers/notify_user/notification_serializer.rb
|
129
|
+
- app/views/layouts/notify_user/application.html.erb
|
130
|
+
- app/views/notify_user/action_mailer/aggregate_notification.html.erb
|
131
|
+
- app/views/notify_user/action_mailer/notification.html.erb
|
132
|
+
- config/routes.rb
|
133
|
+
- lib/generators/notify_user/install/install_generator.rb
|
134
|
+
- lib/generators/notify_user/install/templates/initializer.rb
|
135
|
+
- lib/generators/notify_user/install/templates/migration.rb
|
136
|
+
- lib/generators/notify_user/install/USAGE
|
137
|
+
- lib/generators/notify_user/notification/notification_generator.rb
|
138
|
+
- lib/generators/notify_user/notification/templates/email_layout_template.html.erb.erb
|
139
|
+
- lib/generators/notify_user/notification/templates/email_template.html.erb.erb
|
140
|
+
- lib/generators/notify_user/notification/templates/mobile_sdk_template.html.erb.erb
|
141
|
+
- lib/generators/notify_user/notification/templates/notification.rb.erb
|
142
|
+
- lib/generators/notify_user/notification/USAGE
|
143
|
+
- lib/notify_user/channels/action_mailer/action_mailer_channel.rb
|
144
|
+
- lib/notify_user/engine.rb
|
145
|
+
- lib/notify_user/version.rb
|
146
|
+
- lib/notify_user.rb
|
147
|
+
- MIT-LICENSE
|
148
|
+
- Rakefile
|
149
|
+
- README.rdoc
|
150
|
+
- spec/controllers/notify_user/notifications_controller_spec.rb
|
151
|
+
- spec/dummy/rails-4.0.2/app/assets/javascripts/application.js
|
152
|
+
- spec/dummy/rails-4.0.2/app/assets/stylesheets/application.css
|
153
|
+
- spec/dummy/rails-4.0.2/app/controllers/application_controller.rb
|
154
|
+
- spec/dummy/rails-4.0.2/app/helpers/application_helper.rb
|
155
|
+
- spec/dummy/rails-4.0.2/app/models/user.rb
|
156
|
+
- spec/dummy/rails-4.0.2/app/notifications/new_post_notification.rb
|
157
|
+
- spec/dummy/rails-4.0.2/app/views/layouts/application.html.erb
|
158
|
+
- spec/dummy/rails-4.0.2/app/views/notify_user/layouts/action_mailer.html.erb
|
159
|
+
- spec/dummy/rails-4.0.2/app/views/notify_user/new_post_notification/action_mailer/notification.html.erb
|
160
|
+
- spec/dummy/rails-4.0.2/app/views/notify_user/new_post_notification/mobile_sdk/notification.html.erb
|
161
|
+
- spec/dummy/rails-4.0.2/bin/bundle
|
162
|
+
- spec/dummy/rails-4.0.2/bin/rails
|
163
|
+
- spec/dummy/rails-4.0.2/bin/rake
|
164
|
+
- spec/dummy/rails-4.0.2/config/application.rb
|
165
|
+
- spec/dummy/rails-4.0.2/config/boot.rb
|
166
|
+
- spec/dummy/rails-4.0.2/config/database.yml
|
167
|
+
- spec/dummy/rails-4.0.2/config/environment.rb
|
168
|
+
- spec/dummy/rails-4.0.2/config/environments/development.rb
|
169
|
+
- spec/dummy/rails-4.0.2/config/environments/production.rb
|
170
|
+
- spec/dummy/rails-4.0.2/config/environments/test.rb
|
171
|
+
- spec/dummy/rails-4.0.2/config/initializers/backtrace_silencers.rb
|
172
|
+
- spec/dummy/rails-4.0.2/config/initializers/filter_parameter_logging.rb
|
173
|
+
- spec/dummy/rails-4.0.2/config/initializers/inflections.rb
|
174
|
+
- spec/dummy/rails-4.0.2/config/initializers/mime_types.rb
|
175
|
+
- spec/dummy/rails-4.0.2/config/initializers/notify_user.rb
|
176
|
+
- spec/dummy/rails-4.0.2/config/initializers/secret_token.rb
|
177
|
+
- spec/dummy/rails-4.0.2/config/initializers/session_store.rb
|
178
|
+
- spec/dummy/rails-4.0.2/config/initializers/wrap_parameters.rb
|
179
|
+
- spec/dummy/rails-4.0.2/config/locales/en.yml
|
180
|
+
- spec/dummy/rails-4.0.2/config/routes.rb
|
181
|
+
- spec/dummy/rails-4.0.2/config.ru
|
182
|
+
- spec/dummy/rails-4.0.2/db/migrate/20140105070446_create_users.rb
|
183
|
+
- spec/dummy/rails-4.0.2/db/migrate/20140105070448_create_notify_user_notifications.rb
|
184
|
+
- spec/dummy/rails-4.0.2/db/schema.rb
|
185
|
+
- spec/dummy/rails-4.0.2/db/seeds.rb
|
186
|
+
- spec/dummy/rails-4.0.2/db/test.sqlite3
|
187
|
+
- spec/dummy/rails-4.0.2/Gemfile
|
188
|
+
- spec/dummy/rails-4.0.2/log/test.log
|
189
|
+
- spec/dummy/rails-4.0.2/public/404.html
|
190
|
+
- spec/dummy/rails-4.0.2/public/422.html
|
191
|
+
- spec/dummy/rails-4.0.2/public/500.html
|
192
|
+
- spec/dummy/rails-4.0.2/public/favicon.ico
|
193
|
+
- spec/dummy/rails-4.0.2/public/robots.txt
|
194
|
+
- spec/dummy/rails-4.0.2/Rakefile
|
195
|
+
- spec/dummy/rails-4.0.2/README.rdoc
|
196
|
+
- spec/dummy/rails-4.0.2/test/fixtures/users.yml
|
197
|
+
- spec/dummy/rails-4.0.2/test/models/user_test.rb
|
198
|
+
- spec/dummy/rails-4.0.2/test/test_helper.rb
|
199
|
+
- spec/factories/notify_user_notifications.rb
|
200
|
+
- spec/fixtures/notify_user/notification_mailer/notification_email
|
201
|
+
- spec/mailers/notify_user/notification_mailer_spec.rb
|
202
|
+
- spec/models/notify_user/notification_spec.rb
|
203
|
+
- spec/serializers/notify_user/notification_serializer_spec.rb
|
204
|
+
- spec/setup_spec.rb
|
205
|
+
- spec/spec_helper.rb
|
206
|
+
- spec/support/rails_template.rb
|
207
|
+
homepage: http://www.papercloud.com.au
|
208
|
+
licenses: []
|
209
|
+
post_install_message:
|
210
|
+
rdoc_options: []
|
211
|
+
require_paths:
|
212
|
+
- lib
|
213
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
214
|
+
none: false
|
215
|
+
requirements:
|
216
|
+
- - ! '>='
|
217
|
+
- !ruby/object:Gem::Version
|
218
|
+
version: '0'
|
219
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
|
+
none: false
|
221
|
+
requirements:
|
222
|
+
- - ! '>='
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: '0'
|
225
|
+
requirements: []
|
226
|
+
rubyforge_project:
|
227
|
+
rubygems_version: 1.8.15
|
228
|
+
signing_key:
|
229
|
+
specification_version: 3
|
230
|
+
summary: A Rails engine for user notifications.
|
231
|
+
test_files:
|
232
|
+
- spec/controllers/notify_user/notifications_controller_spec.rb
|
233
|
+
- spec/dummy/rails-4.0.2/app/assets/javascripts/application.js
|
234
|
+
- spec/dummy/rails-4.0.2/app/assets/stylesheets/application.css
|
235
|
+
- spec/dummy/rails-4.0.2/app/controllers/application_controller.rb
|
236
|
+
- spec/dummy/rails-4.0.2/app/helpers/application_helper.rb
|
237
|
+
- spec/dummy/rails-4.0.2/app/models/user.rb
|
238
|
+
- spec/dummy/rails-4.0.2/app/notifications/new_post_notification.rb
|
239
|
+
- spec/dummy/rails-4.0.2/app/views/layouts/application.html.erb
|
240
|
+
- spec/dummy/rails-4.0.2/app/views/notify_user/layouts/action_mailer.html.erb
|
241
|
+
- spec/dummy/rails-4.0.2/app/views/notify_user/new_post_notification/action_mailer/notification.html.erb
|
242
|
+
- spec/dummy/rails-4.0.2/app/views/notify_user/new_post_notification/mobile_sdk/notification.html.erb
|
243
|
+
- spec/dummy/rails-4.0.2/bin/bundle
|
244
|
+
- spec/dummy/rails-4.0.2/bin/rails
|
245
|
+
- spec/dummy/rails-4.0.2/bin/rake
|
246
|
+
- spec/dummy/rails-4.0.2/config/application.rb
|
247
|
+
- spec/dummy/rails-4.0.2/config/boot.rb
|
248
|
+
- spec/dummy/rails-4.0.2/config/database.yml
|
249
|
+
- spec/dummy/rails-4.0.2/config/environment.rb
|
250
|
+
- spec/dummy/rails-4.0.2/config/environments/development.rb
|
251
|
+
- spec/dummy/rails-4.0.2/config/environments/production.rb
|
252
|
+
- spec/dummy/rails-4.0.2/config/environments/test.rb
|
253
|
+
- spec/dummy/rails-4.0.2/config/initializers/backtrace_silencers.rb
|
254
|
+
- spec/dummy/rails-4.0.2/config/initializers/filter_parameter_logging.rb
|
255
|
+
- spec/dummy/rails-4.0.2/config/initializers/inflections.rb
|
256
|
+
- spec/dummy/rails-4.0.2/config/initializers/mime_types.rb
|
257
|
+
- spec/dummy/rails-4.0.2/config/initializers/notify_user.rb
|
258
|
+
- spec/dummy/rails-4.0.2/config/initializers/secret_token.rb
|
259
|
+
- spec/dummy/rails-4.0.2/config/initializers/session_store.rb
|
260
|
+
- spec/dummy/rails-4.0.2/config/initializers/wrap_parameters.rb
|
261
|
+
- spec/dummy/rails-4.0.2/config/locales/en.yml
|
262
|
+
- spec/dummy/rails-4.0.2/config/routes.rb
|
263
|
+
- spec/dummy/rails-4.0.2/config.ru
|
264
|
+
- spec/dummy/rails-4.0.2/db/migrate/20140105070446_create_users.rb
|
265
|
+
- spec/dummy/rails-4.0.2/db/migrate/20140105070448_create_notify_user_notifications.rb
|
266
|
+
- spec/dummy/rails-4.0.2/db/schema.rb
|
267
|
+
- spec/dummy/rails-4.0.2/db/seeds.rb
|
268
|
+
- spec/dummy/rails-4.0.2/db/test.sqlite3
|
269
|
+
- spec/dummy/rails-4.0.2/Gemfile
|
270
|
+
- spec/dummy/rails-4.0.2/log/test.log
|
271
|
+
- spec/dummy/rails-4.0.2/public/404.html
|
272
|
+
- spec/dummy/rails-4.0.2/public/422.html
|
273
|
+
- spec/dummy/rails-4.0.2/public/500.html
|
274
|
+
- spec/dummy/rails-4.0.2/public/favicon.ico
|
275
|
+
- spec/dummy/rails-4.0.2/public/robots.txt
|
276
|
+
- spec/dummy/rails-4.0.2/Rakefile
|
277
|
+
- spec/dummy/rails-4.0.2/README.rdoc
|
278
|
+
- spec/dummy/rails-4.0.2/test/fixtures/users.yml
|
279
|
+
- spec/dummy/rails-4.0.2/test/models/user_test.rb
|
280
|
+
- spec/dummy/rails-4.0.2/test/test_helper.rb
|
281
|
+
- spec/factories/notify_user_notifications.rb
|
282
|
+
- spec/fixtures/notify_user/notification_mailer/notification_email
|
283
|
+
- spec/mailers/notify_user/notification_mailer_spec.rb
|
284
|
+
- spec/models/notify_user/notification_spec.rb
|
285
|
+
- spec/serializers/notify_user/notification_serializer_spec.rb
|
286
|
+
- spec/setup_spec.rb
|
287
|
+
- spec/spec_helper.rb
|
288
|
+
- spec/support/rails_template.rb
|
289
|
+
has_rdoc:
|