proxied 0.2.1 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/Appraisals +9 -2
- data/Gemfile +1 -1
- data/Gemfile.lock +142 -120
- data/README.md +10 -4
- data/bin/console +1 -1
- data/lib/generators/active_record/templates/migration.rb +14 -10
- data/lib/generators/mongoid/proxied_generator.rb +4 -0
- data/lib/generators/templates/proxied.rb +21 -4
- data/lib/proxied/checker.rb +78 -40
- data/lib/proxied/configuration.rb +20 -14
- data/lib/proxied/importer.rb +13 -10
- data/lib/proxied/logger.rb +13 -3
- data/lib/proxied/nosql/proxy_methods.rb +7 -6
- data/lib/proxied/shared.rb +22 -11
- data/lib/proxied/sql/proxy_methods.rb +10 -9
- data/lib/proxied/utilities.rb +20 -27
- data/lib/proxied/version.rb +1 -1
- data/lib/tasks/tasks.rake +4 -4
- data/proxied.gemspec +16 -16
- metadata +33 -36
- data/gemfiles/.bundle/config +0 -2
- data/gemfiles/activerecord5.gemfile +0 -11
- data/gemfiles/mongoid7.gemfile +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db12c4ace8bc64f321360c8e1a6157d07dbd7ee645b6736f38bd1b19e12ef952
|
4
|
+
data.tar.gz: a894a6f8b9ca8608bf1d09670fb3c41010f3fe2c4265645a6c7508564f4f31f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4621888e60cfedd8dc04f923c57b2a0ed7cae70a642e9bfa9c2a3fcc23c209b03455fbe306e0f4c83ed1e04f82f8d49d46d49f3284563b64aa8a16b15a31663d
|
7
|
+
data.tar.gz: bcf9e6d50d2730c415a29a20d4bd27ef57e45bc4d814867715117e029cd667641bd7687baaef49627aaea0446781e5b49517532fcf1bebd5b58287bcc7dda8dd
|
data/.gitignore
CHANGED
data/Appraisals
CHANGED
@@ -1,13 +1,20 @@
|
|
1
1
|
appraise 'mongoid7' do
|
2
|
-
gem "mongoid", "~> 7", require: "mongoid"
|
2
|
+
gem "mongoid", "~> 7.2", require: "mongoid"
|
3
3
|
gem "bson_ext", platform: "ruby"
|
4
4
|
end
|
5
5
|
|
6
6
|
appraise 'activerecord5' do
|
7
7
|
gem "activerecord", ">= 5.2", require: "active_record"
|
8
8
|
|
9
|
-
# Ammeter dependencies:
|
10
9
|
gem "actionpack", ">= 5.2"
|
11
10
|
gem "activemodel", ">= 5.2"
|
12
11
|
gem "railties", ">= 5.2"
|
13
12
|
end
|
13
|
+
|
14
|
+
appraise 'activerecord6' do
|
15
|
+
gem "activerecord", ">= 6.1", require: "active_record"
|
16
|
+
|
17
|
+
gem "actionpack", ">= 6.1"
|
18
|
+
gem "activemodel", ">= 6.1"
|
19
|
+
gem "railties", ">= 6.1"
|
20
|
+
end
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,202 +1,224 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
proxied (0.2.
|
5
|
-
faraday (>= 0
|
6
|
-
net-ssh (>=
|
4
|
+
proxied (0.2.6)
|
5
|
+
faraday (>= 1.0)
|
6
|
+
net-ssh (>= 6.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actioncable (
|
12
|
-
actionpack (=
|
11
|
+
actioncable (6.1.0)
|
12
|
+
actionpack (= 6.1.0)
|
13
|
+
activesupport (= 6.1.0)
|
13
14
|
nio4r (~> 2.0)
|
14
15
|
websocket-driver (>= 0.6.1)
|
15
|
-
|
16
|
-
actionpack (=
|
17
|
-
|
18
|
-
|
16
|
+
actionmailbox (6.1.0)
|
17
|
+
actionpack (= 6.1.0)
|
18
|
+
activejob (= 6.1.0)
|
19
|
+
activerecord (= 6.1.0)
|
20
|
+
activestorage (= 6.1.0)
|
21
|
+
activesupport (= 6.1.0)
|
22
|
+
mail (>= 2.7.1)
|
23
|
+
actionmailer (6.1.0)
|
24
|
+
actionpack (= 6.1.0)
|
25
|
+
actionview (= 6.1.0)
|
26
|
+
activejob (= 6.1.0)
|
27
|
+
activesupport (= 6.1.0)
|
19
28
|
mail (~> 2.5, >= 2.5.4)
|
20
29
|
rails-dom-testing (~> 2.0)
|
21
|
-
actionpack (
|
22
|
-
actionview (=
|
23
|
-
activesupport (=
|
24
|
-
rack (~> 2.0)
|
30
|
+
actionpack (6.1.0)
|
31
|
+
actionview (= 6.1.0)
|
32
|
+
activesupport (= 6.1.0)
|
33
|
+
rack (~> 2.0, >= 2.0.9)
|
25
34
|
rack-test (>= 0.6.3)
|
26
35
|
rails-dom-testing (~> 2.0)
|
27
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
28
|
-
|
29
|
-
|
36
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
37
|
+
actiontext (6.1.0)
|
38
|
+
actionpack (= 6.1.0)
|
39
|
+
activerecord (= 6.1.0)
|
40
|
+
activestorage (= 6.1.0)
|
41
|
+
activesupport (= 6.1.0)
|
42
|
+
nokogiri (>= 1.8.5)
|
43
|
+
actionview (6.1.0)
|
44
|
+
activesupport (= 6.1.0)
|
30
45
|
builder (~> 3.1)
|
31
46
|
erubi (~> 1.4)
|
32
47
|
rails-dom-testing (~> 2.0)
|
33
|
-
rails-html-sanitizer (~> 1.
|
34
|
-
activejob (
|
35
|
-
activesupport (=
|
48
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
49
|
+
activejob (6.1.0)
|
50
|
+
activesupport (= 6.1.0)
|
36
51
|
globalid (>= 0.3.6)
|
37
|
-
activemodel (
|
38
|
-
activesupport (=
|
39
|
-
activerecord (
|
40
|
-
activemodel (=
|
41
|
-
activesupport (=
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
activerecord (=
|
52
|
+
activemodel (6.1.0)
|
53
|
+
activesupport (= 6.1.0)
|
54
|
+
activerecord (6.1.0)
|
55
|
+
activemodel (= 6.1.0)
|
56
|
+
activesupport (= 6.1.0)
|
57
|
+
activestorage (6.1.0)
|
58
|
+
actionpack (= 6.1.0)
|
59
|
+
activejob (= 6.1.0)
|
60
|
+
activerecord (= 6.1.0)
|
61
|
+
activesupport (= 6.1.0)
|
46
62
|
marcel (~> 0.3.1)
|
47
|
-
|
63
|
+
mimemagic (~> 0.3.2)
|
64
|
+
activesupport (6.1.0)
|
48
65
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
49
|
-
i18n (>=
|
50
|
-
minitest (
|
51
|
-
tzinfo (~>
|
52
|
-
|
53
|
-
|
54
|
-
|
66
|
+
i18n (>= 1.6, < 2)
|
67
|
+
minitest (>= 5.1)
|
68
|
+
tzinfo (~> 2.0)
|
69
|
+
zeitwerk (~> 2.3)
|
70
|
+
addressable (2.7.0)
|
71
|
+
public_suffix (>= 2.0.2, < 5.0)
|
72
|
+
appraisal (2.3.0)
|
55
73
|
bundler
|
56
74
|
rake
|
57
75
|
thor (>= 0.14.0)
|
58
|
-
arel (9.0.0)
|
59
76
|
axiom-types (0.1.1)
|
60
77
|
descendants_tracker (~> 0.0.4)
|
61
78
|
ice_nine (~> 0.11.0)
|
62
79
|
thread_safe (~> 0.3, >= 0.3.1)
|
63
|
-
builder (3.2.
|
64
|
-
coderay (1.1.
|
80
|
+
builder (3.2.4)
|
81
|
+
coderay (1.1.3)
|
65
82
|
coercible (1.0.0)
|
66
83
|
descendants_tracker (~> 0.0.1)
|
67
|
-
concurrent-ruby (1.1.
|
68
|
-
crack (0.4.
|
69
|
-
|
70
|
-
crass (1.0.
|
84
|
+
concurrent-ruby (1.1.7)
|
85
|
+
crack (0.4.5)
|
86
|
+
rexml
|
87
|
+
crass (1.0.6)
|
71
88
|
descendants_tracker (0.0.4)
|
72
89
|
thread_safe (~> 0.3, >= 0.3.1)
|
73
|
-
diff-lcs (1.
|
90
|
+
diff-lcs (1.4.4)
|
74
91
|
equalizer (0.0.11)
|
75
|
-
erubi (1.
|
76
|
-
faraday (
|
92
|
+
erubi (1.10.0)
|
93
|
+
faraday (1.2.0)
|
77
94
|
multipart-post (>= 1.2, < 3)
|
95
|
+
ruby2_keywords
|
78
96
|
generator_spec (0.9.4)
|
79
97
|
activesupport (>= 3.0.0)
|
80
98
|
railties (>= 3.0.0)
|
81
99
|
globalid (0.4.2)
|
82
100
|
activesupport (>= 4.2.0)
|
83
|
-
hashdiff (0.
|
84
|
-
i18n (1.
|
101
|
+
hashdiff (1.0.1)
|
102
|
+
i18n (1.8.5)
|
85
103
|
concurrent-ruby (~> 1.0)
|
86
104
|
ice_nine (0.11.2)
|
87
|
-
loofah (2.
|
105
|
+
loofah (2.8.0)
|
88
106
|
crass (~> 1.0.2)
|
89
107
|
nokogiri (>= 1.5.9)
|
90
108
|
mail (2.7.1)
|
91
109
|
mini_mime (>= 0.1.1)
|
92
110
|
marcel (0.3.3)
|
93
111
|
mimemagic (~> 0.3.2)
|
94
|
-
method_source (0.
|
95
|
-
mimemagic (0.3.
|
96
|
-
mini_mime (1.0.
|
112
|
+
method_source (1.0.0)
|
113
|
+
mimemagic (0.3.5)
|
114
|
+
mini_mime (1.0.2)
|
97
115
|
mini_portile2 (2.4.0)
|
98
|
-
minitest (5.
|
116
|
+
minitest (5.14.2)
|
99
117
|
multipart-post (2.1.1)
|
100
|
-
net-ssh (
|
101
|
-
nio4r (2.
|
102
|
-
nokogiri (1.10.
|
118
|
+
net-ssh (6.1.0)
|
119
|
+
nio4r (2.5.4)
|
120
|
+
nokogiri (1.10.10)
|
103
121
|
mini_portile2 (~> 2.4.0)
|
104
|
-
pry (0.
|
105
|
-
coderay (~> 1.1
|
106
|
-
method_source (~>
|
107
|
-
public_suffix (
|
108
|
-
rack (2.
|
122
|
+
pry (0.13.1)
|
123
|
+
coderay (~> 1.1)
|
124
|
+
method_source (~> 1.0)
|
125
|
+
public_suffix (4.0.6)
|
126
|
+
rack (2.2.3)
|
109
127
|
rack-test (1.1.0)
|
110
128
|
rack (>= 1.0, < 3)
|
111
|
-
rails (
|
112
|
-
actioncable (=
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
129
|
+
rails (6.1.0)
|
130
|
+
actioncable (= 6.1.0)
|
131
|
+
actionmailbox (= 6.1.0)
|
132
|
+
actionmailer (= 6.1.0)
|
133
|
+
actionpack (= 6.1.0)
|
134
|
+
actiontext (= 6.1.0)
|
135
|
+
actionview (= 6.1.0)
|
136
|
+
activejob (= 6.1.0)
|
137
|
+
activemodel (= 6.1.0)
|
138
|
+
activerecord (= 6.1.0)
|
139
|
+
activestorage (= 6.1.0)
|
140
|
+
activesupport (= 6.1.0)
|
141
|
+
bundler (>= 1.15.0)
|
142
|
+
railties (= 6.1.0)
|
123
143
|
sprockets-rails (>= 2.0.0)
|
124
144
|
rails-dom-testing (2.0.3)
|
125
145
|
activesupport (>= 4.2.0)
|
126
146
|
nokogiri (>= 1.6)
|
127
|
-
rails-html-sanitizer (1.0
|
128
|
-
loofah (~> 2.
|
129
|
-
railties (
|
130
|
-
actionpack (=
|
131
|
-
activesupport (=
|
147
|
+
rails-html-sanitizer (1.3.0)
|
148
|
+
loofah (~> 2.3)
|
149
|
+
railties (6.1.0)
|
150
|
+
actionpack (= 6.1.0)
|
151
|
+
activesupport (= 6.1.0)
|
132
152
|
method_source
|
133
153
|
rake (>= 0.8.7)
|
134
|
-
thor (
|
135
|
-
rake (
|
136
|
-
rdoc (6.
|
137
|
-
|
138
|
-
|
139
|
-
|
154
|
+
thor (~> 1.0)
|
155
|
+
rake (13.0.3)
|
156
|
+
rdoc (6.3.0)
|
157
|
+
rexml (3.2.4)
|
158
|
+
rspec-core (3.10.0)
|
159
|
+
rspec-support (~> 3.10.0)
|
160
|
+
rspec-expectations (3.10.0)
|
140
161
|
diff-lcs (>= 1.2.0, < 2.0)
|
141
|
-
rspec-support (~> 3.
|
142
|
-
rspec-mocks (3.
|
162
|
+
rspec-support (~> 3.10.0)
|
163
|
+
rspec-mocks (3.10.0)
|
143
164
|
diff-lcs (>= 1.2.0, < 2.0)
|
144
|
-
rspec-support (~> 3.
|
145
|
-
rspec-rails (
|
146
|
-
actionpack (>=
|
147
|
-
activesupport (>=
|
148
|
-
railties (>=
|
149
|
-
rspec-core (~> 3.
|
150
|
-
rspec-expectations (~> 3.
|
151
|
-
rspec-mocks (~> 3.
|
152
|
-
rspec-support (~> 3.
|
153
|
-
rspec-support (3.
|
154
|
-
|
155
|
-
sprockets (
|
165
|
+
rspec-support (~> 3.10.0)
|
166
|
+
rspec-rails (4.0.2)
|
167
|
+
actionpack (>= 4.2)
|
168
|
+
activesupport (>= 4.2)
|
169
|
+
railties (>= 4.2)
|
170
|
+
rspec-core (~> 3.10)
|
171
|
+
rspec-expectations (~> 3.10)
|
172
|
+
rspec-mocks (~> 3.10)
|
173
|
+
rspec-support (~> 3.10)
|
174
|
+
rspec-support (3.10.0)
|
175
|
+
ruby2_keywords (0.0.2)
|
176
|
+
sprockets (4.0.2)
|
156
177
|
concurrent-ruby (~> 1.0)
|
157
178
|
rack (> 1, < 3)
|
158
|
-
sprockets-rails (3.2.
|
179
|
+
sprockets-rails (3.2.2)
|
159
180
|
actionpack (>= 4.0)
|
160
181
|
activesupport (>= 4.0)
|
161
182
|
sprockets (>= 3.0.0)
|
162
|
-
thor (0.
|
183
|
+
thor (1.0.1)
|
163
184
|
thread_safe (0.3.6)
|
164
|
-
tzinfo (
|
165
|
-
|
166
|
-
vcr (
|
185
|
+
tzinfo (2.0.4)
|
186
|
+
concurrent-ruby (~> 1.0)
|
187
|
+
vcr (6.0.0)
|
167
188
|
virtus (1.0.5)
|
168
189
|
axiom-types (~> 0.1)
|
169
190
|
coercible (~> 1.0)
|
170
191
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
171
192
|
equalizer (~> 0.0, >= 0.0.9)
|
172
|
-
webmock (3.
|
193
|
+
webmock (3.11.0)
|
173
194
|
addressable (>= 2.3.6)
|
174
195
|
crack (>= 0.3.2)
|
175
196
|
hashdiff (>= 0.4.0, < 2.0.0)
|
176
|
-
websocket-driver (0.7.
|
197
|
+
websocket-driver (0.7.3)
|
177
198
|
websocket-extensions (>= 0.1.0)
|
178
|
-
websocket-extensions (0.1.
|
199
|
+
websocket-extensions (0.1.5)
|
200
|
+
zeitwerk (2.4.2)
|
179
201
|
|
180
202
|
PLATFORMS
|
181
203
|
ruby
|
182
204
|
|
183
205
|
DEPENDENCIES
|
184
|
-
appraisal (>= 2.
|
185
|
-
bundler (>=
|
186
|
-
generator_spec (>= 0.9
|
206
|
+
appraisal (>= 2.3)
|
207
|
+
bundler (>= 2.0)
|
208
|
+
generator_spec (>= 0.9)
|
187
209
|
proxied!
|
188
|
-
pry (>= 0.
|
189
|
-
rails (
|
190
|
-
rake (>=
|
191
|
-
rdoc (>= 6.
|
192
|
-
rspec-core (>= 3.
|
193
|
-
rspec-expectations (>= 3.
|
194
|
-
rspec-mocks (>= 3.
|
195
|
-
rspec-rails (>=
|
196
|
-
rspec-support (>= 3.
|
197
|
-
vcr (>=
|
210
|
+
pry (>= 0.13)
|
211
|
+
rails (>= 6.0)
|
212
|
+
rake (>= 13.0)
|
213
|
+
rdoc (>= 6.3)
|
214
|
+
rspec-core (>= 3.10)
|
215
|
+
rspec-expectations (>= 3.10)
|
216
|
+
rspec-mocks (>= 3.10)
|
217
|
+
rspec-rails (>= 4.0)
|
218
|
+
rspec-support (>= 3.10)
|
219
|
+
vcr (>= 6.0)
|
198
220
|
virtus (>= 1.0)
|
199
|
-
webmock (>= 3.
|
221
|
+
webmock (>= 3.11)
|
200
222
|
|
201
223
|
BUNDLED WITH
|
202
|
-
1.
|
224
|
+
2.1.4
|
data/README.md
CHANGED
@@ -62,16 +62,22 @@ Features:
|
|
62
62
|
|
63
63
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
64
64
|
|
65
|
+
### Appraisals
|
66
|
+
|
67
|
+
Install appraisal dependencies (if not already done):
|
68
|
+
```
|
69
|
+
bundle exec appraisal install
|
70
|
+
```
|
71
|
+
|
65
72
|
To test specific appraisals/gemfiles, you can do
|
66
73
|
|
67
|
-
* ActiveRecord: bundle exec appraisal
|
74
|
+
* ActiveRecord: bundle exec appraisal activerecord6 rake spec
|
68
75
|
|
69
|
-
In order to test specific specs: bundle exec appraisal
|
76
|
+
In order to test specific specs: `bundle exec appraisal activerecord6 rspec spec/lib/generators/activerecord_generator_spec.rb`
|
70
77
|
|
71
78
|
* Mongoid: bundle exec appraisal mongoid7 rake spec ADAPTER=mongoid
|
72
79
|
|
73
|
-
In order to test specific specs: ADAPTER=mongoid bundle exec appraisal mongoid7 rspec spec/lib/generators/mongoid_generator_spec.rb
|
74
|
-
|
80
|
+
In order to test specific specs: `ADAPTER=mongoid bundle exec appraisal mongoid7 rspec spec/lib/generators/mongoid_generator_spec.rb`
|
75
81
|
|
76
82
|
## Contributing
|
77
83
|
|
data/bin/console
CHANGED
@@ -8,7 +8,7 @@ require "proxied"
|
|
8
8
|
|
9
9
|
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
10
|
require "pry"
|
11
|
-
Pry.config.
|
11
|
+
Pry.config.history_file = File.join(__FILE__, "../.pry_history")
|
12
12
|
Pry.start
|
13
13
|
|
14
14
|
#require "irb"
|
@@ -3,19 +3,23 @@
|
|
3
3
|
class ProxiedCreate<%= table_name.camelize %> < ActiveRecord::Migration<%= migration_version %>
|
4
4
|
def change
|
5
5
|
create_table :<%= table_name %><%= primary_key_type %> do |t|
|
6
|
-
t.string
|
7
|
-
t.string
|
8
|
-
t.integer
|
9
|
-
t.string :username
|
10
|
-
t.string :password
|
6
|
+
t.string :host, null: false, index: true
|
7
|
+
t.string :ip_address, null: false, index: true
|
8
|
+
t.integer :port, null: false, index: true
|
11
9
|
|
12
|
-
t.string
|
13
|
-
t.string
|
14
|
-
t.string
|
10
|
+
t.string :username
|
11
|
+
t.string :password
|
12
|
+
t.string :auth_mode, null: false, default: 'credentials', index: true
|
15
13
|
|
16
|
-
t.string
|
17
|
-
t.string
|
14
|
+
t.string :protocol, null: false, default: 'http', index: true
|
15
|
+
t.string :proxy_type, null: false, default: 'public', index: true
|
16
|
+
t.string :category
|
18
17
|
|
18
|
+
t.string :country, index: true
|
19
|
+
t.string :city, index: true
|
20
|
+
|
21
|
+
t.boolean :checkable, null: false, default: true, index: true
|
22
|
+
t.boolean :asyncable, null: false, default: true, index: true
|
19
23
|
t.datetime :last_checked_at, index: true
|
20
24
|
|
21
25
|
t.boolean :valid_proxy, null: false, default: false, index: true
|