pope 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,9 +1,22 @@
1
1
  # Pope
2
2
 
3
- TODO: Write a gem description
3
+ The Pope has mandated as canon law that your website — with all it's foreign dilly-hoos in the
4
+ URL — provide a single authoritative URL to his liking. To govern the implementation of this,
5
+ he is turning to the people to do as they are notorious for: tattle on each other.
6
+
7
+ ## Usage
8
+
9
+ Pass in a URL, and the Pope will give you the canonical URL, if it is provided.
10
+
11
+ ```ruby
12
+ Pope.canonize 'http://example.com/showArticle.php?_slug=mayan-calendar-inferior-to-gregorian-calendar&tracking-stuff=dillyhoos&language=latin'
13
+ # => 'http://www.example.com/2012/12/21/mayan-calendar-inferior-to-gregorian-calendar.html'
14
+ ```
4
15
 
5
16
  ## Installation
6
17
 
18
+ In case you still don't know how to install gems, just do this:
19
+
7
20
  Add this line to your application's Gemfile:
8
21
 
9
22
  gem 'pope'
@@ -16,14 +29,11 @@ Or install it yourself as:
16
29
 
17
30
  $ gem install pope
18
31
 
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
-
23
32
  ## Contributing
24
33
 
25
- 1. Fork it
34
+ 1. Fork it, and spoon me
26
35
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
36
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
37
  4. Push to the branch (`git push origin my-new-feature`)
29
38
  5. Create new Pull Request
39
+
@@ -12,6 +12,6 @@ module Pope
12
12
  doc = Nokogiri::HTML(response.body)
13
13
 
14
14
  # Parse out canonical URL tag if present
15
- (meta = doc.css('[rel="canonical"]').first) && meta.attr('href').value
15
+ (meta = doc.css('[rel="canonical"]').first) && meta.attr('href')
16
16
  end
17
17
  end
@@ -1,3 +1,3 @@
1
1
  module Pope
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,6 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
4
5
  require 'pope/version'
5
6
 
6
7
  Gem::Specification.new do |gem|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pope
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: