human_power 0.0.1 → 0.0.2

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
2
  SHA1:
3
- metadata.gz: b13d5ae833d0a82cf616bcf7cd7a41bd237acf38
4
- data.tar.gz: 5f43b7c423e35346789c45968e778ac978aec87b
3
+ metadata.gz: 277dc00cb5eb662ee14dd8982e83e9c2eae68259
4
+ data.tar.gz: 4bf0e2eaf3b4f109be86812b141b788ad3185f8c
5
5
  SHA512:
6
- metadata.gz: 5fd802c2b31a394473f34af52be0be9399215c30acfc3dc3b88779d41484b1fab2f526115f860d48832731a86d45b0411a820099471708e3b12cd1c13ecd23a8
7
- data.tar.gz: ecf2616ef34b18622f3b4c9618e24eec259ea037520abb6af138808703e5af57347734e4102aad258136c770ef8979c60d4c31e0fb725eb8f04c5e7014c32349
6
+ metadata.gz: c0d3358d62276159e40f6bc18e7b40ad49d83e1aea7c4b4c88102c7d56ec57a1c3d220ec3f8113b77c11706f7d95e1fc0c68018053b18337889b4b40341c67c1
7
+ data.tar.gz: 5d0f9a11855094a673582851e7f244a4f605a4c592d92e103bb7d7f1c09cfa4b0305f4d6f9826d459d975fb35d35d139a6c491820a1fa41f09648a67cf360a58
data/README.md CHANGED
@@ -20,7 +20,7 @@ Or install it yourself:
20
20
 
21
21
  $ gem install human_power
22
22
 
23
- If you are using Rails, you can add a sample *config/robots.rb* configuration file:
23
+ If you are using Rails, you can add a sample *config/robots.rb* configuration file and route for `/robots.txt`:
24
24
 
25
25
  $ rails g human_power:install
26
26
 
@@ -64,6 +64,10 @@ end
64
64
  if request.subdomains.first == "api"
65
65
  disallow :all
66
66
  end
67
+
68
+ # Add one or more sitemaps
69
+ sitemap sitemap_url
70
+ sitemap one_url, two_url
67
71
  ```
68
72
 
69
73
  ## Caveats
data/config/routes.rb CHANGED
@@ -1,3 +1,3 @@
1
- Rails.application.routes.draw do
2
- get "robots.txt" => "human_power/rails/robots#robots", format: :text, as: :robotstxt
1
+ HumanPower::Rails::Engine.routes.draw do
2
+ root to: "human_power/rails/robots#robots", format: :text
3
3
  end
@@ -8,5 +8,10 @@ module HumanPower
8
8
  def create_config_file
9
9
  copy_file "robots.rb", "config/robots.rb"
10
10
  end
11
+
12
+ desc "Creates a route for robots.txt"
13
+ def create_route
14
+ route %{mount HumanPower::Rails::Engine => "robots.txt"}
15
+ end
11
16
  end
12
17
  end
@@ -1,3 +1,3 @@
1
1
  module HumanPower
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  Dummy::Application.routes.draw do
2
+ mount HumanPower::Rails::Engine => "robots.txt"
2
3
  get "sitemap.xml" => "nothing#here", as: :sitemap
3
4
  get "admin" => "nothing#here", as: :admin
4
5
  get "login" => "nothing#here", as: :login
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: human_power
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lasse Bunk