notify_hipchat 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.rbenv-version +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +36 -0
- data/README +1 -0
- data/bin/notify_hipchat +29 -0
- data/lib/notify_hipchat/client.rb +17 -0
- data/lib/notify_hipchat/version.rb +3 -0
- data/lib/notify_hipchat.rb +2 -0
- data/notify_hipchat.gemspec +26 -0
- metadata +119 -0
data/.rbenv-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-1.9.2-p320
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
notify_hipchat (0.0.1)
|
5
|
+
docopt
|
6
|
+
hipchat-api
|
7
|
+
mustache
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
diff-lcs (1.1.3)
|
13
|
+
docopt (0.5.0)
|
14
|
+
hipchat-api (1.0.5)
|
15
|
+
httparty
|
16
|
+
httparty (0.10.2)
|
17
|
+
multi_json (~> 1.0)
|
18
|
+
multi_xml (>= 0.5.2)
|
19
|
+
multi_json (1.6.1)
|
20
|
+
multi_xml (0.5.3)
|
21
|
+
mustache (0.99.4)
|
22
|
+
rspec (2.12.0)
|
23
|
+
rspec-core (~> 2.12.0)
|
24
|
+
rspec-expectations (~> 2.12.0)
|
25
|
+
rspec-mocks (~> 2.12.0)
|
26
|
+
rspec-core (2.12.2)
|
27
|
+
rspec-expectations (2.12.1)
|
28
|
+
diff-lcs (~> 1.1.3)
|
29
|
+
rspec-mocks (2.12.2)
|
30
|
+
|
31
|
+
PLATFORMS
|
32
|
+
ruby
|
33
|
+
|
34
|
+
DEPENDENCIES
|
35
|
+
notify_hipchat!
|
36
|
+
rspec
|
data/README
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# CLI app to send notifications to hipchat
|
data/bin/notify_hipchat
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
$:.push File.expand_path("../lib", __FILE__)
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
require 'bundler/setup'
|
7
|
+
require 'docopt'
|
8
|
+
require 'notify_hipchat'
|
9
|
+
|
10
|
+
doc = <<DOCOPT
|
11
|
+
Usage:
|
12
|
+
#{__FILE__} <token> <room> <sender> <message>
|
13
|
+
#{__FILE__} -h | --help
|
14
|
+
#{__FILE__} --version
|
15
|
+
|
16
|
+
Options:
|
17
|
+
-h --help Show this screen.
|
18
|
+
--version Show version.
|
19
|
+
|
20
|
+
DOCOPT
|
21
|
+
|
22
|
+
begin
|
23
|
+
opts = Docopt::docopt(doc, :help => true, :version => NotifyHipchat::VERSION)
|
24
|
+
rescue Docopt::Exit => e
|
25
|
+
puts e.message
|
26
|
+
exit 1
|
27
|
+
end
|
28
|
+
|
29
|
+
NotifyHipchat::Client.new(opts["<token>"], opts["<room>"], opts["<sender>"]).send(opts["<message>"])
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'hipchat-api'
|
2
|
+
|
3
|
+
module NotifyHipchat
|
4
|
+
class Client
|
5
|
+
def initialize(token, room, sender)
|
6
|
+
@token = token
|
7
|
+
@room = room
|
8
|
+
@sender = sender
|
9
|
+
|
10
|
+
@api = HipChat::API.new(@token)
|
11
|
+
end
|
12
|
+
|
13
|
+
def send(message)
|
14
|
+
@api.rooms_message(@room, @sender, message)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "notify_hipchat/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "notify_hipchat"
|
7
|
+
s.version = NotifyHipchat::VERSION
|
8
|
+
s.authors = ["Paul Bellamy"]
|
9
|
+
s.email = ["paul.a.bellamy@gmail.com"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = %q{Send notifications to HipChat from the CLI}
|
12
|
+
s.description = %q{Send notifications to HipChat from the CLI}
|
13
|
+
|
14
|
+
s.rubyforge_project = "notify_hipchat"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
s.add_development_dependency "rspec"
|
22
|
+
|
23
|
+
s.add_runtime_dependency "docopt"
|
24
|
+
s.add_runtime_dependency "hipchat-api"
|
25
|
+
s.add_runtime_dependency "mustache"
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: notify_hipchat
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Paul Bellamy
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-02-15 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: docopt
|
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'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: hipchat-api
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: mustache
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
description: Send notifications to HipChat from the CLI
|
79
|
+
email:
|
80
|
+
- paul.a.bellamy@gmail.com
|
81
|
+
executables:
|
82
|
+
- notify_hipchat
|
83
|
+
extensions: []
|
84
|
+
extra_rdoc_files: []
|
85
|
+
files:
|
86
|
+
- .rbenv-version
|
87
|
+
- Gemfile
|
88
|
+
- Gemfile.lock
|
89
|
+
- README
|
90
|
+
- bin/notify_hipchat
|
91
|
+
- lib/notify_hipchat.rb
|
92
|
+
- lib/notify_hipchat/client.rb
|
93
|
+
- lib/notify_hipchat/version.rb
|
94
|
+
- notify_hipchat.gemspec
|
95
|
+
homepage: ''
|
96
|
+
licenses: []
|
97
|
+
post_install_message:
|
98
|
+
rdoc_options: []
|
99
|
+
require_paths:
|
100
|
+
- lib
|
101
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
+
none: false
|
103
|
+
requirements:
|
104
|
+
- - ! '>='
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
109
|
+
requirements:
|
110
|
+
- - ! '>='
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
requirements: []
|
114
|
+
rubyforge_project: notify_hipchat
|
115
|
+
rubygems_version: 1.8.23
|
116
|
+
signing_key:
|
117
|
+
specification_version: 3
|
118
|
+
summary: Send notifications to HipChat from the CLI
|
119
|
+
test_files: []
|