glman 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile +2 -1
- data/lib/glman/commands/base.rb +20 -1
- data/lib/glman/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjEzMDQ2MTEwMzQwZTFhNmEzODcwMjUwZTFiNzA5NDFkZjkzYTNlZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTE4NTBiNjJlOWJiMGQwZjU3MTBlYTY1OGM2N2RlYzM5ZWQ0OWIwOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODVkMGM4MWQ1ZmUwMzU1YTFmZDNiNzhmNzU3NDk2ODk2NDVlYWM1NzNmYTEz
|
10
|
+
OGIzYjQ1ZWEyYmMzZWM4NTVlYTRjOTE0ZDU4OTE1YWZjNzBmY2RiZmNmNzMy
|
11
|
+
ZTM0MDNmYzc0NjkzNDY2YzVlNjFhZWEwOTYxMDU1ODVlNWNlNjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTk5NTUyZWYyODEzMWUyYTI1MGI1YjRmM2E4MjEwZjNkYjFjMzQ1MzM3Njc3
|
14
|
+
Y2JkNTliNzc4Y2NhYjhlYjBmZDcyNmMyNDdlMjMyMjhjYmUzODlmZDMxOWUx
|
15
|
+
MTBlYTMxMDI5Yjg0NzNiNDA2NjY4M2E1MjVmNDc4NGMzMTQxYmE=
|
data/Gemfile
CHANGED
data/lib/glman/commands/base.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "glman/version"
|
2
2
|
require 'executable'
|
3
3
|
require 'awesome_print'
|
4
|
+
require "irc-notify"
|
4
5
|
|
5
6
|
module Glman
|
6
7
|
module Commands
|
@@ -31,7 +32,7 @@ module Glman
|
|
31
32
|
assignee = opts['assignee'] || {}
|
32
33
|
author = opts['author'] || {}
|
33
34
|
info = {
|
34
|
-
url: "#{configuration.load[:gitlab_url]}/
|
35
|
+
url: "#{configuration.load[:gitlab_url]}/#{repository_name}/merge_requests/#{opts['iid']}",
|
35
36
|
assignee: {
|
36
37
|
username: assignee['username'],
|
37
38
|
email: assignee['email'],
|
@@ -169,12 +170,30 @@ module Glman
|
|
169
170
|
@git_repo ||= Repos::GitRepo.new
|
170
171
|
end
|
171
172
|
|
173
|
+
def notify(msg)
|
174
|
+
nick = configuration.load[:irc][:channel] || 'glman'
|
175
|
+
irc_client.register(nick)
|
176
|
+
irc_client.notify(configuration.load[:irc][:channel], msg)
|
177
|
+
client.quit
|
178
|
+
end
|
179
|
+
|
180
|
+
def irc_client
|
181
|
+
@irc_client ||= (
|
182
|
+
irc_config = configuration.load[:irc]
|
183
|
+
server = irc_config[:server] || "irc.freenode.net"
|
184
|
+
port = (irc_config[:port] || 6697).to_i
|
185
|
+
ssl = irc_config[:ssl] == true ? true : false
|
186
|
+
IrcNotify::Client.build(server, port, ssl: ssl)
|
187
|
+
)
|
188
|
+
end
|
189
|
+
|
172
190
|
def help_page
|
173
191
|
%{
|
174
192
|
commands:
|
175
193
|
|
176
194
|
config # display current configuration
|
177
195
|
config <gitlab_url> <private_token> --init # init configuration
|
196
|
+
notify_config <server:port> <channel> <ssl> # setup irc configuration for notifications
|
178
197
|
|
179
198
|
alias # display aliases
|
180
199
|
alias <user_email> <alias> # make alias for user email
|
data/lib/glman/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paweł Niemczyk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|