rack-x_robots_tag 1.0.0 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e7037cb5dc6868d9533ccda5260ecff75ac25ef5
4
- data.tar.gz: cb4285130948b14dac0033417a8ac0b187cb9cb8
2
+ SHA256:
3
+ metadata.gz: 1539d03a674539ff5f02d8bca89e4f8cfeed710a51d1787cb5b10b006ffa1238
4
+ data.tar.gz: 77b45208bcba1ed6e2dc11fd0a9db8f96948536c8ec041afa513aa35543ed11b
5
5
  SHA512:
6
- metadata.gz: 2ee136a4a6055114b021664381723ba3fc96653fc54a299a091b11bc545f2f433b83acbf8e917bea374c228902039357fcb2458f6020ee01f731af56837b204f
7
- data.tar.gz: 0bb5d66f883e94268be61d9051e6211e5106d7dc19fe37dcda05c5791c40c0f64ece7af3f36b1d23f20969041ffcd70dd0364afd82f38952ea8c1375f60af6d2
6
+ metadata.gz: e156c13d747223f3bc0791b36d66f8cd32fb091a6cbdc06f4bd6838129a2ed8391ba14e927bbfeae7c2f66bce2616df8fbc32c00f00d195f84bf6839774e3e12
7
+ data.tar.gz: a68e8db2535cc5ba1731608eb98de216f3b70551c811addb0e61c5f2dd8121ae8c5e86453bf1c4d75e11697641c64b5ec6b4a532481a2df53c1f0232464d1a37
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Rack::XRobotsTag
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rack/x_robots_tag`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This is a small Rack middleware that will add the [`X-Robots-Tag`](https://developers.google.com/search/reference/robots_meta_tag) header to your responses. This indicates to crawlers that your site should not be indexed and is useful for staging and testing sites.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,17 +20,19 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ In your `config.ru` simply use the middleware based upon whatever constraints you may have. For example, if your staging environment has an environment variable called `DISABLE_ROBOTS` here is how you might mount it.
24
+
25
+ use Rack::XRobotsTag if ENV['DISABLE_ROBOTS']
26
26
 
27
27
  ## Development
28
28
 
29
29
  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.
30
30
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, 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).
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `x_robots_tag.rb`, 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).
32
32
 
33
33
  ## Contributing
34
34
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rack-x_robots_tag. 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.
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/my-rent/rack-x_robots_tag. 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.
36
36
 
37
37
  ## License
38
38
 
@@ -40,4 +40,4 @@ The gem is available as open source under the terms of the [MIT License](http://
40
40
 
41
41
  ## Code of Conduct
42
42
 
43
- Everyone interacting in the Rack::XRobotsTag project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/rack-x_robots_tag/blob/master/CODE_OF_CONDUCT.md).
43
+ Everyone interacting in the Rack::XRobotsTag project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/my-rent/rack-x_robots_tag/blob/master/CODE_OF_CONDUCT.md).
@@ -1,6 +1,6 @@
1
1
  module Rack
2
2
  class XRobotsTag
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
 
5
5
  def initialize(app)
6
6
  @app = app
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
31
 
32
- spec.add_development_dependency "bundler", "~> 1.15"
33
- spec.add_development_dependency "rake", "~> 10.0"
32
+ spec.add_development_dependency "bundler", "~> 2.0.2"
33
+ spec.add_development_dependency "rake", "~> 12.3.3"
34
34
  spec.add_development_dependency "rspec", "~> 3.0"
35
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-x_robots_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dwight Watson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-28 00:00:00.000000000 Z
11
+ date: 2020-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.15'
19
+ version: 2.0.2
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.15'
26
+ version: 2.0.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: 12.3.3
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: 12.3.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -90,8 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
- rubyforge_project:
94
- rubygems_version: 2.6.11
93
+ rubygems_version: 3.0.6
95
94
  signing_key:
96
95
  specification_version: 4
97
96
  summary: Rack middleware that adds X-Robots-Tag header.