gossiper 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2113e31ba9ac53ce782e47f7d6151d4cee60ad9b
4
- data.tar.gz: 8470ab50db16479a9e058afdd118ce2feb9601b6
3
+ metadata.gz: ca2a2e48e5af34dc9801e17650ccd5bc38e5f6ab
4
+ data.tar.gz: 62ef5cf7584f60500b2d12502ceeb009cc038d49
5
5
  SHA512:
6
- metadata.gz: 48a9003e745838d2d1d1a95ee56bb508ca9d58a98d4a7a3e56a59172479d7cb0538fc865d3f3aead572e43ba2b2dde8bc4a742256abe79ad289b89cd2eb74cf2
7
- data.tar.gz: e2021162be7d6a11b6a728bc8be138c7eed1e89c68dc5f231c957d225ed2c5d825c708709075b0fe9a8bcd3628f0ce4af1745458a43b0be55a49c7dd4ddfc45b
6
+ metadata.gz: 4a78eaf677ac9c48dd55f43b6d8b2d3dada9482464b5b85f72dd9496b7ac39cd66d6f122e91e2ae546309cf03da44a15b3ed03bf6ee1b7b70104d96aa6501c06
7
+ data.tar.gz: 397f0180340afe252b11fb886236117a06775dba5ab78a7281dc3ecce1e6a18126625bbdbcb7336c205a770328d9d4732aa5d372e26b90eb1ec53983caaaf833
@@ -1,7 +1,10 @@
1
1
  module Gossiper
2
2
  class Notification < ActiveRecord::Base
3
+
3
4
  STATUSES = %w(pending delivered)
4
5
 
6
+ serialize :data, JSON
7
+
5
8
  validates :kind, presence: true
6
9
 
7
10
  def user=(user)
@@ -22,6 +25,10 @@ module Gossiper
22
25
  read_attribute(:status).presence || STATUSES.first
23
26
  end
24
27
 
28
+ def data
29
+ read_attribute(:data).presence || {}
30
+ end
31
+
25
32
  def deliver
26
33
  mail.deliver
27
34
  update_delivered_at!
@@ -0,0 +1,5 @@
1
+ class AddDataToNotifications < ActiveRecord::Migration
2
+ def change
3
+ add_column :gossiper_notifications, :data, :string
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Gossiper
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gossiper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcelo Jacobus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-11 00:00:00.000000000 Z
11
+ date: 2013-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sqlite3
@@ -115,58 +115,59 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
- - app/views/layouts/gossiper/application.html.erb
119
- - app/views/gossiper/notifications/dummy_notification_notification.html.erb
120
- - app/views/gossiper/notifications/index.html.erb
121
- - app/views/gossiper/notifications/show.html.erb
122
- - app/views/kaminari/_first_page.html.erb
123
- - app/views/kaminari/_prev_page.html.erb
124
- - app/views/kaminari/gossiper/_first_page.html.erb
125
- - app/views/kaminari/gossiper/_prev_page.html.erb
126
- - app/views/kaminari/gossiper/_last_page.html.erb
127
- - app/views/kaminari/gossiper/_next_page.html.erb
128
- - app/views/kaminari/gossiper/_page.html.erb
129
- - app/views/kaminari/gossiper/_gap.html.erb
130
- - app/views/kaminari/gossiper/_paginator.html.erb
131
- - app/views/kaminari/_last_page.html.erb
132
- - app/views/kaminari/_next_page.html.erb
133
- - app/views/kaminari/_page.html.erb
134
- - app/views/kaminari/_gap.html.erb
135
- - app/views/kaminari/_paginator.html.erb
136
- - app/helpers/gossiper/notifications_helper.rb
137
- - app/helpers/gossiper/application_helper.rb
138
118
  - app/assets/javascripts/application.js
119
+ - app/assets/javascripts/bootstrap.js
139
120
  - app/assets/javascripts/gossiper/application.js
140
121
  - app/assets/javascripts/gossiper/notifications.js
141
- - app/assets/javascripts/bootstrap.js
122
+ - app/assets/stylesheets/bootstrap_and_overrides.css.less
142
123
  - app/assets/stylesheets/application.css
143
- - app/assets/stylesheets/gossiper/notifications.css
144
124
  - app/assets/stylesheets/gossiper/application.css
145
- - app/assets/stylesheets/bootstrap_and_overrides.css.less
125
+ - app/assets/stylesheets/gossiper/notifications.css
126
+ - app/helpers/gossiper/notifications_helper.rb
127
+ - app/helpers/gossiper/application_helper.rb
146
128
  - app/models/gossiper/notification.rb
147
- - app/controllers/gossiper/application_controller.rb
129
+ - app/views/layouts/gossiper/application.html.erb
130
+ - app/views/kaminari/_gap.html.erb
131
+ - app/views/kaminari/_paginator.html.erb
132
+ - app/views/kaminari/_prev_page.html.erb
133
+ - app/views/kaminari/_page.html.erb
134
+ - app/views/kaminari/_first_page.html.erb
135
+ - app/views/kaminari/_next_page.html.erb
136
+ - app/views/kaminari/_last_page.html.erb
137
+ - app/views/kaminari/gossiper/_gap.html.erb
138
+ - app/views/kaminari/gossiper/_paginator.html.erb
139
+ - app/views/kaminari/gossiper/_prev_page.html.erb
140
+ - app/views/kaminari/gossiper/_page.html.erb
141
+ - app/views/kaminari/gossiper/_first_page.html.erb
142
+ - app/views/kaminari/gossiper/_next_page.html.erb
143
+ - app/views/kaminari/gossiper/_last_page.html.erb
144
+ - app/views/gossiper/notifications/dummy_notification_notification.html.erb
145
+ - app/views/gossiper/notifications/show.html.erb
146
+ - app/views/gossiper/notifications/index.html.erb
148
147
  - app/controllers/gossiper/notifications_controller.rb
149
- - config/locales/en.bootstrap.yml
148
+ - app/controllers/gossiper/application_controller.rb
150
149
  - config/routes.rb
150
+ - config/locales/en.bootstrap.yml
151
151
  - db/migrate/20131206162038_create_gossiper_notifications.rb
152
+ - db/migrate/20131214081503_add_data_to_notifications.rb
153
+ - lib/generators/gossiper/notification_type/USAGE
154
+ - lib/generators/gossiper/notification_type/notification_type_generator.rb
155
+ - lib/generators/gossiper/notification_type/templates/notification_type_spec.rb
156
+ - lib/generators/gossiper/notification_type/templates/notification_type_template.rb
157
+ - lib/generators/gossiper/notification_type/templates/notification_type_test.rb
158
+ - lib/generators/gossiper/notification_type/templates/notification_type.rb
159
+ - lib/generators/gossiper/install/USAGE
160
+ - lib/generators/gossiper/install/install_generator.rb
161
+ - lib/generators/gossiper/install/templates/initializer.rb
162
+ - lib/generators/gossiper/install/templates/locale.en.yml
152
163
  - lib/gossiper.rb
153
- - lib/gossiper/configuration.rb
154
- - lib/gossiper/engine.rb
164
+ - lib/tasks/gossiper_tasks.rake
155
165
  - lib/gossiper/email_config.rb
156
- - lib/gossiper/version.rb
166
+ - lib/gossiper/engine.rb
157
167
  - lib/gossiper/mailer.rb
158
168
  - lib/gossiper/notification_decorator.rb
159
- - lib/tasks/gossiper_tasks.rake
160
- - lib/generators/gossiper/install/templates/locale.en.yml
161
- - lib/generators/gossiper/install/templates/initializer.rb
162
- - lib/generators/gossiper/install/install_generator.rb
163
- - lib/generators/gossiper/install/USAGE
164
- - lib/generators/gossiper/notification_type/notification_type_generator.rb
165
- - lib/generators/gossiper/notification_type/templates/notification_type.rb
166
- - lib/generators/gossiper/notification_type/templates/notification_type_test.rb
167
- - lib/generators/gossiper/notification_type/templates/notification_type_template.rb
168
- - lib/generators/gossiper/notification_type/templates/notification_type_spec.rb
169
- - lib/generators/gossiper/notification_type/USAGE
169
+ - lib/gossiper/configuration.rb
170
+ - lib/gossiper/version.rb
170
171
  - MIT-LICENSE
171
172
  - Rakefile
172
173
  homepage: https://github.com/mjacobus/gossiper-engine
@@ -189,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
190
  version: '0'
190
191
  requirements: []
191
192
  rubyforge_project:
192
- rubygems_version: 2.1.11
193
+ rubygems_version: 2.0.3
193
194
  signing_key:
194
195
  specification_version: 4
195
196
  summary: It eases the creation of messages for the users