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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e1bdab2156a5bcdd3208a094bee85b70d1ed31f9
4
- data.tar.gz: b049a47cd5476114ae72733df2a092e959e8fbe3
3
+ metadata.gz: aee2df8c223d9f38ab1da97c9d1945c664da597a
4
+ data.tar.gz: 005c75639a52baf00ad3d68f6c4908cd02b23666
5
5
  SHA512:
6
- metadata.gz: b36d62a25a4fcd6d365c8ebf55661a60b3e836f29c6b501092b7115d731baa1bd1771af8c1e6778e8084cff1a78b4f139a31e18f7bb2bc5c67f05a6aa356f78a
7
- data.tar.gz: dd072c34d90cdd21300b096dbcd6c20bd803d65e81f2a19919779e4c64349889867c3bb15395facacf5383cf44cb6816916e7b6bdd0fb9a79f88154af604004d
6
+ metadata.gz: 789e48f2d11bb843b33327f0e63b45a3a8b8001da1a68b5164b32cae7fb0c4e52f76cf7bc9200fd37906a0c12698674d96926decf94706b46b6f4e31b8dcde58
7
+ data.tar.gz: 29b19a25733e887740c4985c57874512ed3a37ba33952380056b61ee1ff05ed3072d9dedd8bdd8d48c46d8ee9bf526530a934f35781f77c80e1da33deb8d7452
@@ -0,0 +1,3 @@
1
+ ## 0.1.2
2
+
3
+ - Added support for Rails 5
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Gindex
1
+ # g index
2
2
 
3
- :dash: Instant **concurrent indexes** for Rails
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:
@@ -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 "rails"
20
+ spec.add_dependency "railties"
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.9"
23
- spec.add_development_dependency "rake", "~> 10.0"
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
@@ -1,4 +1,4 @@
1
- class <%= migration_class_name %> < ActiveRecord::Migration
1
+ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def change
@@ -1,3 +1,3 @@
1
1
  module Gindex
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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: 2015-07-16 00:00:00.000000000 Z
11
+ date: 2018-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
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: '1.9'
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: '1.9'
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: '10.0'
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: '10.0'
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.4.5
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: