gns 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/gns.gemspec +1 -0
- data/lib/gns/github_atom.rb +7 -2
- data/lib/gns/version.rb +1 -1
- metadata +18 -2
data/gns.gemspec
CHANGED
data/lib/gns/github_atom.rb
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
require 'rss'
|
2
2
|
require 'openssl'
|
3
|
-
require '
|
3
|
+
require 'httpclient'
|
4
4
|
|
5
5
|
module Gns
|
6
6
|
class GithubAtom
|
7
7
|
def initialize(url, start_time = Time.now)
|
8
8
|
@url = url
|
9
9
|
@last_updated = start_time
|
10
|
+
@client = HTTPClient.new
|
10
11
|
end
|
11
12
|
|
12
13
|
def recent_items
|
@@ -18,10 +19,14 @@ module Gns
|
|
18
19
|
end
|
19
20
|
|
20
21
|
def get_atom_items
|
21
|
-
RSS::Parser.parse(
|
22
|
+
RSS::Parser.parse(get_atom).items.map {|item|
|
22
23
|
GithubItem.new(item)
|
23
24
|
}
|
24
25
|
end
|
26
|
+
|
27
|
+
def get_atom
|
28
|
+
@client.get_content(@url)
|
29
|
+
end
|
25
30
|
end
|
26
31
|
|
27
32
|
class GithubItem
|
data/lib/gns/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: foreverb
|
@@ -27,6 +27,22 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: httpclient
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
30
46
|
- !ruby/object:Gem::Dependency
|
31
47
|
name: terminal-notifier
|
32
48
|
requirement: !ruby/object:Gem::Requirement
|