hey_listen 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e40af5bb9ca2983b1080f50efa3a5481609fecd9
|
4
|
+
data.tar.gz: f556c903a5b7c53d2c8300d035ffd2d81fecb27d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea303fef535cb7f7fc809894e5d6208097dbe19797f123c59a4f97e901c7d1293e09c7fadaa1b62e9526c4cc07d1537671a515a1ed8a32946b4d62fced8efd18
|
7
|
+
data.tar.gz: bc9282bb7dd6a3c0b2d2c2411df8fcacf296a31d68b8268197e1a378f23eaa617a2bc53edf05e03ec5ac03f23e518fc7cd6388cb46f206733dc7b820482b617d
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module HeyListen
|
2
|
+
class InstallGenerator < Rails::Generators::Base
|
3
|
+
include Rails::Generators::Migration
|
4
|
+
source_root File.expand_path('../../templates', __FILE__)
|
5
|
+
|
6
|
+
desc 'Creates a Hey! Listen! migration for the Notifications table.'
|
7
|
+
|
8
|
+
def copy_migration
|
9
|
+
migration_template 'create_notifications.rb', 'db/migrate/create_notifications.rb'
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.next_migration_number(path)
|
13
|
+
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateNotifications < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :notifications, force: true do |t|
|
4
|
+
t.integer :user_id, allow_nil: false
|
5
|
+
t.string :label, allow_nil: false
|
6
|
+
|
7
|
+
t.string :notifiable_type, allow_nil: false
|
8
|
+
t.integer :notifiable_id, allow_nil: false
|
9
|
+
|
10
|
+
t.boolean :read, default: false, allow_nil: false
|
11
|
+
t.datetime :created_at
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/hey_listen/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hey_listen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Escobedo
|
@@ -55,7 +55,8 @@ files:
|
|
55
55
|
- app/models/hey_listen/notification.rb
|
56
56
|
- app/views/layouts/hey_listen/application.html.erb
|
57
57
|
- config/routes.rb
|
58
|
-
- lib/generators/hey_listen/
|
58
|
+
- lib/generators/hey_listen/install_generator.rb
|
59
|
+
- lib/generators/templates/create_notifications.rb
|
59
60
|
- lib/hey_listen.rb
|
60
61
|
- lib/hey_listen/engine.rb
|
61
62
|
- lib/hey_listen/version.rb
|