gisty 0.0.22 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gisty.rb +2 -2
- data/test/gisty_test.rb +1 -1
- metadata +4 -4
data/lib/gisty.rb
CHANGED
@@ -7,7 +7,7 @@ require 'nokogiri'
|
|
7
7
|
require 'net/https'
|
8
8
|
|
9
9
|
class Gisty
|
10
|
-
VERSION = '0.0.
|
10
|
+
VERSION = '0.0.23'
|
11
11
|
GIST_URL = 'https://gist.github.com/'
|
12
12
|
GISTY_URL = 'http://github.com/swdyh/gisty/tree/master'
|
13
13
|
COMMAND_PATH = Pathname.new(File.join(File.dirname(__FILE__), 'commands')).realpath.to_s
|
@@ -26,7 +26,7 @@ class Gisty
|
|
26
26
|
doc.css('.file .info a').map { |i| i['href'].sub('/', '') }
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
29
|
+
def extract url
|
30
30
|
doc = Nokogiri::HTML read_by_url(url)
|
31
31
|
{
|
32
32
|
:id => url.split('/').last,
|
data/test/gisty_test.rb
CHANGED
@@ -57,7 +57,7 @@ class GistyTest < Test::Unit::TestCase
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def test_extract
|
60
|
-
meta =
|
60
|
+
meta = @gisty.extract 'http://gist.github.com/30119'
|
61
61
|
assert_equal 'brianleroux', meta[:author]
|
62
62
|
assert_equal 4, meta[:files].size
|
63
63
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gisty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 49
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 23
|
10
|
+
version: 0.0.23
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- swdyh
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-02-22 00:00:00 +09:00
|
19
19
|
default_executable: gisty
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|