virginia 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e2d85af27f0a8e253843bf3a74d936b06a758e0f
4
+ data.tar.gz: f1e444baa92667624b501a4de62735f34770cbb0
5
+ SHA512:
6
+ metadata.gz: 8ac323a7eee5635082ab6456d842b9f32235c6ca22a7055c46d73d05d3674be37566a1569dce2ac2954bc1bf0a08478c261e7cf01812683d890a6cac10e9d288
7
+ data.tar.gz: d93f237e1ee0dbb54937b0d82c15f85eca9516c494ef826e598e34b2c9ebef072f8d690fe3bae0056adabdcff7e9421736ac5c0aded4029c7c8cc4cb8f5f5767
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
- pkg
1
+ .bundle
2
+ pkg
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # develop
2
2
 
3
+ # Version 0.2.0
4
+ * Reverted to using a pure Reel handler because Reel::App does not exist any more
5
+
3
6
  # Version 0.1.0
4
7
  * First official release
5
8
 
@@ -7,4 +10,4 @@
7
10
  * Now using Reel::App instead of an explicit handler
8
11
 
9
12
  # Version 0.0.1
10
- * First version
13
+ * First version
data/Gemfile.lock CHANGED
@@ -1,147 +1,163 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- virginia (0.0.2)
5
- activesupport (>= 3.0.10)
6
- adhearsion (~> 2.1)
4
+ virginia (0.2.0)
5
+ activesupport (>= 3.0)
6
+ adhearsion (~> 2.4)
7
7
  octarine
8
8
  reel
9
9
 
10
10
  GEM
11
11
  remote: http://rubygems.org/
12
12
  specs:
13
- activesupport (3.2.12)
14
- i18n (~> 0.6)
15
- multi_json (~> 1.0)
16
- adhearsion (2.2.1)
17
- activesupport (~> 3.0)
13
+ activesupport (4.0.0)
14
+ i18n (~> 0.6, >= 0.6.4)
15
+ minitest (~> 4.2)
16
+ multi_json (~> 1.3)
17
+ thread_safe (~> 0.1)
18
+ tzinfo (~> 0.3.37)
19
+ adhearsion (2.4.0)
20
+ activesupport (>= 3.0.0, < 5.0.0)
18
21
  adhearsion-loquacious (~> 1.9)
19
22
  bundler (~> 1.0)
20
- celluloid (~> 0.12, >= 0.12.1)
23
+ celluloid (~> 0.14)
21
24
  countdownlatch
22
25
  deep_merge
23
26
  ffi (~> 1.0)
24
- future-resource (~> 1.0)
25
27
  girl_friday
26
28
  has-guarded-handlers (~> 1.5)
27
29
  logging (~> 1.8)
28
30
  pry
29
- punchblock (~> 1.4)
31
+ punchblock (~> 2.0)
30
32
  rake
31
- ruby_speech (~> 1.0)
32
- thor
33
+ ruby_speech (~> 2.0)
34
+ thor (~> 0.18.0)
33
35
  adhearsion-loquacious (1.9.3)
34
- blather (0.8.2)
36
+ atomic (1.1.14)
37
+ backports (3.3.5)
38
+ blather (0.8.8)
35
39
  activesupport (>= 2.3.11)
36
40
  eventmachine (>= 1.0.0)
37
41
  girl_friday
38
42
  niceogiri (~> 1.0)
39
43
  nokogiri (~> 1.5, >= 1.5.6)
40
- celluloid (0.12.4)
41
- facter (>= 1.6.12)
42
- timers (>= 1.0.0)
43
- celluloid-io (0.12.1)
44
- celluloid (~> 0.12.0)
45
- nio4r (>= 0.4.0)
46
- certified (0.1.1)
47
- coderay (1.0.8)
48
- connection_pool (1.0.0)
44
+ celluloid (0.15.2)
45
+ timers (~> 1.1.0)
46
+ celluloid-io (0.15.0)
47
+ celluloid (>= 0.15.0)
48
+ nio4r (>= 0.5.0)
49
+ coderay (1.0.9)
50
+ connection_pool (1.1.0)
49
51
  countdownlatch (1.0.0)
50
52
  deep_merge (1.0.0)
51
- diff-lcs (1.1.3)
52
- eventmachine (1.0.0)
53
- facter (1.6.17)
54
- ffi (1.3.1)
55
- future-resource (1.0.0)
53
+ descendants_tracker (0.0.3)
54
+ diff-lcs (1.2.4)
55
+ eventmachine (1.0.3)
56
+ ffi (1.9.0)
57
+ formatador (0.2.4)
58
+ future-resource (1.1.0)
56
59
  girl_friday (0.11.2)
57
60
  connection_pool (~> 1.0)
58
61
  rubinius-actor
59
- guard (1.5.0)
60
- listen (>= 0.4.2)
61
- lumberjack (>= 1.0.2)
62
- pry (>= 0.9.10)
63
- thor (>= 0.14.6)
64
- guard-rspec (2.1.0)
65
- guard (>= 1.1)
66
- rspec (~> 2.11)
62
+ guard (2.1.1)
63
+ formatador (>= 0.2.4)
64
+ listen (~> 2.1)
65
+ lumberjack (~> 1.0)
66
+ pry (>= 0.9.12)
67
+ thor (>= 0.18.1)
68
+ guard-rspec (4.0.3)
69
+ guard (>= 2.1.1)
70
+ rspec (~> 2.14)
67
71
  has-guarded-handlers (1.5.0)
68
- http (0.4.0)
69
- certified
72
+ http (0.5.0)
70
73
  http_parser.rb
71
- http_parser.rb (0.5.3)
74
+ http_parser.rb (0.6.0.beta.2)
72
75
  http_router (0.11.0)
73
76
  rack (>= 1.0.0)
74
77
  url_mount (~> 0.2.1)
75
- i18n (0.6.1)
76
- json (1.7.7)
77
- listen (0.5.3)
78
+ i18n (0.6.5)
79
+ json (1.8.1)
80
+ listen (2.1.1)
81
+ celluloid (>= 0.15.2)
82
+ rb-fsevent (>= 0.9.3)
83
+ rb-inotify (>= 0.9)
78
84
  little-plugger (1.1.3)
79
85
  logging (1.8.1)
80
86
  little-plugger (>= 1.1.3)
81
87
  multi_json (>= 1.3.6)
82
- lumberjack (1.0.2)
83
- method_source (0.8.1)
84
- multi_json (1.6.1)
85
- niceogiri (1.1.1)
88
+ lumberjack (1.0.4)
89
+ method_source (0.8.2)
90
+ mini_portile (0.5.1)
91
+ minitest (4.7.5)
92
+ multi_json (1.8.2)
93
+ niceogiri (1.1.2)
86
94
  nokogiri (~> 1.5)
87
- nio4r (0.4.3)
88
- nokogiri (1.5.6)
95
+ nio4r (0.5.0)
96
+ nokogiri (1.6.0)
97
+ mini_portile (~> 0.5.0)
89
98
  octarine (0.0.3)
90
99
  http_router
91
- pry (0.9.10)
100
+ pry (0.9.12.2)
92
101
  coderay (~> 1.0.5)
93
102
  method_source (~> 0.8)
94
- slop (~> 3.3.1)
95
- punchblock (1.8.0)
96
- activesupport (~> 3.0)
103
+ slop (~> 3.4)
104
+ punchblock (2.0.2)
105
+ activesupport (>= 3.0.0, < 5.0.0)
97
106
  blather (>= 0.7.0)
98
- celluloid (~> 0.12, >= 0.12.4)
107
+ celluloid (~> 0.14)
99
108
  future-resource (~> 1.0)
100
109
  has-guarded-handlers (~> 1.5)
101
- niceogiri (~> 1.1)
102
110
  nokogiri (~> 1.5, >= 1.5.6)
103
- ruby_ami (~> 1.2, >= 1.2.1)
104
- ruby_fs (~> 1.0)
105
- ruby_speech (~> 1.0)
111
+ ruby_ami (~> 2.0)
112
+ ruby_fs (~> 1.1)
113
+ ruby_jid (~> 1.0)
114
+ ruby_speech (~> 2.0)
106
115
  state_machine (~> 1.0)
116
+ virtus (~> 0.5)
107
117
  rack (1.5.2)
108
- rake (0.9.2.2)
109
- reel (0.3.0)
110
- celluloid-io (>= 0.8.0)
111
- http (>= 0.2.0)
112
- http_parser.rb (>= 0.5.3)
113
- rack (>= 1.4.0)
114
- websocket_parser (>= 0.1.0)
115
- rspec (2.11.0)
116
- rspec-core (~> 2.11.0)
117
- rspec-expectations (~> 2.11.0)
118
- rspec-mocks (~> 2.11.0)
119
- rspec-core (2.11.1)
120
- rspec-expectations (2.11.3)
121
- diff-lcs (~> 1.1.3)
122
- rspec-mocks (2.11.3)
118
+ rake (10.1.0)
119
+ rb-fsevent (0.9.3)
120
+ rb-inotify (0.9.2)
121
+ ffi (>= 0.5.0)
122
+ reel (0.4.0)
123
+ celluloid (>= 0.15.1)
124
+ celluloid-io (>= 0.15.0)
125
+ http (>= 0.5.0)
126
+ http_parser.rb (>= 0.6.0.beta.2)
127
+ websocket_parser (>= 0.1.4)
128
+ rspec (2.14.1)
129
+ rspec-core (~> 2.14.0)
130
+ rspec-expectations (~> 2.14.0)
131
+ rspec-mocks (~> 2.14.0)
132
+ rspec-core (2.14.6)
133
+ rspec-expectations (2.14.3)
134
+ diff-lcs (>= 1.1.3, < 2.0)
135
+ rspec-mocks (2.14.4)
123
136
  rubinius-actor (0.0.2)
124
137
  rubinius-core-api
125
138
  rubinius-core-api (0.0.1)
126
- ruby_ami (1.3.0)
127
- celluloid-io (~> 0.12.0)
128
- countdownlatch (~> 1.0)
129
- future-resource
130
- girl_friday
131
- ruby_fs (1.0.3)
132
- celluloid-io (~> 0.12.0)
139
+ ruby_ami (2.1.0)
140
+ celluloid-io (~> 0.13)
141
+ ruby_fs (1.1.0)
142
+ celluloid-io (~> 0.13)
133
143
  json
134
- ruby_speech (1.0.2)
135
- activesupport (>= 3.0.7)
136
- niceogiri (~> 1.1, >= 1.1.1)
137
- nokogiri (~> 1.5, >= 1.5.6)
138
- slop (3.3.3)
139
- state_machine (1.1.2)
140
- thor (0.16.0)
144
+ ruby_jid (1.0.0)
145
+ ruby_speech (2.3.0)
146
+ activesupport (>= 3.0.7, < 5.0.0)
147
+ nokogiri (~> 1.6)
148
+ slop (3.4.6)
149
+ state_machine (1.2.0)
150
+ thor (0.18.1)
151
+ thread_safe (0.1.3)
152
+ atomic
141
153
  timers (1.1.0)
154
+ tzinfo (0.3.38)
142
155
  url_mount (0.2.1)
143
156
  rack
144
- websocket_parser (0.1.1)
157
+ virtus (0.5.5)
158
+ backports (~> 3.3)
159
+ descendants_tracker (~> 0.0.1)
160
+ websocket_parser (0.1.4)
145
161
  http
146
162
 
147
163
  PLATFORMS
data/README.md CHANGED
@@ -10,7 +10,7 @@ The plugin defines three configuration keys.
10
10
 
11
11
  * host: Which IP to bind on (defaults to 0.0.0.0)
12
12
  * port: Which port to listen on (defaults to 8080)
13
- * handler: the Reel::App class to use (see below)
13
+ * handler: the Reel::Server class to use (see below)
14
14
 
15
15
  ## Handler
16
16
  Virginia bundles a simple logging handler class that will answer to GET on "/" with OK and prints a log message in the Adhearsion console.
@@ -19,17 +19,18 @@ An example handler, implementing click-to-call, would be built as follows:
19
19
 
20
20
  ```ruby
21
21
  require 'reel'
22
- require 'reel/app'
23
22
 
24
23
  class RequestHandler
25
- include Reel::App
26
- get('/dial') do
27
- Adhearsion::OutboundCall.originate "SIP/100" do
28
- invoke ConnectingController
24
+ def initialize(host, port)
25
+ Reel::Server.supervise(host, port) do |connection|
26
+ connection.each_request do |request|
27
+ Adhearsion::OutboundCall.originate "SIP/100" do
28
+ invoke ConnectingController
29
+ end
30
+ [200, {}, "200 OK"]
31
+ end
29
32
  end
30
- [200, {}, "200 OK"]
31
33
  end
32
- end
33
34
  ```
34
35
 
35
36
  ### Author
@@ -1,12 +1,13 @@
1
1
  require 'reel'
2
- require 'reel/app'
3
2
 
4
3
  module Virginia
5
- class LoggingHandler
6
- include Reel::App
7
- get "/" do
8
- logger.info "Virginia request received"
9
- [:ok, "200 OK"]
10
- end
11
- end
4
+ class LoggingHandler
5
+ def initialize(host, port)
6
+ Reel::Server.supervise(host, port) do |connection|
7
+ connection.each_request do |request|
8
+ request.respond :ok, "Hello, world!"
9
+ end
10
+ end
11
+ end
12
+ end
12
13
  end
@@ -1,3 +1,3 @@
1
1
  module Virginia
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  require 'adhearsion'
2
2
  require 'virginia'
3
3
 
4
+ ENV['AHN_ENV'] = 'test'
5
+
4
6
  RSpec.configure do |config|
5
7
  config.color_enabled = true
6
8
  config.tty = true
@@ -9,7 +9,7 @@ describe Virginia::Service do
9
9
  let(:host) { "127.0.0.1" }
10
10
  let(:port) { 8989 }
11
11
  let(:handler) { DummyHandler }
12
- before :all do
12
+ before :each do
13
13
  Adhearsion.config.virginia.host = host
14
14
  Adhearsion.config.virginia.port = port
15
15
  Adhearsion.config.virginia.handler = handler
@@ -19,4 +19,4 @@ describe Virginia::Service do
19
19
  handler.should_receive(:new).with(host, port)
20
20
  Virginia::Service.start
21
21
  end
22
- end
22
+ end
data/virginia.gemspec CHANGED
@@ -17,8 +17,8 @@ Gem::Specification.new do |s|
17
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
18
  s.require_paths = ["lib"]
19
19
 
20
- s.add_runtime_dependency %q<adhearsion>, ["~> 2.1"]
21
- s.add_runtime_dependency %q<activesupport>, [">= 3.0.10"]
20
+ s.add_runtime_dependency %q<adhearsion>, ["~> 2.4"]
21
+ s.add_runtime_dependency %q<activesupport>, [">= 3.0"]
22
22
  s.add_runtime_dependency %q<reel>
23
23
  s.add_runtime_dependency %q<octarine>
24
24
 
metadata CHANGED
@@ -1,84 +1,74 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virginia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Luca Pradovera
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-15 00:00:00.000000000 Z
11
+ date: 2013-10-18 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: adhearsion
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: '2.1'
19
+ version: '2.4'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
29
- version: '2.1'
26
+ version: '2.4'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: activesupport
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
- version: 3.0.10
33
+ version: '3.0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
- version: 3.0.10
40
+ version: '3.0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: reel
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: octarine
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: bundler
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: rspec
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -110,33 +97,29 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: rake
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - '>='
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - '>='
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: guard-rspec
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - '>='
132
116
  - !ruby/object:Gem::Version
133
117
  version: '0'
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - '>='
140
123
  - !ruby/object:Gem::Version
141
124
  version: '0'
142
125
  description: Gives an Adhearsion app the ability to be controlled and interact over
@@ -167,29 +150,27 @@ files:
167
150
  - virginia.gemspec
168
151
  homepage: ''
169
152
  licenses: []
153
+ metadata: {}
170
154
  post_install_message:
171
155
  rdoc_options: []
172
156
  require_paths:
173
157
  - lib
174
158
  required_ruby_version: !ruby/object:Gem::Requirement
175
- none: false
176
159
  requirements:
177
- - - ! '>='
160
+ - - '>='
178
161
  - !ruby/object:Gem::Version
179
162
  version: '0'
180
163
  required_rubygems_version: !ruby/object:Gem::Requirement
181
- none: false
182
164
  requirements:
183
- - - ! '>='
165
+ - - '>='
184
166
  - !ruby/object:Gem::Version
185
167
  version: '0'
186
168
  requirements: []
187
169
  rubyforge_project: virginia
188
- rubygems_version: 1.8.24
170
+ rubygems_version: 2.1.9
189
171
  signing_key:
190
- specification_version: 3
172
+ specification_version: 4
191
173
  summary: A Reel interface to Adhearsion
192
174
  test_files:
193
175
  - spec/spec_helper.rb
194
176
  - spec/virginia/service_spec.rb
195
- has_rdoc: