verboice 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/verboice.rb +12 -2
  2. metadata +37 -62
data/lib/verboice.rb CHANGED
@@ -29,8 +29,18 @@ class Verboice
29
29
  }
30
30
  end
31
31
 
32
- def call address, channel = @default_channel
33
- get_json "/api/call?#{self.class.to_query :channel => channel, :address => address}"
32
+ def call address, channel = @default_channel, options = {}
33
+ args = {:channel => channel, :address => address}
34
+
35
+ if options[:flow]
36
+ post "/api/call?#{self.class.to_query args}", options[:flow] do |response, error|
37
+ raise Verboice::Exception.new error.message if error
38
+ JSON.parse response.body
39
+ end
40
+ else
41
+ args[:callback_url] = options[:callback_url] if options[:callback_url]
42
+ get_json "/api/call?#{self.class.to_query args}"
43
+ end
34
44
  end
35
45
 
36
46
  def call_state id
metadata CHANGED
@@ -1,93 +1,68 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: verboice
3
- version: !ruby/object:Gem::Version
4
- hash: 21
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.2
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 2
9
- - 1
10
- version: 0.2.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - InSTEDD
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-11-24 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: httparty
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
12
+ date: 2011-11-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rest-client
16
+ requirement: &70200133298780 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
32
22
  type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: json
36
23
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70200133298780
25
+ - !ruby/object:Gem::Dependency
26
+ name: json
27
+ requirement: &70200133297920 !ruby/object:Gem::Requirement
38
28
  none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
46
33
  type: :runtime
47
- version_requirements: *id002
34
+ prerelease: false
35
+ version_requirements: *70200133297920
48
36
  description: Access the Verboice API in ruby.
49
37
  email: aromero@manas.com.ar
50
38
  executables: []
51
-
52
39
  extensions: []
53
-
54
40
  extra_rdoc_files: []
55
-
56
- files:
41
+ files:
57
42
  - lib/verboice.rb
58
43
  - lib/verboice/exception.rb
59
- homepage: http://code.google.com/p/verboice-api-ruby
44
+ homepage: https://bitbucket.org/instedd/verboice-api-ruby
60
45
  licenses: []
61
-
62
46
  post_install_message:
63
47
  rdoc_options: []
64
-
65
- require_paths:
48
+ require_paths:
66
49
  - lib
67
- required_ruby_version: !ruby/object:Gem::Requirement
50
+ required_ruby_version: !ruby/object:Gem::Requirement
68
51
  none: false
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- hash: 3
73
- segments:
74
- - 0
75
- version: "0"
76
- required_rubygems_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
57
  none: false
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- hash: 3
82
- segments:
83
- - 0
84
- version: "0"
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
85
62
  requirements: []
86
-
87
63
  rubyforge_project:
88
- rubygems_version: 1.8.8
64
+ rubygems_version: 1.8.11
89
65
  signing_key:
90
66
  specification_version: 3
91
67
  summary: Access the Verboice API in ruby
92
68
  test_files: []
93
-