lol_dba 1.6.4 → 1.6.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40a0cac346cb77869a426efa8ff1838c230100a6
4
- data.tar.gz: aa7ea3476a95e5b1cb01be80846fd1798b479343
3
+ metadata.gz: b9641b91bac129bd6c79d4283c72ecaa32dc2f1b
4
+ data.tar.gz: dcbdfafeb25f68cf9ed8b330994b148e60279d38
5
5
  SHA512:
6
- metadata.gz: a3aeac0eef635979e9abb15f9e53d0b9a8136f379d1b91da4d4f50cb2d3fd161405648ea3fe28d1741d1e7197351723a884ade1861e7e727eab35b21542ee668
7
- data.tar.gz: 12140e5f8a44ab544fb6540035f3bd9c046973d7c0b5e44845a0e4a2238cdb447e3aa381f30f99e441e9c0953ba790098056e071f65ab2df95a89e03e63ab7ea
6
+ metadata.gz: 865bc86214659eda2e6ad1b588d57904349ffa34af15c99b2b1baec6a1981b7ddce319a4d16d1cf2dd80c06ad5cfdcf0ead04b55e9b80bc44c1d7e212b127b1a
7
+ data.tar.gz: 6364656d074e6e2029d7fc62658d76026b26258ac3274f12183f291394e2e52e48da751c24d5d85bf881032fb51ed59d048d782dfac5f1d1f8299872d6a7c691
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.0.0
3
+ - 2.2.1
4
+ - 2.1.5
5
5
  gemfile:
6
6
  - Gemfile
7
7
  script: "bundle exec rake"
@@ -1,91 +1,117 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- actionmailer (4.1.6)
5
- actionpack (= 4.1.6)
6
- actionview (= 4.1.6)
4
+ actionmailer (4.2.0)
5
+ actionpack (= 4.2.0)
6
+ actionview (= 4.2.0)
7
+ activejob (= 4.2.0)
7
8
  mail (~> 2.5, >= 2.5.4)
8
- actionpack (4.1.6)
9
- actionview (= 4.1.6)
10
- activesupport (= 4.1.6)
11
- rack (~> 1.5.2)
9
+ rails-dom-testing (~> 1.0, >= 1.0.5)
10
+ actionpack (4.2.0)
11
+ actionview (= 4.2.0)
12
+ activesupport (= 4.2.0)
13
+ rack (~> 1.6.0)
12
14
  rack-test (~> 0.6.2)
13
- actionview (4.1.6)
14
- activesupport (= 4.1.6)
15
+ rails-dom-testing (~> 1.0, >= 1.0.5)
16
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
17
+ actionview (4.2.0)
18
+ activesupport (= 4.2.0)
15
19
  builder (~> 3.1)
16
20
  erubis (~> 2.7.0)
17
- activemodel (4.1.6)
18
- activesupport (= 4.1.6)
21
+ rails-dom-testing (~> 1.0, >= 1.0.5)
22
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
23
+ activejob (4.2.0)
24
+ activesupport (= 4.2.0)
25
+ globalid (>= 0.3.0)
26
+ activemodel (4.2.0)
27
+ activesupport (= 4.2.0)
19
28
  builder (~> 3.1)
20
- activerecord (4.1.6)
21
- activemodel (= 4.1.6)
22
- activesupport (= 4.1.6)
23
- arel (~> 5.0.0)
24
- activesupport (4.1.6)
25
- i18n (~> 0.6, >= 0.6.9)
29
+ activerecord (4.2.0)
30
+ activemodel (= 4.2.0)
31
+ activesupport (= 4.2.0)
32
+ arel (~> 6.0)
33
+ activesupport (4.2.0)
34
+ i18n (~> 0.7)
26
35
  json (~> 1.7, >= 1.7.7)
27
36
  minitest (~> 5.1)
28
- thread_safe (~> 0.1)
37
+ thread_safe (~> 0.3, >= 0.3.4)
29
38
  tzinfo (~> 1.1)
30
- arel (5.0.1.20140414130214)
39
+ arel (6.0.0)
31
40
  builder (3.2.2)
32
41
  diff-lcs (1.2.5)
33
42
  erubis (2.7.0)
43
+ globalid (0.3.3)
44
+ activesupport (>= 4.1.0)
34
45
  hike (1.2.3)
35
- i18n (0.6.11)
36
- json (1.8.1)
37
- mail (2.6.1)
46
+ i18n (0.7.0)
47
+ json (1.8.2)
48
+ loofah (2.0.1)
49
+ nokogiri (>= 1.5.9)
50
+ mail (2.6.3)
38
51
  mime-types (>= 1.16, < 3)
39
- mime-types (2.3)
40
- minitest (5.4.1)
41
- multi_json (1.10.1)
42
- rack (1.5.2)
43
- rack-test (0.6.2)
52
+ mime-types (2.4.3)
53
+ mini_portile (0.6.2)
54
+ minitest (5.5.1)
55
+ multi_json (1.11.0)
56
+ nokogiri (1.6.6.2)
57
+ mini_portile (~> 0.6.0)
58
+ rack (1.6.0)
59
+ rack-test (0.6.3)
44
60
  rack (>= 1.0)
45
- rails (4.1.6)
46
- actionmailer (= 4.1.6)
47
- actionpack (= 4.1.6)
48
- actionview (= 4.1.6)
49
- activemodel (= 4.1.6)
50
- activerecord (= 4.1.6)
51
- activesupport (= 4.1.6)
61
+ rails (4.2.0)
62
+ actionmailer (= 4.2.0)
63
+ actionpack (= 4.2.0)
64
+ actionview (= 4.2.0)
65
+ activejob (= 4.2.0)
66
+ activemodel (= 4.2.0)
67
+ activerecord (= 4.2.0)
68
+ activesupport (= 4.2.0)
52
69
  bundler (>= 1.3.0, < 2.0)
53
- railties (= 4.1.6)
54
- sprockets-rails (~> 2.0)
55
- railties (4.1.6)
56
- actionpack (= 4.1.6)
57
- activesupport (= 4.1.6)
70
+ railties (= 4.2.0)
71
+ sprockets-rails
72
+ rails-deprecated_sanitizer (1.0.3)
73
+ activesupport (>= 4.2.0.alpha)
74
+ rails-dom-testing (1.0.5)
75
+ activesupport (>= 4.2.0.beta, < 5.0)
76
+ nokogiri (~> 1.6.0)
77
+ rails-deprecated_sanitizer (>= 1.0.1)
78
+ rails-html-sanitizer (1.0.2)
79
+ loofah (~> 2.0)
80
+ railties (4.2.0)
81
+ actionpack (= 4.2.0)
82
+ activesupport (= 4.2.0)
58
83
  rake (>= 0.8.7)
59
84
  thor (>= 0.18.1, < 2.0)
60
- rake (10.3.2)
61
- rspec-core (3.1.4)
62
- rspec-support (~> 3.1.0)
63
- rspec-expectations (3.1.1)
85
+ rake (10.4.2)
86
+ rspec-core (3.2.2)
87
+ rspec-support (~> 3.2.0)
88
+ rspec-expectations (3.2.0)
64
89
  diff-lcs (>= 1.2.0, < 2.0)
65
- rspec-support (~> 3.1.0)
66
- rspec-mocks (3.1.1)
67
- rspec-support (~> 3.1.0)
68
- rspec-rails (3.1.0)
69
- actionpack (>= 3.0)
70
- activesupport (>= 3.0)
71
- railties (>= 3.0)
72
- rspec-core (~> 3.1.0)
73
- rspec-expectations (~> 3.1.0)
74
- rspec-mocks (~> 3.1.0)
75
- rspec-support (~> 3.1.0)
76
- rspec-support (3.1.0)
77
- sprockets (2.12.2)
90
+ rspec-support (~> 3.2.0)
91
+ rspec-mocks (3.2.1)
92
+ diff-lcs (>= 1.2.0, < 2.0)
93
+ rspec-support (~> 3.2.0)
94
+ rspec-rails (3.2.1)
95
+ actionpack (>= 3.0, < 4.3)
96
+ activesupport (>= 3.0, < 4.3)
97
+ railties (>= 3.0, < 4.3)
98
+ rspec-core (~> 3.2.0)
99
+ rspec-expectations (~> 3.2.0)
100
+ rspec-mocks (~> 3.2.0)
101
+ rspec-support (~> 3.2.0)
102
+ rspec-support (3.2.2)
103
+ sprockets (2.12.3)
78
104
  hike (~> 1.2)
79
105
  multi_json (~> 1.0)
80
106
  rack (~> 1.0)
81
107
  tilt (~> 1.1, != 1.3.0)
82
- sprockets-rails (2.1.4)
108
+ sprockets-rails (2.2.4)
83
109
  actionpack (>= 3.0)
84
110
  activesupport (>= 3.0)
85
- sprockets (~> 2.8)
86
- sqlite3 (1.3.9)
111
+ sprockets (>= 2.8, < 4.0)
112
+ sqlite3 (1.3.10)
87
113
  thor (0.19.1)
88
- thread_safe (0.3.4)
114
+ thread_safe (0.3.5)
89
115
  tilt (1.4.1)
90
116
  tzinfo (1.2.2)
91
117
  thread_safe (~> 0.1)
data/README.md CHANGED
@@ -74,6 +74,7 @@ All feedback, bug reports and thoughts on this gratefully received.
74
74
  * [Adrian Hooper](https://twitter.com/PaReeOhNos)
75
75
  * [Ray Zane](https://github.com/rzane)
76
76
  * [Grant Gongaware](https://github.com/ggongaware)
77
+ * [Philipp Weissensteiner](http://philippweissensteiner.com)
77
78
 
78
79
  ### License
79
80
 
data/Rakefile CHANGED
@@ -1,6 +1,3 @@
1
- #require 'bundler'
2
- #Bundler::GemHelper.install_tasks
3
-
4
1
  require 'rubygems'
5
2
  require 'rspec/core/rake_task'
6
3
  require 'rdoc/task'
@@ -18,9 +18,9 @@ EOM
18
18
  end
19
19
 
20
20
  def self.get_through_foreign_key(target_class, reflection_options)
21
- if target_class.reflections[reflection_options.options[:through]]
21
+ if target_class.reflections[reflection_options.options[:through].to_s]
22
22
  # has_many :through
23
- reflection = target_class.reflections[reflection_options.options[:through]]
23
+ reflection = target_class.reflections[reflection_options.options[:through].to_s]
24
24
  else
25
25
  # has_and_belongs_to_many
26
26
  reflection = reflection_options
@@ -117,18 +117,17 @@ EOM
117
117
  when :has_many
118
118
  # has_many tables are threaten by the other side of the relation
119
119
  next unless reflection_options.options[:through]
120
-
121
- through_class = class_name.reflections[reflection_options.options[:through]].klass
120
+ through_class = class_name.reflections[reflection_options.options[:through].to_s].klass
122
121
  table_name = through_class.table_name
123
122
 
124
123
  foreign_key = get_through_foreign_key(class_name, reflection_options)
125
124
 
126
125
  if reflection_options.options[:source]
127
- association_class = through_class.reflections[reflection_options.options[:source]].klass
126
+ association_class = through_class.reflections[reflection_options.options[:source].to_s].klass
128
127
  association_foreign_key = get_through_foreign_key(association_class, reflection_options)
129
128
  else
130
129
  # go to joining model through has_many and find belongs_to
131
- blg_to_reflection = class_name.reflections[reflection_options.options[:through]]
130
+ blg_to_reflection = class_name.reflections[reflection_options.options[:through].to_s]
132
131
  if blg_to_reflection.options[:class_name]
133
132
  # has_many :class_name
134
133
  blg_to_class = blg_to_reflection.options[:class_name].constantize
@@ -138,10 +137,11 @@ EOM
138
137
  end
139
138
 
140
139
  #multiple level :through relation, can be ignored for now(it will be checked in the right relation)
141
- next if blg_to_class.reflections[reflection_name.to_s.singularize.to_sym].nil?
140
+ next if blg_to_class.reflections[reflection_name.to_s.singularize.to_s].nil?
141
+
142
142
 
143
143
  # get foreign_key from belongs_to
144
- association_foreign_key = blg_to_class.reflections[reflection_name.to_s.singularize.to_sym].options[:foreign_key]
144
+ association_foreign_key = blg_to_class.reflections[reflection_name.to_s.singularize.to_s].options[:foreign_key]
145
145
  end
146
146
 
147
147
  #FIXME currently we don't support :through => :another_regular_has_many_and_non_through_relation
@@ -1,3 +1,3 @@
1
1
  module LolDba
2
- VERSION = "1.6.4" unless defined? LolDba::VERSION
3
- end
2
+ VERSION = "1.6.5" unless defined? LolDba::VERSION
3
+ end
@@ -18,8 +18,8 @@ Gem::Specification.new do |s|
18
18
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
19
  s.require_paths = ["lib", "lib/lol_dba"]
20
20
 
21
- s.required_ruby_version = ">= 1.9.1"
22
- s.add_dependency "activerecord", ">= 3.0"
23
- s.add_dependency "actionpack", ">= 3.0"
24
- s.add_dependency "railties", ">= 3.0"
21
+ s.required_ruby_version = ">= 2.0.0"
22
+ s.add_dependency "activerecord", ">= 3.0", "< 5.0"
23
+ s.add_dependency "actionpack", ">= 3.0", "< 5.0"
24
+ s.add_dependency "railties", ">= 3.0", "< 5.0"
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lol_dba
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.4
4
+ version: 1.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Plentz
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-09-20 00:00:00.000000000 Z
15
+ date: 2015-03-15 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activerecord
@@ -21,6 +21,9 @@ dependencies:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
23
  version: '3.0'
24
+ - - "<"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.0'
24
27
  type: :runtime
25
28
  prerelease: false
26
29
  version_requirements: !ruby/object:Gem::Requirement
@@ -28,6 +31,9 @@ dependencies:
28
31
  - - ">="
29
32
  - !ruby/object:Gem::Version
30
33
  version: '3.0'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '5.0'
31
37
  - !ruby/object:Gem::Dependency
32
38
  name: actionpack
33
39
  requirement: !ruby/object:Gem::Requirement
@@ -35,6 +41,9 @@ dependencies:
35
41
  - - ">="
36
42
  - !ruby/object:Gem::Version
37
43
  version: '3.0'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '5.0'
38
47
  type: :runtime
39
48
  prerelease: false
40
49
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,6 +51,9 @@ dependencies:
42
51
  - - ">="
43
52
  - !ruby/object:Gem::Version
44
53
  version: '3.0'
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: '5.0'
45
57
  - !ruby/object:Gem::Dependency
46
58
  name: railties
47
59
  requirement: !ruby/object:Gem::Requirement
@@ -49,6 +61,9 @@ dependencies:
49
61
  - - ">="
50
62
  - !ruby/object:Gem::Version
51
63
  version: '3.0'
64
+ - - "<"
65
+ - !ruby/object:Gem::Version
66
+ version: '5.0'
52
67
  type: :runtime
53
68
  prerelease: false
54
69
  version_requirements: !ruby/object:Gem::Requirement
@@ -56,6 +71,9 @@ dependencies:
56
71
  - - ">="
57
72
  - !ruby/object:Gem::Version
58
73
  version: '3.0'
74
+ - - "<"
75
+ - !ruby/object:Gem::Version
76
+ version: '5.0'
59
77
  description: lol_dba is a small package of rake tasks that scan your application models
60
78
  and displays a list of columns that probably should be indexed. Also, it can generate
61
79
  .sql migration scripts.
@@ -116,7 +134,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
134
  requirements:
117
135
  - - ">="
118
136
  - !ruby/object:Gem::Version
119
- version: 1.9.1
137
+ version: 2.0.0
120
138
  required_rubygems_version: !ruby/object:Gem::Requirement
121
139
  requirements:
122
140
  - - ">="
@@ -124,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
142
  version: '0'
125
143
  requirements: []
126
144
  rubyforge_project:
127
- rubygems_version: 2.2.2
145
+ rubygems_version: 2.4.6
128
146
  signing_key:
129
147
  specification_version: 4
130
148
  summary: A small package of rake tasks to track down missing database indexes and