table_saw 2.9.0 → 2.10.0

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
  SHA256:
3
- metadata.gz: 73052f9f389e923a44a30245537349bf20aeccb941b6c9a737cd724429d99816
4
- data.tar.gz: 46a3903eaf79023dd986c0977fbe330ee3bebada1aada3da149ce7d59d3d4a36
3
+ metadata.gz: 2523b019080dccb116fed85c38ecb0a629cd6f8630abd65a1a30e2214c6a71b3
4
+ data.tar.gz: 03e53e17ef16f72e976772bc027ca4698ba8eaa7bf4498a2fae5ab7e7dfd3f7d
5
5
  SHA512:
6
- metadata.gz: 10511fdee69e7277992eed0bd5d7566ed880c1c33f24470f056fb470eba1ec2b808adbe3d88a65ecc9183bb378eab1cc6114f04f01ed6a43d4389f5dc7a474b8
7
- data.tar.gz: 21fd89f55177bc4d44a1061d6336689dd0e330950e647d3e85bf9c0e967e18eed377639cca9cf4460b3402ba400b9b2ea81cb416b8accaa8b52a36d8babcf520
6
+ metadata.gz: ab502f4b52e5e5214cca044d4ca450b9c885e63595423161e4ad130f85da6a5eb28fca008c77e49d70b675448ebe54a63bf6dfba465db6f47572b5d9b7fddbf3
7
+ data.tar.gz: 63a25f77f34251c801ba0f21aa5649988e763c1e8516dc4c1d3fc7976c2bd97c5bbc50d4fe6085b24032780ea7c93203d27c856c1304d681f6d2065a9a60f2f3
@@ -10,7 +10,6 @@ jobs:
10
10
  strategy:
11
11
  matrix:
12
12
  ruby:
13
- - '2.6.6'
14
13
  - '2.7.2'
15
14
  - '3.0.0'
16
15
  activerecord:
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 3.0.0
1
+ ruby 3.0.2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- table_saw (2.9.0)
4
+ table_saw (2.10.0)
5
5
  activerecord (>= 5.2)
6
6
  pg
7
7
  thor
@@ -9,66 +9,70 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (6.1.0)
13
- actionview (= 6.1.0)
14
- activesupport (= 6.1.0)
12
+ actionpack (6.1.4.1)
13
+ actionview (= 6.1.4.1)
14
+ activesupport (= 6.1.4.1)
15
15
  rack (~> 2.0, >= 2.0.9)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
19
- actionview (6.1.0)
20
- activesupport (= 6.1.0)
19
+ actionview (6.1.4.1)
20
+ activesupport (= 6.1.4.1)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
25
- activemodel (6.1.0)
26
- activesupport (= 6.1.0)
27
- activerecord (6.1.0)
28
- activemodel (= 6.1.0)
29
- activesupport (= 6.1.0)
30
- activesupport (6.1.0)
25
+ activemodel (6.1.4.1)
26
+ activesupport (= 6.1.4.1)
27
+ activerecord (6.1.4.1)
28
+ activemodel (= 6.1.4.1)
29
+ activesupport (= 6.1.4.1)
30
+ activesupport (6.1.4.1)
31
31
  concurrent-ruby (~> 1.0, >= 1.0.2)
32
32
  i18n (>= 1.6, < 2)
33
33
  minitest (>= 5.1)
34
34
  tzinfo (~> 2.0)
35
35
  zeitwerk (~> 2.3)
36
- appraisal (2.3.0)
36
+ appraisal (2.4.0)
37
37
  bundler
38
38
  rake
39
39
  thor (>= 0.14.0)
40
- ast (2.4.1)
40
+ ast (2.4.2)
41
41
  builder (3.2.4)
42
- coderay (1.1.2)
42
+ coderay (1.1.3)
43
43
  combustion (1.3.1)
44
44
  activesupport (>= 3.0.0)
45
45
  railties (>= 3.0.0)
46
46
  thor (>= 0.14.6)
47
- concurrent-ruby (1.1.7)
47
+ concurrent-ruby (1.1.9)
48
48
  crass (1.0.6)
49
- database_cleaner (1.7.0)
50
- diff-lcs (1.3)
51
- docile (1.3.1)
49
+ database_cleaner (2.0.1)
50
+ database_cleaner-active_record (~> 2.0.0)
51
+ database_cleaner-active_record (2.0.1)
52
+ activerecord (>= 5.a)
53
+ database_cleaner-core (~> 2.0.0)
54
+ database_cleaner-core (2.0.1)
55
+ diff-lcs (1.4.4)
56
+ docile (1.4.0)
52
57
  erubi (1.10.0)
53
- i18n (1.8.5)
58
+ i18n (1.8.10)
54
59
  concurrent-ruby (~> 1.0)
55
- json (2.3.1)
56
- loofah (2.8.0)
60
+ loofah (2.12.0)
57
61
  crass (~> 1.0.2)
58
62
  nokogiri (>= 1.5.9)
59
- method_source (0.9.2)
60
- mini_portile2 (2.5.0)
61
- minitest (5.14.2)
62
- nokogiri (1.11.1)
63
- mini_portile2 (~> 2.5.0)
63
+ method_source (1.0.0)
64
+ mini_portile2 (2.6.1)
65
+ minitest (5.14.4)
66
+ nokogiri (1.12.5)
67
+ mini_portile2 (~> 2.6.1)
64
68
  racc (~> 1.4)
65
69
  parallel (1.20.1)
66
- parser (3.0.0.0)
70
+ parser (3.0.1.1)
67
71
  ast (~> 2.4.1)
68
72
  pg (1.2.3)
69
- pry (0.12.2)
70
- coderay (~> 1.1.0)
71
- method_source (~> 0.9.0)
73
+ pry (0.14.1)
74
+ coderay (~> 1.1)
75
+ method_source (~> 1.0)
72
76
  racc (1.5.2)
73
77
  rack (2.2.3)
74
78
  rack-test (1.1.0)
@@ -76,58 +80,59 @@ GEM
76
80
  rails-dom-testing (2.0.3)
77
81
  activesupport (>= 4.2.0)
78
82
  nokogiri (>= 1.6)
79
- rails-html-sanitizer (1.3.0)
83
+ rails-html-sanitizer (1.4.2)
80
84
  loofah (~> 2.3)
81
- railties (6.1.0)
82
- actionpack (= 6.1.0)
83
- activesupport (= 6.1.0)
85
+ railties (6.1.4.1)
86
+ actionpack (= 6.1.4.1)
87
+ activesupport (= 6.1.4.1)
84
88
  method_source
85
- rake (>= 0.8.7)
89
+ rake (>= 0.13)
86
90
  thor (~> 1.0)
87
91
  rainbow (3.0.0)
88
- rake (13.0.1)
89
- regexp_parser (2.0.3)
90
- rexml (3.2.4)
91
- rspec (3.9.0)
92
- rspec-core (~> 3.9.0)
93
- rspec-expectations (~> 3.9.0)
94
- rspec-mocks (~> 3.9.0)
95
- rspec-core (3.9.1)
96
- rspec-support (~> 3.9.1)
97
- rspec-expectations (3.9.0)
92
+ rake (13.0.3)
93
+ regexp_parser (2.1.1)
94
+ rexml (3.2.5)
95
+ rspec (3.10.0)
96
+ rspec-core (~> 3.10.0)
97
+ rspec-expectations (~> 3.10.0)
98
+ rspec-mocks (~> 3.10.0)
99
+ rspec-core (3.10.1)
100
+ rspec-support (~> 3.10.0)
101
+ rspec-expectations (3.10.1)
98
102
  diff-lcs (>= 1.2.0, < 2.0)
99
- rspec-support (~> 3.9.0)
100
- rspec-mocks (3.9.1)
103
+ rspec-support (~> 3.10.0)
104
+ rspec-mocks (3.10.2)
101
105
  diff-lcs (>= 1.2.0, < 2.0)
102
- rspec-support (~> 3.9.0)
103
- rspec-support (3.9.2)
104
- rubocop (0.93.1)
106
+ rspec-support (~> 3.10.0)
107
+ rspec-support (3.10.2)
108
+ rubocop (1.14.0)
105
109
  parallel (~> 1.10)
106
- parser (>= 2.7.1.5)
110
+ parser (>= 3.0.0.0)
107
111
  rainbow (>= 2.2.2, < 4.0)
108
- regexp_parser (>= 1.8)
112
+ regexp_parser (>= 1.8, < 3.0)
109
113
  rexml
110
- rubocop-ast (>= 0.6.0)
114
+ rubocop-ast (>= 1.5.0, < 2.0)
111
115
  ruby-progressbar (~> 1.7)
112
- unicode-display_width (>= 1.4.0, < 2.0)
113
- rubocop-ast (1.3.0)
114
- parser (>= 2.7.1.5)
115
- rubocop-rspec (1.44.1)
116
- rubocop (~> 0.87)
117
- rubocop-ast (>= 0.7.1)
116
+ unicode-display_width (>= 1.4.0, < 3.0)
117
+ rubocop-ast (1.5.0)
118
+ parser (>= 3.0.1.1)
119
+ rubocop-rspec (2.3.0)
120
+ rubocop (~> 1.0)
121
+ rubocop-ast (>= 1.1.0)
118
122
  ruby-progressbar (1.11.0)
119
123
  scenic (1.5.4)
120
124
  activerecord (>= 4.0.0)
121
125
  railties (>= 4.0.0)
122
- simplecov (0.16.1)
126
+ simplecov (0.21.2)
123
127
  docile (~> 1.1)
124
- json (>= 1.8, < 3)
125
- simplecov-html (~> 0.10.0)
126
- simplecov-html (0.10.2)
127
- thor (1.0.1)
128
- tzinfo (2.0.3)
128
+ simplecov-html (~> 0.11)
129
+ simplecov_json_formatter (~> 0.1)
130
+ simplecov-html (0.12.3)
131
+ simplecov_json_formatter (0.1.3)
132
+ thor (1.1.0)
133
+ tzinfo (2.0.4)
129
134
  concurrent-ruby (~> 1.0)
130
- unicode-display_width (1.7.0)
135
+ unicode-display_width (2.0.0)
131
136
  zeitwerk (2.4.2)
132
137
 
133
138
  PLATFORMS
@@ -137,14 +142,14 @@ DEPENDENCIES
137
142
  appraisal
138
143
  bundler (~> 2.0)
139
144
  combustion (~> 1.3)
140
- database_cleaner (~> 1.7)
145
+ database_cleaner (~> 2)
141
146
  pry
142
- rake (~> 13.0)
147
+ rake (= 13.0.3)
143
148
  rspec (~> 3.0)
144
- rubocop-rspec (~> 1.33)
149
+ rubocop-rspec (~> 2.3)
145
150
  scenic (~> 1.5)
146
151
  simplecov (~> 0.16)
147
152
  table_saw!
148
153
 
149
154
  BUNDLED WITH
150
- 2.2.3
155
+ 2.2.22
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- table_saw (2.9.0)
4
+ table_saw (2.10.0)
5
5
  activerecord (>= 5.2)
6
6
  pg
7
7
  thor
@@ -9,25 +9,25 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (6.0.3.4)
13
- actionview (= 6.0.3.4)
14
- activesupport (= 6.0.3.4)
12
+ actionpack (6.0.4.1)
13
+ actionview (= 6.0.4.1)
14
+ activesupport (= 6.0.4.1)
15
15
  rack (~> 2.0, >= 2.0.8)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
19
- actionview (6.0.3.4)
20
- activesupport (= 6.0.3.4)
19
+ actionview (6.0.4.1)
20
+ activesupport (= 6.0.4.1)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
25
- activemodel (6.0.3.4)
26
- activesupport (= 6.0.3.4)
27
- activerecord (6.0.3.4)
28
- activemodel (= 6.0.3.4)
29
- activesupport (= 6.0.3.4)
30
- activesupport (6.0.3.4)
25
+ activemodel (6.0.4.1)
26
+ activesupport (= 6.0.4.1)
27
+ activerecord (6.0.4.1)
28
+ activemodel (= 6.0.4.1)
29
+ activesupport (= 6.0.4.1)
30
+ activesupport (6.0.4.1)
31
31
  concurrent-ruby (~> 1.0, >= 1.0.2)
32
32
  i18n (>= 0.7, < 2)
33
33
  minitest (~> 5.1)
@@ -37,54 +37,61 @@ GEM
37
37
  bundler
38
38
  rake
39
39
  thor (>= 0.14.0)
40
- ast (2.4.1)
40
+ ast (2.4.2)
41
41
  builder (3.2.4)
42
42
  coderay (1.1.3)
43
43
  combustion (1.3.1)
44
44
  activesupport (>= 3.0.0)
45
45
  railties (>= 3.0.0)
46
46
  thor (>= 0.14.6)
47
- concurrent-ruby (1.1.7)
47
+ concurrent-ruby (1.1.9)
48
48
  crass (1.0.6)
49
- database_cleaner (1.8.5)
49
+ database_cleaner (2.0.1)
50
+ database_cleaner-active_record (~> 2.0.0)
51
+ database_cleaner-active_record (2.0.1)
52
+ activerecord (>= 5.a)
53
+ database_cleaner-core (~> 2.0.0)
54
+ database_cleaner-core (2.0.1)
50
55
  diff-lcs (1.4.4)
51
- docile (1.3.4)
56
+ docile (1.4.0)
52
57
  erubi (1.10.0)
53
- i18n (1.8.5)
58
+ i18n (1.8.10)
54
59
  concurrent-ruby (~> 1.0)
55
- loofah (2.8.0)
60
+ loofah (2.12.0)
56
61
  crass (~> 1.0.2)
57
62
  nokogiri (>= 1.5.9)
58
63
  method_source (1.0.0)
59
- mini_portile2 (2.4.0)
60
- minitest (5.14.2)
61
- nokogiri (1.10.10)
62
- mini_portile2 (~> 2.4.0)
64
+ minitest (5.14.4)
65
+ nokogiri (1.12.5-x86_64-darwin)
66
+ racc (~> 1.4)
67
+ nokogiri (1.12.5-x86_64-linux)
68
+ racc (~> 1.4)
63
69
  parallel (1.20.1)
64
- parser (3.0.0.0)
70
+ parser (3.0.1.1)
65
71
  ast (~> 2.4.1)
66
72
  pg (1.2.3)
67
73
  pry (0.13.1)
68
74
  coderay (~> 1.1)
69
75
  method_source (~> 1.0)
76
+ racc (1.5.2)
70
77
  rack (2.2.3)
71
78
  rack-test (1.1.0)
72
79
  rack (>= 1.0, < 3)
73
80
  rails-dom-testing (2.0.3)
74
81
  activesupport (>= 4.2.0)
75
82
  nokogiri (>= 1.6)
76
- rails-html-sanitizer (1.3.0)
83
+ rails-html-sanitizer (1.4.2)
77
84
  loofah (~> 2.3)
78
- railties (6.0.3.4)
79
- actionpack (= 6.0.3.4)
80
- activesupport (= 6.0.3.4)
85
+ railties (6.0.4.1)
86
+ actionpack (= 6.0.4.1)
87
+ activesupport (= 6.0.4.1)
81
88
  method_source
82
89
  rake (>= 0.8.7)
83
90
  thor (>= 0.20.3, < 2.0)
84
91
  rainbow (3.0.0)
85
92
  rake (13.0.3)
86
- regexp_parser (2.0.3)
87
- rexml (3.2.4)
93
+ regexp_parser (2.1.1)
94
+ rexml (3.2.5)
88
95
  rspec (3.10.0)
89
96
  rspec-core (~> 3.10.0)
90
97
  rspec-expectations (~> 3.10.0)
@@ -98,38 +105,39 @@ GEM
98
105
  diff-lcs (>= 1.2.0, < 2.0)
99
106
  rspec-support (~> 3.10.0)
100
107
  rspec-support (3.10.1)
101
- rubocop (0.93.1)
108
+ rubocop (1.14.0)
102
109
  parallel (~> 1.10)
103
- parser (>= 2.7.1.5)
110
+ parser (>= 3.0.0.0)
104
111
  rainbow (>= 2.2.2, < 4.0)
105
- regexp_parser (>= 1.8)
112
+ regexp_parser (>= 1.8, < 3.0)
106
113
  rexml
107
- rubocop-ast (>= 0.6.0)
114
+ rubocop-ast (>= 1.5.0, < 2.0)
108
115
  ruby-progressbar (~> 1.7)
109
- unicode-display_width (>= 1.4.0, < 2.0)
110
- rubocop-ast (1.3.0)
111
- parser (>= 2.7.1.5)
112
- rubocop-rspec (1.44.1)
113
- rubocop (~> 0.87)
114
- rubocop-ast (>= 0.7.1)
116
+ unicode-display_width (>= 1.4.0, < 3.0)
117
+ rubocop-ast (1.5.0)
118
+ parser (>= 3.0.1.1)
119
+ rubocop-rspec (2.3.0)
120
+ rubocop (~> 1.0)
121
+ rubocop-ast (>= 1.1.0)
115
122
  ruby-progressbar (1.11.0)
116
123
  scenic (1.5.4)
117
124
  activerecord (>= 4.0.0)
118
125
  railties (>= 4.0.0)
119
- simplecov (0.20.0)
126
+ simplecov (0.21.2)
120
127
  docile (~> 1.1)
121
128
  simplecov-html (~> 0.11)
122
129
  simplecov_json_formatter (~> 0.1)
123
130
  simplecov-html (0.12.3)
124
- simplecov_json_formatter (0.1.2)
125
- thor (1.0.1)
131
+ simplecov_json_formatter (0.1.3)
132
+ thor (1.1.0)
126
133
  thread_safe (0.3.6)
127
134
  tzinfo (1.2.9)
128
135
  thread_safe (~> 0.1)
129
- unicode-display_width (1.7.0)
136
+ unicode-display_width (2.0.0)
130
137
  zeitwerk (2.4.2)
131
138
 
132
139
  PLATFORMS
140
+ x86_64-darwin-19
133
141
  x86_64-darwin-20
134
142
  x86_64-linux
135
143
 
@@ -138,14 +146,14 @@ DEPENDENCIES
138
146
  appraisal
139
147
  bundler (~> 2.0)
140
148
  combustion (~> 1.3)
141
- database_cleaner (~> 1.7)
149
+ database_cleaner (~> 2)
142
150
  pry
143
- rake (~> 13.0)
151
+ rake (= 13.0.3)
144
152
  rspec (~> 3.0)
145
- rubocop-rspec (~> 1.33)
153
+ rubocop-rspec (~> 2.3)
146
154
  scenic (~> 1.5)
147
155
  simplecov (~> 0.16)
148
156
  table_saw!
149
157
 
150
158
  BUNDLED WITH
151
- 2.2.3
159
+ 2.2.22
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- table_saw (2.9.0)
4
+ table_saw (2.10.0)
5
5
  activerecord (>= 5.2)
6
6
  pg
7
7
  thor
@@ -9,25 +9,25 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (6.1.0)
13
- actionview (= 6.1.0)
14
- activesupport (= 6.1.0)
12
+ actionpack (6.1.4.1)
13
+ actionview (= 6.1.4.1)
14
+ activesupport (= 6.1.4.1)
15
15
  rack (~> 2.0, >= 2.0.9)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
19
- actionview (6.1.0)
20
- activesupport (= 6.1.0)
19
+ actionview (6.1.4.1)
20
+ activesupport (= 6.1.4.1)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
25
- activemodel (6.1.0)
26
- activesupport (= 6.1.0)
27
- activerecord (6.1.0)
28
- activemodel (= 6.1.0)
29
- activesupport (= 6.1.0)
30
- activesupport (6.1.0)
25
+ activemodel (6.1.4.1)
26
+ activesupport (= 6.1.4.1)
27
+ activerecord (6.1.4.1)
28
+ activemodel (= 6.1.4.1)
29
+ activesupport (= 6.1.4.1)
30
+ activesupport (6.1.4.1)
31
31
  concurrent-ruby (~> 1.0, >= 1.0.2)
32
32
  i18n (>= 1.6, < 2)
33
33
  minitest (>= 5.1)
@@ -37,54 +37,61 @@ GEM
37
37
  bundler
38
38
  rake
39
39
  thor (>= 0.14.0)
40
- ast (2.4.1)
40
+ ast (2.4.2)
41
41
  builder (3.2.4)
42
42
  coderay (1.1.3)
43
43
  combustion (1.3.1)
44
44
  activesupport (>= 3.0.0)
45
45
  railties (>= 3.0.0)
46
46
  thor (>= 0.14.6)
47
- concurrent-ruby (1.1.7)
47
+ concurrent-ruby (1.1.9)
48
48
  crass (1.0.6)
49
- database_cleaner (1.8.5)
49
+ database_cleaner (2.0.1)
50
+ database_cleaner-active_record (~> 2.0.0)
51
+ database_cleaner-active_record (2.0.1)
52
+ activerecord (>= 5.a)
53
+ database_cleaner-core (~> 2.0.0)
54
+ database_cleaner-core (2.0.1)
50
55
  diff-lcs (1.4.4)
51
- docile (1.3.4)
56
+ docile (1.4.0)
52
57
  erubi (1.10.0)
53
- i18n (1.8.5)
58
+ i18n (1.8.10)
54
59
  concurrent-ruby (~> 1.0)
55
- loofah (2.8.0)
60
+ loofah (2.12.0)
56
61
  crass (~> 1.0.2)
57
62
  nokogiri (>= 1.5.9)
58
63
  method_source (1.0.0)
59
- mini_portile2 (2.4.0)
60
- minitest (5.14.2)
61
- nokogiri (1.10.10)
62
- mini_portile2 (~> 2.4.0)
64
+ minitest (5.14.4)
65
+ nokogiri (1.12.5-x86_64-darwin)
66
+ racc (~> 1.4)
67
+ nokogiri (1.12.5-x86_64-linux)
68
+ racc (~> 1.4)
63
69
  parallel (1.20.1)
64
- parser (3.0.0.0)
70
+ parser (3.0.1.1)
65
71
  ast (~> 2.4.1)
66
72
  pg (1.2.3)
67
73
  pry (0.13.1)
68
74
  coderay (~> 1.1)
69
75
  method_source (~> 1.0)
76
+ racc (1.5.2)
70
77
  rack (2.2.3)
71
78
  rack-test (1.1.0)
72
79
  rack (>= 1.0, < 3)
73
80
  rails-dom-testing (2.0.3)
74
81
  activesupport (>= 4.2.0)
75
82
  nokogiri (>= 1.6)
76
- rails-html-sanitizer (1.3.0)
83
+ rails-html-sanitizer (1.4.2)
77
84
  loofah (~> 2.3)
78
- railties (6.1.0)
79
- actionpack (= 6.1.0)
80
- activesupport (= 6.1.0)
85
+ railties (6.1.4.1)
86
+ actionpack (= 6.1.4.1)
87
+ activesupport (= 6.1.4.1)
81
88
  method_source
82
- rake (>= 0.8.7)
89
+ rake (>= 0.13)
83
90
  thor (~> 1.0)
84
91
  rainbow (3.0.0)
85
92
  rake (13.0.3)
86
- regexp_parser (2.0.3)
87
- rexml (3.2.4)
93
+ regexp_parser (2.1.1)
94
+ rexml (3.2.5)
88
95
  rspec (3.10.0)
89
96
  rspec-core (~> 3.10.0)
90
97
  rspec-expectations (~> 3.10.0)
@@ -98,37 +105,38 @@ GEM
98
105
  diff-lcs (>= 1.2.0, < 2.0)
99
106
  rspec-support (~> 3.10.0)
100
107
  rspec-support (3.10.1)
101
- rubocop (0.93.1)
108
+ rubocop (1.14.0)
102
109
  parallel (~> 1.10)
103
- parser (>= 2.7.1.5)
110
+ parser (>= 3.0.0.0)
104
111
  rainbow (>= 2.2.2, < 4.0)
105
- regexp_parser (>= 1.8)
112
+ regexp_parser (>= 1.8, < 3.0)
106
113
  rexml
107
- rubocop-ast (>= 0.6.0)
114
+ rubocop-ast (>= 1.5.0, < 2.0)
108
115
  ruby-progressbar (~> 1.7)
109
- unicode-display_width (>= 1.4.0, < 2.0)
110
- rubocop-ast (1.3.0)
111
- parser (>= 2.7.1.5)
112
- rubocop-rspec (1.44.1)
113
- rubocop (~> 0.87)
114
- rubocop-ast (>= 0.7.1)
116
+ unicode-display_width (>= 1.4.0, < 3.0)
117
+ rubocop-ast (1.5.0)
118
+ parser (>= 3.0.1.1)
119
+ rubocop-rspec (2.3.0)
120
+ rubocop (~> 1.0)
121
+ rubocop-ast (>= 1.1.0)
115
122
  ruby-progressbar (1.11.0)
116
123
  scenic (1.5.4)
117
124
  activerecord (>= 4.0.0)
118
125
  railties (>= 4.0.0)
119
- simplecov (0.20.0)
126
+ simplecov (0.21.2)
120
127
  docile (~> 1.1)
121
128
  simplecov-html (~> 0.11)
122
129
  simplecov_json_formatter (~> 0.1)
123
130
  simplecov-html (0.12.3)
124
- simplecov_json_formatter (0.1.2)
125
- thor (1.0.1)
131
+ simplecov_json_formatter (0.1.3)
132
+ thor (1.1.0)
126
133
  tzinfo (2.0.4)
127
134
  concurrent-ruby (~> 1.0)
128
- unicode-display_width (1.7.0)
135
+ unicode-display_width (2.0.0)
129
136
  zeitwerk (2.4.2)
130
137
 
131
138
  PLATFORMS
139
+ x86_64-darwin-19
132
140
  x86_64-darwin-20
133
141
  x86_64-linux
134
142
 
@@ -137,14 +145,14 @@ DEPENDENCIES
137
145
  appraisal
138
146
  bundler (~> 2.0)
139
147
  combustion (~> 1.3)
140
- database_cleaner (~> 1.7)
148
+ database_cleaner (~> 2)
141
149
  pry
142
- rake (~> 13.0)
150
+ rake (= 13.0.3)
143
151
  rspec (~> 3.0)
144
- rubocop-rspec (~> 1.33)
152
+ rubocop-rspec (~> 2.3)
145
153
  scenic (~> 1.5)
146
154
  simplecov (~> 0.16)
147
155
  table_saw!
148
156
 
149
157
  BUNDLED WITH
150
- 2.2.3
158
+ 2.2.22
@@ -6,7 +6,7 @@ module TableSaw
6
6
  attr_reader :table_name, :partial, :has_many
7
7
  attr_accessor :ids
8
8
 
9
- def initialize(table_name, ids: [], partial: true, has_many: [])
9
+ def initialize(table_name, ids: [], partial: true, has_many: {})
10
10
  @table_name = table_name
11
11
  @ids = ids
12
12
  @partial = partial
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TableSaw
4
+ module DependencyGraph
5
+ class BuildHasManyQuery
6
+ QUERY = <<~SQL.squish
7
+ select %{primary_key} from %{table} where %{clause} and %{polymorphic}
8
+ SQL
9
+
10
+ attr_reader :manifest, :directive, :foreign_key
11
+
12
+ def initialize(manifest, directive, foreign_key)
13
+ @manifest = manifest
14
+ @directive = directive
15
+ @foreign_key = foreign_key
16
+ end
17
+
18
+ def call
19
+ build_base_query
20
+ .then { |query| append_scope(query) }
21
+ .then { |query| append_limit(query) }
22
+ end
23
+
24
+ private
25
+
26
+ # rubocop:disable Metrics/AbcSize
27
+ def build_base_query
28
+ format(QUERY, primary_key: TableSaw.schema_cache.primary_keys(foreign_key.from_table),
29
+ table: foreign_key.from_table,
30
+ clause: TableSaw::Queries::SerializeSqlInClause.new(foreign_key.from_table,
31
+ foreign_key.column.primary_key,
32
+ directive.ids).call,
33
+ polymorphic: foreign_key.type_condition)
34
+ end
35
+ # rubocop:enable Metrics/AbcSize
36
+
37
+ def append_scope(query)
38
+ return query unless has_many&.scope
39
+
40
+ [query, has_many.scope].join(' and ')
41
+ end
42
+
43
+ def append_limit(query)
44
+ return query unless has_many&.limit
45
+
46
+ [query, "limit #{has_many.limit}"].join(' ')
47
+ end
48
+
49
+ def has_many
50
+ directive.has_many[foreign_key.from_table] ||
51
+ manifest.has_many.fetch(directive.table_name, {})[foreign_key.from_table]
52
+ end
53
+ end
54
+ end
55
+ end
@@ -3,10 +3,6 @@
3
3
  module TableSaw
4
4
  module DependencyGraph
5
5
  class HasManyDirectives
6
- QUERY = <<~SQL
7
- select %{primary_key} from %{table} where %{clause} and %{polymorphic}
8
- SQL
9
-
10
6
  attr_reader :manifest, :directive
11
7
 
12
8
  def initialize(manifest, directive)
@@ -34,25 +30,20 @@ module TableSaw
34
30
  def valid_associations
35
31
  associations.select do |fk|
36
32
  next false if directive.partial? && TableSaw.schema_cache.primary_keys(fk.from_table).nil?
37
- next true if directive.has_many.include?(fk.from_table)
33
+ next true if directive.has_many.key?(fk.from_table)
38
34
 
39
- manifest.has_many.fetch(directive.table_name, []).include?(fk.from_table)
35
+ manifest.has_many.fetch(directive.table_name, {}).key?(fk.from_table)
40
36
  end
41
37
  end
38
+ # rubocop:enable Metrics/AbcSize
42
39
 
43
40
  def query_result(foreign_key)
44
41
  return [] unless directive.selectable?
45
42
 
46
43
  TableSaw::Connection.exec(
47
- format(QUERY, primary_key: TableSaw.schema_cache.primary_keys(foreign_key.from_table),
48
- table: foreign_key.from_table,
49
- clause: TableSaw::Queries::SerializeSqlInClause.new(foreign_key.from_table,
50
- foreign_key.column.primary_key,
51
- directive.ids).call,
52
- polymorphic: foreign_key.type_condition)
44
+ TableSaw::DependencyGraph::BuildHasManyQuery.new(manifest, directive, foreign_key).call
53
45
  )
54
46
  end
55
- # rubocop:enable Metrics/AbcSize
56
47
  end
57
48
  end
58
49
  end
@@ -3,5 +3,6 @@
3
3
  require 'table_saw/dependency_graph/add_directive'
4
4
  require 'table_saw/dependency_graph/belongs_to_directives'
5
5
  require 'table_saw/dependency_graph/build'
6
+ require 'table_saw/dependency_graph/build_has_many_query'
6
7
  require 'table_saw/dependency_graph/dump_table'
7
8
  require 'table_saw/dependency_graph/has_many_directives'
@@ -5,6 +5,35 @@ require 'table_saw/associations'
5
5
 
6
6
  module TableSaw
7
7
  class Manifest
8
+ class HasManyEntry
9
+ def self.build(config)
10
+ config.each_with_object({}) do |(table, options), memo|
11
+ case table
12
+ when String
13
+ memo[table] = new(table, options)
14
+ when Hash
15
+ table, options = table.first
16
+ memo[table] = new(table, options)
17
+ end
18
+ end
19
+ end
20
+
21
+ attr_reader :table, :options
22
+
23
+ def initialize(table, options)
24
+ @table = table
25
+ @options = options || {}
26
+ end
27
+
28
+ def scope
29
+ options['scope']
30
+ end
31
+
32
+ def limit
33
+ options['limit']
34
+ end
35
+ end
36
+
8
37
  class Table
9
38
  attr_reader :variables, :config
10
39
 
@@ -30,7 +59,7 @@ module TableSaw
30
59
  end
31
60
 
32
61
  def has_many
33
- config.fetch('has_many', [])
62
+ config.fetch('has_many', {}).then { |config| HasManyEntry.build(config) }
34
63
  end
35
64
  end
36
65
 
@@ -58,7 +87,9 @@ module TableSaw
58
87
  end
59
88
 
60
89
  def has_many
61
- @has_many ||= config.fetch('has_many', {})
90
+ @has_many ||= config.fetch('has_many', {}).transform_values do |value|
91
+ HasManyEntry.build(value)
92
+ end
62
93
  end
63
94
 
64
95
  def foreign_keys
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TableSaw
4
- VERSION = '2.9.0'
4
+ VERSION = '2.10.0'
5
5
  end
data/table_saw.gemspec CHANGED
@@ -31,11 +31,11 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  spec.add_development_dependency 'bundler', '~> 2.0'
33
33
  spec.add_development_dependency 'combustion', '~> 1.3'
34
- spec.add_development_dependency 'database_cleaner', '~> 1.7'
34
+ spec.add_development_dependency 'database_cleaner', '~> 2'
35
35
  spec.add_development_dependency 'pry'
36
- spec.add_development_dependency 'rake', '~> 13.0'
36
+ spec.add_development_dependency 'rake', '13.0.3'
37
37
  spec.add_development_dependency 'rspec', '~> 3.0'
38
- spec.add_development_dependency 'rubocop-rspec', '~> 1.33'
38
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.3'
39
39
  spec.add_development_dependency 'scenic', '~> 1.5'
40
40
  spec.add_development_dependency 'simplecov', '~> 0.16'
41
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_saw
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hamed Asghari
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-05 00:00:00.000000000 Z
11
+ date: 2021-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.7'
89
+ version: '2'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '1.7'
96
+ version: '2'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: pry
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: rake
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: '13.0'
117
+ version: 13.0.3
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: '13.0'
124
+ version: 13.0.3
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rspec
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '1.33'
145
+ version: '2.3'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '1.33'
152
+ version: '2.3'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: scenic
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -216,6 +216,7 @@ files:
216
216
  - lib/table_saw/dependency_graph/add_directive.rb
217
217
  - lib/table_saw/dependency_graph/belongs_to_directives.rb
218
218
  - lib/table_saw/dependency_graph/build.rb
219
+ - lib/table_saw/dependency_graph/build_has_many_query.rb
219
220
  - lib/table_saw/dependency_graph/dump_table.rb
220
221
  - lib/table_saw/dependency_graph/has_many_directives.rb
221
222
  - lib/table_saw/foreign_key.rb
@@ -253,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
253
254
  - !ruby/object:Gem::Version
254
255
  version: '0'
255
256
  requirements: []
256
- rubygems_version: 3.2.3
257
+ rubygems_version: 3.2.22
257
258
  signing_key:
258
259
  specification_version: 4
259
260
  summary: Create a postgres dump file from a subset of tables