lol_dba 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.3
5
+ gemfile:
6
+ - Gemfile
7
+ script: "bundle exec rake"
8
+ notifications:
9
+ recipients:
10
+ - diego@plentz.org
data/README.md CHANGED
@@ -1,9 +1,8 @@
1
- #lol_dba
1
+ #lol_dba ![travis](https://api.travis-ci.org/plentz/lol_dba.png?branch=master)
2
2
 
3
3
  lol_dba is a small package of rake tasks that scan your application models and displays a list of columns that probably should be indexed. Also, it can generate .sql migration scripts. Most of the code come from rails_indexes and migration_sql_generator.
4
4
 
5
- Installation
6
- ------------
5
+ ### Installation
7
6
 
8
7
  Add lol_dba to your Gemfile:
9
8
 
@@ -13,8 +12,7 @@ and install gem
13
12
 
14
13
  bundle install
15
14
 
16
- Usage
17
- -----
15
+ ### Usage
18
16
 
19
17
  Display a migration for adding/removing all necessary indexes based on associations:
20
18
 
@@ -26,32 +24,28 @@ Generate .sql files for all your migrations inside db/migrate_sql folder:
26
24
 
27
25
  Note that create an index in a big database may take a long time.
28
26
 
29
- Compatibility
30
- -------------
27
+ ### Compatibility
31
28
 
32
29
  Compatible with Ruby 1.9 and Rails 3.x. I think.
33
30
 
34
- About primary_key
35
- -----------------
31
+ ### About primary_key
32
+
36
33
  >The primary key is always indexed. This is generally true for all storage engines that at all supports indices.
37
34
 
38
- For this reason, no longer displays a gem suggestions about adding indexes to primary keys.
35
+ For this reason, we no longer suggest to add indexes to primary keys.
39
36
 
40
- Tests
41
- -----
37
+ ### Tests
42
38
 
43
39
  bundle install
44
40
  rake
45
41
 
46
42
  to run the tests.
47
43
 
48
- Feedback
49
- --------
44
+ ### Feedback
50
45
 
51
46
  All feedback, bug reports and thoughts on this gratefully received.
52
47
 
53
- Contributors
54
- ------
48
+ ### Contributors
55
49
 
56
50
  * [Diego Plentz](http://plentz.org)
57
51
  * [Elad Meidar](http://blog.eizesus.com)
@@ -60,6 +54,6 @@ Contributors
60
54
  * [Muness Alrubaie](http://muness.blogspot.com/)
61
55
  * [Vladimir Sharshov](https://github.com/warpc)
62
56
 
63
- License
64
- -------
57
+ ### License
58
+
65
59
  Lol DBA is released under the MIT license.
@@ -20,7 +20,7 @@ module LolDba
20
20
  end
21
21
 
22
22
  def migration_class
23
- name.camelize.constantize
23
+ name.camelize.split(".")[0].constantize
24
24
  end
25
25
 
26
26
  def up
@@ -1,3 +1,3 @@
1
1
  module LolDba
2
- VERSION = "1.4.1" unless defined? LolDba::VERSION
2
+ VERSION = "1.4.2" unless defined? LolDba::VERSION
3
3
  end
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lol_dba
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
5
- prerelease:
4
+ prerelease:
5
+ version: 1.4.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Diego Plentz
@@ -10,62 +10,60 @@ authors:
10
10
  - Eric Davis
11
11
  - Muness Alrubaie
12
12
  - Vladimir Sharshov
13
- autorequire:
13
+ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2012-12-22 00:00:00.000000000 Z
16
+ date: 2013-01-29 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: activerecord
20
- requirement: !ruby/object:Gem::Requirement
21
- none: false
20
+ version_requirements: !ruby/object:Gem::Requirement
22
21
  requirements:
23
- - - ! '>='
22
+ - - ">="
24
23
  - !ruby/object:Gem::Version
25
24
  version: '3.0'
26
- type: :runtime
27
- prerelease: false
28
- version_requirements: !ruby/object:Gem::Requirement
29
25
  none: false
26
+ requirement: !ruby/object:Gem::Requirement
30
27
  requirements:
31
- - - ! '>='
28
+ - - ">="
32
29
  - !ruby/object:Gem::Version
33
30
  version: '3.0'
31
+ none: false
32
+ prerelease: false
33
+ type: :runtime
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: actionpack
36
- requirement: !ruby/object:Gem::Requirement
37
- none: false
36
+ version_requirements: !ruby/object:Gem::Requirement
38
37
  requirements:
39
- - - ! '>='
38
+ - - ">="
40
39
  - !ruby/object:Gem::Version
41
40
  version: '3.0'
42
- type: :runtime
43
- prerelease: false
44
- version_requirements: !ruby/object:Gem::Requirement
45
41
  none: false
42
+ requirement: !ruby/object:Gem::Requirement
46
43
  requirements:
47
- - - ! '>='
44
+ - - ">="
48
45
  - !ruby/object:Gem::Version
49
46
  version: '3.0'
47
+ none: false
48
+ prerelease: false
49
+ type: :runtime
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: railties
52
- requirement: !ruby/object:Gem::Requirement
53
- none: false
52
+ version_requirements: !ruby/object:Gem::Requirement
54
53
  requirements:
55
- - - ! '>='
54
+ - - ">="
56
55
  - !ruby/object:Gem::Version
57
56
  version: '3.0'
58
- type: :runtime
59
- prerelease: false
60
- version_requirements: !ruby/object:Gem::Requirement
61
57
  none: false
58
+ requirement: !ruby/object:Gem::Requirement
62
59
  requirements:
63
- - - ! '>='
60
+ - - ">="
64
61
  - !ruby/object:Gem::Version
65
62
  version: '3.0'
66
- description: lol_dba is a small package of rake tasks that scan your application models
67
- and displays a list of columns that probably should be indexed. Also, it can generate
68
- .sql migration scripts.
63
+ none: false
64
+ prerelease: false
65
+ type: :runtime
66
+ description: lol_dba is a small package of rake tasks that scan your application models and displays a list of columns that probably should be indexed. Also, it can generate .sql migration scripts.
69
67
  email:
70
68
  - diego@plentz.org
71
69
  - elad@eizesus.com
@@ -75,7 +73,8 @@ executables: []
75
73
  extensions: []
76
74
  extra_rdoc_files: []
77
75
  files:
78
- - .gitignore
76
+ - ".gitignore"
77
+ - ".travis.yml"
79
78
  - Gemfile
80
79
  - Gemfile.lock
81
80
  - README.md
@@ -90,8 +89,6 @@ files:
90
89
  - lol_dba.gemspec
91
90
  - spec/associations_index_spec.rb
92
91
  - spec/common_function_spec.rb
93
- - spec/fixtures/app/controllers/cats_controller.rb
94
- - spec/fixtures/app/controllers/users_controller.rb
95
92
  - spec/fixtures/app/models/address.rb
96
93
  - spec/fixtures/app/models/billable_week.rb
97
94
  - spec/fixtures/app/models/company.rb
@@ -106,40 +103,38 @@ files:
106
103
  - spec/fixtures/app/models/worker.rb
107
104
  - spec/fixtures/app/models/worker_user.rb
108
105
  - spec/fixtures/app/models/wrong.rb
109
- - spec/fixtures/app/sweepers/user_sweeper.rb
110
106
  - spec/fixtures/schema.rb
111
107
  - spec/spec_helper.rb
112
108
  homepage: https://github.com/plentz/lol_dba
113
109
  licenses: []
114
- post_install_message:
110
+ post_install_message:
115
111
  rdoc_options: []
116
112
  require_paths:
117
113
  - lib
118
114
  - lib/lol_dba
119
115
  required_ruby_version: !ruby/object:Gem::Requirement
120
- none: false
121
116
  requirements:
122
- - - ! '>='
117
+ - - ">="
123
118
  - !ruby/object:Gem::Version
124
- version: '0'
125
- required_rubygems_version: !ruby/object:Gem::Requirement
119
+ version: !binary |-
120
+ MA==
126
121
  none: false
122
+ required_rubygems_version: !ruby/object:Gem::Requirement
127
123
  requirements:
128
- - - ! '>='
124
+ - - ">="
129
125
  - !ruby/object:Gem::Version
130
- version: '0'
126
+ version: !binary |-
127
+ MA==
128
+ none: false
131
129
  requirements: []
132
- rubyforge_project:
130
+ rubyforge_project:
133
131
  rubygems_version: 1.8.24
134
- signing_key:
132
+ signing_key:
135
133
  specification_version: 3
136
- summary: A small package of rake tasks to track down missing database indexes and
137
- generate sql migration scripts
134
+ summary: A small package of rake tasks to track down missing database indexes and generate sql migration scripts
138
135
  test_files:
139
136
  - spec/associations_index_spec.rb
140
137
  - spec/common_function_spec.rb
141
- - spec/fixtures/app/controllers/cats_controller.rb
142
- - spec/fixtures/app/controllers/users_controller.rb
143
138
  - spec/fixtures/app/models/address.rb
144
139
  - spec/fixtures/app/models/billable_week.rb
145
140
  - spec/fixtures/app/models/company.rb
@@ -154,6 +149,5 @@ test_files:
154
149
  - spec/fixtures/app/models/worker.rb
155
150
  - spec/fixtures/app/models/worker_user.rb
156
151
  - spec/fixtures/app/models/wrong.rb
157
- - spec/fixtures/app/sweepers/user_sweeper.rb
158
152
  - spec/fixtures/schema.rb
159
153
  - spec/spec_helper.rb
@@ -1,14 +0,0 @@
1
- class CatsController < ActionController::Base
2
-
3
- before_filter :find_commentable
4
-
5
- def index
6
- @cats = nil
7
- end
8
-
9
- protected
10
-
11
- def find_commentable
12
- #do something awesome
13
- end
14
- end
@@ -1,8 +0,0 @@
1
- class UsersController < ActionController::Base
2
-
3
-
4
- def index
5
- @freelancer = Freelancer.find_all_by_name(param[:name])
6
- @user = User.find(1)
7
- end
8
- end
@@ -1,9 +0,0 @@
1
- class UserSweeper < ActionController::Caching::Sweeper
2
- # This sweeper is going to keep an eye on the Product model
3
- observe User
4
-
5
- # If our sweeper detects that a Product was created call this
6
- def after_create(product)
7
- logger.info "Sweeped!"
8
- end
9
- end