searchjoy 0.2.1 → 0.3.0

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: 862d1746537799a5bafb78e34d80cada1c14de5c
4
- data.tar.gz: 83fbc177bc299282edae186d4147cf285d7ad4fe
3
+ metadata.gz: 3bf6ba548fc593244ad33e8730d462eb32782e1b
4
+ data.tar.gz: 8368c14bf4f4edbaca26a5ceadd56c02cf8d0aba
5
5
  SHA512:
6
- metadata.gz: '097becc8c6b70f079d66a5687c0db5fb7bc0ada6be6cf47ef2d33246d4ee908293dedcc62dd4ef37081e268fb8f94284c61c58b146e07b89cfa55a5ea6e2b579'
7
- data.tar.gz: f13fa9f9cdd05d088fd5eacb72ca466eaa387927fe159276d2d4705d54d19e324c8986666b5aa9f4b080e0cf9b8c7e6b8ee9d30d79cdb6bf96b0c418351276d9
6
+ metadata.gz: fbe4a0101a7e8537dce6e7fac53082cb904c088691249476ecc7862fccb91a7f7e4f96a64492f3886b20dd12e614331ca20ce6033646f8c558f9fc07bd813c2d
7
+ data.tar.gz: e3f4b7080eb8076fab111a7c1f0001e5ea03cf904a5edc0ffc32becf9efb730e50d43bfdbfaf0eba1cda007f4ebc65dacc8784aa59a220deeab8ddd5fba06a96
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.3.0
2
+
3
+ - Added support for Rails 5.1
4
+ - Fixed `belongs_to` issue with Rails 5
5
+
1
6
  ## 0.2.1
2
7
 
3
8
  - Added `query_url` option
@@ -1,6 +1,10 @@
1
1
  module Searchjoy
2
2
  class Search < ActiveRecord::Base
3
- belongs_to :convertable, polymorphic: true
3
+ if Rails::VERSION::MAJOR == 5
4
+ belongs_to :convertable, polymorphic: true, optional: true
5
+ else
6
+ belongs_to :convertable, polymorphic: true
7
+ end
4
8
 
5
9
  # the devise way
6
10
  if (Rails::VERSION::MAJOR == 3 && !defined?(ActionController::StrongParameters)) || defined?(ActiveModel::MassAssignmentSecurity)
@@ -22,7 +22,13 @@ module Searchjoy
22
22
  end
23
23
 
24
24
  def copy_migration
25
- migration_template "install.rb", "db/migrate/install_searchjoy.rb"
25
+ migration_template "install.rb", "db/migrate/install_searchjoy.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 :searchjoy_searches do |t|
4
4
  t.integer :user_id
@@ -1,3 +1,3 @@
1
1
  module Searchjoy
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchjoy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
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-03-20 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: chartkick
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  requirements: []
146
146
  rubyforge_project:
147
- rubygems_version: 2.6.8
147
+ rubygems_version: 2.5.1
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Search analytics made easy