proby 2.1.0 → 2.2.0

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.
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- proby (2.1.0)
4
+ proby (2.2.0)
5
5
  chronic (~> 0.6.7)
6
6
  httparty (~> 0.8.1)
7
- multi_json (~> 1.2.0)
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.2.0)
23
- multi_xml (0.4.4)
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
@@ -1,3 +1,9 @@
1
+ 2.2.0
2
+ -----
3
+ * Loosened up the version dependency on multi_json
4
+ * Log error to stderr when API key is not set
5
+ * Fix warning about version already being defined
6
+
1
7
  2.1.0
2
8
  -----
3
9
  * Added Proby.monitor method
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Proby
2
2
  A simple library for working with the Proby task monitoring application.
3
3
 
4
+ [![Build Status](https://secure.travis-ci.org/signal/proby-ruby.png?branch=master)](http://travis-ci.org/signal/proby-ruby)
4
5
 
5
6
  Installation
6
7
  ------------
@@ -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
- Proby.logger.warn "Proby: No notification sent because API key is not set"
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
 
@@ -1,3 +1,3 @@
1
1
  module Proby
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  end
@@ -1,5 +1,8 @@
1
1
  # -*- encoding: utf-8 -*-
2
- require File.expand_path("../lib/proby/version", __FILE__)
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.2.0'
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"
@@ -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
- assert_nil Proby.send_start_notification("abc123")
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
@@ -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
- e = assert_raise TypeError do
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: 11
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 2.1.0
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-04-30 00:00:00 -05:00
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: 31
61
+ hash: 15
62
62
  segments:
63
63
  - 1
64
- - 2
65
64
  - 0
66
- version: 1.2.0
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