octospy 0.0.4 → 0.0.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 -1
- data/lib/cinch/plugins/octospy/job.rb +13 -6
- data/lib/cinch/plugins/octospy/recording.rb +6 -5
- data/lib/octospy/configurable.rb +2 -1
- data/lib/octospy/recordable/channel.rb +1 -1
- data/lib/octospy/recordable.rb +1 -1
- data/lib/octospy/version.rb +1 -1
- data/lib/octospy/worker.rb +1 -1
- data/lib/octospy.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c874824f5ed9d1cbfc20596aeac3b6beac49e824
|
4
|
+
data.tar.gz: 93e9b711dbf83baa39b9a92e951ed172cc5b5a92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdad245ae5c213b971a6dc65a89479a3f1f7546c89aa39f9cf7d7ae38ef13ace811e837d0c13b427536ad87e3d6c7f3d5b48c890928328c4417ff06ff84f67dc
|
7
|
+
data.tar.gz: c64fad9937309ea56a26f10b1bc7ff9d3f8d6aff3fbb39f2d80cbd7f92a50bd47d5949b8e1f40654bd8e1efdb31c1069d1044a75d253f5339e187fac4af3b6b2
|
data/README.md
CHANGED
@@ -21,30 +21,37 @@ module Cinch
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def start_with_message(m)
|
24
|
+
channel = ::Octospy::Recordable.channel(m.channel.name)
|
25
|
+
|
26
|
+
if channel.nil? || channel.repos.nil? || channel.repos.empty?
|
27
|
+
m.reply 'no repository watched'
|
28
|
+
return
|
29
|
+
end
|
30
|
+
|
24
31
|
if m.channel.job_thread_alive?
|
25
|
-
m.reply '
|
32
|
+
m.reply 'already started'
|
26
33
|
return
|
27
34
|
end
|
28
35
|
|
29
36
|
start(m)
|
30
|
-
m.reply '
|
37
|
+
m.reply 'started'
|
31
38
|
end
|
32
39
|
|
33
40
|
def stop_with_message(m)
|
34
41
|
unless m.channel.job_thread_alive?
|
35
|
-
m.reply '
|
42
|
+
m.reply 'not started'
|
36
43
|
return
|
37
44
|
end
|
38
45
|
|
39
46
|
stop(m)
|
40
|
-
m.reply '
|
47
|
+
m.reply 'stopped'
|
41
48
|
end
|
42
49
|
|
43
50
|
def restart_with_message(m)
|
44
51
|
if restart(m)
|
45
|
-
m.reply '
|
52
|
+
m.reply 'restarted'
|
46
53
|
else
|
47
|
-
m.reply '
|
54
|
+
m.reply 'not started'
|
48
55
|
end
|
49
56
|
end
|
50
57
|
|
@@ -24,7 +24,7 @@ module Cinch
|
|
24
24
|
::Octospy::Recordable.channel(m.channel.name).add_repo(repo)
|
25
25
|
|
26
26
|
restart(m)
|
27
|
-
m.reply "
|
27
|
+
m.reply "started to watch the #{repo} events"
|
28
28
|
end
|
29
29
|
|
30
30
|
def watch_repositories(m, owner)
|
@@ -43,7 +43,7 @@ module Cinch
|
|
43
43
|
}
|
44
44
|
|
45
45
|
if repos.count > 0
|
46
|
-
m.reply "
|
46
|
+
m.reply "started to watch events of #{repos.count} repositories"
|
47
47
|
restart(m)
|
48
48
|
end
|
49
49
|
end
|
@@ -52,14 +52,14 @@ module Cinch
|
|
52
52
|
repo = "#{owner}/#{project}"
|
53
53
|
|
54
54
|
unless ::Octokit.repository?(repo)
|
55
|
-
m.reply "
|
55
|
+
m.reply "sorry, '#{repo}' not found"
|
56
56
|
return
|
57
57
|
end
|
58
58
|
|
59
59
|
::Octospy::Recordable.channel(m.channel.name).remove_repo(repo)
|
60
60
|
|
61
61
|
restart(m)
|
62
|
-
m.reply "
|
62
|
+
m.reply "stopped to watch the #{repo} events"
|
63
63
|
end
|
64
64
|
|
65
65
|
def unwatch_repositories(m, owner)
|
@@ -81,13 +81,14 @@ module Cinch
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def unwatch_all(m)
|
84
|
+
::Octospy::Recordable.remove_channel(m.channel.name)
|
84
85
|
end
|
85
86
|
|
86
87
|
def show_watched_repositories(m)
|
87
88
|
channel = ::Octospy::Recordable.channel(m.channel.name)
|
88
89
|
|
89
90
|
if channel.nil? || channel.repos.nil? || channel.repos.empty?
|
90
|
-
m.reply 'nothing
|
91
|
+
m.reply 'nothing'
|
91
92
|
return
|
92
93
|
end
|
93
94
|
|
data/lib/octospy/configurable.rb
CHANGED
@@ -45,7 +45,8 @@ module Octospy
|
|
45
45
|
@port = ENV['PORT']
|
46
46
|
@ssl = !!ENV['SSL']
|
47
47
|
@password = ENV['PASSWORD']
|
48
|
-
@worker_interval = ENV['WORKER_INTERVAL']
|
48
|
+
@worker_interval = ENV['WORKER_INTERVAL'] ?
|
49
|
+
ENV['WORKER_INTERVAL'].to_i : 30 #sec
|
49
50
|
@github_login = ENV['GITHUB_LOGIN']
|
50
51
|
@github_token = ENV['GITHUB_TOKEN']
|
51
52
|
@channels = ENV['CHANNELS'] ?
|
data/lib/octospy/recordable.rb
CHANGED
data/lib/octospy/version.rb
CHANGED
data/lib/octospy/worker.rb
CHANGED
data/lib/octospy.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octospy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- linyows
|
@@ -324,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
324
324
|
version: '0'
|
325
325
|
requirements: []
|
326
326
|
rubyforge_project:
|
327
|
-
rubygems_version: 2.2.
|
327
|
+
rubygems_version: 2.2.2
|
328
328
|
signing_key:
|
329
329
|
specification_version: 4
|
330
330
|
summary: Octospy notifies the repository activity to an IRC channel.
|