mock-web-service 1.0 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -5
- data/README.md +32 -0
- data/lib/mock-web-service/response_options.rb +2 -1
- data/lib/mock-web-service/server.rb +1 -0
- data/lib/mock-web-service/version.rb +1 -1
- data/mock-web-service.gemspec +2 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cc69433e58033d0a5eb5da9f6dc0f65be2e2f8c
|
4
|
+
data.tar.gz: 85876bdb7bc0c956d968a62efb7b0c13a10a373e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07b7c23cd3cccef8d18ecd03aea88d240775d04211efde2fb3b8348e1d97c7011ebf6f22e4e90208be92b7d5940df2138eea4ab923154ecde2925f49c148ea18
|
7
|
+
data.tar.gz: 69d6a5f1b558ca12512aaeb31c81be846855ff9b2b6d3ef9b4e2e245ad8106d60752b61bb6c6417a0761d133fc679e9a7ba3256ae6c837f233db17c0923adebf
|
data/Gemfile.lock
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mock-web-service (1.
|
4
|
+
mock-web-service (1.1)
|
5
5
|
sinatra
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
diff-lcs (1.2.5)
|
11
|
-
rack (1.6.
|
11
|
+
rack (1.6.5)
|
12
12
|
rack-protection (1.5.3)
|
13
13
|
rack
|
14
|
+
rake (10.4.2)
|
14
15
|
rspec (3.0.0)
|
15
16
|
rspec-core (~> 3.0.0)
|
16
17
|
rspec-expectations (~> 3.0.0)
|
@@ -23,15 +24,19 @@ GEM
|
|
23
24
|
rspec-mocks (3.0.3)
|
24
25
|
rspec-support (~> 3.0.0)
|
25
26
|
rspec-support (3.0.3)
|
26
|
-
sinatra (1.4.
|
27
|
-
rack (~> 1.
|
27
|
+
sinatra (1.4.8)
|
28
|
+
rack (~> 1.5)
|
28
29
|
rack-protection (~> 1.4)
|
29
30
|
tilt (>= 1.3, < 3)
|
30
|
-
tilt (2.0.
|
31
|
+
tilt (2.0.7)
|
31
32
|
|
32
33
|
PLATFORMS
|
33
34
|
x86-mingw32
|
34
35
|
|
35
36
|
DEPENDENCIES
|
36
37
|
mock-web-service!
|
38
|
+
rake (~> 10.0)
|
37
39
|
rspec (>= 2.12.0)
|
40
|
+
|
41
|
+
BUNDLED WITH
|
42
|
+
1.14.6
|
data/README.md
CHANGED
@@ -2,3 +2,35 @@ mock-web-server
|
|
2
2
|
===============
|
3
3
|
|
4
4
|
Tool to mock out web service requests
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'mock-web-service'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install mock-web-service
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
TODO: Write usage instructions here
|
25
|
+
|
26
|
+
## Development
|
27
|
+
|
28
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
29
|
+
|
30
|
+
## Contributing
|
31
|
+
|
32
|
+
1. Fork it ( https://github.com/[my-github-username]/mock-web-service/fork )
|
33
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
34
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
35
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
36
|
+
5. Create a new Pull Request
|
@@ -1,12 +1,13 @@
|
|
1
1
|
module MockWebService
|
2
2
|
class ResponseOptions
|
3
|
-
attr_accessor :method, :path, :status, :content_type
|
3
|
+
attr_accessor :method, :path, :status, :content_type, :headers
|
4
4
|
|
5
5
|
def initialize
|
6
6
|
self.method = :get
|
7
7
|
self.path = '/'
|
8
8
|
self.status = 200
|
9
9
|
self.content_type = 'text/html;charset=utf-8'
|
10
|
+
self.headers = {}
|
10
11
|
|
11
12
|
yield self if block_given?
|
12
13
|
end
|
data/mock-web-service.gemspec
CHANGED
@@ -5,7 +5,7 @@ require 'mock-web-service/version'
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'mock-web-service'
|
7
7
|
s.version = MockWebService::VERSION
|
8
|
-
s.date = '
|
8
|
+
s.date = '2017-06-02'
|
9
9
|
s.description = 'Tool for mocking web requests'
|
10
10
|
s.authors = ['Mosaic']
|
11
11
|
s.email = 'mosaic.development@sherwin.com'
|
@@ -17,4 +17,5 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.add_dependency 'sinatra'
|
18
18
|
|
19
19
|
s.add_development_dependency 'rspec', '>= 2.12.0'
|
20
|
+
s.add_development_dependency 'rake', '~> 10.0'
|
20
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mock-web-service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mosaic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 2.12.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
41
55
|
description: Tool for mocking web requests
|
42
56
|
email: mosaic.development@sherwin.com
|
43
57
|
executables: []
|
@@ -79,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
93
|
version: '0'
|
80
94
|
requirements: []
|
81
95
|
rubyforge_project:
|
82
|
-
rubygems_version: 2.4.5.
|
96
|
+
rubygems_version: 2.4.5.2
|
83
97
|
signing_key:
|
84
98
|
specification_version: 4
|
85
99
|
summary: With version 1.0, the add_response method is no longer recommended.
|