broach 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,4 +9,7 @@ module Broach
9
9
 
10
10
  # Raised when the credentials were correct, but the resource could not be accessed
11
11
  class AuthorizationError < APIError; end
12
+
13
+ # Raised when the configuration of the account was incorrect
14
+ class ConfigurationError < APIError; end
12
15
  end
@@ -4,7 +4,8 @@ module Broach
4
4
  TYPE_MAP = {
5
5
  :text => 'TextMessage',
6
6
  :paste => 'PasteMessage',
7
- :sound => 'SoundMessage'
7
+ :sound => 'SoundMessage',
8
+ :tweet => 'TweetMessage'
8
9
  }
9
10
 
10
11
  include Broach::Attributes
@@ -63,6 +63,8 @@ module Broach
63
63
  Broach::AuthenticationError.new("Couldn't authenticate with the supplied credentials for the account `#{account}'")
64
64
  elsif response.forbidden?
65
65
  Broach::AuthorizationError.new("Couldn't #{method.to_s.upcase} the resource `#{path}' on the account `#{account}'")
66
+ elsif response.found?
67
+ Broach::ConfigurationError.new("Got redirected when trying to #{method.to_s.upcase} the resource `#{path}' on the account `#{account}'")
66
68
  else
67
69
  Broach::APIError.new("Response from the server was unexpected (#{response.status_code})")
68
70
  end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: broach
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ hash: 23
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
5
11
  platform: ruby
6
12
  authors:
7
13
  - Manfred Stienstra
@@ -9,19 +15,24 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2009-12-23 00:00:00 +01:00
18
+ date: 2010-09-18 00:00:00 +02:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: nap
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
29
+ hash: 13
30
+ segments:
31
+ - 0
32
+ - 3
23
33
  version: "0.3"
24
- version:
34
+ type: :runtime
35
+ version_requirements: *id001
25
36
  description: " Ruby implementation of 37signal's Campfire API.\n"
26
37
  email: manfred@fngtps.com
27
38
  executables: []
@@ -48,21 +59,27 @@ rdoc_options:
48
59
  require_paths:
49
60
  - lib
50
61
  required_ruby_version: !ruby/object:Gem::Requirement
62
+ none: false
51
63
  requirements:
52
64
  - - ">="
53
65
  - !ruby/object:Gem::Version
66
+ hash: 3
67
+ segments:
68
+ - 0
54
69
  version: "0"
55
- version:
56
70
  required_rubygems_version: !ruby/object:Gem::Requirement
71
+ none: false
57
72
  requirements:
58
73
  - - ">="
59
74
  - !ruby/object:Gem::Version
75
+ hash: 3
76
+ segments:
77
+ - 0
60
78
  version: "0"
61
- version:
62
79
  requirements: []
63
80
 
64
81
  rubyforge_project:
65
- rubygems_version: 1.3.5
82
+ rubygems_version: 1.3.7
66
83
  signing_key:
67
84
  specification_version: 3
68
85
  summary: Ruby implementation of 37signal's Campfire API.