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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/generators/searchjoy/install_generator.rb +2 -17
- data/lib/searchjoy/engine.rb +8 -2
- data/lib/searchjoy/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cf790f134ff1f479e76e9d793b91e5b889a45b8b8b82f14ec2e6b1b919f66ec
|
4
|
+
data.tar.gz: cf38fef090b482d3af0922c4bf0128fef17b8b4dda5b16f0357e55663e674b84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f924603116e8dc5a0fbb65742522a93148784df02a5483314cf31b7968a683977f8157a4e4088e9453aee302f4685d217f4be8720a8794c05212998cedade47b
|
7
|
+
data.tar.gz: 0157f4df291ae3acfe8d140ed0fe09ae9efdf635a47db10780a1cf80df020218f9bd82a0218bd41330983558df7bad9c0140a5eeacca407d01a3be38978051d1
|
data/CHANGELOG.md
CHANGED
@@ -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
|
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
|
data/lib/searchjoy/engine.rb
CHANGED
@@ -3,8 +3,14 @@ module Searchjoy
|
|
3
3
|
isolate_namespace Searchjoy
|
4
4
|
|
5
5
|
initializer "searchjoy" do |app|
|
6
|
-
|
7
|
-
|
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
|
data/lib/searchjoy/version.rb
CHANGED
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.
|
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-
|
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:
|
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:
|
110
|
+
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: searchkick
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|