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 +11 -2
- data/VERSION +1 -1
- data/lib/ricepaper.rb +6 -7
- data/ricepaper.gemspec +2 -2
- metadata +4 -4
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
|
-
|
5
|
-
|
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.
|
1
|
+
0.0.4
|
data/lib/ricepaper.rb
CHANGED
@@ -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
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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
|
data/ricepaper.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ricepaper}
|
8
|
-
s.version = "0.0.
|
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-
|
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:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
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-
|
18
|
+
date: 2010-07-07 00:00:00 -06:00
|
19
19
|
default_executable: ricepaper
|
20
20
|
dependencies: []
|
21
21
|
|