gindex 0.1.1 → 0.1.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 +3 -0
- data/README.md +3 -3
- data/gindex.gemspec +3 -3
- data/lib/generators/index/index_generator.rb +8 -0
- data/lib/generators/index/templates/index_migration.rb +1 -1
- data/lib/gindex/version.rb +1 -1
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aee2df8c223d9f38ab1da97c9d1945c664da597a
|
4
|
+
data.tar.gz: 005c75639a52baf00ad3d68f6c4908cd02b23666
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 789e48f2d11bb843b33327f0e63b45a3a8b8001da1a68b5164b32cae7fb0c4e52f76cf7bc9200fd37906a0c12698674d96926decf94706b46b6f4e31b8dcde58
|
7
|
+
data.tar.gz: 29b19a25733e887740c4985c57874512ed3a37ba33952380056b61ee1ff05ed3072d9dedd8bdd8d48c46d8ee9bf526530a934f35781f77c80e1da33deb8d7452
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# g index
|
2
2
|
|
3
|
-
:
|
3
|
+
:speedboat: Instant **concurrent** index migrations for Rails
|
4
4
|
|
5
5
|
```ruby
|
6
6
|
rails g index users email
|
@@ -17,7 +17,7 @@ rails g index deliveries store_id delivered_at
|
|
17
17
|
Add this line to your application’s Gemfile:
|
18
18
|
|
19
19
|
```ruby
|
20
|
-
gem 'gindex'
|
20
|
+
gem 'gindex', group: :development
|
21
21
|
```
|
22
22
|
|
23
23
|
And then execute:
|
data/gindex.gemspec
CHANGED
@@ -17,8 +17,8 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.add_dependency "
|
20
|
+
spec.add_dependency "railties"
|
21
21
|
|
22
|
-
spec.add_development_dependency "bundler"
|
23
|
-
spec.add_development_dependency "rake"
|
22
|
+
spec.add_development_dependency "bundler"
|
23
|
+
spec.add_development_dependency "rake"
|
24
24
|
end
|
@@ -2,7 +2,9 @@ require "rails/generators/migration"
|
|
2
2
|
|
3
3
|
class IndexGenerator < Rails::Generators::Base
|
4
4
|
include Rails::Generators::Migration
|
5
|
+
|
5
6
|
source_root File.expand_path("../templates", __FILE__)
|
7
|
+
|
6
8
|
argument :table, type: :string
|
7
9
|
argument :columns, type: :array
|
8
10
|
|
@@ -19,4 +21,10 @@ class IndexGenerator < Rails::Generators::Base
|
|
19
21
|
def copy_migration
|
20
22
|
migration_template "index_migration.rb", "db/migrate/add_index_on_#{columns.join('_and_')}_to_#{table}.rb"
|
21
23
|
end
|
24
|
+
|
25
|
+
def migration_version
|
26
|
+
if ActiveRecord::VERSION::MAJOR >= 5
|
27
|
+
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
28
|
+
end
|
29
|
+
end
|
22
30
|
end
|
data/lib/gindex/version.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gindex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: railties
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -28,30 +28,30 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- andrew@chartkick.com
|
@@ -60,6 +60,7 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
+
- CHANGELOG.md
|
63
64
|
- Gemfile
|
64
65
|
- README.md
|
65
66
|
- Rakefile
|
@@ -87,9 +88,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
88
|
version: '0'
|
88
89
|
requirements: []
|
89
90
|
rubyforge_project:
|
90
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.6.13
|
91
92
|
signing_key:
|
92
93
|
specification_version: 4
|
93
94
|
summary: Instant concurrent indexes for Rails
|
94
95
|
test_files: []
|
95
|
-
has_rdoc:
|