stubsvc 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 47c51d2f2c8e7de139b80b2aec5ef7ed00bb7174
4
- data.tar.gz: b6d93132fe6eca7eb9bd41c605a6dc251d260b2f
3
+ metadata.gz: e093289ff5402c4c385172a8d2c513bbae070ebc
4
+ data.tar.gz: fc66782fab170c7e599cffe63a62289f0dd2886c
5
5
  SHA512:
6
- metadata.gz: 487566b7e7117c326106f0a3b7996d05bfe2a11799e9c77886fae9563fb9b23c286cc8a351a3f78419723621f29b05d791fd97637a36fc2974c4d795d992c762
7
- data.tar.gz: eb44dca264789dde3ef8c454d5a9fae2552b38882d9d7f1516ac4891e629f0e27c92890a0e15e01b5fc67f6b76fcd08526c1c954fe3884d3e7543b1d24cdb4ff
6
+ metadata.gz: 49923503b12820460bea10fc96ffa6e17aa9fda4768262eaed548950e194fa5980008c3e8fc882b39d4107680b67d3a3c892c507326d4fda697620850cead2ee
7
+ data.tar.gz: be961aae1a3fa06e517fa10bdafeb652421928d9e49f343a8ecb895a6bb403922446b8d8aef05b17a73ac9eb8ee4e38d8bab4649c5a9f3665e74067c148f3099
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ *0.1.4* (March 10, 2016)
2
+
3
+ * Update README to make it clear about ActiveResource
4
+ * Add homepage in .gemspec
5
+
1
6
  *0.1.3* (October 26, 2015)
2
7
 
3
8
  * Relax version requirement for Webmock to 1.x
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Stubsvc
2
2
 
3
- **Version: 0.1.3**
3
+ **Version: 0.1.4**
4
4
 
5
- A Ruby gem that makes it easy to stub out calls to external web services using Webmock.
5
+ Stub calls to ActiveResource based web services using [Webmock](https://github.com/bblimke/webmock).
6
6
 
7
- Many applications are service-oriented or distributed in some way. Testing can be problematic in such an environment. `Stubsvc` makes it easy for unit tests to stub calls to external services, in a deterministic way, wrapping the Webmock `stub_request` method.
7
+ Testing [SOA](http://www.service-architecture.com/articles/web-services/service-oriented_architecture_soa_definition.html) - [ActiveResource](https://github.com/rails/activeresource) services can be problematic using [VCR](https://github.com/vcr/vcr). `Stubsvc` makes it to stub these kinds of RESTful calls to external services, in a deterministic way.
8
8
 
9
9
  ## Installation
10
10
 
@@ -47,9 +47,9 @@ There are two ways to stub a service call:
47
47
  1. `Stubsvc.stub_action`
48
48
  2. `Stubsvc.stub_verb`
49
49
 
50
- #### `stub_action`
50
+ #### stub_action
51
51
 
52
- `Stubsvc.stub_action` is for Rails [ActiveResource](https://github.com/rails/activeresource) type actions which accepts the following arguments:
52
+ `Stubsvc.stub_action` is for Rails [ActiveResource](https://github.com/rails/activeresource) type actions and accepts the following arguments:
53
53
 
54
54
  Stubsvc.stub_action(service, action, resource, return_hash, status)
55
55
 
@@ -59,9 +59,9 @@ There are two ways to stub a service call:
59
59
  * return_hash - (optional) A hash representation of the JSON data you want returned for this call. If you don't care what gets returned and leave this argument out, it will default to `"{}"`
60
60
  * status - (optional) The HTTP status code that should be returned. Defaults to 200
61
61
 
62
- #### `stub_verb`
62
+ #### stub_verb
63
63
 
64
- `Stubsvc.stub_verb` is for stubbing standard HTTP verbs which accepts the following arguments:
64
+ `Stubsvc.stub_verb` is for stubbing standard, RESTful HTTP verbs and accepts the following arguments:
65
65
 
66
66
  Stubsvc.stub_verb(service, http_verb, uri, return_hash, status)
67
67
 
@@ -78,12 +78,12 @@ Let's say I have a model called `Article`. Whenever an `Article` instance is cre
78
78
  We want to unit test the `create` method for `ArticlesController`, without having to fire up the external service. We can stub out the call to the file service `Folder.create` method like this:
79
79
 
80
80
  RSpec.describe ArticlesController, type: :controller do
81
- let(:valid_params) do
81
+ let(:valid_params) do
82
82
  {
83
83
  article: {
84
84
  name: 'Test Article'
85
85
  }
86
- }
86
+ }
87
87
  end
88
88
 
89
89
  it 'persists an Article instance' do
@@ -108,7 +108,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
108
108
 
109
109
  ## Contributing
110
110
 
111
- 1. Fork it ( https://github.com/[my-github-username]/stubsvc/fork )
111
+ 1. Fork it
112
112
  2. Create your feature branch (`git checkout -b my-new-feature`)
113
113
  3. Commit your changes (`git commit -am 'Add some feature'`)
114
114
  4. Push to the branch (`git push origin my-new-feature`)
@@ -1,3 +1,3 @@
1
1
  module Stubsvc
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
data/stubsvc.gemspec CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.description = <<-stop
14
14
  A Ruby gem that makes it easy to stub out calls to external web services using Webmock.
15
15
  stop
16
- spec.homepage = ''
16
+ spec.homepage = 'https://bitbucket.org/midwiretech/stubsvc/overview'
17
17
 
18
18
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
19
  spec.bindir = 'exe'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stubsvc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Blackburn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-26 00:00:00.000000000 Z
11
+ date: 2016-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -200,7 +200,7 @@ files:
200
200
  - lib/stubsvc/stubber.rb
201
201
  - lib/stubsvc/version.rb
202
202
  - stubsvc.gemspec
203
- homepage: ''
203
+ homepage: https://bitbucket.org/midwiretech/stubsvc/overview
204
204
  licenses: []
205
205
  metadata: {}
206
206
  post_install_message:
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  version: '0'
220
220
  requirements: []
221
221
  rubyforge_project:
222
- rubygems_version: 2.4.5
222
+ rubygems_version: 2.4.5.1
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: Stub out calls to external web services.