getbox 1.0.0 → 1.0.1
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 +4 -4
- data/README.md +18 -2
- data/lib/getbox.rb +1 -1
- data/lib/getbox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25f47dd3cc375b639efa1b2bfc48fe6600d22741
|
4
|
+
data.tar.gz: c3dd6e30d4c8f28b0afa241e63c7581a61c09aec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a9db1b138940055285c111da95ea52b3518cb808abf9af071254f081828d826489b970b336f0e573f4adb35ecee58df470ed00464e584951e119ed7c3cedc94
|
7
|
+
data.tar.gz: 5250607e6c30ebf699e2b8e255baa71e78e6c63538704a1a0f4046ea2a4df4f4eb74ba34488174b4d13040debcb68bc9db01409ebf34d912a2a76ee625f0efc0
|
data/README.md
CHANGED
@@ -2,8 +2,24 @@
|
|
2
2
|
|
3
3
|
## Installation
|
4
4
|
|
5
|
-
|
5
|
+
Install as a gem:
|
6
|
+
|
7
|
+
gem install gembox
|
6
8
|
|
7
9
|
## Usage
|
8
10
|
|
9
|
-
|
11
|
+
The gem installs a global `gembox` executable, which will guide you through exporting your gists. Sometimes it takes a minute.
|
12
|
+
|
13
|
+
## API
|
14
|
+
|
15
|
+
### method to enter an interactive prompt and save gists to a file as JSON:
|
16
|
+
|
17
|
+
Getbox::prompt
|
18
|
+
|
19
|
+
### methods to return an array of gists:
|
20
|
+
|
21
|
+
Getbox::getGistsFromSite(username, password)
|
22
|
+
|
23
|
+
Getbox::getGistsFromFile(location_of_html_file)
|
24
|
+
|
25
|
+
Getbox::getGistsFromHtml(html_string)
|
data/lib/getbox.rb
CHANGED
@@ -66,7 +66,7 @@ module Getbox
|
|
66
66
|
|
67
67
|
description = gist.css('div.gist-description').inner_text.strip
|
68
68
|
description = nil if description == 'No Description'
|
69
|
-
data[:description] = description
|
69
|
+
data[:description] = description if description
|
70
70
|
|
71
71
|
labels = []
|
72
72
|
gist.css('span.gist-label').each {|label| labels.push label.inner_text}
|
data/lib/getbox/version.rb
CHANGED