rflow-components-http 1.0.0a3 → 1.0.0a4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c8e0aafd255f7936e411610a811d1af425de6a5
4
- data.tar.gz: 733e7ea0910aca051f9979f0a58a2982ab645cc6
3
+ metadata.gz: 9d3f8d7053686835ebc386e5bc66c5c4dc286b69
4
+ data.tar.gz: c7f38dd720973ce5d627981ccf65936393db6b21
5
5
  SHA512:
6
- metadata.gz: ecde2cf8d154c68120901bebb4f7abaf80af439384e7ae314a994761b8f58b222e0d0862aea45ed2ba0f211e82fa144f3e6bcaf4b7fc36e20110bef838aa3469
7
- data.tar.gz: dc580c77986021c51228604bea59a575cf91e84aaeaffcdf2a14e446c93bb3574df1bcd5a27637f12733f1752b06d66f98cd778081fbb7029b4e2aaf873df6e2
6
+ metadata.gz: 4801abe18b734e189798051cb445c04e80ef0f4ce97073ebb073c6e2dde349f34c12270b138fe46649e195a8b1da74fb3087fbb74bdcb9a8424bd5a309c00d06
7
+ data.tar.gz: bb0e8199d77b5187f61c63641e31afd80b3120537862a6a07e2a7491a02d74fabbc23398a0aaccf90a439929db4b186ef09eb559f2dc45554c75e44b354b44ae
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.1.1
1
+ ruby-2.1.2
@@ -1,7 +1,7 @@
1
1
  class RFlow
2
2
  module Components
3
3
  module HTTP
4
- VERSION = "1.0.0a3"
4
+ VERSION = "1.0.0a4"
5
5
  end
6
6
  end
7
7
  end
@@ -21,10 +21,10 @@ Gem::Specification.new do |s|
21
21
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
22
  s.require_paths = ["lib"]
23
23
 
24
- s.add_dependency 'rflow', '~> 1.0.0a2'
24
+ s.add_dependency 'rflow', '~> 1.0.0a3'
25
25
  s.add_dependency 'eventmachine_httpserver_update', '~> 0.2.1'
26
26
 
27
- s.add_development_dependency 'rspec', '~> 2.99'
28
- s.add_development_dependency 'rspec-collection_matchers', '~> 0.0.4'
29
- s.add_development_dependency 'rake', '~> 0.8'
27
+ s.add_development_dependency 'rspec', '~> 3.0'
28
+ s.add_development_dependency 'rspec-collection_matchers', '~> 1.0'
29
+ s.add_development_dependency 'rake', '>= 10.3'
30
30
  end
@@ -6,32 +6,32 @@ class RFlow
6
6
  module Extensions
7
7
  describe HTTPRequestExtension do
8
8
  it "should work" do
9
- Configuration.available_data_extensions['RFlow::Message::Data::HTTP::Request'].should include(described_class)
9
+ expect(Configuration.available_data_extensions['RFlow::Message::Data::HTTP::Request']).to include(described_class)
10
10
 
11
11
  Message.new('RFlow::Message::Data::HTTP::Request').data.tap do |d|
12
- d.uri.should == '/'
13
- d.method.should == 'GET'
14
- d.query_string.should == nil
15
- d.protocol.should == 'HTTP/1.0'
16
- d.headers.should == {}
12
+ expect(d.uri).to eq('/')
13
+ expect(d.method).to eq('GET')
14
+ expect(d.query_string).to be_nil
15
+ expect(d.protocol).to eq('HTTP/1.0')
16
+ expect(d.headers).to eq({})
17
17
  d.uri = '/foo'
18
- d.uri.should == '/foo'
18
+ expect(d.uri).to eq('/foo')
19
19
  end
20
20
  end
21
21
  end
22
22
 
23
23
  describe HTTPResponseExtension do
24
24
  it "should work" do
25
- Configuration.available_data_extensions['RFlow::Message::Data::HTTP::Response'].should include(described_class)
25
+ expect(Configuration.available_data_extensions['RFlow::Message::Data::HTTP::Response']).to include(described_class)
26
26
 
27
27
  Message.new('RFlow::Message::Data::HTTP::Response').data.tap do |d|
28
- d.protocol.should == 'HTTP/1.0'
29
- d.status_code.should == 200
30
- d.status_reason_phrase.should == 'OK'
31
- d.headers.should == {}
32
- d.content.should == ''
28
+ expect(d.protocol).to eq('HTTP/1.0')
29
+ expect(d.status_code).to eq(200)
30
+ expect(d.status_reason_phrase).to eq('OK')
31
+ expect(d.headers).to eq({})
32
+ expect(d.content).to eq('')
33
33
  d.status_code = 404
34
- d.status_code.should == 404
34
+ expect(d.status_code).to eq(404)
35
35
  end
36
36
  end
37
37
  end
@@ -7,17 +7,17 @@ class RFlow
7
7
  let(:conn) { Server::Connection.new('a') }
8
8
 
9
9
  it "should return a default HTTP response" do
10
- conn.should_receive(:send_data).with("HTTP/1.1 200 OK\r\nContent-Length: 0\r\nContent-Type: text/html\r\nServer: Apache\r\n\r\n")
11
- conn.should_receive(:send_data).with('')
12
- conn.stub(:close_connection)
10
+ expect(conn).to receive(:send_data).with("HTTP/1.1 200 OK\r\nContent-Length: 0\r\nContent-Type: text/html\r\nServer: Apache\r\n\r\n")
11
+ expect(conn).to receive(:send_data).with('')
12
+ allow(conn).to receive(:close_connection)
13
13
 
14
14
  conn.send_http_response(Message.new("RFlow::Message::Data::HTTP::Response"))
15
15
  end
16
16
 
17
17
  it "should use proper status reason phrases" do
18
- conn.should_receive(:send_data).with("HTTP/1.1 404 Not Found\r\nContent-Length: 0\r\nContent-Type: text/html\r\nServer: Apache\r\n\r\n")
19
- conn.should_receive(:send_data).with('')
20
- conn.stub(:close_connection)
18
+ expect(conn).to receive(:send_data).with("HTTP/1.1 404 Not Found\r\nContent-Length: 0\r\nContent-Type: text/html\r\nServer: Apache\r\n\r\n")
19
+ expect(conn).to receive(:send_data).with('')
20
+ allow(conn).to receive(:close_connection)
21
21
 
22
22
  conn.send_http_response(Message.new("RFlow::Message::Data::HTTP::Response").tap {|r| r.data.status_code = 404 })
23
23
  end
@@ -32,9 +32,9 @@ class RFlow
32
32
 
33
33
  expected_body = "boom"
34
34
 
35
- conn.should_receive(:send_data).with("HTTP/1.1 1337\r\nBoom: Town\r\nContent-Length: 4\r\nContent-Type: text/html\r\nServer: Apache\r\n\r\n")
36
- conn.should_receive(:send_data).with('boom')
37
- conn.stub(:close_connection)
35
+ expect(conn).to receive(:send_data).with("HTTP/1.1 1337\r\nBoom: Town\r\nContent-Length: 4\r\nContent-Type: text/html\r\nServer: Apache\r\n\r\n")
36
+ expect(conn).to receive(:send_data).with('boom')
37
+ allow(conn).to receive(:close_connection)
38
38
 
39
39
  conn.send_http_response(m)
40
40
  end
data/spec/schema_spec.rb CHANGED
@@ -21,12 +21,12 @@ describe 'RFlow::Message::Data::HTTP::Request Avro Schema' do
21
21
 
22
22
  expect { decode_avro(schema, encoded_request) }.to_not raise_error
23
23
  decode_avro(schema, encoded_request).tap do |decoded|
24
- decoded['method'].should == request['method']
25
- decoded['uri'].should == request['uri']
26
- decoded['query_string'].should == request['query_string']
27
- decoded['protocol'].should == request['protocol']
28
- decoded['headers'].should == request['headers']
29
- decoded['content'].should == request['content']
24
+ expect(decoded['method']).to eq(request['method'])
25
+ expect(decoded['uri']).to eq(request['uri'])
26
+ expect(decoded['query_string']).to eq(request['query_string'])
27
+ expect(decoded['protocol']).to eq(request['protocol'])
28
+ expect(decoded['headers']).to eq(request['headers'])
29
+ expect(decoded['content']).to eq(request['content'])
30
30
  end
31
31
  end
32
32
  end
@@ -51,11 +51,11 @@ describe 'RFlow::Message::Data::HTTP::Response Avro Schema' do
51
51
 
52
52
  expect { decode_avro(schema, encoded_response) }.to_not raise_error
53
53
  decode_avro(schema, encoded_response).tap do |decoded|
54
- decoded['protocol'].should == response['protocol']
55
- decoded['status_code'].should == response['status_code']
56
- decoded['status_reason_phrase'].should == response['status_reason_phrase']
57
- decoded['headers'].should == response['headers']
58
- decoded['content'].should == response['content']
54
+ expect(decoded['protocol']).to eq(response['protocol'])
55
+ expect(decoded['status_code']).to eq(response['status_code'])
56
+ expect(decoded['status_reason_phrase']).to eq(response['status_reason_phrase'])
57
+ expect(decoded['headers']).to eq(response['headers'])
58
+ expect(decoded['content']).to eq(response['content'])
59
59
  end
60
60
  end
61
61
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rflow-components-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0a3
4
+ version: 1.0.0a4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael L. Artz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-04 00:00:00.000000000 Z
11
+ date: 2014-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rflow
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0a2
19
+ version: 1.0.0a3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0a2
26
+ version: 1.0.0a3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: eventmachine_httpserver_update
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,42 +44,42 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.99'
47
+ version: '3.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.99'
54
+ version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec-collection_matchers
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.0.4
61
+ version: '1.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.0.4
68
+ version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '0.8'
75
+ version: '10.3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '0.8'
82
+ version: '10.3'
83
83
  description: HTTP client and server components for the RFlow FBP framework. Also
84
84
  includes the necessary HTTP::Request and HTTP::Response message types
85
85
  email:
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  version: 1.3.1
130
130
  requirements: []
131
131
  rubyforge_project: rflow-components-http
132
- rubygems_version: 2.2.2
132
+ rubygems_version: 2.3.0
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: HTTP client and server components for the RFlow FBP framework
@@ -138,4 +138,3 @@ test_files:
138
138
  - spec/rflow/components/http/server_spec.rb
139
139
  - spec/schema_spec.rb
140
140
  - spec/spec_helper.rb
141
- has_rdoc: