robocop 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/.travis.yml +11 -0
  2. data/README.md +7 -5
  3. data/robocop.gemspec +2 -1
  4. metadata +25 -13
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - "1.8.7"
4
+ - "1.9.2"
5
+ - "1.9.3"
6
+ - jruby-18mode # JRuby in 1.8 mode
7
+ - jruby-19mode # JRuby in 1.9 mode
8
+ - rbx-18mode
9
+ - rbx-19mode
10
+ # uncomment this line if your project needs to run something other than `rake`:
11
+ # script: bundle exec rspec spec
data/README.md CHANGED
@@ -1,9 +1,11 @@
1
- # Robocop
1
+ # Robocop [![Build Status](https://secure.travis-ci.org/pjkelly/robocop.png?branch=master)](http://travis-ci.org/pjkelly/robocop)
2
2
 
3
3
  Robocop is a simple Rack middleware that inserts the `X-Robots-Tag` into the headers of all your responses.
4
4
 
5
5
  The `X-Robots-Tag` can be used in place of a `robots.txt` file or meta tags to tell crawlers what they're allowed to do with your content. See [this article](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag) for more information.
6
6
 
7
+ Tested against Ruby 1.8.7, 1.9.2, 1.9.3, and Rubinius & JRuby in both 1.8 and 1.9 mode.
8
+
7
9
  ## Installation
8
10
 
9
11
  The simplest way to install Robocop is to use [Bundler](http://gembundler.com/).
@@ -21,7 +23,7 @@ gem 'robocop'
21
23
  To use Robocop in your Rails application, add the following line to your application config file (`config/application.rb` for Rails 3, `config/environment.rb` for Rails 2):
22
24
 
23
25
  ``` ruby
24
- config.middleware.use Robocop, :directives => %w(all)
26
+ config.middleware.use Robocop::Middleware, :directives => %w(all)
25
27
  ```
26
28
 
27
29
  ### Other Rack Applications (Sinatra, Padrino, etc.)
@@ -29,7 +31,7 @@ config.middleware.use Robocop, :directives => %w(all)
29
31
  Simple add the following to your `config.ru`:
30
32
 
31
33
  ``` ruby
32
- use Robocop, :directives => %w(all)
34
+ use Robocop::Middleware, :directives => %w(all)
33
35
  ```
34
36
 
35
37
  ## Options
@@ -51,7 +53,7 @@ The following directives can be passed in to Robocop's configuration:
51
53
  If you just want to specify a list of directives for all useragents to follow, simply pass in an array of directives with the `:directive` option:
52
54
 
53
55
  ``` ruby
54
- config.middleware.use Robocop, :directives => %w(noindex nofollow)
56
+ config.middleware.use Robocop::Middleware, :directives => %w(noindex nofollow)
55
57
  ```
56
58
 
57
59
  ### Useragents
@@ -59,7 +61,7 @@ config.middleware.use Robocop, :directives => %w(noindex nofollow)
59
61
  If you want to give specific user agents unique sets of directives, you can do so by passing in the `:useragent` option:
60
62
 
61
63
  ``` ruby
62
- config.middleware.use Robocop, :useragents => {
64
+ config.middleware.use Robocop::Middleware, :useragents => {
63
65
  :googlebot => %w(noindex nofollow, noimageindex),
64
66
  :otherbot => %w(none)
65
67
  }
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "robocop"
7
- gem.version = "0.1.0"
7
+ gem.version = "0.1.1"
8
8
  gem.authors = ["PJ Kelly"]
9
9
  gem.email = ["me@pjkel.ly"]
10
10
  gem.description = %q{Rack middleware that inserts the X-Robots-Tag into all responses.}
@@ -16,6 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
17
  gem.require_paths = ["lib"]
18
18
  gem.add_dependency 'rack'
19
+ gem.add_development_dependency 'rake'
19
20
  gem.add_development_dependency 'rspec'
20
21
  gem.add_development_dependency 'guard-rspec'
21
22
  gem.add_development_dependency 'fuubar'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-11-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
16
- requirement: &70362405142460 !ruby/object:Gem::Requirement
16
+ requirement: &70349576539880 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,21 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70362405142460
24
+ version_requirements: *70349576539880
25
+ - !ruby/object:Gem::Dependency
26
+ name: rake
27
+ requirement: &70349576539240 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *70349576539240
25
36
  - !ruby/object:Gem::Dependency
26
37
  name: rspec
27
- requirement: &70362405141740 !ruby/object:Gem::Requirement
38
+ requirement: &70349576538020 !ruby/object:Gem::Requirement
28
39
  none: false
29
40
  requirements:
30
41
  - - ! '>='
@@ -32,10 +43,10 @@ dependencies:
32
43
  version: '0'
33
44
  type: :development
34
45
  prerelease: false
35
- version_requirements: *70362405141740
46
+ version_requirements: *70349576538020
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: guard-rspec
38
- requirement: &70362405141180 !ruby/object:Gem::Requirement
49
+ requirement: &70349576537040 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ! '>='
@@ -43,10 +54,10 @@ dependencies:
43
54
  version: '0'
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *70362405141180
57
+ version_requirements: *70349576537040
47
58
  - !ruby/object:Gem::Dependency
48
59
  name: fuubar
49
- requirement: &70362405140120 !ruby/object:Gem::Requirement
60
+ requirement: &70349576558840 !ruby/object:Gem::Requirement
50
61
  none: false
51
62
  requirements:
52
63
  - - ! '>='
@@ -54,10 +65,10 @@ dependencies:
54
65
  version: '0'
55
66
  type: :development
56
67
  prerelease: false
57
- version_requirements: *70362405140120
68
+ version_requirements: *70349576558840
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: rb-fsevent
60
- requirement: &70362405156020 !ruby/object:Gem::Requirement
71
+ requirement: &70349576558380 !ruby/object:Gem::Requirement
61
72
  none: false
62
73
  requirements:
63
74
  - - ! '>='
@@ -65,10 +76,10 @@ dependencies:
65
76
  version: '0'
66
77
  type: :development
67
78
  prerelease: false
68
- version_requirements: *70362405156020
79
+ version_requirements: *70349576558380
69
80
  - !ruby/object:Gem::Dependency
70
81
  name: terminal-notifier-guard
71
- requirement: &70362405155060 !ruby/object:Gem::Requirement
82
+ requirement: &70349576557880 !ruby/object:Gem::Requirement
72
83
  none: false
73
84
  requirements:
74
85
  - - ! '>='
@@ -76,7 +87,7 @@ dependencies:
76
87
  version: '0'
77
88
  type: :development
78
89
  prerelease: false
79
- version_requirements: *70362405155060
90
+ version_requirements: *70349576557880
80
91
  description: Rack middleware that inserts the X-Robots-Tag into all responses.
81
92
  email:
82
93
  - me@pjkel.ly
@@ -86,6 +97,7 @@ extra_rdoc_files: []
86
97
  files:
87
98
  - .gitignore
88
99
  - .rbenv-version
100
+ - .travis.yml
89
101
  - Gemfile
90
102
  - Guardfile
91
103
  - LICENSE.txt