ikachan 0.0.1 → 0.0.2

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: d939208a0c35025386846b84a7c6ec52149d34c3
4
- data.tar.gz: 4b0abdcd11c1ccc3e0bcd2557afb3c0c9d40b2e1
3
+ metadata.gz: 3a329041640650e54b092f6ccb728fddab77cf88
4
+ data.tar.gz: 8a38d868fb172388c003737c2a66021d6ab5b520
5
5
  SHA512:
6
- metadata.gz: 2c7f9eefd42e90f9e0d3dc80b3b36b787f1774f3fcd8b04af3cd82c848facfa407fed7fa4193db9e03e8d3a6cb3145ae07c611acc65f48795d44a81e5d4454f4
7
- data.tar.gz: 8f8cda63eeb6c8be55b8174ab8c4bac2681ee5d88cf59b9ae34092955199511cc002ebca17db6b84ffa622f5e541886e0b512199f092c17bb0e693a87b7c1ba4
6
+ metadata.gz: af72574494a5173754c9cae68c5d9a0c5fff89cb72a2c83b2490e53d20d7296455bde7e79a03e1f0c410c8953fff2d18cf8fd4eba4c30b90f8378091b168706d
7
+ data.tar.gz: 6acb6a0a0eb5471eeea4c5526beb65670de169c82b92ecc7c4063fbdab28db6dd1c57d7f43db21383b438c10df6cdd08866553979ee77400a393f357cae00785
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 SHIBATA Hiroshi
1
+ Copyright (c) 2014 GMO Pepabo, Inc.
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Ikachan
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/ikachan.png)](http://badge.fury.io/rb/ikachan)
4
+ [![Build Status](https://travis-ci.org/pepabo/ikachan.png?branch=master)](https://travis-ci.org/pepabo/ikachan)
5
+
3
6
  Ruby wrapper of Ikachan
4
7
 
5
8
  ## Installation
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["shibata.hiroshi@gmail.com"]
11
11
  spec.summary = %q{Ruby wrapper of Ikachan}
12
12
  spec.description = %q{Ruby wrapper of Ikachan}
13
- spec.homepage = "https://github.com/paperboy-all/ikachan"
13
+ spec.homepage = "https://github.com/pepabo/ikachan"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -18,6 +18,11 @@ module Ikachan
18
18
  request('/notice', { 'channel' => @@channel, 'message' => message })
19
19
  end
20
20
 
21
+ def privmsg(message)
22
+ join
23
+ request('/privmsg', { 'channel' => @@channel, 'message' => message })
24
+ end
25
+
21
26
  def uri_for(path = nil)
22
27
  uri = URI.parse("#{@@url}/#{path}")
23
28
  uri.path = Pathname.new(uri.path).cleanpath.to_s
@@ -1,3 +1,3 @@
1
1
  module Ikachan
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -43,6 +43,24 @@ class IkachanTest < Test::Unit::TestCase
43
43
  Ikachan.notice('foo bar buzz')
44
44
  end
45
45
 
46
+ def test_privmsg
47
+ Ikachan.expects(:join)
48
+
49
+ http = mock('http')
50
+ http.stub_everything
51
+ http.expects(:request)
52
+ Net::HTTP.expects(:new).with('irc.example.com', 4649).returns(http)
53
+
54
+ req = mock('req')
55
+ req.stub_everything
56
+ req.expects(:form_data=).with do |params|
57
+ (params['channel'] == '#example') && (params['message'] == 'foo bar buzz')
58
+ end
59
+ Net::HTTP::Post.expects(:new).with('/privmsg').returns(req)
60
+
61
+ Ikachan.privmsg('foo bar buzz')
62
+ end
63
+
46
64
  def test_rescue_timeout_error
47
65
  Ikachan.expects(:join)
48
66
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ikachan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - SHIBATA Hiroshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-19 00:00:00.000000000 Z
11
+ date: 2014-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -98,7 +98,7 @@ files:
98
98
  - lib/ikachan/version.rb
99
99
  - test/ikachan_test.rb
100
100
  - test/test_helper.rb
101
- homepage: https://github.com/paperboy-all/ikachan
101
+ homepage: https://github.com/pepabo/ikachan
102
102
  licenses:
103
103
  - MIT
104
104
  metadata: {}
@@ -118,11 +118,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  requirements: []
120
120
  rubyforge_project:
121
- rubygems_version: 2.2.2
121
+ rubygems_version: 2.3.0
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: Ruby wrapper of Ikachan
125
125
  test_files:
126
126
  - test/ikachan_test.rb
127
127
  - test/test_helper.rb
128
- has_rdoc: