rack-builtwith 1.0.0.alpha

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fb29e6a96a3206d51698953cc6e4ec72e2d83d06b22384793292485083dbaf10
4
+ data.tar.gz: e33c8cf3a45c9b695c13c972c2db9f723823df3e2bdecf2986d254c3a2a98dfb
5
+ SHA512:
6
+ metadata.gz: 5457425695cad7798d22e098e8b141723ae24c685e9c553d7e884e60874200571673e7747ab6187252969e45cdb3c7b0ea29bc247ec0ec6fe8e35b55d912646f
7
+ data.tar.gz: 5ac6faadf8f922212134332f003ccbc561df4b3fb18fe185ca255ad0241fbec9f776d978b3b66cc3ee528dc4820c30c5d465e2c4fa7a0b89b11b0b12bf22c70b
@@ -0,0 +1,3 @@
1
+ l/P�4{@'�0��b9g�_ (�4����iK���d,f�J�\ju%�j&��δ�'Ū4T3=��CD{���J2�=mzV7Syn�h�-�{�ǂ==�i����\�
2
+ ��D�
3
+ ���(ĸ㛞��ة��:6��.�f�4���c�;&R�5�_��؄!C��-�%��c�M�vך2�(�q
@@ -0,0 +1,4 @@
1
+ �g,5w�#��|��.
2
+ Q���)�ǰ��� ��� z�zf����!G��Ӽ��R!A��;
3
+ +{�)ޅ�@�m�!�AWM�0����E��d��ZyUc�d#�29�:�-�uo�v��� �ͨ��d?q�Ǥ;���;S�'�`�.g�;j"y������0v�
4
+ �u??&�E�8Q#�}j�i��f�<T��ψW�*3�t�3�!���!�ŵ�٬�7,����N��w(E���
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Samuel Cochran
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.
@@ -0,0 +1,59 @@
1
+ # Rack BuiltWith
2
+
3
+ Serve a `builtwith.txt` file from your [Ruby on Rails](https://rubyonrails.org) or [Rack](https://rack.github.io) application so you can [remove your site](https://builtwith.com/removals) from [BuiltWith](https://builtwith.com). 🙅‍♀️
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem "rack-builtwith"
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install rack-builtwith
20
+
21
+ ## Usage
22
+
23
+ If you're using Rails, you can add the middleware in an initializer:
24
+
25
+ ```ruby
26
+ # config/initializers/rack-builtwith.rb
27
+
28
+ Rails.application.middleware.use Rack::BuiltWith
29
+ ```
30
+
31
+ or add it to any rack application in your rackup config:
32
+
33
+ ```ruby
34
+ # config.ru
35
+
36
+ use Rack::BuiltWith
37
+
38
+ run [200, {}, ["Hello, world!"]]
39
+ ```
40
+
41
+ By default, the middleware will respond to "/builtwith.txt" on any host with the correct hostname. You can force it to use the same host in the response, regardless of the request host, by specifying an argument to the middleware:
42
+
43
+ ```ruby
44
+ use Rack::BuiltWith, "example.com"
45
+ ```
46
+
47
+ ## Development
48
+
49
+ 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.
50
+
51
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in the gemspec, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
52
+
53
+ ## Contributing
54
+
55
+ Bug reports and pull requests are welcome on GitHub at https://github.com/sj26/rack-builtwith.
56
+
57
+ ## License
58
+
59
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,2 @@
1
+ require "rack"
2
+ require "rack/built_with"
@@ -0,0 +1,24 @@
1
+ require "rack"
2
+ require "base64"
3
+
4
+ class Rack::BuiltWith
5
+ class Error < StandardError; end
6
+
7
+ def initialize(app, host=nil)
8
+ @app = app
9
+ @host = host
10
+ end
11
+
12
+ def call(env)
13
+ request = Rack::Request.new(env)
14
+
15
+ if request.get? && request.path == "/builtwith.txt"
16
+ host = @host || request.host
17
+ body = Base64.encode64(host).chomp
18
+
19
+ [200, {"Content-Type" => "text/plain", "Content-Length" => body.bytesize}, [body]]
20
+ else
21
+ @app.call(env)
22
+ end
23
+ end
24
+ end
metadata ADDED
@@ -0,0 +1,124 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rack-builtwith
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.alpha
5
+ platform: ruby
6
+ authors:
7
+ - Samuel Cochran
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDKDCCAhCgAwIBAgIBBzANBgkqhkiG9w0BAQsFADA6MQ0wCwYDVQQDDARzajI2
14
+ MRQwEgYKCZImiZPyLGQBGRYEc2oyNjETMBEGCgmSJomT8ixkARkWA2NvbTAeFw0x
15
+ OTEwMjQwNjM0MjJaFw0yMDEwMjMwNjM0MjJaMDoxDTALBgNVBAMMBHNqMjYxFDAS
16
+ BgoJkiaJk/IsZAEZFgRzajI2MRMwEQYKCZImiZPyLGQBGRYDY29tMIIBIjANBgkq
17
+ hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsr60Eo/ttCk8GMTMFiPr3GoYMIMFvLak
18
+ xSmTk9YGCB6UiEePB4THSSA5w6IPyeaCF/nWkDp3/BAam0eZMWG1IzYQB23TqIM0
19
+ 1xzcNRvFsn0aQoQ00k+sj+G83j3T5OOV5OZIlu8xAChMkQmiPd1NXc6uFv+Iacz7
20
+ kj+CMsI9YUFdNoU09QY0b+u+Rb6wDYdpyvN60YC30h0h1MeYbvYZJx/iZK4XY5zu
21
+ 4O/FL2ChjL2CPCpLZW55ShYyrzphWJwLOJe+FJ/ZBl6YXwrzQM9HKnt4titSNvyU
22
+ KzE3L63A3PZvExzLrN9u09kuWLLJfXB2sGOlw3n9t72rJiuBr3/OQQIDAQABozkw
23
+ NzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU99dfRjEKFyczTeIz
24
+ m3ZsDWrNC80wDQYJKoZIhvcNAQELBQADggEBAI06Bv7coqIflKtxRIwIJABl3hRR
25
+ fZ2U0C1T16VXGwGdxRyDJHYt/2aMDfS/bpDzqR0ela2dwTh/29/oZQeAtzbQq6dE
26
+ 7Pax2oYi+dahcreJFndcA6P/dl03XLNVIFVDtfEHvcUjtKKWQALAWirmW7KGAW1R
27
+ Xn1uy1RJ0TzazCY059p0UQwLU1KXz/5NnTrGka/GvKjLTjk67T6Y05lmr7TxMY2w
28
+ cTRkS42ilkarelc4DnSSO5jw7qFq7Cmf6F9hMx3xdoSWpLf+FvXJRbYrqwZIsmME
29
+ V8zEtJFhdNOFOdtcTE67qh/aYQe2y/LDnG9ywXHWdSeF4UUjg1WRt8s3OP8=
30
+ -----END CERTIFICATE-----
31
+ date: 2019-12-18 00:00:00.000000000 Z
32
+ dependencies:
33
+ - !ruby/object:Gem::Dependency
34
+ name: rack
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: bundler
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '2.0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '2.0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: rake
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '10.0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '10.0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: rspec
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '3.0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '3.0'
89
+ description:
90
+ email: sj26@sj26.com
91
+ executables: []
92
+ extensions: []
93
+ extra_rdoc_files: []
94
+ files:
95
+ - LICENSE
96
+ - README.md
97
+ - lib/rack-builtwith.rb
98
+ - lib/rack/built_with.rb
99
+ homepage: https://github.com/sj26/rack-builtwith
100
+ licenses:
101
+ - MIT
102
+ metadata:
103
+ homepage_uri: https://github.com/sj26/rack-builtwith
104
+ source_code_uri: https://github.com/sj26/rack-builtwith
105
+ post_install_message:
106
+ rdoc_options: []
107
+ require_paths:
108
+ - lib
109
+ required_ruby_version: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ version: '0'
114
+ required_rubygems_version: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">"
117
+ - !ruby/object:Gem::Version
118
+ version: 1.3.1
119
+ requirements: []
120
+ rubygems_version: 3.0.6
121
+ signing_key:
122
+ specification_version: 4
123
+ summary: Remove your site from builtwith.com
124
+ test_files: []
Binary file