ricepaper 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.txt CHANGED
@@ -1,6 +1,15 @@
1
1
  RicePaper is a tiny little command-line utility to post URLs to
2
2
  InstantPaper. It also works as a Ruby library in a pinch also.
3
3
 
4
- See the examples/ directory for example usage, or use
5
- 'ricepaper -h' for command-line usage.
4
+ Installation
5
+
6
+ gem install ricepaper
7
+
8
+
9
+ Usage: ricepaper [options] "<url>" ["<url>" "<url>" ...]
10
+ -u, --username [USER] Username
11
+ -p, --password [PASS] Password
12
+ -a, --authenticate Only attempt to authenticate to Instapaper
13
+ -t, --title [TITLE] Optional title for instantpaper entry
14
+ -d, --description [DESC] Optional description for the article
6
15
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -24,13 +24,12 @@ class RicePaper
24
24
  # Handle Errors - sets the error code appropriately
25
25
  # so that it can be reported
26
26
  def handle_error(err)
27
- result = /(\d+)/.match(err.to_s)[1]
28
- @error = case result
29
- when "400" then "Bad Request"
30
- when "403" then "Invalid username of password"
31
- when "500" then "There was a server error. Please try again later."
32
- else "An unknown error occured"
33
- end
27
+ @error = case err.http_code
28
+ when 400 then "Bad Request"
29
+ when 403 then "Invalid username or password"
30
+ when 500 then "There was a server error. Please try again later."
31
+ else "An unknown error occured"
32
+ end
34
33
  end
35
34
 
36
35
  # Authenticate with instapaper, returning true if auth
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ricepaper}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Lee Hinman"]
12
- s.date = %q{2010-07-06}
12
+ s.date = %q{2010-07-07}
13
13
  s.default_executable = %q{ricepaper}
14
14
  s.description = %q{Ricepaper is a library that allows you to add URLs to Instapaper, either by using it as a CLI or as a Ruby library.}
15
15
  s.email = %q{lee@writequit.org}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ricepaper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lee Hinman
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-06 00:00:00 -06:00
18
+ date: 2010-07-07 00:00:00 -06:00
19
19
  default_executable: ricepaper
20
20
  dependencies: []
21
21