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: 30e654c58c8e742bfd71a7014c414377dc3507d8
4
- data.tar.gz: 778843f600bbe041f423e59d4617c5963a0a47d1
3
+ metadata.gz: e40af5bb9ca2983b1080f50efa3a5481609fecd9
4
+ data.tar.gz: f556c903a5b7c53d2c8300d035ffd2d81fecb27d
5
5
  SHA512:
6
- metadata.gz: 592f623274ef3340b5d86102749b0cf88a42f7f4e431ac806cb85b51e463af986df3ed7155a46719ab18a7675b4f0cc9f7b5376a0a989c65643271645091f714
7
- data.tar.gz: 48abf1b30b339dcace2b05fbb163c51e68686a74f8bf66e624983e6fa3625826ea207667a02991afe851068ca211d9ce2184e0e59c125cb8b1e6474dd2304e01
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
@@ -1,3 +1,3 @@
1
1
  module HeyListen
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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.3
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/install.rb
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
@@ -1,9 +0,0 @@
1
- require 'rails/generators/base'
2
-
3
- module HeyListen
4
- module Generators
5
- class InstallGenerator < Rails::Generators::Base
6
- desc 'Creates Hey! Listen! necessary migrations.'
7
- end
8
- end
9
- end