lol_dba 2.0.0 → 2.0.1

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: 0ba7fdc2c7953969c50ccd82353b9e9162b6e21c
4
- data.tar.gz: 4e15e8ce2c0c07dd96a8cbd29a6eac62b06fe117
3
+ metadata.gz: 0f58898cf4d34daf83b52dbf1329aacfa7ea1531
4
+ data.tar.gz: a04f250fa27a24a68958f2393f4ff9344ddf73ab
5
5
  SHA512:
6
- metadata.gz: e05dbb7d70f02e178a53a28014b3bd0ca56be77bde892512e8b6f4e124e4c25853548f44bbb4a531a7c1545d69c7925c9986b67ef3b881d547a056bbfa020afc
7
- data.tar.gz: 0b005f850e1dc737e699c9052591c0a4e54454a3cda1deac9680e79f94384f332c2ff4ad271726e6721001e0ad4bfc1eeaff0908507b54f0946b78c891a2c840
6
+ metadata.gz: 102dfb9b0aa89fbc7829579f98aef6faf4371a971b5dfc1c2bd493871977ddab2567935a89aec59d908e85513f0dfd1bffd8e308d4b32740fb578f5e28b4dac3
7
+ data.tar.gz: c17fa9267d528fa442d3144a60efaaa6b906c6c6d2098fed54c60209db25642a2aa8e1b925c3892625c000a2afe205912dd13b9c7de4a3b80daf2b66bccb47e8
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lol_dba (1.6.7)
4
+ lol_dba (2.0.0)
5
5
  actionpack (>= 3.0, < 5.0)
6
6
  activerecord (>= 3.0, < 5.0)
7
7
  railties (>= 3.0, < 5.0)
@@ -9,36 +9,36 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionmailer (4.2.1)
13
- actionpack (= 4.2.1)
14
- actionview (= 4.2.1)
15
- activejob (= 4.2.1)
12
+ actionmailer (4.2.4)
13
+ actionpack (= 4.2.4)
14
+ actionview (= 4.2.4)
15
+ activejob (= 4.2.4)
16
16
  mail (~> 2.5, >= 2.5.4)
17
17
  rails-dom-testing (~> 1.0, >= 1.0.5)
18
- actionpack (4.2.1)
19
- actionview (= 4.2.1)
20
- activesupport (= 4.2.1)
18
+ actionpack (4.2.4)
19
+ actionview (= 4.2.4)
20
+ activesupport (= 4.2.4)
21
21
  rack (~> 1.6)
22
22
  rack-test (~> 0.6.2)
23
23
  rails-dom-testing (~> 1.0, >= 1.0.5)
24
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
25
- actionview (4.2.1)
26
- activesupport (= 4.2.1)
24
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
25
+ actionview (4.2.4)
26
+ activesupport (= 4.2.4)
27
27
  builder (~> 3.1)
28
28
  erubis (~> 2.7.0)
29
29
  rails-dom-testing (~> 1.0, >= 1.0.5)
30
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
31
- activejob (4.2.1)
32
- activesupport (= 4.2.1)
30
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
31
+ activejob (4.2.4)
32
+ activesupport (= 4.2.4)
33
33
  globalid (>= 0.3.0)
34
- activemodel (4.2.1)
35
- activesupport (= 4.2.1)
34
+ activemodel (4.2.4)
35
+ activesupport (= 4.2.4)
36
36
  builder (~> 3.1)
37
- activerecord (4.2.1)
38
- activemodel (= 4.2.1)
39
- activesupport (= 4.2.1)
37
+ activerecord (4.2.4)
38
+ activemodel (= 4.2.4)
39
+ activesupport (= 4.2.4)
40
40
  arel (~> 6.0)
41
- activesupport (4.2.1)
41
+ activesupport (4.2.4)
42
42
  i18n (~> 0.7)
43
43
  json (~> 1.7, >= 1.7.7)
44
44
  minitest (~> 5.1)
@@ -48,86 +48,80 @@ GEM
48
48
  bundler
49
49
  rake
50
50
  thor (>= 0.14.0)
51
- arel (6.0.0)
51
+ arel (6.0.3)
52
52
  builder (3.2.2)
53
53
  diff-lcs (1.2.5)
54
54
  erubis (2.7.0)
55
- globalid (0.3.3)
55
+ globalid (0.3.6)
56
56
  activesupport (>= 4.1.0)
57
- hike (1.2.3)
58
57
  i18n (0.7.0)
59
- json (1.8.2)
60
- loofah (2.0.1)
58
+ json (1.8.3)
59
+ loofah (2.0.3)
61
60
  nokogiri (>= 1.5.9)
62
61
  mail (2.6.3)
63
62
  mime-types (>= 1.16, < 3)
64
- mime-types (2.4.3)
63
+ mime-types (2.6.2)
65
64
  mini_portile (0.6.2)
66
- minitest (5.5.1)
67
- multi_json (1.11.0)
65
+ minitest (5.8.1)
68
66
  nokogiri (1.6.6.2)
69
67
  mini_portile (~> 0.6.0)
70
- power_assert (0.2.3)
71
- rack (1.6.0)
68
+ power_assert (0.2.4)
69
+ rack (1.6.4)
72
70
  rack-test (0.6.3)
73
71
  rack (>= 1.0)
74
- rails (4.2.1)
75
- actionmailer (= 4.2.1)
76
- actionpack (= 4.2.1)
77
- actionview (= 4.2.1)
78
- activejob (= 4.2.1)
79
- activemodel (= 4.2.1)
80
- activerecord (= 4.2.1)
81
- activesupport (= 4.2.1)
72
+ rails (4.2.4)
73
+ actionmailer (= 4.2.4)
74
+ actionpack (= 4.2.4)
75
+ actionview (= 4.2.4)
76
+ activejob (= 4.2.4)
77
+ activemodel (= 4.2.4)
78
+ activerecord (= 4.2.4)
79
+ activesupport (= 4.2.4)
82
80
  bundler (>= 1.3.0, < 2.0)
83
- railties (= 4.2.1)
81
+ railties (= 4.2.4)
84
82
  sprockets-rails
85
83
  rails-deprecated_sanitizer (1.0.3)
86
84
  activesupport (>= 4.2.0.alpha)
87
- rails-dom-testing (1.0.6)
85
+ rails-dom-testing (1.0.7)
88
86
  activesupport (>= 4.2.0.beta, < 5.0)
89
87
  nokogiri (~> 1.6.0)
90
88
  rails-deprecated_sanitizer (>= 1.0.1)
91
89
  rails-html-sanitizer (1.0.2)
92
90
  loofah (~> 2.0)
93
- railties (4.2.1)
94
- actionpack (= 4.2.1)
95
- activesupport (= 4.2.1)
91
+ railties (4.2.4)
92
+ actionpack (= 4.2.4)
93
+ activesupport (= 4.2.4)
96
94
  rake (>= 0.8.7)
97
95
  thor (>= 0.18.1, < 2.0)
98
96
  rake (10.4.2)
99
- rspec-core (3.2.2)
100
- rspec-support (~> 3.2.0)
101
- rspec-expectations (3.2.0)
97
+ rspec-core (3.3.2)
98
+ rspec-support (~> 3.3.0)
99
+ rspec-expectations (3.3.1)
102
100
  diff-lcs (>= 1.2.0, < 2.0)
103
- rspec-support (~> 3.2.0)
104
- rspec-mocks (3.2.1)
101
+ rspec-support (~> 3.3.0)
102
+ rspec-mocks (3.3.2)
105
103
  diff-lcs (>= 1.2.0, < 2.0)
106
- rspec-support (~> 3.2.0)
107
- rspec-rails (3.2.1)
104
+ rspec-support (~> 3.3.0)
105
+ rspec-rails (3.3.3)
108
106
  actionpack (>= 3.0, < 4.3)
109
107
  activesupport (>= 3.0, < 4.3)
110
108
  railties (>= 3.0, < 4.3)
111
- rspec-core (~> 3.2.0)
112
- rspec-expectations (~> 3.2.0)
113
- rspec-mocks (~> 3.2.0)
114
- rspec-support (~> 3.2.0)
115
- rspec-support (3.2.2)
116
- sprockets (2.12.3)
117
- hike (~> 1.2)
118
- multi_json (~> 1.0)
119
- rack (~> 1.0)
120
- tilt (~> 1.1, != 1.3.0)
121
- sprockets-rails (2.2.4)
109
+ rspec-core (~> 3.3.0)
110
+ rspec-expectations (~> 3.3.0)
111
+ rspec-mocks (~> 3.3.0)
112
+ rspec-support (~> 3.3.0)
113
+ rspec-support (3.3.0)
114
+ sprockets (3.4.0)
115
+ rack (> 1, < 3)
116
+ sprockets-rails (2.3.3)
122
117
  actionpack (>= 3.0)
123
118
  activesupport (>= 3.0)
124
119
  sprockets (>= 2.8, < 4.0)
125
- sqlite3 (1.3.10)
126
- test-unit (3.0.9)
120
+ sqlite3 (1.3.11)
121
+ test-unit (3.1.5)
127
122
  power_assert
128
123
  thor (0.19.1)
129
124
  thread_safe (0.3.5)
130
- tilt (1.4.1)
131
125
  tzinfo (1.2.2)
132
126
  thread_safe (~> 0.1)
133
127
 
@@ -141,3 +135,6 @@ DEPENDENCIES
141
135
  rspec-rails
142
136
  sqlite3
143
137
  test-unit
138
+
139
+ BUNDLED WITH
140
+ 1.10.6
data/README.md CHANGED
@@ -78,6 +78,8 @@ All feedback, bug reports and thoughts on this gratefully received.
78
78
  * [Philipp Weissensteiner](http://philippweissensteiner.com)
79
79
  * [Leung Ho Kuen](https://twitter.com/PikachuEXE)
80
80
  * [Lucas Mazza](https://twitter.com/lucasmazza)
81
+ * [Larry Reaves](https://github.com/yrral86)
82
+ * [James Bowles](https://github.com/jamesbowles)
81
83
 
82
84
  ### License
83
85
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- lol_dba (1.6.7)
4
+ lol_dba (2.0.0)
5
5
  actionpack (>= 3.0, < 5.0)
6
6
  activerecord (>= 3.0, < 5.0)
7
7
  railties (>= 3.0, < 5.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- lol_dba (1.6.7)
4
+ lol_dba (2.0.0)
5
5
  actionpack (>= 3.0, < 5.0)
6
6
  activerecord (>= 3.0, < 5.0)
7
7
  railties (>= 3.0, < 5.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- lol_dba (1.6.7)
4
+ lol_dba (2.0.0)
5
5
  actionpack (>= 3.0, < 5.0)
6
6
  activerecord (>= 3.0, < 5.0)
7
7
  railties (>= 3.0, < 5.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- lol_dba (1.6.7)
4
+ lol_dba (2.0.0)
5
5
  actionpack (>= 3.0, < 5.0)
6
6
  activerecord (>= 3.0, < 5.0)
7
7
  railties (>= 3.0, < 5.0)
@@ -115,18 +115,18 @@ EOM
115
115
  index_name = [association_foreign_key, foreign_key].sort
116
116
  when :has_many
117
117
  # has_many tables are threaten by the other side of the relation
118
- next unless reflection_options.options[:through]
118
+ next unless reflection_options.options[:through] && reflections[reflection_options.options[:through].to_s]
119
119
  through_class = reflections[reflection_options.options[:through].to_s].klass
120
120
  table_name = through_class.table_name
121
121
 
122
122
  foreign_key = get_through_foreign_key(class_name, reflection_options)
123
123
 
124
- if reflection_options.options[:source]
125
- association_class = through_class.reflections.stringify_keys[reflection_options.options[:source].to_s].klass
124
+ if source = reflection_options.options[:source]
125
+ association_class = through_class.reflections.stringify_keys[source.to_s].klass
126
126
  association_foreign_key = get_through_foreign_key(association_class, reflection_options)
127
- else
127
+ elsif through_reflections = through_class.reflections.stringify_keys[reflection_name.singularize]
128
128
  # go to joining model through has_many and find belongs_to
129
- association_foreign_key = through_class.reflections.stringify_keys[reflection_name.singularize].options[:foreign_key]
129
+ association_foreign_key = through_reflections.options[:foreign_key]
130
130
  end
131
131
 
132
132
  #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 = "2.0.0" unless defined? LolDba::VERSION
2
+ VERSION = "2.0.1" unless defined? LolDba::VERSION
3
3
  end
@@ -0,0 +1,3 @@
1
+ class Component < ActiveRecord::Base
2
+ has_many :groups, through: :group_components
3
+ end
@@ -0,0 +1,4 @@
1
+ class Group < ActiveRecord::Base
2
+ has_many :group_components
3
+ has_many :components, through: :group_components
4
+ end
@@ -0,0 +1,4 @@
1
+ class GroupComponent < ActiveRecord::Base
2
+ belongs_to :profile_group
3
+ belongs_to :profile_component
4
+ end
@@ -66,4 +66,17 @@ ActiveRecord::Schema.define do
66
66
  create_table "countries", :force => true do |t|
67
67
  t.column "name", :string
68
68
  end
69
- end
69
+
70
+ create_table "components", force: :cascade do |t|
71
+ end
72
+
73
+ create_table "group_components", force: :cascade do |t|
74
+ t.column "group_id", :integer
75
+ t.column "component_id", :integer
76
+ end
77
+
78
+ create_table "groups", force: :cascade do |t|
79
+ end
80
+
81
+
82
+ 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: 2.0.0
4
+ version: 2.0.1
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: 2015-04-19 00:00:00.000000000 Z
15
+ date: 2015-10-24 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activerecord
@@ -133,10 +133,13 @@ files:
133
133
  - spec/fixtures/app/models/company.rb
134
134
  - spec/fixtures/app/models/complex_billable_week.rb
135
135
  - spec/fixtures/app/models/complex_timesheet.rb
136
+ - spec/fixtures/app/models/component.rb
136
137
  - spec/fixtures/app/models/country.rb
137
138
  - spec/fixtures/app/models/freelancer.rb
138
139
  - spec/fixtures/app/models/gift.rb
139
140
  - spec/fixtures/app/models/god.rb
141
+ - spec/fixtures/app/models/group.rb
142
+ - spec/fixtures/app/models/group_component.rb
140
143
  - spec/fixtures/app/models/timesheet.rb
141
144
  - spec/fixtures/app/models/user.rb
142
145
  - spec/fixtures/app/models/worker.rb
@@ -165,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
168
  version: '0'
166
169
  requirements: []
167
170
  rubyforge_project:
168
- rubygems_version: 2.4.6
171
+ rubygems_version: 2.4.8
169
172
  signing_key:
170
173
  specification_version: 4
171
174
  summary: A small package of rake tasks to track down missing database indexes and
@@ -178,10 +181,13 @@ test_files:
178
181
  - spec/fixtures/app/models/company.rb
179
182
  - spec/fixtures/app/models/complex_billable_week.rb
180
183
  - spec/fixtures/app/models/complex_timesheet.rb
184
+ - spec/fixtures/app/models/component.rb
181
185
  - spec/fixtures/app/models/country.rb
182
186
  - spec/fixtures/app/models/freelancer.rb
183
187
  - spec/fixtures/app/models/gift.rb
184
188
  - spec/fixtures/app/models/god.rb
189
+ - spec/fixtures/app/models/group.rb
190
+ - spec/fixtures/app/models/group_component.rb
185
191
  - spec/fixtures/app/models/timesheet.rb
186
192
  - spec/fixtures/app/models/user.rb
187
193
  - spec/fixtures/app/models/worker.rb