active_record_doctor 1.0.2 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,24 @@
1
1
  class SpyPrinter
2
- attr_reader :unindexed_foreign_keys
2
+ attr_reader :unindexed_foreign_keys, :extraneous_indexes
3
3
 
4
4
  def initialize
5
- @unindexed_foreign_keys = []
5
+ @unindexed_foreign_keys = nil
6
+ @extraneous_indexes = nil
6
7
  end
7
8
 
8
9
  def print_unindexed_foreign_keys(argument)
9
- @unindexed_foreign_keys << argument
10
+ if @unindexed_foreign_keys
11
+ fail("print_unindexed_foreign_keys cannot be called twice")
12
+ else
13
+ @unindexed_foreign_keys = argument
14
+ end
15
+ end
16
+
17
+ def print_extraneous_indexes(argument)
18
+ if @extraneous_indexes
19
+ fail("print_extraneous_indexes cannot be called twice")
20
+ else
21
+ @extraneous_indexes = argument
22
+ end
10
23
  end
11
24
  end
metadata CHANGED
@@ -1,55 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_doctor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Navis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-05 00:00:00.000000000 Z
11
+ date: 2016-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '4.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '4.2'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
25
39
  - !ruby/object:Gem::Version
26
40
  version: '4.2'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: sqlite3
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - "~>"
45
+ - - ~>
32
46
  - !ruby/object:Gem::Version
33
47
  version: '1.3'
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
- - - "~>"
52
+ - - ~>
39
53
  - !ruby/object:Gem::Version
40
54
  version: '1.3'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - "~>"
59
+ - - ~>
46
60
  - !ruby/object:Gem::Version
47
61
  version: '11.1'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - "~>"
66
+ - - ~>
53
67
  - !ruby/object:Gem::Version
54
68
  version: '11.1'
55
69
  description:
@@ -59,67 +73,69 @@ executables: []
59
73
  extensions: []
60
74
  extra_rdoc_files: []
61
75
  files:
62
- - README.rdoc
63
- - Rakefile
64
- - lib/active_record_doctor.rb
76
+ - lib/generators/active_record_doctor/add_indexes/add_indexes_generator.rb
77
+ - lib/generators/active_record_doctor/add_indexes/USAGE
78
+ - lib/active_record_doctor/railtie.rb
65
79
  - lib/active_record_doctor/printers.rb
66
80
  - lib/active_record_doctor/printers/io_printer.rb
67
- - lib/active_record_doctor/railtie.rb
68
81
  - lib/active_record_doctor/tasks.rb
69
- - lib/active_record_doctor/tasks/unindexed_foreign_keys.rb
70
82
  - lib/active_record_doctor/version.rb
71
- - lib/generators/active_record_doctor/add_indexes/USAGE
72
- - lib/generators/active_record_doctor/add_indexes/add_indexes_generator.rb
83
+ - lib/active_record_doctor/tasks/extraneous_indexes.rb
84
+ - lib/active_record_doctor/tasks/unindexed_foreign_keys.rb
85
+ - lib/active_record_doctor.rb
73
86
  - lib/tasks/active_record_doctor_tasks.rake
87
+ - Rakefile
88
+ - README.rdoc
89
+ - test/test_helper.rb
74
90
  - test/active_record_doctor/printers/io_printer_test.rb
91
+ - test/active_record_doctor/tasks/extraneous_indexes_test.rb
75
92
  - test/active_record_doctor/tasks/unindexed_foreign_keys_test.rb
76
93
  - test/dummy/README.rdoc
77
- - test/dummy/Rakefile
78
- - test/dummy/app/assets/javascripts/application.js
79
- - test/dummy/app/assets/stylesheets/application.css
80
- - test/dummy/app/controllers/application_controller.rb
94
+ - test/dummy/log/development.log
95
+ - test/dummy/log/test.log
96
+ - test/dummy/bin/rake
97
+ - test/dummy/bin/rails
98
+ - test/dummy/bin/setup
99
+ - test/dummy/bin/bundle
81
100
  - test/dummy/app/helpers/application_helper.rb
82
- - test/dummy/app/models/employer.rb
101
+ - test/dummy/app/controllers/application_controller.rb
102
+ - test/dummy/app/assets/stylesheets/application.css
103
+ - test/dummy/app/assets/javascripts/application.js
104
+ - test/dummy/app/views/layouts/application.html.erb
83
105
  - test/dummy/app/models/profile.rb
106
+ - test/dummy/app/models/employer.rb
84
107
  - test/dummy/app/models/user.rb
85
- - test/dummy/app/views/layouts/application.html.erb
86
- - test/dummy/bin/bundle
87
- - test/dummy/bin/rails
88
- - test/dummy/bin/rake
89
- - test/dummy/bin/setup
90
- - test/dummy/config.ru
108
+ - test/dummy/db/schema.rb
109
+ - test/dummy/db/migrate/20160213102131_create_employers.rb
110
+ - test/dummy/db/migrate/20160213101232_create_profiles.rb
111
+ - test/dummy/db/migrate/20160213101213_create_users.rb
112
+ - test/dummy/db/development.sqlite3
113
+ - test/dummy/db/test.sqlite3
114
+ - test/dummy/public/404.html
115
+ - test/dummy/public/500.html
116
+ - test/dummy/public/422.html
117
+ - test/dummy/public/favicon.ico
118
+ - test/dummy/config/secrets.yml
91
119
  - test/dummy/config/application.rb
92
- - test/dummy/config/boot.rb
93
- - test/dummy/config/database.yml
94
- - test/dummy/config/environment.rb
120
+ - test/dummy/config/routes.rb
95
121
  - test/dummy/config/environments/development.rb
96
- - test/dummy/config/environments/production.rb
97
122
  - test/dummy/config/environments/test.rb
98
- - test/dummy/config/initializers/assets.rb
123
+ - test/dummy/config/environments/production.rb
124
+ - test/dummy/config/environment.rb
125
+ - test/dummy/config/database.yml
126
+ - test/dummy/config/locales/en.yml
127
+ - test/dummy/config/initializers/wrap_parameters.rb
99
128
  - test/dummy/config/initializers/backtrace_silencers.rb
100
129
  - test/dummy/config/initializers/cookies_serializer.rb
101
- - test/dummy/config/initializers/filter_parameter_logging.rb
130
+ - test/dummy/config/initializers/session_store.rb
102
131
  - test/dummy/config/initializers/inflections.rb
132
+ - test/dummy/config/initializers/filter_parameter_logging.rb
133
+ - test/dummy/config/initializers/assets.rb
103
134
  - test/dummy/config/initializers/mime_types.rb
104
- - test/dummy/config/initializers/session_store.rb
105
- - test/dummy/config/initializers/wrap_parameters.rb
106
- - test/dummy/config/locales/en.yml
107
- - test/dummy/config/routes.rb
108
- - test/dummy/config/secrets.yml
109
- - test/dummy/db/development.sqlite3
110
- - test/dummy/db/migrate/20160213101213_create_users.rb
111
- - test/dummy/db/migrate/20160213101232_create_profiles.rb
112
- - test/dummy/db/migrate/20160213102131_create_employers.rb
113
- - test/dummy/db/schema.rb
114
- - test/dummy/db/test.sqlite3
115
- - test/dummy/log/development.log
116
- - test/dummy/log/test.log
117
- - test/dummy/public/404.html
118
- - test/dummy/public/422.html
119
- - test/dummy/public/500.html
120
- - test/dummy/public/favicon.ico
135
+ - test/dummy/config/boot.rb
136
+ - test/dummy/Rakefile
137
+ - test/dummy/config.ru
121
138
  - test/support/spy_printer.rb
122
- - test/test_helper.rb
123
139
  homepage: http://www.gregnavis.com/active-record-doctor/
124
140
  licenses:
125
141
  - MIT
@@ -130,23 +146,24 @@ require_paths:
130
146
  - lib
131
147
  required_ruby_version: !ruby/object:Gem::Requirement
132
148
  requirements:
133
- - - ">="
149
+ - - '>='
134
150
  - !ruby/object:Gem::Version
135
151
  version: '0'
136
152
  required_rubygems_version: !ruby/object:Gem::Requirement
137
153
  requirements:
138
- - - ">="
154
+ - - '>='
139
155
  - !ruby/object:Gem::Version
140
156
  version: '0'
141
157
  requirements: []
142
158
  rubyforge_project:
143
- rubygems_version: 2.5.1
159
+ rubygems_version: 2.0.14
144
160
  signing_key:
145
161
  specification_version: 4
146
162
  summary: A cure for your Active Record ailments.
147
163
  test_files:
148
164
  - test/test_helper.rb
149
165
  - test/active_record_doctor/printers/io_printer_test.rb
166
+ - test/active_record_doctor/tasks/extraneous_indexes_test.rb
150
167
  - test/active_record_doctor/tasks/unindexed_foreign_keys_test.rb
151
168
  - test/dummy/README.rdoc
152
169
  - test/dummy/log/development.log