proby 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +5 -0
- data/Gemfile.lock +4 -4
- data/HISTORY.md +6 -0
- data/README.md +1 -0
- data/lib/proby/notifier.rb +1 -1
- data/lib/proby/version.rb +1 -1
- data/proby.gemspec +5 -2
- data/test/notifier_test.rb +6 -1
- data/test/proby_task_test.rb +4 -2
- metadata +7 -7
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
proby (2.
|
4
|
+
proby (2.2.0)
|
5
5
|
chronic (~> 0.6.7)
|
6
6
|
httparty (~> 0.8.1)
|
7
|
-
multi_json (~> 1.
|
7
|
+
multi_json (~> 1.0)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: http://rubygems.org/
|
@@ -19,8 +19,8 @@ GEM
|
|
19
19
|
metaclass (0.0.1)
|
20
20
|
mocha (0.10.5)
|
21
21
|
metaclass (~> 0.0.1)
|
22
|
-
multi_json (1.
|
23
|
-
multi_xml (0.
|
22
|
+
multi_json (1.3.6)
|
23
|
+
multi_xml (0.5.1)
|
24
24
|
rake (0.9.2.2)
|
25
25
|
shoulda (2.11.3)
|
26
26
|
yard (0.6.8)
|
data/HISTORY.md
CHANGED
data/README.md
CHANGED
data/lib/proby/notifier.rb
CHANGED
@@ -3,7 +3,7 @@ module Proby
|
|
3
3
|
|
4
4
|
def self.send_notification(type, proby_task_id, options={})
|
5
5
|
if Proby.api_key.nil?
|
6
|
-
|
6
|
+
$stderr.puts "Proby: No notification sent because API key is not set. Set it using Proby.api_key = 'my_api_key'"
|
7
7
|
return nil
|
8
8
|
end
|
9
9
|
|
data/lib/proby/version.rb
CHANGED
data/proby.gemspec
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
|
2
|
+
lib = File.expand_path('../lib/', __FILE__)
|
3
|
+
$:.unshift lib unless $:.include?(lib)
|
4
|
+
|
5
|
+
require 'proby/version'
|
3
6
|
|
4
7
|
Gem::Specification.new do |s|
|
5
8
|
s.name = "proby"
|
@@ -18,7 +21,7 @@ Gem::Specification.new do |s|
|
|
18
21
|
|
19
22
|
s.add_dependency 'httparty', '~> 0.8.1'
|
20
23
|
s.add_dependency 'chronic', '~> 0.6.7'
|
21
|
-
s.add_dependency 'multi_json', '~> 1.
|
24
|
+
s.add_dependency 'multi_json', '~> 1.0'
|
22
25
|
|
23
26
|
s.add_development_dependency "bundler", ">= 1.0.0"
|
24
27
|
s.add_development_dependency "rake", "~> 0.9.0"
|
data/test/notifier_test.rb
CHANGED
@@ -13,7 +13,12 @@ class NotifierTest < Test::Unit::TestCase
|
|
13
13
|
end
|
14
14
|
|
15
15
|
should "not send the notification if the api_key is not set" do
|
16
|
-
|
16
|
+
previous_stderr, $stderr = $stderr, StringIO.new
|
17
|
+
begin
|
18
|
+
assert_nil Proby.send_start_notification("abc123")
|
19
|
+
ensure
|
20
|
+
$stderr = previous_stderr
|
21
|
+
end
|
17
22
|
end
|
18
23
|
|
19
24
|
context "with an api key set" do
|
data/test/proby_task_test.rb
CHANGED
@@ -307,10 +307,12 @@ END
|
|
307
307
|
proby_task = Proby::ProbyTask.new('api_id' => 'abc123', 'name' => 'Test task', 'crontab' => '* * * * *')
|
308
308
|
assert proby_task.delete
|
309
309
|
assert proby_task.frozen?
|
310
|
-
|
310
|
+
begin
|
311
311
|
proby_task.name = "foo"
|
312
|
+
assert false, "Should have raised an exception"
|
313
|
+
rescue Exception => e
|
314
|
+
assert e.message.include?("can't modify frozen")
|
312
315
|
end
|
313
|
-
assert_equal "can't modify frozen object", e.message
|
314
316
|
end
|
315
317
|
|
316
318
|
should "raise an exception if unable to delete a task" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 2.
|
10
|
+
version: 2.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Wood
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-
|
19
|
+
date: 2012-07-29 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -58,12 +58,11 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
hash:
|
61
|
+
hash: 15
|
62
62
|
segments:
|
63
63
|
- 1
|
64
|
-
- 2
|
65
64
|
- 0
|
66
|
-
version: 1.
|
65
|
+
version: "1.0"
|
67
66
|
type: :runtime
|
68
67
|
requirement: *id003
|
69
68
|
name: multi_json
|
@@ -207,6 +206,7 @@ extra_rdoc_files: []
|
|
207
206
|
|
208
207
|
files:
|
209
208
|
- .gitignore
|
209
|
+
- .travis.yml
|
210
210
|
- Gemfile
|
211
211
|
- Gemfile.lock
|
212
212
|
- HISTORY.md
|