eventifier 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.travis.yml +7 -8
  4. data/Gemfile +1 -1
  5. data/README.textile +44 -3
  6. data/app/assets/images/eventifier/notifications-bell.png +0 -0
  7. data/app/assets/images/eventifier/notifications-tower.png +0 -0
  8. data/app/assets/javascripts/eventifier/notifications.coffee +196 -0
  9. data/app/assets/javascripts/eventifier/templates/dropdown.hamlc +10 -0
  10. data/app/assets/javascripts/eventifier/templates/settings.hamlc +11 -0
  11. data/app/assets/stylesheets/eventifier/notifications.scss +167 -0
  12. data/app/controllers/eventifier/application_controller.rb +4 -0
  13. data/app/controllers/eventifier/notifications_controller.rb +36 -0
  14. data/app/controllers/eventifier/preferences_controller.rb +19 -0
  15. data/app/helpers/eventifier/notification_helper.rb +87 -0
  16. data/app/helpers/eventifier/path_helper.rb +15 -0
  17. data/app/mailers/eventifier/mailer.rb +12 -0
  18. data/app/models/event_tracking.rb +3 -0
  19. data/app/models/eventifier/event.rb +22 -0
  20. data/app/models/eventifier/ghost.rb +21 -0
  21. data/app/models/eventifier/notification.rb +38 -0
  22. data/app/models/eventifier/notification_setting.rb +14 -0
  23. data/app/views/eventifier/_notification.haml +1 -0
  24. data/app/views/eventifier/email/_notification.haml +2 -0
  25. data/app/views/eventifier/mailer/notifications.haml +5 -0
  26. data/app/views/eventifier/notifications/index.jbuilder +6 -0
  27. data/config/routes.rb +7 -0
  28. data/config.ru +7 -0
  29. data/{lib/generators/eventifier/install/templates/migration.rb → db/migrate/1_eventifier_setup.rb} +2 -3
  30. data/db/migrate/2_eventifier_notification_settings.rb +11 -0
  31. data/db/migrate/3_notification_sent_status.rb +15 -0
  32. data/db/migrate/4_event_groupable.rb +19 -0
  33. data/eventifier.gemspec +12 -15
  34. data/lib/eventifier/delivery.rb +59 -0
  35. data/lib/eventifier/{railtie.rb → engine.rb} +4 -2
  36. data/lib/eventifier/event_subscriber.rb +44 -0
  37. data/lib/eventifier/event_tracking.rb +5 -58
  38. data/lib/eventifier/mailers/helpers.rb +70 -0
  39. data/lib/eventifier/notifier/notification_mapping.rb +34 -0
  40. data/lib/eventifier/notifier/notification_subscriber.rb +23 -0
  41. data/lib/eventifier/notifier/notifier.rb +21 -0
  42. data/lib/eventifier/preferences.rb +44 -0
  43. data/lib/eventifier/relationship.rb +36 -0
  44. data/lib/eventifier/trackable_class.rb +74 -0
  45. data/lib/eventifier/tracker.rb +18 -0
  46. data/lib/eventifier.rb +35 -11
  47. data/lib/generators/eventifier/install/install_generator.rb +2 -5
  48. data/lib/generators/eventifier/install/templates/events.en.yaml +1 -0
  49. data/lib/tasks/email.rake +8 -0
  50. data/spec/controllers/eventifier/notifications_controller_spec.rb +24 -0
  51. data/spec/controllers/eventifier/preferences_controller_spec.rb +56 -0
  52. data/spec/eventifier/delivery_spec.rb +110 -0
  53. data/spec/eventifier/preferences_spec.rb +69 -0
  54. data/spec/eventifier/relationship_spec.rb +33 -0
  55. data/spec/eventifier_spec.rb +6 -48
  56. data/spec/fabricators/fabricator.rb +11 -11
  57. data/spec/helpers/eventifier/notification_helper_spec.rb +169 -0
  58. data/spec/helpers/eventifier/path_helper_spec.rb +19 -0
  59. data/spec/integration/eventifier_spec.rb +113 -70
  60. data/spec/integration/internationalisation_spec.rb +39 -0
  61. data/spec/internal/app/controllers/application_controller.rb +3 -0
  62. data/spec/internal/app/lib/event_tracking.rb +12 -0
  63. data/spec/internal/app/models/category.rb +3 -0
  64. data/spec/internal/app/models/post.rb +8 -0
  65. data/spec/internal/app/models/subscription.rb +4 -0
  66. data/spec/internal/app/models/user.rb +4 -0
  67. data/spec/internal/app/views/eventifier/dropdown/_awesome_object.haml +0 -0
  68. data/spec/internal/config/database.yml +4 -0
  69. data/spec/internal/config/initializers/eventifier.rb +1 -0
  70. data/spec/internal/config/locales/events.en.yml +20 -0
  71. data/spec/internal/config/routes.rb +5 -0
  72. data/spec/internal/db/schema.rb +31 -0
  73. data/spec/internal/log/.gitignore +1 -0
  74. data/spec/internal/public/favicon.ico +0 -0
  75. data/spec/models/eventifier/event_spec.rb +23 -0
  76. data/spec/{ghost_spec.rb → models/eventifier/ghost_spec.rb} +3 -3
  77. data/spec/{notification_spec.rb → models/eventifier/notification_spec.rb} +1 -9
  78. data/spec/notification_mailer_spec.rb +8 -4
  79. data/spec/notifier/notification_mapping_spec.rb +28 -0
  80. data/spec/spec_helper.rb +14 -8
  81. data/spec/support/controller_helpers.rb +14 -0
  82. metadata +205 -128
  83. data/Gemfile.lock +0 -97
  84. data/lib/eventifier/active_record/event.rb +0 -10
  85. data/lib/eventifier/active_record/event_observer.rb +0 -8
  86. data/lib/eventifier/active_record/event_tracking.rb +0 -11
  87. data/lib/eventifier/active_record/ghost.rb +0 -9
  88. data/lib/eventifier/active_record/notification.rb +0 -13
  89. data/lib/eventifier/active_record_support.rb +0 -5
  90. data/lib/eventifier/event_helper.rb +0 -40
  91. data/lib/eventifier/event_mixin.rb +0 -45
  92. data/lib/eventifier/event_observer_mixin.rb +0 -44
  93. data/lib/eventifier/ghost_mixin.rb +0 -27
  94. data/lib/eventifier/helper_methods.rb +0 -36
  95. data/lib/eventifier/mongoid/event.rb +0 -16
  96. data/lib/eventifier/mongoid/event_observer.rb +0 -7
  97. data/lib/eventifier/mongoid/event_tracking.rb +0 -13
  98. data/lib/eventifier/mongoid/ghost.rb +0 -15
  99. data/lib/eventifier/mongoid/notification.rb +0 -19
  100. data/lib/eventifier/mongoid/user_patch.rb +0 -3
  101. data/lib/eventifier/mongoid_support.rb +0 -6
  102. data/lib/eventifier/notification_helper.rb +0 -42
  103. data/lib/eventifier/notification_mailer.rb +0 -18
  104. data/lib/eventifier/notification_mixin.rb +0 -50
  105. data/lib/eventifier/version.rb +0 -3
  106. data/spec/event_helper_spec.rb +0 -67
  107. data/spec/event_observer_spec.rb +0 -20
  108. data/spec/event_spec.rb +0 -39
  109. data/spec/helper_methods_spec.rb +0 -36
  110. data/spec/notification_helper_spec.rb +0 -65
  111. data/spec/support/action_mailer.rb +0 -3
  112. data/spec/support/database_cleaner.rb +0 -3
  113. data/spec/test_classes/active_record_support.rb +0 -72
  114. data/spec/test_classes/mongoid_support.rb +0 -34
@@ -1,17 +1,21 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Eventifier::NotificationMailer do
3
+ describe Eventifier::Mailer do
4
4
  describe "#notification_email" do
5
5
  before do
6
- Eventifier::NotificationMailer.any_instance.stub main_app: double('app', url_for: true)
6
+ Eventifier::Mailer.any_instance.stub main_app: double('app', url_for: true)
7
7
  end
8
8
 
9
9
  it "should response to notification emails" do
10
- Eventifier::NotificationMailer.should respond_to(:notification_email)
10
+ Eventifier::Mailer.should respond_to(:notifications)
11
11
  end
12
12
 
13
13
  it "should be able to send a 'notification' email" do
14
- proc { Eventifier::NotificationMailer.notification_email(Fabricate(:notification)).deliver }.should change(ActionMailer::Base.deliveries, :count)
14
+ proc {
15
+ Eventifier::Mailer.notifications(
16
+ Fabricate(:user), [Fabricate(:notification)]
17
+ ).deliver
18
+ }.should change(ActionMailer::Base.deliveries, :count)
15
19
  end
16
20
  end
17
21
  end
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+
3
+ describe Eventifier::NotificationMapping do
4
+
5
+ describe 'adding and finding' do
6
+ it 'acts like a datasource' do
7
+ Eventifier::NotificationMapping.add 'test', :relation
8
+
9
+ Eventifier::NotificationMapping.find('test').should == [:relation]
10
+ end
11
+
12
+ it "appends further relations" do
13
+ Eventifier::NotificationMapping.notification_mappings.clear
14
+
15
+ Eventifier::NotificationMapping.add 'test', :relation_a
16
+ Eventifier::NotificationMapping.add 'test', :relation_b
17
+
18
+ Eventifier::NotificationMapping.find('test').
19
+ should == [:relation_a, :relation_b]
20
+ end
21
+ end
22
+
23
+ describe '.add' do
24
+ it 'should act like a data source' do
25
+ Eventifier::NotificationMapping.add('test', :relation)
26
+ end
27
+ end
28
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,17 +1,23 @@
1
- $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
2
- $LOAD_PATH.unshift File.dirname(__FILE__)
1
+ require 'bundler'
2
+
3
+ Bundler.setup :default, :development
3
4
 
4
5
  require 'fabrication'
5
- orm = ENV['ORM'] || 'active_record'
6
- require "./spec/test_classes/#{orm}_support.rb"
6
+ require 'combustion'
7
+ require 'active_record'
8
+ require 'eventifier'
7
9
 
8
10
  Fabrication.configure do |config|
9
- config.fabricator_dir = ["spec/fabricators"]
11
+ config.fabricator_path = ["spec/fabricators"]
12
+ config.path_prefix = '.'
10
13
  end
11
14
 
15
+ Combustion.initialize! :action_controller, :active_record, :action_mailer
16
+
17
+ require 'rspec/rails'
12
18
 
13
19
  Dir["./spec/support/**/*.rb"].each { |f| require f }
14
20
 
15
- require 'rubygems'
16
- require 'rspec'
17
- require 'eventifier'
21
+ RSpec.configure do |config|
22
+ config.use_transactional_fixtures = true
23
+ end
@@ -0,0 +1,14 @@
1
+ module ControllerAuthenticationHelpers
2
+ def sign_in(user = double('User', enrolled?: false))
3
+ controller.stub current_user: user, authenticate_user!: true
4
+ end
5
+
6
+ def sign_out
7
+ sign_in nil
8
+ end
9
+ end
10
+
11
+ RSpec.configure do |config|
12
+ config.include ControllerAuthenticationHelpers, type: :controller
13
+ config.before(:each, type: :controller) { @routes = Eventifier::Engine.routes }
14
+ end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
5
- prerelease:
4
+ version: 0.0.8
6
5
  platform: ruby
7
6
  authors:
8
7
  - Nathan Sampimon
@@ -10,129 +9,162 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-04-04 00:00:00.000000000 Z
12
+ date: 2013-06-23 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
- name: activerecord
17
- requirement: &70265561805220 !ruby/object:Gem::Requirement
18
- none: false
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
19
17
  requirements:
20
- - - ! '>='
18
+ - - ~>
21
19
  - !ruby/object:Gem::Version
22
- version: '0'
23
- type: :development
20
+ version: 3.2.0
21
+ type: :runtime
24
22
  prerelease: false
25
- version_requirements: *70265561805220
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: 3.2.0
26
28
  - !ruby/object:Gem::Dependency
27
- name: mongoid
28
- requirement: &70265561804740 !ruby/object:Gem::Requirement
29
- none: false
29
+ name: bson_ext
30
+ requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - ! '>='
32
+ - - '>='
32
33
  - !ruby/object:Gem::Version
33
34
  version: '0'
34
- type: :development
35
+ type: :runtime
35
36
  prerelease: false
36
- version_requirements: *70265561804740
37
- - !ruby/object:Gem::Dependency
38
- name: actionmailer
39
- requirement: &70265561804200 !ruby/object:Gem::Requirement
40
- none: false
37
+ version_requirements: !ruby/object:Gem::Requirement
41
38
  requirements:
42
- - - ! '>='
39
+ - - '>='
43
40
  - !ruby/object:Gem::Version
44
41
  version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: haml-rails
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ~>
47
+ - !ruby/object:Gem::Version
48
+ version: '0.4'
45
49
  type: :runtime
46
50
  prerelease: false
47
- version_requirements: *70265561804200
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ version: '0.4'
48
56
  - !ruby/object:Gem::Dependency
49
- name: fabrication
50
- requirement: &70265561803760 !ruby/object:Gem::Requirement
51
- none: false
57
+ name: haml_coffee_assets
58
+ requirement: !ruby/object:Gem::Requirement
52
59
  requirements:
53
- - - ! '>='
60
+ - - '>='
54
61
  - !ruby/object:Gem::Version
55
62
  version: '0'
56
- type: :development
63
+ type: :runtime
57
64
  prerelease: false
58
- version_requirements: *70265561803760
59
- - !ruby/object:Gem::Dependency
60
- name: database_cleaner
61
- requirement: &70265561803280 !ruby/object:Gem::Requirement
62
- none: false
65
+ version_requirements: !ruby/object:Gem::Requirement
63
66
  requirements:
64
- - - ! '>='
67
+ - - '>='
65
68
  - !ruby/object:Gem::Version
66
69
  version: '0'
67
- type: :development
68
- prerelease: false
69
- version_requirements: *70265561803280
70
70
  - !ruby/object:Gem::Dependency
71
- name: pg
72
- requirement: &70265561802840 !ruby/object:Gem::Requirement
73
- none: false
71
+ name: coffee-rails
72
+ requirement: !ruby/object:Gem::Requirement
74
73
  requirements:
75
- - - ! '>='
74
+ - - ~>
76
75
  - !ruby/object:Gem::Version
77
- version: '0'
78
- type: :development
76
+ version: 3.2.1
77
+ type: :runtime
79
78
  prerelease: false
80
- version_requirements: *70265561802840
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ~>
82
+ - !ruby/object:Gem::Version
83
+ version: 3.2.1
81
84
  - !ruby/object:Gem::Dependency
82
- name: rspec
83
- requirement: &70265561802380 !ruby/object:Gem::Requirement
84
- none: false
85
+ name: compass-rails
86
+ requirement: !ruby/object:Gem::Requirement
85
87
  requirements:
86
- - - ! '>='
88
+ - - '>='
87
89
  - !ruby/object:Gem::Version
88
90
  version: '0'
89
- type: :development
91
+ type: :runtime
90
92
  prerelease: false
91
- version_requirements: *70265561802380
92
- - !ruby/object:Gem::Dependency
93
- name: activerecord
94
- requirement: &70265561801940 !ruby/object:Gem::Requirement
95
- none: false
93
+ version_requirements: !ruby/object:Gem::Requirement
96
94
  requirements:
97
- - - ! '>='
95
+ - - '>='
98
96
  - !ruby/object:Gem::Version
99
97
  version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: multi_json
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ~>
103
+ - !ruby/object:Gem::Version
104
+ version: 1.7.4
100
105
  type: :runtime
101
106
  prerelease: false
102
- version_requirements: *70265561801940
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ~>
110
+ - !ruby/object:Gem::Version
111
+ version: 1.7.4
103
112
  - !ruby/object:Gem::Dependency
104
- name: bson_ext
105
- requirement: &70265561801480 !ruby/object:Gem::Requirement
106
- none: false
113
+ name: combustion
114
+ requirement: !ruby/object:Gem::Requirement
107
115
  requirements:
108
- - - ! '>='
116
+ - - ~>
109
117
  - !ruby/object:Gem::Version
110
- version: '0'
111
- type: :runtime
118
+ version: 0.5.0
119
+ type: :development
112
120
  prerelease: false
113
- version_requirements: *70265561801480
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 0.5.0
114
126
  - !ruby/object:Gem::Dependency
115
- name: mongoid
116
- requirement: &70265561801040 !ruby/object:Gem::Requirement
117
- none: false
127
+ name: fabrication
128
+ requirement: !ruby/object:Gem::Requirement
118
129
  requirements:
119
- - - ! '>='
130
+ - - ~>
120
131
  - !ruby/object:Gem::Version
121
- version: '0'
122
- type: :runtime
132
+ version: 2.7.1
133
+ type: :development
123
134
  prerelease: false
124
- version_requirements: *70265561801040
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ~>
138
+ - !ruby/object:Gem::Version
139
+ version: 2.7.1
125
140
  - !ruby/object:Gem::Dependency
126
- name: actionmailer
127
- requirement: &70265561800580 !ruby/object:Gem::Requirement
128
- none: false
141
+ name: pg
142
+ requirement: !ruby/object:Gem::Requirement
129
143
  requirements:
130
- - - ! '>='
144
+ - - '>='
131
145
  - !ruby/object:Gem::Version
132
146
  version: '0'
133
- type: :runtime
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ - !ruby/object:Gem::Dependency
155
+ name: rspec-rails
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ~>
159
+ - !ruby/object:Gem::Version
160
+ version: 2.13.2
161
+ type: :development
134
162
  prerelease: false
135
- version_requirements: *70265561800580
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ~>
166
+ - !ruby/object:Gem::Version
167
+ version: 2.13.2
136
168
  description: Tracks and logs events and sends notifications of events on Active Record
137
169
  models.
138
170
  email:
@@ -144,98 +176,143 @@ files:
144
176
  - .gitignore
145
177
  - .travis.yml
146
178
  - Gemfile
147
- - Gemfile.lock
148
179
  - README.textile
149
180
  - Rakefile
181
+ - app/assets/images/eventifier/notifications-bell.png
182
+ - app/assets/images/eventifier/notifications-tower.png
183
+ - app/assets/javascripts/eventifier/notifications.coffee
184
+ - app/assets/javascripts/eventifier/templates/dropdown.hamlc
185
+ - app/assets/javascripts/eventifier/templates/settings.hamlc
186
+ - app/assets/stylesheets/eventifier/notifications.scss
187
+ - app/controllers/eventifier/application_controller.rb
188
+ - app/controllers/eventifier/notifications_controller.rb
189
+ - app/controllers/eventifier/preferences_controller.rb
190
+ - app/helpers/eventifier/notification_helper.rb
191
+ - app/helpers/eventifier/path_helper.rb
192
+ - app/mailers/eventifier/mailer.rb
193
+ - app/models/event_tracking.rb
194
+ - app/models/eventifier/event.rb
195
+ - app/models/eventifier/ghost.rb
196
+ - app/models/eventifier/notification.rb
197
+ - app/models/eventifier/notification_setting.rb
198
+ - app/views/eventifier/_notification.haml
199
+ - app/views/eventifier/email/_notification.haml
200
+ - app/views/eventifier/mailer/notifications.haml
201
+ - app/views/eventifier/notifications/index.jbuilder
202
+ - config.ru
203
+ - config/routes.rb
204
+ - db/migrate/1_eventifier_setup.rb
205
+ - db/migrate/2_eventifier_notification_settings.rb
206
+ - db/migrate/3_notification_sent_status.rb
207
+ - db/migrate/4_event_groupable.rb
150
208
  - eventifier.gemspec
151
209
  - lib/eventifier.rb
152
- - lib/eventifier/active_record/event.rb
153
- - lib/eventifier/active_record/event_observer.rb
154
- - lib/eventifier/active_record/event_tracking.rb
155
- - lib/eventifier/active_record/ghost.rb
156
- - lib/eventifier/active_record/notification.rb
157
- - lib/eventifier/active_record_support.rb
158
- - lib/eventifier/event_helper.rb
159
- - lib/eventifier/event_mixin.rb
160
- - lib/eventifier/event_observer_mixin.rb
210
+ - lib/eventifier/delivery.rb
211
+ - lib/eventifier/engine.rb
212
+ - lib/eventifier/event_subscriber.rb
161
213
  - lib/eventifier/event_tracking.rb
162
- - lib/eventifier/ghost_mixin.rb
163
- - lib/eventifier/helper_methods.rb
214
+ - lib/eventifier/mailers/helpers.rb
164
215
  - lib/eventifier/matchers.rb
165
- - lib/eventifier/mongoid/event.rb
166
- - lib/eventifier/mongoid/event_observer.rb
167
- - lib/eventifier/mongoid/event_tracking.rb
168
- - lib/eventifier/mongoid/ghost.rb
169
- - lib/eventifier/mongoid/notification.rb
170
- - lib/eventifier/mongoid/user_patch.rb
171
- - lib/eventifier/mongoid_support.rb
172
- - lib/eventifier/notification_helper.rb
173
- - lib/eventifier/notification_mailer.rb
174
- - lib/eventifier/notification_mixin.rb
175
- - lib/eventifier/railtie.rb
176
- - lib/eventifier/version.rb
216
+ - lib/eventifier/notifier/notification_mapping.rb
217
+ - lib/eventifier/notifier/notification_subscriber.rb
218
+ - lib/eventifier/notifier/notifier.rb
219
+ - lib/eventifier/preferences.rb
220
+ - lib/eventifier/relationship.rb
221
+ - lib/eventifier/trackable_class.rb
222
+ - lib/eventifier/tracker.rb
177
223
  - lib/generators/eventifier/install/install_generator.rb
178
224
  - lib/generators/eventifier/install/templates/event_tracking.rb
179
225
  - lib/generators/eventifier/install/templates/events.en.yaml
180
- - lib/generators/eventifier/install/templates/migration.rb
181
- - spec/event_helper_spec.rb
182
- - spec/event_observer_spec.rb
183
- - spec/event_spec.rb
226
+ - lib/tasks/email.rake
227
+ - spec/controllers/eventifier/notifications_controller_spec.rb
228
+ - spec/controllers/eventifier/preferences_controller_spec.rb
184
229
  - spec/event_tracking_spec.rb
230
+ - spec/eventifier/delivery_spec.rb
231
+ - spec/eventifier/preferences_spec.rb
232
+ - spec/eventifier/relationship_spec.rb
185
233
  - spec/eventifier_spec.rb
186
234
  - spec/fabricators/fabricator.rb
187
- - spec/ghost_spec.rb
188
- - spec/helper_methods_spec.rb
235
+ - spec/helpers/eventifier/notification_helper_spec.rb
236
+ - spec/helpers/eventifier/path_helper_spec.rb
189
237
  - spec/integration/eventifier_spec.rb
190
- - spec/notification_helper_spec.rb
238
+ - spec/integration/internationalisation_spec.rb
239
+ - spec/internal/app/controllers/application_controller.rb
240
+ - spec/internal/app/lib/event_tracking.rb
241
+ - spec/internal/app/models/category.rb
242
+ - spec/internal/app/models/post.rb
243
+ - spec/internal/app/models/subscription.rb
244
+ - spec/internal/app/models/user.rb
245
+ - spec/internal/app/views/eventifier/dropdown/_awesome_object.haml
246
+ - spec/internal/config/database.yml
247
+ - spec/internal/config/initializers/eventifier.rb
248
+ - spec/internal/config/locales/events.en.yml
249
+ - spec/internal/config/routes.rb
250
+ - spec/internal/db/schema.rb
251
+ - spec/internal/log/.gitignore
252
+ - spec/internal/public/favicon.ico
253
+ - spec/models/eventifier/event_spec.rb
254
+ - spec/models/eventifier/ghost_spec.rb
255
+ - spec/models/eventifier/notification_spec.rb
191
256
  - spec/notification_mailer_spec.rb
192
- - spec/notification_spec.rb
257
+ - spec/notifier/notification_mapping_spec.rb
193
258
  - spec/spec_helper.rb
194
- - spec/support/action_mailer.rb
195
- - spec/support/database_cleaner.rb
259
+ - spec/support/controller_helpers.rb
196
260
  - spec/support/model_helpers.rb
197
- - spec/test_classes/active_record_support.rb
198
- - spec/test_classes/mongoid_support.rb
199
261
  homepage: http://github.com/inspire9/eventifier
200
262
  licenses: []
263
+ metadata: {}
201
264
  post_install_message:
202
265
  rdoc_options: []
203
266
  require_paths:
204
267
  - lib
205
268
  required_ruby_version: !ruby/object:Gem::Requirement
206
- none: false
207
269
  requirements:
208
- - - ! '>='
270
+ - - '>='
209
271
  - !ruby/object:Gem::Version
210
272
  version: '0'
211
273
  required_rubygems_version: !ruby/object:Gem::Requirement
212
- none: false
213
274
  requirements:
214
- - - ! '>='
275
+ - - '>='
215
276
  - !ruby/object:Gem::Version
216
277
  version: '0'
217
278
  requirements: []
218
279
  rubyforge_project: eventifier
219
- rubygems_version: 1.8.11
280
+ rubygems_version: 2.0.2
220
281
  signing_key:
221
- specification_version: 3
282
+ specification_version: 4
222
283
  summary: Event tracking and notifying for active record models
223
284
  test_files:
224
- - spec/event_helper_spec.rb
225
- - spec/event_observer_spec.rb
226
- - spec/event_spec.rb
285
+ - spec/controllers/eventifier/notifications_controller_spec.rb
286
+ - spec/controllers/eventifier/preferences_controller_spec.rb
227
287
  - spec/event_tracking_spec.rb
288
+ - spec/eventifier/delivery_spec.rb
289
+ - spec/eventifier/preferences_spec.rb
290
+ - spec/eventifier/relationship_spec.rb
228
291
  - spec/eventifier_spec.rb
229
292
  - spec/fabricators/fabricator.rb
230
- - spec/ghost_spec.rb
231
- - spec/helper_methods_spec.rb
293
+ - spec/helpers/eventifier/notification_helper_spec.rb
294
+ - spec/helpers/eventifier/path_helper_spec.rb
232
295
  - spec/integration/eventifier_spec.rb
233
- - spec/notification_helper_spec.rb
296
+ - spec/integration/internationalisation_spec.rb
297
+ - spec/internal/app/controllers/application_controller.rb
298
+ - spec/internal/app/lib/event_tracking.rb
299
+ - spec/internal/app/models/category.rb
300
+ - spec/internal/app/models/post.rb
301
+ - spec/internal/app/models/subscription.rb
302
+ - spec/internal/app/models/user.rb
303
+ - spec/internal/app/views/eventifier/dropdown/_awesome_object.haml
304
+ - spec/internal/config/database.yml
305
+ - spec/internal/config/initializers/eventifier.rb
306
+ - spec/internal/config/locales/events.en.yml
307
+ - spec/internal/config/routes.rb
308
+ - spec/internal/db/schema.rb
309
+ - spec/internal/log/.gitignore
310
+ - spec/internal/public/favicon.ico
311
+ - spec/models/eventifier/event_spec.rb
312
+ - spec/models/eventifier/ghost_spec.rb
313
+ - spec/models/eventifier/notification_spec.rb
234
314
  - spec/notification_mailer_spec.rb
235
- - spec/notification_spec.rb
315
+ - spec/notifier/notification_mapping_spec.rb
236
316
  - spec/spec_helper.rb
237
- - spec/support/action_mailer.rb
238
- - spec/support/database_cleaner.rb
317
+ - spec/support/controller_helpers.rb
239
318
  - spec/support/model_helpers.rb
240
- - spec/test_classes/active_record_support.rb
241
- - spec/test_classes/mongoid_support.rb
data/Gemfile.lock DELETED
@@ -1,97 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- eventifier (0.0.6)
5
- actionmailer
6
- actionmailer
7
- activerecord
8
- bson_ext
9
- mongoid
10
-
11
- GEM
12
- remote: http://rubygems.org/
13
- specs:
14
- actionmailer (3.2.5)
15
- actionpack (= 3.2.5)
16
- mail (~> 2.4.4)
17
- actionpack (3.2.5)
18
- activemodel (= 3.2.5)
19
- activesupport (= 3.2.5)
20
- builder (~> 3.0.0)
21
- erubis (~> 2.7.0)
22
- journey (~> 1.0.1)
23
- rack (~> 1.4.0)
24
- rack-cache (~> 1.2)
25
- rack-test (~> 0.6.1)
26
- sprockets (~> 2.1.3)
27
- activemodel (3.2.5)
28
- activesupport (= 3.2.5)
29
- builder (~> 3.0.0)
30
- activerecord (3.2.5)
31
- activemodel (= 3.2.5)
32
- activesupport (= 3.2.5)
33
- arel (~> 3.0.2)
34
- tzinfo (~> 0.3.29)
35
- activesupport (3.2.5)
36
- i18n (~> 0.6)
37
- multi_json (~> 1.0)
38
- arel (3.0.2)
39
- bson (1.6.4)
40
- bson_ext (1.6.4)
41
- bson (~> 1.6.4)
42
- builder (3.0.0)
43
- database_cleaner (0.7.2)
44
- diff-lcs (1.1.3)
45
- erubis (2.7.0)
46
- fabrication (1.4.0)
47
- hike (1.2.1)
48
- i18n (0.6.0)
49
- journey (1.0.4)
50
- mail (2.4.4)
51
- i18n (>= 0.4.0)
52
- mime-types (~> 1.16)
53
- treetop (~> 1.4.8)
54
- mime-types (1.19)
55
- mongo (1.6.2)
56
- bson (~> 1.6.2)
57
- mongoid (2.4.11)
58
- activemodel (~> 3.1)
59
- mongo (<= 1.6.2)
60
- tzinfo (~> 0.3.22)
61
- multi_json (1.3.6)
62
- pg (0.13.2)
63
- polyglot (0.3.3)
64
- rack (1.4.5)
65
- rack-cache (1.2)
66
- rack (>= 0.4)
67
- rack-test (0.6.2)
68
- rack (>= 1.0)
69
- rspec (2.10.0)
70
- rspec-core (~> 2.10.0)
71
- rspec-expectations (~> 2.10.0)
72
- rspec-mocks (~> 2.10.0)
73
- rspec-core (2.10.1)
74
- rspec-expectations (2.10.0)
75
- diff-lcs (~> 1.1.3)
76
- rspec-mocks (2.10.1)
77
- sprockets (2.1.3)
78
- hike (~> 1.2)
79
- rack (~> 1.0)
80
- tilt (~> 1.1, != 1.3.0)
81
- tilt (1.3.3)
82
- treetop (1.4.12)
83
- polyglot
84
- polyglot (>= 0.3.1)
85
- tzinfo (0.3.33)
86
-
87
- PLATFORMS
88
- ruby
89
-
90
- DEPENDENCIES
91
- activerecord
92
- database_cleaner
93
- eventifier!
94
- fabrication
95
- mongoid
96
- pg
97
- rspec
@@ -1,10 +0,0 @@
1
- require 'eventifier/event_mixin'
2
-
3
- module Eventifier
4
- class Event < ActiveRecord::Base
5
- include Eventifier::EventMixin
6
- attr_accessible :user, :eventable, :verb, :change_data
7
-
8
- serialize :change_data
9
- end
10
- end
@@ -1,8 +0,0 @@
1
- require 'eventifier/event_observer_mixin'
2
-
3
- module Eventifier
4
- class EventObserver < ActiveRecord::Observer
5
- include Eventifier::EventObserverMixin
6
-
7
- end
8
- end
@@ -1,11 +0,0 @@
1
- module Eventifier
2
- module EventTracking
3
- OBSERVER_CLASS = ActiveRecord::Observer
4
-
5
- def add_notification_association(target_klass)
6
- target_klass.class_eval do
7
- has_many :notifications, :through => :events, :class_name => 'Eventifier::Notification', :dependent => :destroy
8
- end
9
- end
10
- end
11
- end
@@ -1,9 +0,0 @@
1
- require 'eventifier/ghost_mixin'
2
-
3
- module Eventifier
4
- class Ghost < ActiveRecord::Base
5
- include Eventifier::GhostMixin
6
-
7
- serialize :data_hash
8
- end
9
- end