restful_adhearsion 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ .DS_Store
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in ruby_speech.gemspec
4
+ gemspec
File without changes
data/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # RESTfulAdhearsion
2
+
3
+ ## Description
4
+
5
+ Ruby library for consuming the Adhearsion RESTful RPC API.
6
+
7
+ ## Example
8
+ ```ruby
9
+ Adhearsion = RESTfulAdhearsion.new :host => "localhost",
10
+ :port => 5000,
11
+ :user => "jicksta",
12
+ :password => "roflcopterz"
13
+
14
+ Adhearsion.originate :channel => "SIP/3000",
15
+ :priority => 1,
16
+ :exten => "1000",
17
+ :context => "adhearsion",
18
+ :async => "true",
19
+ :variable => "bill_this=true"
20
+ ```
21
+
22
+ ## Installation
23
+
24
+ gem install restful_adhearsion
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler/gem_tasks'
2
+ Bundler::GemHelper.install_tasks
@@ -10,7 +10,7 @@ class RESTfulAdhearsion
10
10
  :path_nesting => "/"
11
11
  }
12
12
 
13
- def initialize(options={})
13
+ def initialize(options = {})
14
14
  @options = DEFAULT_OPTIONS.merge options
15
15
 
16
16
  @path_nesting = @options.delete :path_nesting
@@ -21,7 +21,7 @@ class RESTfulAdhearsion
21
21
  end
22
22
 
23
23
  def method_missing(method_name, *args)
24
- JSON.parse RestClient::Resource.new(@url_beginning + method_name.to_s, @options).post(args.to_json).body
24
+ JSON.parse RestClient::Resource.new("#{@url_beginning}restful_#{method_name.to_s}", @options).post(args.to_json)
25
25
  end
26
26
 
27
- end
27
+ end
@@ -0,0 +1,3 @@
1
+ class RESTfulAdhearsion
2
+ VERSION = "0.2.0"
3
+ end
@@ -1,15 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "restful_adhearsion/version"
4
+
1
5
  Gem::Specification.new do |s|
2
- s.name = "restful_adhearsion"
3
- s.version = "0.1.3"
4
- s.summary = "Ruby Library for the Adhearsion RESTful RPC API"
6
+ s.name = "restful_adhearsion"
7
+ s.version = RESTfulAdhearsion::VERSION
8
+ s.authors = ["Jason Goecke", "Jay Phillips"]
9
+ s.email = ["jason@goecke.net"]
10
+ s.homepage = "http://adhearsion.com"
11
+ s.summary = "Ruby Library for the Adhearsion RESTful RPC API"
5
12
  s.description = "Ruby library for consuming the Adhearsion RESTful RPC API"
6
- s.authors = ["Jason Goecke", "Jay Phillips", "Ludovic Gasc"]
7
- s.email = ["jason@goecke.net", "gmludo@gmail.com"]
8
- s.homepage = "http://github.com/GMLudo/restful_adhearsion"
9
13
 
10
- s.files = ["lib/restful_adhearsion.rb", "LICENSE", "README.textile", "restful_adhearsion.gemspec"]
14
+ s.rubyforge_project = "restful_adhearsion"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
11
19
  s.require_paths = ["lib"]
12
20
 
13
- s.add_dependency("json", ">= 1.1.3")
14
- s.add_dependency("rest-client", ">= 0.8.2")
15
- end
21
+ s.add_dependency "json", ">= 1.1.3"
22
+ s.add_dependency "rest-client", ">= 0.8.2"
23
+ end
metadata CHANGED
@@ -1,96 +1,78 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: restful_adhearsion
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 3
9
- version: 0.1.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Jason Goecke
13
9
  - Jay Phillips
14
- - Ludovic Gasc
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2010-04-15 00:00:00 +02:00
13
+ date: 2011-08-26 00:00:00.000000000 +01:00
20
14
  default_executable:
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
23
17
  name: json
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- segments:
30
- - 1
31
- - 1
32
- - 3
18
+ requirement: &2164973420 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ! '>='
22
+ - !ruby/object:Gem::Version
33
23
  version: 1.1.3
34
24
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: rest-client
38
25
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- segments:
44
- - 0
45
- - 8
46
- - 2
26
+ version_requirements: *2164973420
27
+ - !ruby/object:Gem::Dependency
28
+ name: rest-client
29
+ requirement: &2164972920 !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
47
34
  version: 0.8.2
48
35
  type: :runtime
49
- version_requirements: *id002
36
+ prerelease: false
37
+ version_requirements: *2164972920
50
38
  description: Ruby library for consuming the Adhearsion RESTful RPC API
51
- email:
39
+ email:
52
40
  - jason@goecke.net
53
- - gmludo@gmail.com
54
41
  executables: []
55
-
56
42
  extensions: []
57
-
58
43
  extra_rdoc_files: []
59
-
60
- files:
44
+ files:
45
+ - .gitignore
46
+ - Gemfile
47
+ - LICENSE.txt
48
+ - README.md
49
+ - Rakefile
61
50
  - lib/restful_adhearsion.rb
62
- - LICENSE
63
- - README.textile
51
+ - lib/restful_adhearsion/version.rb
64
52
  - restful_adhearsion.gemspec
65
53
  has_rdoc: true
66
- homepage: http://github.com/GMLudo/restful_adhearsion
54
+ homepage: http://adhearsion.com
67
55
  licenses: []
68
-
69
56
  post_install_message:
70
57
  rdoc_options: []
71
-
72
- require_paths:
58
+ require_paths:
73
59
  - lib
74
- required_ruby_version: !ruby/object:Gem::Requirement
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- segments:
79
- - 0
80
- version: "0"
81
- required_rubygems_version: !ruby/object:Gem::Requirement
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- segments:
86
- - 0
87
- version: "0"
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ! '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
88
72
  requirements: []
89
-
90
- rubyforge_project:
91
- rubygems_version: 1.3.6
73
+ rubyforge_project: restful_adhearsion
74
+ rubygems_version: 1.6.2
92
75
  signing_key:
93
76
  specification_version: 3
94
77
  summary: Ruby Library for the Adhearsion RESTful RPC API
95
78
  test_files: []
96
-
data/README.textile DELETED
@@ -1,32 +0,0 @@
1
- h1. RESTfulAdhearsion
2
-
3
- h2. Description
4
-
5
- Ruby library for consuming the Adhearsion RESTful RPC API.
6
-
7
- h2. Example
8
-
9
- <pre>
10
- <code>
11
- Adhearsion = RESTfulAdhearsion.new(:host => "localhost",
12
- :port => 5000,
13
- :user => "jicksta",
14
- :password => "roflcopterz")
15
- options = { :channel => "SIP/3000",
16
- :priority => 1,
17
- :exten => "1000",
18
- :context => "adhearsion",
19
- :async => "true",
20
- :variable => "bill_this=true" }
21
- Adhearsion.originate options
22
- </code>
23
- </pre>
24
-
25
- h2. Dependencies
26
-
27
- * json v1.1.3+
28
- * rest-client v0.8.2+
29
-
30
- h2. Installation
31
-
32
- <pre>sudo gem install restful_adhearsion</pre>