agig 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b93f4ed4d50aa5b7cab7c8ec61b4c3b54ea1d3f4
4
- data.tar.gz: 20b66f126aebb992a727d17b5cefa10db6186057
3
+ metadata.gz: df12190a9b82939baf71234bbd20dd699dacf935
4
+ data.tar.gz: ed95458598389d929037c065c455cd5993520a3e
5
5
  SHA512:
6
- metadata.gz: 910e7f3bb94854b672b8630fa480fd10376824fda2f398f40fba627bbca30e312c49d7c54b12c1e0c26a1cd2998bef9c8271ee0907c4a7185e9873d41fcd9287
7
- data.tar.gz: 5c6fb99fd2d246d28d500b2e2df98c869946247dca665d4b90ea1c4e4957be0e53fa443d014253da952faa8b095e8515bb03573eb02e1a34ecdbe7b986969ccc
6
+ metadata.gz: a428a8f562514f82af29f7a6a5b068019d0ae934d072ebb265f30dd27e1005f9de301db98db98d9c39cf59d7a318b5911c8122ce01c4146696d4c48ad17c3740
7
+ data.tar.gz: 290768691ec03b4c756cf1a63576a256c895d32c455e6aec06c61caf0ccb73d4372680955266cd46fd6b42799aa58d0ab441c30f8552b776c0484edf18c9fb53
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ /vendor
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
@@ -20,4 +20,6 @@ Gem::Specification.new do |gem|
20
20
  gem.add_dependency 'net-irc'
21
21
  gem.add_dependency 'json'
22
22
  gem.add_dependency 'octokit'
23
+
24
+ gem.add_development_dependency 'rspec'
23
25
  end
@@ -89,7 +89,9 @@ class Agig::Session < Net::IRC::Server::Session
89
89
  if issue_match = latest_comment_url.match(/(?:issues|pulls)\/(\d+?)$/)
90
90
  issue_id = issue_match[1]
91
91
  latest_comment = client.issue_comments(repos_owner, issue_id).last
92
- latest_comment ? latest_comment['html_url'] : latest_comment_url.sub(/api\./, '').sub(/repos\//, '')
92
+ latest_comment ?
93
+ latest_comment['html_url'] :
94
+ latest_comment_url.sub(/api\./, '').sub(/repos\//, '').sub(/pulls\//, 'pull/')
93
95
  elsif comment_match = latest_comment_url.match(/comments\/(\d+?)$/)
94
96
  comment_id = comment_match[1]
95
97
  client.issue_comment(repos_owner, comment_id)['html_url']
@@ -1,3 +1,3 @@
1
1
  module Agig
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -0,0 +1,21 @@
1
+ # coding: utf-8
2
+ require File.expand_path('../../../spec_helper', __FILE__)
3
+
4
+ describe Agig::Session do
5
+ before do
6
+ @session = described_class.new('localhost', nil, nil)
7
+ end
8
+
9
+ describe '#reachable_url_for' do
10
+ subject { @session.reachable_url_for(latest_comment_url) }
11
+
12
+ context 'When "https://api.github.com/repos/fastladder/fastladder/pulls/170" given' do
13
+ before do
14
+ @session.stub_chain(:client, :issue_comments).and_return([])
15
+ end
16
+
17
+ let(:latest_comment_url) { 'https://api.github.com/repos/fastladder/fastladder/pulls/170' }
18
+ it { should eq('https://github.com/fastladder/fastladder/pull/170') }
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,5 @@
1
+ require 'bundler/setup'
2
+ require 'agig'
3
+
4
+ RSpec.configure do |config|
5
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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-03-15 00:00:00.000000000 Z
11
+ date: 2013-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-irc
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: another Github IRC Gateway
56
70
  email:
57
71
  - shibata.hiroshi@gmail.com
@@ -61,6 +75,7 @@ extensions: []
61
75
  extra_rdoc_files: []
62
76
  files:
63
77
  - .gitignore
78
+ - .rspec
64
79
  - Gemfile
65
80
  - LICENSE
66
81
  - README.md
@@ -72,6 +87,8 @@ files:
72
87
  - lib/agig/optparse.rb
73
88
  - lib/agig/session.rb
74
89
  - lib/agig/version.rb
90
+ - spec/lib/agig/session_spec.rb
91
+ - spec/spec_helper.rb
75
92
  homepage: https://github.com/hsbt/agig
76
93
  licenses: []
77
94
  metadata: {}
@@ -96,5 +113,7 @@ signing_key:
96
113
  specification_version: 4
97
114
  summary: agig is another Github IRC Gateway. agig is forked from gig.rb, and contained
98
115
  net-irc gems.
99
- test_files: []
116
+ test_files:
117
+ - spec/lib/agig/session_spec.rb
118
+ - spec/spec_helper.rb
100
119
  has_rdoc: