index_shotgun 0.1.0.beta1 → 0.1.0.beta2

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: a0c71bfd2cae379df93f4d40f3564495539242d3
4
- data.tar.gz: db399ae9e9d9a856980df219e8cb1e333b941099
3
+ metadata.gz: 8dde594c3b25b6a71c75480f9a772d5fec8576cc
4
+ data.tar.gz: 801a79976c58e88b62adef5b782fb51147f19fc5
5
5
  SHA512:
6
- metadata.gz: 2d7087544d68801b6e8a67789dd321675ccaefa58a967a820a53684a5b051d2da4367a76f7f85c8176983532e8ff3e8dd36d64efe5e251d0dd38f774876f6298
7
- data.tar.gz: 7b91e741405bf184f7b2a224b6e529d70b949d9af56405da54330689f74bc0fc732775487fb8995faccc09fac3d3ac930169e8d128fe6de82a1c8d9785dd50a9
6
+ metadata.gz: 39ef469a2fc17f9eb275b369807d3b98d6d9280f0b0a7979d1c7eab7c54b1791f9fd32cf2b2565f5e3a27101cfa463a4559900e44bfa9fcb12d493e239ecaf4e
7
+ data.tar.gz: e40a69bdf284acc3bac8ca72e13113a72a87aac8920467645807c8236536e3241d5d08d258c007d1d7965309b0e4a9a299770d5d8d83096b3564995367611842
@@ -0,0 +1 @@
1
+ repo_token: 4teBIhMIA8Ea55PSTJdusLkWkYMhFG3Ay
@@ -0,0 +1,2 @@
1
+ ruby:
2
+ config_file: .rubocop.yml
@@ -0,0 +1,4 @@
1
+ inherit_from: .rubocop_standard.yml
2
+
3
+ Rails/Output:
4
+ Enabled: false
@@ -0,0 +1,196 @@
1
+ # via. https://gist.github.com/onk/38bfbd78899d892e0e83
2
+
3
+ # target_version:
4
+ # rubocop v0.31.0
5
+
6
+ # 自動生成されるものはチェック対象から除外する
7
+ AllCops:
8
+ Exclude:
9
+ - "vendor/**/*" # rubocop config/default.yml
10
+ - "db/schema.rb"
11
+ DisplayCopNames: true
12
+
13
+ ##################### Style ##################################
14
+
15
+ # redirect_to xxx and return のイディオムを維持したい
16
+ Style/AndOr:
17
+ EnforcedStyle: conditionals
18
+
19
+ # 日本語のコメントを許可する
20
+ Style/AsciiComments:
21
+ Enabled: false
22
+
23
+ # option 等、明示的にハッシュにした方が分かりやすい場合もある
24
+ Style/BracesAroundHashParameters:
25
+ Enabled: false
26
+
27
+ # Style/CollectionMethods 自体は無効になっているのだが、
28
+ # https://github.com/bbatsov/rubocop/issues/1084
29
+ # https://github.com/bbatsov/rubocop/issues/1334
30
+ # Performance/Detect がこの設定値を見るので PreferredMethods だけ変更しておく。
31
+ #
32
+ # デフォルト値から変えたのは
33
+ # find -> detect
34
+ # ActiveRecord の find と間違えやすいため
35
+ # reduce -> inject
36
+ # detect, reject, select と並べたときに韻を踏んでいるため。
37
+ # collect -> map を維持しているのは文字数が圧倒的に少ないため。
38
+ Style/CollectionMethods:
39
+ PreferredMethods:
40
+ detect: "detect"
41
+ find: "detect"
42
+ inject: "inject"
43
+ reduce: "inject"
44
+
45
+ # Hash#has_key? は許可したい
46
+ Style/DeprecatedHashMethods:
47
+ Enabled: false
48
+
49
+ # ドキュメントの無い public class を許可する
50
+ Style/Documentation:
51
+ Enabled: false
52
+
53
+ # !! のイディオムは積極的に使う
54
+ Style/DoubleNegation:
55
+ Enabled: false
56
+
57
+ # メソッドチェーンの改行は末尾に . を入れる
58
+ # REPL に貼り付けた際の暴発を防ぐため
59
+ Style/DotPosition:
60
+ EnforcedStyle: trailing
61
+
62
+ # 明示的に else で nil を返すのは分かりやすいので許可する
63
+ Style/EmptyElse:
64
+ EnforcedStyle: empty
65
+
66
+ # いずれかに揃えるのならば `sprintf` や `format` より String#% が好きです
67
+ Style/FormatString:
68
+ EnforcedStyle: percent
69
+
70
+ # if 文の中に 3 行程度のブロックを書くぐらいは許容した方が現実的
71
+ Style/GuardClause:
72
+ MinBodyLength: 5
73
+
74
+ # 同じ hash 内で記法を混ぜない
75
+ # rake タスクの順序の hash は rocket を許可する
76
+ Style/HashSyntax:
77
+ EnforcedStyle: ruby19_no_mixed_keys
78
+ Exclude:
79
+ - "**/*.rake"
80
+ - "Rakefile"
81
+
82
+ # 条件式の方を意識させたい場合には後置の if/unless を使わない方が分かりやすい
83
+ Style/IfUnlessModifier:
84
+ Enabled: false
85
+
86
+ # ({ と hash を開始した場合に ( の位置にインデントさせる
87
+ # そもそも {} が必要ない可能性が高いが Style/BracesAroundHashParameters はチェックしないことにしたので
88
+ Style/IndentHash:
89
+ EnforcedStyle: consistent
90
+
91
+ # private/protected は一段深くインデントする
92
+ Style/IndentationConsistency:
93
+ EnforcedStyle: rails
94
+
95
+ # scope 等は複数行でも lambda ではなく ->{} で揃えた方が見た目が綺麗
96
+ Style/Lambda:
97
+ Enabled: false
98
+
99
+ # 1_000_000 と区切り文字が 2 個以上必要になる場合のみ _ 区切りを必須にする
100
+ Style/NumericLiterals:
101
+ MinDigits: 7
102
+
103
+ # has_ から始まるメソッドは許可する
104
+ Style/PredicateName:
105
+ NamePrefixBlacklist:
106
+ - "is_"
107
+ - "have_"
108
+ NamePrefix:
109
+ - "is_"
110
+ - "have_"
111
+
112
+ # 特に model 内において、ローカル変数とメソッド呼び出しの区別をつけた方が分かりやすい場合が多い
113
+ Style/RedundantSelf:
114
+ Enabled: false
115
+
116
+ # 受け取り側で multiple assignment しろというのを明示
117
+ Style/RedundantReturn:
118
+ AllowMultipleReturnValues: true
119
+
120
+ # fail と使い分ける必要ナシ
121
+ Style/SignalException:
122
+ EnforcedStyle: only_raise
123
+
124
+ # `||` も align に使うことがあるので追加する
125
+ Style/SpaceAroundOperators:
126
+ MultiSpaceAllowedForOperators:
127
+ - "="
128
+ - "=>"
129
+ - "||"
130
+
131
+ # * 式展開したい場合に書き換えるのが面倒
132
+ # * 文章ではダブルクォートよりもシングルクォートの方が頻出する
133
+ # ことから EnforcedStyle: double_quotes 推奨
134
+ Style/StringLiterals:
135
+ EnforcedStyle: double_quotes
136
+
137
+ # auto-correct 時に Style/StringLiterals とカニバって無限ループになる (v0.28.0)
138
+ Style/StringLiteralsInInterpolation:
139
+ Enabled: false
140
+
141
+ # いくらなんでも inject { |a, e| } は短すぎるので分かりやすい名前をつけたい
142
+ Style/SingleLineBlockParams:
143
+ Enabled: false
144
+
145
+ # * migrate
146
+ # * jbuilder
147
+ # * model の association
148
+ # * controller の callback
149
+ # 辺りの桁揃えで引っかかるので全体的にチェックしない
150
+ Style/SingleSpaceBeforeFirstArg:
151
+ Enabled: false
152
+
153
+ # 複数行の場合はケツカンマを入れる
154
+ Style/TrailingComma:
155
+ EnforcedStyleForMultiline: comma
156
+
157
+ ##################### Lint ##################################
158
+
159
+ # * 同名のメソッドがある場合にローカル変数に `_` を付ける
160
+ # * 一時変数として `_` を付ける
161
+ # というテクニックは頻出する
162
+ Lint/UnderscorePrefixedVariableName:
163
+ Enabled: false
164
+
165
+ # 子クラスで実装させるつもりのメソッドで引っかかるので
166
+ Lint/UnusedMethodArgument:
167
+ Enabled: false
168
+
169
+ ##################### Metrics ##################################
170
+
171
+ # 30 まではギリギリ許せる範囲だった
172
+ Metrics/AbcSize:
173
+ Max: 30
174
+
175
+ # 6 は強すぎるので緩める
176
+ Metrics/CyclomaticComplexity:
177
+ Max: 10
178
+
179
+ # * 警告 120文字
180
+ # * 禁止 160文字
181
+ # のイメージ
182
+ Metrics/LineLength:
183
+ Max: 160
184
+ Exclude:
185
+ - "db/migrate/*.rb"
186
+
187
+ # 20 行超えるのは migration ファイル以外滅多に無い
188
+ Metrics/MethodLength:
189
+ Max: 20
190
+ Exclude:
191
+ - "db/migrate/*.rb"
192
+
193
+ # 分岐の数。ガード句を多用しているとデフォルト 7 だと厳しい
194
+ Metrics/PerceivedComplexity:
195
+ Max: 8
196
+
@@ -1,4 +1,26 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.3
3
+ - 2.1
4
+ - 2.2
5
+ - ruby-head
6
+ env:
7
+ - DATABASE=mysql
8
+ - DATABASE=postgresql
9
+ - DATABASE=sqlite3
10
+ before_script:
11
+ - export CI=true
12
+ - export CODECLIMATE_REPO_TOKEN=377596024a4c6f3c4c4b9a0cd16add92fb5e7f716663629b5efd080377c0b838
4
13
  before_install: gem install bundler -v 1.10.6
14
+ script: "./travis_ci/build.sh"
15
+ branches:
16
+ only:
17
+ - master
18
+ notifications:
19
+ email: false
20
+ slack:
21
+ secure: YGQKOd0oz96gfQtyfTLj7N2Riq93oj1lR9X5hf4071Zu9q3wQjLD4a5y39iVAtOpK2Lw3ShM93kcGREZfpThx9jQ0jUd26DWLLFokZvM82l5+hD7PMhLU1Pv/EbW7mTGAw1TR0su98m91A71qJghdZsT/UrP+QN/4zV72I8XiYrkAiKaTLaucEN4Pn2GgSAGV4Hs7eqT7jNBkGbxSOio3MttoYMDz7dBfR3Z8GRk7jSL5z820zejHNPbfbpwZQhtx/rY/KGSHoIRDc7je6Aiebd5wElQFKsh13LFYSbGaYvB2gRdU/ZmyG0YLV+0hUvWYS14QvCUFrCbiKmRf58tTk3Y/FVtBga+Aj11JrAgpvR9qf2y+gC3BwBwBwaElZ2gMmfZOzXPI7P+OATKbVCQOE4PCAIUkfBbaYkg6FJlYwaume5n+ObLhZPZwa8EGaOkrzonKRhU7hMBT6A+aQkwz0wfccErEog8vB/5OYSMquxZtfWywLgUpnyg97SYeC8aaON+/U8edWsYUR+0bBIySNYEAq0algQEo52cLh4qNpLJeb/zRdFX2b+CI1EYPa+rDSygD7NpT+mx5/5leAcxyvp4S3iKxjFEVkoKwIEoLnqbqjarwz2LjJ+l32wZDhmBV5UggpKoieV5KtpkIwOCJ4g6t+aq786oSW+/GWWI9s0=
22
+ matrix:
23
+ allow_failures:
24
+ - rvm: ruby-head
25
+ cache: bundler
26
+ sudo: false
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in index_shotgun.gemspec
4
4
  gemspec
data/README.md CHANGED
@@ -4,6 +4,12 @@ Welcome to your new gem! In this directory, you'll find the files you need to be
4
4
 
5
5
  TODO: Delete this and the text above, and describe your gem
6
6
 
7
+ [![Gem Version](https://badge.fury.io/rb/index_shotgun.svg)](http://badge.fury.io/rb/index_shotgun)
8
+ [![Build Status](https://travis-ci.org/sue445/index_shotgun.svg?branch=master)](https://travis-ci.org/sue445/index_shotgun)
9
+ [![Code Climate](https://codeclimate.com/github/sue445/index_shotgun/badges/gpa.svg)](https://codeclimate.com/github/sue445/index_shotgun)
10
+ [![Coverage Status](https://coveralls.io/repos/sue445/index_shotgun/badge.svg?branch=master&service=github)](https://coveralls.io/github/sue445/index_shotgun?branch=master)
11
+ [![Dependency Status](https://gemnasium.com/sue445/index_shotgun.svg)](https://gemnasium.com/sue445/index_shotgun)
12
+
7
13
  ## Installation
8
14
 
9
15
  Add this line to your application's Gemfile:
@@ -1,3 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "index_shotgun"
3
+ require 'index_shotgun/cli'
4
+
5
+ IndexShotgun::CLI.start(ARGV)
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
2
+ lib = File.expand_path("../lib", __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'index_shotgun/version'
4
+ require "index_shotgun/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "index_shotgun"
@@ -9,33 +9,40 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["sue445"]
10
10
  spec.email = ["sue445@sue445.net"]
11
11
 
12
- spec.summary = %q{duplicate index checker}
13
- spec.description = %q{duplicate index checker}
12
+ spec.summary = "duplicate index checker"
13
+ spec.description = "duplicate index checker"
14
14
  spec.homepage = "https://github.com/sue445/index_shotgun"
15
15
  spec.license = "MIT"
16
16
 
17
17
  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
18
  # delete this section to allow pushing this gem to any host.
19
19
  if spec.respond_to?(:metadata)
20
- spec.metadata['allowed_push_host'] = "https://rubygems.org"
20
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
21
21
  else
22
22
  raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
23
  end
24
24
 
25
+ spec.required_ruby_version = ">= 2.1.0"
26
+
25
27
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
28
  spec.bindir = "exe"
27
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
30
  spec.require_paths = ["lib"]
29
31
 
30
32
  spec.add_dependency "activerecord"
33
+ spec.add_dependency "thor"
31
34
 
32
35
  spec.add_development_dependency "bundler", "~> 1.10"
33
- spec.add_development_dependency "mysql2"
36
+ spec.add_development_dependency "codeclimate-test-reporter"
37
+ spec.add_development_dependency "coveralls"
38
+ spec.add_development_dependency "mysql2", "< 0.4.0"
34
39
  spec.add_development_dependency "pg"
35
40
  spec.add_development_dependency "pry-byebug"
36
41
  spec.add_development_dependency "rake", "~> 10.0"
42
+ spec.add_development_dependency "rake_shared_context"
37
43
  spec.add_development_dependency "rspec"
38
44
  spec.add_development_dependency "rspec-its"
39
45
  spec.add_development_dependency "rspec-power_assert"
46
+ spec.add_development_dependency "rubocop", "0.31.0"
40
47
  spec.add_development_dependency "sqlite3"
41
48
  end
@@ -5,3 +5,5 @@ require "active_record"
5
5
  module IndexShotgun
6
6
  # Your code goes here...
7
7
  end
8
+
9
+ require "index_shotgun/railtie" if defined?(Rails)
@@ -5,32 +5,55 @@ module IndexShotgun
5
5
  class << self
6
6
  using IndexShotgun::ArrayStartWith
7
7
 
8
+ # Search duplicate index
9
+ # @return [String] result message
10
+ def perform
11
+ tables = ActiveRecord::Base.connection.tables
12
+
13
+ duplicate_indexes =
14
+ tables.each_with_object([]) do |table, array|
15
+ response = check_indexes(table)
16
+ array.push(*response)
17
+ end
18
+
19
+ duplicate_indexes.each_with_object("") do |info, message|
20
+ message << <<-EOS.strip_heredoc
21
+ # =============================
22
+ # #{info[:index].table}
23
+ # =============================
24
+
25
+ # #{info[:result]}
26
+ # To remove this duplicate index, execute:
27
+ ALTER TABLE `#{info[:index].table}` DROP INDEX `#{info[:index].name}`;
28
+
29
+ EOS
30
+ end
31
+ end
32
+
33
+ # check duplicate indexes of table
34
+ # @param table [String] table name
35
+ # @return [Array<Hash>] array of index info
36
+ # index: index info {ActiveRecord::ConnectionAdapters::IndexDefinition}
37
+ # result: search result message
8
38
  def check_indexes(table)
9
39
  indexes = table_indexes(table)
10
40
 
11
- response = []
12
- indexes.each do |source_index|
13
- indexes.each do |target_index|
14
- next if source_index.name == target_index.name
15
-
16
- if source_index.columns.start_with?(target_index.columns)
17
- if target_index.unique
18
- last_column = source_index.columns.last
19
- response << {
20
- index: source_index,
21
- result: "#{source_index.name} has unnecessary column #{last_column} (#{target_index.name} is unique index!)",
22
- }
23
- else
24
- response << {
25
- index: target_index,
26
- result: "#{target_index.name} is a left-prefix of #{source_index.name}",
27
- }
28
- end
29
- end
41
+ indexes.permutation(2).each_with_object([]) do |(source_index, target_index), response|
42
+ next unless source_index.columns.start_with?(target_index.columns)
43
+
44
+ if target_index.unique
45
+ last_column = source_index.columns.last
46
+ response << {
47
+ index: source_index,
48
+ result: "#{source_index.name} has unnecessary column #{last_column} (#{target_index.name} is unique index!)",
49
+ }
50
+ else
51
+ response << {
52
+ index: target_index,
53
+ result: "#{target_index.name} is a left-prefix of #{source_index.name}",
54
+ }
30
55
  end
31
56
  end
32
-
33
- response
34
57
  end
35
58
 
36
59
  # get indexes of table
@@ -0,0 +1,58 @@
1
+ require "thor"
2
+ require "index_shotgun"
3
+ require "active_support/core_ext/hash"
4
+
5
+ module IndexShotgun
6
+ class CLI < Thor
7
+ desc "mysql", "Search duplicate indexes on MySQL"
8
+ option :database, required: true
9
+ option :encoding, default: "utf8"
10
+ option :pool, default: 5, type: :numeric
11
+ option :host, default: "localhost"
12
+ option :port, default: 3306, type: :numeric
13
+ option :username
14
+ option :password
15
+ def mysql
16
+ analyze("mysql2")
17
+ end
18
+
19
+ desc "postgresql", "Search duplicate indexes on PostgreSQL"
20
+ option :database, required: true
21
+ option :encoding, default: "utf8"
22
+ option :pool, default: 5, type: :numeric
23
+ option :host, default: "localhost"
24
+ option :port, default: 5432, type: :numeric
25
+ option :username
26
+ option :password
27
+ def postgresql
28
+ analyze("postgresql", "pg")
29
+ end
30
+
31
+ desc "sqlite3", "Search duplicate indexes on sqlite3"
32
+ option :database, required: true
33
+ def sqlite3
34
+ analyze("sqlite3")
35
+ end
36
+
37
+ desc "version", "Show index_shotgun version"
38
+ def version
39
+ puts IndexShotgun::VERSION
40
+ end
41
+
42
+ private
43
+
44
+ def analyze(adapter_name, gem_name = nil)
45
+ gem_name ||= adapter_name
46
+ begin
47
+ require gem_name
48
+ rescue LoadError
49
+ puts "[ERROR] #{adapter_name} is not installed. Please run `gem install #{gem_name}` and install gem"
50
+ exit!
51
+ end
52
+
53
+ config = options.reverse_merge(adapter: adapter_name)
54
+ ActiveRecord::Base.establish_connection(config)
55
+ puts IndexShotgun::Analyzer.perform
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,7 @@
1
+ module IndexShotgun
2
+ class Railtie < ::Rails::Railtie
3
+ rake_tasks do
4
+ require "index_shotgun/tasks"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1 @@
1
+ load "index_shotgun/tasks/index_shotgun.rake"
@@ -0,0 +1,6 @@
1
+ namespace :index_shotgun do
2
+ desc "Search duplicate indexes"
3
+ task :fire => :environment do
4
+ puts IndexShotgun::Analyzer.perform
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module IndexShotgun
2
- VERSION = "0.1.0.beta1"
2
+ VERSION = "0.1.0.beta2"
3
3
  end
@@ -0,0 +1,14 @@
1
+ #!/bin/bash -xe
2
+
3
+ cp travis_ci/database.yml.${DATABASE} spec/config/database.yml
4
+ bundle exec rspec
5
+
6
+ bundle exec ./exe/index_shotgun version
7
+
8
+ if [ ${DATABASE} = "mysql" ]; then
9
+ bundle exec ./exe/index_shotgun mysql --database=index_shotgun_test --username=travis
10
+ elif [ ${DATABASE} = "postgresql" ]; then
11
+ bundle exec ./exe/index_shotgun postgresql --database=index_shotgun_test --username=postgres
12
+ elif [ ${DATABASE} = "sqlite3" ]; then
13
+ bundle exec ./exe/index_shotgun sqlite3 --database=spec/db/index_shotgun_test.db
14
+ fi
@@ -0,0 +1,5 @@
1
+ test:
2
+ adapter: mysql2
3
+ database: index_shotgun_test
4
+ username: travis
5
+ encoding: utf8
@@ -0,0 +1,4 @@
1
+ test:
2
+ adapter: postgresql
3
+ database: index_shotgun_test
4
+ username: postgres
@@ -0,0 +1,3 @@
1
+ test:
2
+ adapter: sqlite3
3
+ database: db/index_shotgun_test.db
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: index_shotgun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.beta1
4
+ version: 0.1.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-06 00:00:00.000000000 Z
11
+ date: 2015-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: thor
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +53,21 @@ dependencies:
39
53
  - !ruby/object:Gem::Version
40
54
  version: '1.10'
41
55
  - !ruby/object:Gem::Dependency
42
- name: mysql2
56
+ name: codeclimate-test-reporter
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: coveralls
43
71
  requirement: !ruby/object:Gem::Requirement
44
72
  requirements:
45
73
  - - ">="
@@ -52,6 +80,20 @@ dependencies:
52
80
  - - ">="
53
81
  - !ruby/object:Gem::Version
54
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: mysql2
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "<"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.4.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "<"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.4.0
55
97
  - !ruby/object:Gem::Dependency
56
98
  name: pg
57
99
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +136,20 @@ dependencies:
94
136
  - - "~>"
95
137
  - !ruby/object:Gem::Version
96
138
  version: '10.0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rake_shared_context
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
97
153
  - !ruby/object:Gem::Dependency
98
154
  name: rspec
99
155
  requirement: !ruby/object:Gem::Requirement
@@ -136,6 +192,20 @@ dependencies:
136
192
  - - ">="
137
193
  - !ruby/object:Gem::Version
138
194
  version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: rubocop
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - '='
200
+ - !ruby/object:Gem::Version
201
+ version: 0.31.0
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - '='
207
+ - !ruby/object:Gem::Version
208
+ version: 0.31.0
139
209
  - !ruby/object:Gem::Dependency
140
210
  name: sqlite3
141
211
  requirement: !ruby/object:Gem::Requirement
@@ -158,8 +228,12 @@ executables:
158
228
  extensions: []
159
229
  extra_rdoc_files: []
160
230
  files:
231
+ - ".coveralls.yml"
161
232
  - ".gitignore"
233
+ - ".hound.yml"
162
234
  - ".rspec"
235
+ - ".rubocop.yml"
236
+ - ".rubocop_standard.yml"
163
237
  - ".travis.yml"
164
238
  - Gemfile
165
239
  - LICENSE.txt
@@ -172,7 +246,15 @@ files:
172
246
  - lib/index_shotgun.rb
173
247
  - lib/index_shotgun/analyzer.rb
174
248
  - lib/index_shotgun/array_start_with.rb
249
+ - lib/index_shotgun/cli.rb
250
+ - lib/index_shotgun/railtie.rb
251
+ - lib/index_shotgun/tasks.rb
252
+ - lib/index_shotgun/tasks/index_shotgun.rake
175
253
  - lib/index_shotgun/version.rb
254
+ - travis_ci/build.sh
255
+ - travis_ci/database.yml.mysql
256
+ - travis_ci/database.yml.postgresql
257
+ - travis_ci/database.yml.sqlite3
176
258
  homepage: https://github.com/sue445/index_shotgun
177
259
  licenses:
178
260
  - MIT
@@ -186,7 +268,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
186
268
  requirements:
187
269
  - - ">="
188
270
  - !ruby/object:Gem::Version
189
- version: '0'
271
+ version: 2.1.0
190
272
  required_rubygems_version: !ruby/object:Gem::Requirement
191
273
  requirements:
192
274
  - - ">"