agig 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -2
- data/agig.gemspec +1 -1
- data/lib/agig/session.rb +7 -3
- data/lib/agig/version.rb +1 -1
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3da2fcec9b0d123aeb956eebab8e2a4dbafa454
|
4
|
+
data.tar.gz: 950c9a3ffa495fc0718f42e3fd69e3c8c8f25413
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 079b2dab6b4a2283e009a1dc3be88349fdcfd9d195dc7f603cf6bc95ac67def535a02fb8ac73604e39dfdedbf940f70468f0b495f43f75b884584f34cff6c333
|
7
|
+
data.tar.gz: 660a20b981b3549ceb41ef89981066d5f0318e8ec4ac693042f82d8a1721542d5ef319e5d8292bc38ae928f8062df35ec207b6e881fbff7172e2171b0d64ad4e
|
data/README.md
CHANGED
@@ -4,8 +4,7 @@ Agig is another Github IRC Gateway, forked cho45's [gig.rb](https://github.com/c
|
|
4
4
|
|
5
5
|
Modified from original gig.rb:
|
6
6
|
|
7
|
-
* use
|
8
|
-
* use open-uri instead of net/https
|
7
|
+
* use [Octokit](http://rubygems.org/gems/octokit) instead of libxml-ruby and net/https
|
9
8
|
* create new channel, it includes user activities.
|
10
9
|
|
11
10
|
## Installation and Usage
|
data/agig.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.add_dependency 'net-irc'
|
21
21
|
gem.add_dependency 'json'
|
22
22
|
gem.add_dependency 'faraday', '~> 0.8.7'
|
23
|
-
gem.add_dependency 'octokit'
|
23
|
+
gem.add_dependency 'octokit', '~> 1.25'
|
24
24
|
|
25
25
|
gem.add_development_dependency 'rspec'
|
26
26
|
end
|
data/lib/agig/session.rb
CHANGED
@@ -9,7 +9,7 @@ class Agig::Session < Net::IRC::Server::Session
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def server_version
|
12
|
-
|
12
|
+
Agig::VERSION
|
13
13
|
end
|
14
14
|
|
15
15
|
def channels
|
@@ -22,7 +22,11 @@ class Agig::Session < Net::IRC::Server::Session
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def client
|
25
|
-
@client ||=
|
25
|
+
@client ||= if @opts.oauth_token
|
26
|
+
Octokit::Client.new(oauth_token: @pass)
|
27
|
+
else
|
28
|
+
Octokit::Client.new(login: @nick, password: @pass)
|
29
|
+
end
|
26
30
|
end
|
27
31
|
|
28
32
|
def on_disconnected
|
@@ -49,7 +53,7 @@ class Agig::Session < Net::IRC::Server::Session
|
|
49
53
|
begin
|
50
54
|
@log.info 'retrieveing feed...'
|
51
55
|
|
52
|
-
entries = client.notifications
|
56
|
+
entries = client.notifications(all: true)
|
53
57
|
entries.sort_by(&:updated_at).reverse_each do |entry|
|
54
58
|
updated_at = Time.parse(entry.updated_at).utc
|
55
59
|
next if updated_at <= @notification_last_retrieved
|
data/lib/agig/version.rb
CHANGED
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SHIBATA Hiroshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-irc
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: faraday
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 0.8.7
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.8.7
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: octokit
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '1.25'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '1.25'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description: another Github IRC Gateway
|
@@ -88,8 +88,8 @@ executables:
|
|
88
88
|
extensions: []
|
89
89
|
extra_rdoc_files: []
|
90
90
|
files:
|
91
|
-
- .gitignore
|
92
|
-
- .rspec
|
91
|
+
- ".gitignore"
|
92
|
+
- ".rspec"
|
93
93
|
- Gemfile
|
94
94
|
- LICENSE
|
95
95
|
- README.md
|
@@ -112,17 +112,17 @@ require_paths:
|
|
112
112
|
- lib
|
113
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 1.9.2
|
118
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- -
|
120
|
+
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.1.3
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: agig is another Github IRC Gateway. agig is forked from gig.rb, and contained
|