and-son 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -3,6 +3,6 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  gem 'rake'
6
- gem 'pry'
6
+ gem 'pry', "~> 0.9.0"
7
7
 
8
8
  gem 'bson_ext'
@@ -18,8 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
19
  gem.require_paths = ["lib"]
20
20
 
21
- gem.add_dependency("sanford-protocol", ["~> 0.8"])
21
+ gem.add_dependency("sanford-protocol", ["~> 0.9"])
22
22
 
23
- gem.add_development_dependency("assert", ["~> 2.10"])
24
- gem.add_development_dependency("assert-mocha", ["~> 1.1"])
23
+ gem.add_development_dependency("assert", ["~> 2.12"])
25
24
  end
@@ -1,3 +1,3 @@
1
1
  module AndSon
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -6,4 +6,3 @@ $LOAD_PATH.unshift(File.expand_path("../..", __FILE__))
6
6
 
7
7
  # require pry for debugging (`binding.pry`)
8
8
  require 'pry'
9
- require 'assert-mocha' if defined?(Assert)
@@ -80,14 +80,14 @@ class AndSon::Client
80
80
  @connection = AndSon::Connection.new('localhost', 12001)
81
81
  @response = AndSon::Response.parse({ 'status' => [200] })
82
82
  @fake_connection = FakeConnection.new
83
- AndSon::Connection.stubs(:new).returns(@connection)
84
- end
85
- teardown do
86
- AndSon::Connection.unstub(:new)
83
+ Assert.stub(AndSon::Connection, :new){ @connection }
87
84
  end
88
85
 
89
86
  should "write a request to the connection" do
90
- @connection.stubs(:open).yields(@fake_connection).returns(@response)
87
+ Assert.stub(@connection, :open) do |&block|
88
+ block.call(@fake_connection)
89
+ @response
90
+ end
91
91
 
92
92
  client = AndSon::Client.new('localhost', 12001).call('echo', {
93
93
  :message => 'test'
@@ -99,7 +99,10 @@ class AndSon::Client
99
99
  end
100
100
 
101
101
  should "close the write stream" do
102
- @connection.stubs(:open).yields(@fake_connection).returns(@response)
102
+ Assert.stub(@connection, :open) do |&block|
103
+ block.call(@fake_connection)
104
+ @response
105
+ end
103
106
 
104
107
  client = AndSon::Client.new('localhost', 12001).call('echo', {
105
108
  :message => 'test'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: and-son
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 0
10
- version: 0.6.0
9
+ - 1
10
+ version: 0.6.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Collin Redding
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2014-06-10 00:00:00 Z
19
+ date: 2014-07-24 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  requirement: &id001 !ruby/object:Gem::Requirement
@@ -24,14 +24,14 @@ dependencies:
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
- hash: 27
27
+ hash: 25
28
28
  segments:
29
29
  - 0
30
- - 8
31
- version: "0.8"
30
+ - 9
31
+ version: "0.9"
32
+ version_requirements: *id001
32
33
  type: :runtime
33
34
  name: sanford-protocol
34
- version_requirements: *id001
35
35
  prerelease: false
36
36
  - !ruby/object:Gem::Dependency
37
37
  requirement: &id002 !ruby/object:Gem::Requirement
@@ -39,29 +39,14 @@ dependencies:
39
39
  requirements:
40
40
  - - ~>
41
41
  - !ruby/object:Gem::Version
42
- hash: 23
42
+ hash: 27
43
43
  segments:
44
44
  - 2
45
- - 10
46
- version: "2.10"
47
- type: :development
48
- name: assert
45
+ - 12
46
+ version: "2.12"
49
47
  version_requirements: *id002
50
- prerelease: false
51
- - !ruby/object:Gem::Dependency
52
- requirement: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ~>
56
- - !ruby/object:Gem::Version
57
- hash: 13
58
- segments:
59
- - 1
60
- - 1
61
- version: "1.1"
62
48
  type: :development
63
- name: assert-mocha
64
- version_requirements: *id003
49
+ name: assert
65
50
  prerelease: false
66
51
  description: Simple Sanford client for Ruby.
67
52
  email:
@@ -123,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
108
  requirements: []
124
109
 
125
110
  rubyforge_project:
126
- rubygems_version: 1.8.25
111
+ rubygems_version: 1.8.29
127
112
  signing_key:
128
113
  specification_version: 3
129
114
  summary: Simple Sanford client for Ruby.