searchjoy 0.4.1 → 0.4.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
  SHA256:
3
- metadata.gz: 47b5f1bbd61d9b7816b5bfe5333de4555e139b26f6a7e1149f20018563eadf9b
4
- data.tar.gz: bf3f3e7f166ff1645cac7561562a4405728935601cb67eea54db06061c02d170
3
+ metadata.gz: 7cf790f134ff1f479e76e9d793b91e5b889a45b8b8b82f14ec2e6b1b919f66ec
4
+ data.tar.gz: cf38fef090b482d3af0922c4bf0128fef17b8b4dda5b16f0357e55663e674b84
5
5
  SHA512:
6
- metadata.gz: 7a8815fd2d3832a5bf76bab88c724ef2f721c128fa9c8172b91e569682c91fc005da4d769d9ef1d8388dfd0d8551420f83b16e1613f725826c6c17119d355ae2
7
- data.tar.gz: c9d2b458ffa97a76f773d48b3dc6238ee85c0693494d7f89e2c8d980788c1197ab1602f901f873c54be5634d5eb1b63a73f1d453abbfb0d42542584fc4d734bb
6
+ metadata.gz: f924603116e8dc5a0fbb65742522a93148784df02a5483314cf31b7968a683977f8157a4e4088e9453aee302f4685d217f4be8720a8794c05212998cedade47b
7
+ data.tar.gz: 0157f4df291ae3acfe8d140ed0fe09ae9efdf635a47db10780a1cf80df020218f9bd82a0218bd41330983558df7bad9c0140a5eeacca407d01a3be38978051d1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.4.2
2
+
3
+ - Added support for Sprockets 4
4
+ - Require latest version of Chartkick
5
+
1
6
  ## 0.4.1
2
7
 
3
8
  - Added support for Rails 6
@@ -1,25 +1,10 @@
1
- # taken from https://github.com/collectiveidea/audited/blob/master/lib/generators/audited/install_generator.rb
2
- require "rails/generators"
3
- require "rails/generators/migration"
4
- require "active_record"
5
1
  require "rails/generators/active_record"
6
2
 
7
3
  module Searchjoy
8
4
  module Generators
9
5
  class InstallGenerator < Rails::Generators::Base
10
- include Rails::Generators::Migration
11
-
12
- source_root File.expand_path("../templates", __FILE__)
13
-
14
- # Implement the required interface for Rails::Generators::Migration.
15
- def self.next_migration_number(dirname) #:nodoc:
16
- next_migration_number = current_migration_number(dirname) + 1
17
- if ActiveRecord::Base.timestamped_migrations
18
- [Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % next_migration_number].max
19
- else
20
- "%.3d" % next_migration_number
21
- end
22
- end
6
+ include ActiveRecord::Generators::Migration
7
+ source_root File.join(__dir__, "templates")
23
8
 
24
9
  def copy_migration
25
10
  migration_template "install.rb", "db/migrate/install_searchjoy.rb", migration_version: migration_version
@@ -3,8 +3,14 @@ module Searchjoy
3
3
  isolate_namespace Searchjoy
4
4
 
5
5
  initializer "searchjoy" do |app|
6
- # use a proc instead of a string
7
- app.config.assets.precompile << proc { |path| path == "searchjoy.js" }
6
+ if app.config.respond_to?(:assets)
7
+ if defined?(Sprockets) && Sprockets::VERSION >= "4"
8
+ app.config.assets.precompile << "searchjoy.js"
9
+ else
10
+ # use a proc instead of a string
11
+ app.config.assets.precompile << proc { |path| path == "searchjoy.js" }
12
+ end
13
+ end
8
14
 
9
15
  Searchjoy.attach_to_searchkick! if defined?(Searchkick)
10
16
  end
@@ -1,3 +1,3 @@
1
1
  module Searchjoy
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
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.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-27 00:00:00.000000000 Z
11
+ date: 2019-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chartkick
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2'
19
+ version: '3.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '2'
26
+ version: '3.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: groupdate
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -98,16 +98,16 @@ dependencies:
98
98
  name: sqlite3
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 1.3.0
103
+ version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 1.3.0
110
+ version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: searchkick
113
113
  requirement: !ruby/object:Gem::Requirement