notable 0.2.0 → 0.2.1

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: c4d9ade6391e626b6456ce4fbbea37d0978327c1
4
- data.tar.gz: 3c5baf92e0867ae2e94790613a28ab843217ecb0
3
+ metadata.gz: 40acf54eb3ab7d88b666fdb100c1622f68194b69
4
+ data.tar.gz: 0f32edf2c850262c7a389910a3b2f325b50630ff
5
5
  SHA512:
6
- metadata.gz: 2b46b38463983747feb4521469f6896c20a682b5c41a465743548ab6a6fcb811c991270039dc9b631086984273eee8b1f43560c5de23d1667bafc32df979ad4e
7
- data.tar.gz: 07573eecf3ea2442f48ef5cd22e00130b815e866e36e1bcbc3062ac1bdae56b1c719590f46f9deba10f9cce6525759edb38381eb309efcdab015587a79ccd97f
6
+ metadata.gz: d7949e50b20a7998073e72fc0066f5e1f238f5cd7af5ca248907c6b60a1d0c6eeade4639b0c4fbdc3fd798f4470eb04c160ff000380af7e9e1c39eeab2decee6
7
+ data.tar.gz: 39c8bfc89301550d8bee600fa788605ccb28b1bc541cf7c034f5a834fae09486211d4352e8ce37e6ba7532f9c63a5a500382e182cb50733d18bee8d5176ea5ac
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.1
2
+
3
+ - Added support for Rails 5.1
4
+
1
5
  ## 0.2.0
2
6
 
3
7
  - Switched to ActiveJob for jobs
@@ -2,7 +2,7 @@ module Notable
2
2
  class Request < ActiveRecord::Base
3
3
  self.table_name = "notable_requests"
4
4
 
5
- belongs_to :user, polymorphic: true
5
+ belongs_to :user, {polymorphic: true}.merge(ActiveRecord::VERSION::MAJOR >= 5 ? {optional: true} : {})
6
6
  serialize :params, JSON
7
7
  end
8
8
  end
@@ -22,7 +22,13 @@ module Notable
22
22
  end
23
23
 
24
24
  def copy_migration
25
- migration_template "create_jobs.rb", "db/migrate/create_notable_jobs.rb"
25
+ migration_template "create_jobs.rb", "db/migrate/create_notable_jobs.rb", migration_version: migration_version
26
+ end
27
+
28
+ def migration_version
29
+ if ActiveRecord::VERSION::MAJOR >= 5
30
+ "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
31
+ end
26
32
  end
27
33
  end
28
34
  end
@@ -22,7 +22,13 @@ module Notable
22
22
  end
23
23
 
24
24
  def copy_migration
25
- migration_template "create_requests.rb", "db/migrate/create_notable_requests.rb"
25
+ migration_template "create_requests.rb", "db/migrate/create_notable_requests.rb", migration_version: migration_version
26
+ end
27
+
28
+ def migration_version
29
+ if ActiveRecord::VERSION::MAJOR >= 5
30
+ "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
31
+ end
26
32
  end
27
33
  end
28
34
  end
@@ -1,4 +1,4 @@
1
- class <%= migration_class_name %> < ActiveRecord::Migration
1
+ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
2
2
  def change
3
3
  create_table :notable_jobs do |t|
4
4
  t.string :note_type
@@ -1,4 +1,4 @@
1
- class <%= migration_class_name %> < ActiveRecord::Migration
1
+ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
2
2
  def change
3
3
  create_table :notable_requests do |t|
4
4
  t.string :note_type
@@ -1,3 +1,3 @@
1
1
  module Notable
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-17 00:00:00.000000000 Z
11
+ date: 2017-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: request_store
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  requirements: []
118
118
  rubyforge_project:
119
- rubygems_version: 2.6.8
119
+ rubygems_version: 2.6.11
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: Track notable requests and background jobs