proxied 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 29acafb1d9f1d68dd0c3992e3948516fc939fb351a521c819932417c7bc68cfb
4
+ data.tar.gz: 60a91e0f65fe7a4c2468a0c02136ace0184480daa2255fcb44795f7088aea214
5
+ SHA512:
6
+ metadata.gz: 5421ffe9184290f0becd77ae161d000f3a2f997fc9dd109efab7d365dfd49e8fd6e42c3aed2cb19e7e0142158be0d2ab16e545ea676a6f54a8a74bd3c683faaf
7
+ data.tar.gz: 1485343312be1dc6204be61a839cfc9ff45ad35c23f94f4ea2352411922100ebad413191aee04cc26139f135a6af668e50b1da28086d325587f0bf19530a8901
data/.gitignore ADDED
@@ -0,0 +1,19 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/tmp/
9
+ /spec/support/files/proxies.yml
10
+ /tmp/
11
+
12
+ # rspec failure tracking
13
+ .rspec_status
14
+
15
+ # pry history
16
+ .pry_history
17
+
18
+ # appraisals
19
+ /gemfiles/*.lock
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ proxied
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.0-preview2
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.6.0
5
+ before_install: gem install bundler -v 1.16.2
data/Appraisals ADDED
@@ -0,0 +1,13 @@
1
+ appraise 'mongoid7' do
2
+ gem "mongoid", "~> 7", require: "mongoid"
3
+ gem "bson_ext", platform: "ruby"
4
+ end
5
+
6
+ appraise 'activerecord5' do
7
+ gem "activerecord", ">= 5.2", require: "active_record"
8
+
9
+ # Ammeter dependencies:
10
+ gem "actionpack", ">= 5.2"
11
+ gem "activemodel", ">= 5.2"
12
+ gem "railties", ">= 5.2"
13
+ end
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at sebastian.johnsson@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in proxied.gemspec
6
+ gemspec
7
+
8
+ gem "rails", "~> 5.2"
data/Gemfile.lock ADDED
@@ -0,0 +1,202 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ proxied (0.1.0)
5
+ faraday (~> 0.15.2)
6
+ net-ssh (~> 5.0.2)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (5.2.0)
12
+ actionpack (= 5.2.0)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (>= 0.6.1)
15
+ actionmailer (5.2.0)
16
+ actionpack (= 5.2.0)
17
+ actionview (= 5.2.0)
18
+ activejob (= 5.2.0)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.2.0)
22
+ actionview (= 5.2.0)
23
+ activesupport (= 5.2.0)
24
+ rack (~> 2.0)
25
+ rack-test (>= 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
+ actionview (5.2.0)
29
+ activesupport (= 5.2.0)
30
+ builder (~> 3.1)
31
+ erubi (~> 1.4)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
+ activejob (5.2.0)
35
+ activesupport (= 5.2.0)
36
+ globalid (>= 0.3.6)
37
+ activemodel (5.2.0)
38
+ activesupport (= 5.2.0)
39
+ activerecord (5.2.0)
40
+ activemodel (= 5.2.0)
41
+ activesupport (= 5.2.0)
42
+ arel (>= 9.0)
43
+ activestorage (5.2.0)
44
+ actionpack (= 5.2.0)
45
+ activerecord (= 5.2.0)
46
+ marcel (~> 0.3.1)
47
+ activesupport (5.2.0)
48
+ concurrent-ruby (~> 1.0, >= 1.0.2)
49
+ i18n (>= 0.7, < 2)
50
+ minitest (~> 5.1)
51
+ tzinfo (~> 1.1)
52
+ addressable (2.5.2)
53
+ public_suffix (>= 2.0.2, < 4.0)
54
+ appraisal (2.2.0)
55
+ bundler
56
+ rake
57
+ thor (>= 0.14.0)
58
+ arel (9.0.0)
59
+ axiom-types (0.1.1)
60
+ descendants_tracker (~> 0.0.4)
61
+ ice_nine (~> 0.11.0)
62
+ thread_safe (~> 0.3, >= 0.3.1)
63
+ builder (3.2.3)
64
+ coderay (1.1.2)
65
+ coercible (1.0.0)
66
+ descendants_tracker (~> 0.0.1)
67
+ concurrent-ruby (1.0.5)
68
+ crack (0.4.3)
69
+ safe_yaml (~> 1.0.0)
70
+ crass (1.0.4)
71
+ descendants_tracker (0.0.4)
72
+ thread_safe (~> 0.3, >= 0.3.1)
73
+ diff-lcs (1.3)
74
+ equalizer (0.0.11)
75
+ erubi (1.7.1)
76
+ faraday (0.15.2)
77
+ multipart-post (>= 1.2, < 3)
78
+ generator_spec (0.9.4)
79
+ activesupport (>= 3.0.0)
80
+ railties (>= 3.0.0)
81
+ globalid (0.4.1)
82
+ activesupport (>= 4.2.0)
83
+ hashdiff (0.3.7)
84
+ i18n (1.0.1)
85
+ concurrent-ruby (~> 1.0)
86
+ ice_nine (0.11.2)
87
+ loofah (2.2.2)
88
+ crass (~> 1.0.2)
89
+ nokogiri (>= 1.5.9)
90
+ mail (2.7.0)
91
+ mini_mime (>= 0.1.1)
92
+ marcel (0.3.2)
93
+ mimemagic (~> 0.3.2)
94
+ method_source (0.9.0)
95
+ mimemagic (0.3.2)
96
+ mini_mime (1.0.0)
97
+ mini_portile2 (2.3.0)
98
+ minitest (5.11.3)
99
+ multipart-post (2.0.0)
100
+ net-ssh (5.0.2)
101
+ nio4r (2.3.1)
102
+ nokogiri (1.8.3)
103
+ mini_portile2 (~> 2.3.0)
104
+ pry (0.11.3)
105
+ coderay (~> 1.1.0)
106
+ method_source (~> 0.9.0)
107
+ public_suffix (3.0.2)
108
+ rack (2.0.5)
109
+ rack-test (1.0.0)
110
+ rack (>= 1.0, < 3)
111
+ rails (5.2.0)
112
+ actioncable (= 5.2.0)
113
+ actionmailer (= 5.2.0)
114
+ actionpack (= 5.2.0)
115
+ actionview (= 5.2.0)
116
+ activejob (= 5.2.0)
117
+ activemodel (= 5.2.0)
118
+ activerecord (= 5.2.0)
119
+ activestorage (= 5.2.0)
120
+ activesupport (= 5.2.0)
121
+ bundler (>= 1.3.0)
122
+ railties (= 5.2.0)
123
+ sprockets-rails (>= 2.0.0)
124
+ rails-dom-testing (2.0.3)
125
+ activesupport (>= 4.2.0)
126
+ nokogiri (>= 1.6)
127
+ rails-html-sanitizer (1.0.4)
128
+ loofah (~> 2.2, >= 2.2.2)
129
+ railties (5.2.0)
130
+ actionpack (= 5.2.0)
131
+ activesupport (= 5.2.0)
132
+ method_source
133
+ rake (>= 0.8.7)
134
+ thor (>= 0.18.1, < 2.0)
135
+ rake (12.3.1)
136
+ rdoc (6.0.4)
137
+ rspec-core (3.7.1)
138
+ rspec-support (~> 3.7.0)
139
+ rspec-expectations (3.7.0)
140
+ diff-lcs (>= 1.2.0, < 2.0)
141
+ rspec-support (~> 3.7.0)
142
+ rspec-mocks (3.7.0)
143
+ diff-lcs (>= 1.2.0, < 2.0)
144
+ rspec-support (~> 3.7.0)
145
+ rspec-rails (3.7.2)
146
+ actionpack (>= 3.0)
147
+ activesupport (>= 3.0)
148
+ railties (>= 3.0)
149
+ rspec-core (~> 3.7.0)
150
+ rspec-expectations (~> 3.7.0)
151
+ rspec-mocks (~> 3.7.0)
152
+ rspec-support (~> 3.7.0)
153
+ rspec-support (3.7.1)
154
+ safe_yaml (1.0.4)
155
+ sprockets (3.7.2)
156
+ concurrent-ruby (~> 1.0)
157
+ rack (> 1, < 3)
158
+ sprockets-rails (3.2.1)
159
+ actionpack (>= 4.0)
160
+ activesupport (>= 4.0)
161
+ sprockets (>= 3.0.0)
162
+ thor (0.20.0)
163
+ thread_safe (0.3.6)
164
+ tzinfo (1.2.5)
165
+ thread_safe (~> 0.1)
166
+ vcr (4.0.0)
167
+ virtus (1.0.5)
168
+ axiom-types (~> 0.1)
169
+ coercible (~> 1.0)
170
+ descendants_tracker (~> 0.0, >= 0.0.3)
171
+ equalizer (~> 0.0, >= 0.0.9)
172
+ webmock (3.4.2)
173
+ addressable (>= 2.3.6)
174
+ crack (>= 0.3.2)
175
+ hashdiff
176
+ websocket-driver (0.7.0)
177
+ websocket-extensions (>= 0.1.0)
178
+ websocket-extensions (0.1.3)
179
+
180
+ PLATFORMS
181
+ ruby
182
+
183
+ DEPENDENCIES
184
+ appraisal (~> 2.2)
185
+ bundler (~> 1.16.2)
186
+ generator_spec (~> 0.9.4)
187
+ proxied!
188
+ pry (~> 0.11.3)
189
+ rails (~> 5.2)
190
+ rake (~> 12.3.1)
191
+ rdoc (~> 6.0.4)
192
+ rspec-core (~> 3.7, >= 3.7.1)
193
+ rspec-expectations (~> 3.7)
194
+ rspec-mocks (~> 3.7)
195
+ rspec-rails (~> 3.7, >= 3.7.2)
196
+ rspec-support (~> 3.7, >= 3.7.1)
197
+ vcr (~> 4.0)
198
+ virtus (~> 1.0, >= 1.0.5)
199
+ webmock (~> 3.4.2)
200
+
201
+ BUNDLED WITH
202
+ 1.16.2
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Sebastian
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # Proxied
2
+
3
+ Proxied is a proxy management gem.
4
+
5
+ Supports ActiveRecord and Mongoid as database adapters.
6
+
7
+ Includes a proxy checker for both HTTP/HTTPS and SOCKS.
8
+
9
+ Includes Sidekiq jobs for invoking the checker asynchronously and/or in a scheduled fashion.
10
+
11
+ ## Installation
12
+
13
+ Add this line to your application's Gemfile:
14
+
15
+ ```ruby
16
+ gem 'proxied'
17
+ ```
18
+
19
+ And then execute:
20
+
21
+ $ bundle
22
+
23
+ Or install it yourself as:
24
+
25
+ $ gem install proxied
26
+
27
+ ## Usage
28
+
29
+ - TODO -
30
+
31
+ ## Development
32
+
33
+ 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.
34
+
35
+ To test specific appraisals/gemfiles, you can do
36
+
37
+ * ActiveRecord: bundle exec appraisal activerecord5 rake spec
38
+
39
+ In order to test specific specs: bundle exec appraisal activerecord5 rspec spec/lib/generators/activerecord_generator_spec.rb
40
+
41
+ * Mongoid: bundle exec appraisal mongoid7 rake spec ADAPTER=mongoid
42
+
43
+ In order to test specific specs: ADAPTER=mongoid bundle exec appraisal mongoid7 rspec spec/lib/generators/mongoid_generator_spec.rb
44
+
45
+
46
+ ## Contributing
47
+
48
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/proxied. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
49
+
50
+ ## License
51
+
52
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
53
+
54
+ ## Code of Conduct
55
+
56
+ Everyone interacting in the Proxied project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/proxied/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,19 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+ require 'appraisal'
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"]
8
+ task :default => :appraisal
9
+ else
10
+ task :default => :spec
11
+ end
12
+
13
+ desc 'Run specs for all adapters'
14
+ task :spec_all do
15
+ %w[active_record mongoid].each do |model_adapter|
16
+ puts "ADAPTER = #{model_adapter}"
17
+ system "ADAPTER=#{model_adapter} rake"
18
+ end
19
+ end