pastie-api 0.1.1 → 0.1.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.
Files changed (2) hide show
  1. data/lib/pastie-api/paste.rb +2 -2
  2. metadata +4 -4
@@ -5,7 +5,7 @@ module Pastie
5
5
 
6
6
  # Initializes a pastie from server html response
7
7
  def initialize(html)
8
- url = html.scan(/http:\/\/pastie.org\/([\d]{1,}).txt(\?key=([A-Za-z\d]{1,}))?/)
8
+ url = html.scan(/http:\/\/pastie.org\/pastes\/([\d]{1,})\/text(\?key=([A-Za-z\d]{1,}))?/)
9
9
  unless url.nil?
10
10
  url.flatten!
11
11
  @id = url[0] ; @key = url[2]
@@ -17,7 +17,7 @@ module Pastie
17
17
 
18
18
  # Returns direct link to paste contents
19
19
  def raw_link
20
- BASE_URL + "/#{@id}.txt" + (private? ? "?key=#{@key}" : '')
20
+ BASE_URL + "/pastes/#{@id}/text" + (private? ? "?key=#{@key}" : '')
21
21
  end
22
22
 
23
23
  # Return direct link to paste page
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pastie-api
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dan Sosedoff
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-30 00:00:00 -05:00
18
+ date: 2010-10-17 00:00:00 -05:00
19
19
  default_executable: pastie
20
20
  dependencies: []
21
21