doppelserver 0.2.0
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 +7 -0
- data/.circleci/config.yml +57 -0
- data/.coveralls.yml +2 -0
- data/.gitignore +9 -0
- data/.rspec +6 -0
- data/.rubocop.yml +14 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +54 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doppelserver.gemspec +52 -0
- data/lib/doppelserver.rb +4 -0
- data/lib/doppelserver/base_server.rb +91 -0
- data/lib/doppelserver/data.rb +54 -0
- data/lib/doppelserver/version.rb +3 -0
- metadata +234 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 78cfc32f4b0ac2f496d20d018fefb1b4a0a74b02852bb7fd65180a835aa09dcb
|
4
|
+
data.tar.gz: e6786dbf639465a5b65e416a7e2c89fb2d32b1d70bac8629b38ec9f154e1c878
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e0e787686d5f7a6afe06898748f4a5e5da96b41f4141f2ebf13779d1866ea0bcec04e2d7638ab6e5e302c79461135812d7953b344b815efa556a0a0620adc221
|
7
|
+
data.tar.gz: d7467f9b1b6eb180de4c4cc7b0bd9917402e7435df46478c20d67dd58b737a3c5147b1b2b81c14a385db36097a9d8ac35a0e5738b61a25085fa26499320fa58e
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# Ruby CircleCI 2.0 configuration file
|
2
|
+
#
|
3
|
+
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
4
|
+
#
|
5
|
+
version: 2
|
6
|
+
jobs:
|
7
|
+
build:
|
8
|
+
docker:
|
9
|
+
# specify the version you desire here
|
10
|
+
- image: circleci/ruby:2.4.1-node-browsers
|
11
|
+
|
12
|
+
# Specify service dependencies here if necessary
|
13
|
+
# CircleCI maintains a library of pre-built images
|
14
|
+
# documented at https://circleci.com/docs/2.0/circleci-images/
|
15
|
+
# - image: circleci/postgres:9.4
|
16
|
+
|
17
|
+
working_directory: ~/repo
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- checkout
|
21
|
+
|
22
|
+
# Download and cache dependencies
|
23
|
+
- restore_cache:
|
24
|
+
keys:
|
25
|
+
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
26
|
+
# fallback to using the latest cache if no exact match is found
|
27
|
+
- v1-dependencies-
|
28
|
+
|
29
|
+
- run:
|
30
|
+
name: install dependencies
|
31
|
+
command: |
|
32
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
33
|
+
|
34
|
+
- save_cache:
|
35
|
+
paths:
|
36
|
+
- ./vendor/bundle
|
37
|
+
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
38
|
+
|
39
|
+
# run tests!
|
40
|
+
- run:
|
41
|
+
name: run tests
|
42
|
+
command: |
|
43
|
+
mkdir /tmp/test-results
|
44
|
+
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
|
45
|
+
|
46
|
+
bundle exec rspec --format progress \
|
47
|
+
--format RspecJunitFormatter \
|
48
|
+
--out /tmp/test-results/rspec.xml \
|
49
|
+
--format progress \
|
50
|
+
$TEST_FILES
|
51
|
+
|
52
|
+
# collect reports
|
53
|
+
- store_test_results:
|
54
|
+
path: /tmp/test-results
|
55
|
+
- store_artifacts:
|
56
|
+
path: /tmp/test-results
|
57
|
+
destination: test-results
|
data/.coveralls.yml
ADDED
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
AllCops:
|
2
|
+
DefaultFormatter: progress
|
3
|
+
DisplayCopNames: true
|
4
|
+
DisplayStyleGuide: true
|
5
|
+
ExtraDetails: true
|
6
|
+
|
7
|
+
Metrics/BlockLength:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Metrics/MethodLength:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
Style/BracesAroundHashParameters:
|
14
|
+
Enabled: false
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Drew Cooper
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# Doppelserver
|
2
|
+
|
3
|
+
[](https://travis-ci.org/drewcoo/doppelserver)
|
4
|
+
[](https://circleci.com/gh/drewcoo/doppelserver)
|
5
|
+
[](https://coveralls.io/github/drewcoo/doppelserver?branch=master)
|
6
|
+
|
7
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/doppelserver`. To experiment with that code, run `bin/console` for an interactive prompt.
|
8
|
+
|
9
|
+
TODO: Delete this and the text above, and describe your gem
|
10
|
+
|
11
|
+
## Why Doppelerver?
|
12
|
+
|
13
|
+
TODO: Explain mocks, dups, and fakes. This is a fake. Explain why fakes.
|
14
|
+
|
15
|
+
Also, all the cool names were taken on RubyGems.
|
16
|
+
|
17
|
+
### Alternatives
|
18
|
+
|
19
|
+
TODO: Table of alternatives.
|
20
|
+
|
21
|
+
## Installation
|
22
|
+
|
23
|
+
Add this line to your application's Gemfile:
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
gem 'doppelserver'
|
27
|
+
```
|
28
|
+
|
29
|
+
And then execute:
|
30
|
+
|
31
|
+
$ bundle
|
32
|
+
|
33
|
+
Or install it yourself as:
|
34
|
+
|
35
|
+
$ gem install doppelserver
|
36
|
+
|
37
|
+
## Usage
|
38
|
+
|
39
|
+
TODO: Write usage instructions here
|
40
|
+
|
41
|
+
## Development
|
42
|
+
|
43
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
44
|
+
|
45
|
+
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`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
46
|
+
|
47
|
+
## Contributing
|
48
|
+
|
49
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/drewcoo/doppelserver.
|
50
|
+
|
51
|
+
|
52
|
+
## License
|
53
|
+
|
54
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'fake_server'
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require 'irb'
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'doppelserver/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'doppelserver'
|
7
|
+
spec.version = Doppelserver::VERSION
|
8
|
+
spec.authors = ['Drew Cooper']
|
9
|
+
spec.email = ['drewcoo@gmail.com']
|
10
|
+
spec.summary = 'A REST server and a client that knows how to talk ' \
|
11
|
+
'to it, so be used for test fakes.'
|
12
|
+
spec.description = 'Unlike mocks and stubs, fake services are running ' \
|
13
|
+
'processes that pretend to function as real ones ' \
|
14
|
+
'would. This enables testing the software under test ' \
|
15
|
+
'with more complete control of the surfaces it talks' \
|
16
|
+
'to (other services, faked). Beyond that, it makes' \
|
17
|
+
'application- and (http)protocol-level fault' \
|
18
|
+
'injection easy.'
|
19
|
+
spec.homepage = 'https://github.com/drewcoo/doppelserver'
|
20
|
+
spec.license = 'MIT'
|
21
|
+
|
22
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the
|
23
|
+
# 'allowed_push_host' to allow pushing to a single host or delete this
|
24
|
+
# section to allow pushing to any host.
|
25
|
+
if spec.respond_to?(:metadata)
|
26
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org/gems/doppleserver'
|
27
|
+
else
|
28
|
+
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
29
|
+
'public gem pushes.'
|
30
|
+
end
|
31
|
+
|
32
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
33
|
+
f.match(%r{^(test|spec|features)/})
|
34
|
+
end
|
35
|
+
spec.bindir = 'exe'
|
36
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
37
|
+
spec.require_paths = ['lib']
|
38
|
+
|
39
|
+
spec.add_development_dependency 'activesupport', '~> 5.0.0.1'
|
40
|
+
spec.add_development_dependency 'coveralls'
|
41
|
+
spec.add_development_dependency 'bundler', '~> 1.13'
|
42
|
+
spec.add_development_dependency 'faraday', '~> 0.10.0' # TODO: development only?
|
43
|
+
spec.add_development_dependency 'gem-release'
|
44
|
+
# spec.add_development_dependency 'rack-test', '~> 0.6.3'
|
45
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
46
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
47
|
+
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.3'
|
48
|
+
spec.add_development_dependency 'rubocop', '~> 0.55'
|
49
|
+
spec.add_development_dependency 'simplecov', '~> 0.12.0'
|
50
|
+
spec.add_development_dependency 'sinatra', '~> 1.4.7'
|
51
|
+
spec.add_development_dependency 'sinatra-contrib', '~> 1.4.7'
|
52
|
+
end
|
data/lib/doppelserver.rb
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
require 'sinatra'
|
2
|
+
require 'sinatra/json'
|
3
|
+
# require File.expand_path '../../lib/doppelserver/base_server.rb', __FILE__
|
4
|
+
require_relative 'data'
|
5
|
+
|
6
|
+
module Doppelserver
|
7
|
+
ENFORCE_PLURALS = true
|
8
|
+
|
9
|
+
class BaseServer < Sinatra::Base
|
10
|
+
require 'active_support' # for singularization/pluralization
|
11
|
+
def singular?(word)
|
12
|
+
ActiveSupport::Inflector.singularize(word) == word
|
13
|
+
end
|
14
|
+
|
15
|
+
def enforce_plural(word)
|
16
|
+
return unless ENFORCE_PLURALS
|
17
|
+
halt 403, 'only plural collection names allowed' if singular?(word)
|
18
|
+
end
|
19
|
+
|
20
|
+
configure do
|
21
|
+
@@data = Data.new
|
22
|
+
end
|
23
|
+
|
24
|
+
delete '/control/data' do
|
25
|
+
@@data.clear
|
26
|
+
end
|
27
|
+
|
28
|
+
get '/' do
|
29
|
+
body = 'here i am' # TODO: Change this.
|
30
|
+
end
|
31
|
+
|
32
|
+
get '/:endpoint/:id' do
|
33
|
+
collection, id = params['endpoint'], params['id']
|
34
|
+
enforce_plural(collection)
|
35
|
+
halt 404 unless @@data.collection?(collection)
|
36
|
+
result = @@data.get_value(collection, id)
|
37
|
+
halt 404 if result.nil?
|
38
|
+
json(result)
|
39
|
+
end
|
40
|
+
|
41
|
+
get '/:endpoint' do
|
42
|
+
collection = params[:endpoint]
|
43
|
+
enforce_plural(collection)
|
44
|
+
halt 404 unless @@data.collection?(collection)
|
45
|
+
json(@@data.get_collection(collection))
|
46
|
+
end
|
47
|
+
|
48
|
+
post '/:endpoint' do
|
49
|
+
request.body.rewind
|
50
|
+
collection = params['endpoint']
|
51
|
+
enforce_plural(collection)
|
52
|
+
raw_data = request.body.read
|
53
|
+
halt 403, 'NO DATA' if raw_data.empty?
|
54
|
+
data = begin
|
55
|
+
JSON.parse(raw_data)
|
56
|
+
rescue
|
57
|
+
halt 403, "BAD DATA:\n#{raw_data}"
|
58
|
+
end
|
59
|
+
body = json(id: @@data.add(collection, data))
|
60
|
+
end
|
61
|
+
|
62
|
+
post '/:endpoint/:id' do
|
63
|
+
request.body.rewind
|
64
|
+
collection, id = params['endpoint'], params['id']
|
65
|
+
enforce_plural(collection)
|
66
|
+
halt 403 unless @@data.collection_key?(collection, id)
|
67
|
+
raw_data = request.body.read
|
68
|
+
halt 403, 'NO DATA' if raw_data.empty?
|
69
|
+
data = begin
|
70
|
+
JSON.parse(raw_data)
|
71
|
+
rescue
|
72
|
+
halt 403, "BAD DATA:\n#{raw_data}"
|
73
|
+
end
|
74
|
+
halt 403 unless @@data.update?(collection, id, data)
|
75
|
+
end
|
76
|
+
|
77
|
+
delete '/:endpoint/:id' do
|
78
|
+
request.body.rewind
|
79
|
+
collection, id = params['endpoint'], params['id']
|
80
|
+
enforce_plural(collection)
|
81
|
+
halt 404 unless @@data.collection?(collection)
|
82
|
+
if @@data.delete(collection, id)
|
83
|
+
status 200
|
84
|
+
else
|
85
|
+
halt 404
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
run! if app_file == $PROGRAM_NAME
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Doppelserver
|
2
|
+
class Data
|
3
|
+
def initialize
|
4
|
+
@data = {}
|
5
|
+
@next_keys = {}
|
6
|
+
end
|
7
|
+
|
8
|
+
def clear
|
9
|
+
@data = {}
|
10
|
+
@next_keys = {}
|
11
|
+
end
|
12
|
+
|
13
|
+
def collection?(name)
|
14
|
+
@data.key?(name)
|
15
|
+
end
|
16
|
+
|
17
|
+
def collection_key?(collection, key)
|
18
|
+
collection?(collection) && @data[collection].key?(key)
|
19
|
+
end
|
20
|
+
|
21
|
+
def get_collection(name)
|
22
|
+
@data[name]
|
23
|
+
end
|
24
|
+
|
25
|
+
def get_value(collection, key)
|
26
|
+
@data[collection][key]
|
27
|
+
end
|
28
|
+
|
29
|
+
def add(collection, data)
|
30
|
+
unless collection?(collection)
|
31
|
+
@data[collection] = {}
|
32
|
+
@next_keys[collection] = 0
|
33
|
+
end
|
34
|
+
next_key = @next_keys[collection]
|
35
|
+
@data[collection][next_key.to_s] = data
|
36
|
+
@next_keys[collection] += 1
|
37
|
+
next_key.to_s
|
38
|
+
end
|
39
|
+
|
40
|
+
def update?(collection, id, data)
|
41
|
+
data.each_key do |key|
|
42
|
+
return false unless @data[collection][id].key?(key)
|
43
|
+
end
|
44
|
+
data.each do |key, value|
|
45
|
+
@data[collection][id][key] = value
|
46
|
+
end
|
47
|
+
true
|
48
|
+
end
|
49
|
+
|
50
|
+
def delete(collection, key)
|
51
|
+
@data[collection].delete(key)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
metadata
ADDED
@@ -0,0 +1,234 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: doppelserver
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Drew Cooper
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-05-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 5.0.0.1
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 5.0.0.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: coveralls
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.13'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.13'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: faraday
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.10.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.10.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: gem-release
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '10.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '10.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec_junit_formatter
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.3'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.3'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.55'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.55'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.12.0
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.12.0
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: sinatra
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 1.4.7
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 1.4.7
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: sinatra-contrib
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 1.4.7
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 1.4.7
|
181
|
+
description: Unlike mocks and stubs, fake services are running processes that pretend
|
182
|
+
to function as real ones would. This enables testing the software under test with
|
183
|
+
more complete control of the surfaces it talksto (other services, faked). Beyond
|
184
|
+
that, it makesapplication- and (http)protocol-level faultinjection easy.
|
185
|
+
email:
|
186
|
+
- drewcoo@gmail.com
|
187
|
+
executables: []
|
188
|
+
extensions: []
|
189
|
+
extra_rdoc_files: []
|
190
|
+
files:
|
191
|
+
- ".circleci/config.yml"
|
192
|
+
- ".coveralls.yml"
|
193
|
+
- ".gitignore"
|
194
|
+
- ".rspec"
|
195
|
+
- ".rubocop.yml"
|
196
|
+
- ".travis.yml"
|
197
|
+
- Gemfile
|
198
|
+
- LICENSE.txt
|
199
|
+
- README.md
|
200
|
+
- Rakefile
|
201
|
+
- bin/console
|
202
|
+
- bin/setup
|
203
|
+
- doppelserver.gemspec
|
204
|
+
- lib/doppelserver.rb
|
205
|
+
- lib/doppelserver/base_server.rb
|
206
|
+
- lib/doppelserver/data.rb
|
207
|
+
- lib/doppelserver/version.rb
|
208
|
+
homepage: https://github.com/drewcoo/doppelserver
|
209
|
+
licenses:
|
210
|
+
- MIT
|
211
|
+
metadata:
|
212
|
+
allowed_push_host: https://rubygems.org/gems/doppleserver
|
213
|
+
post_install_message:
|
214
|
+
rdoc_options: []
|
215
|
+
require_paths:
|
216
|
+
- lib
|
217
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
218
|
+
requirements:
|
219
|
+
- - ">="
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: '0'
|
222
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
223
|
+
requirements:
|
224
|
+
- - ">="
|
225
|
+
- !ruby/object:Gem::Version
|
226
|
+
version: '0'
|
227
|
+
requirements: []
|
228
|
+
rubyforge_project:
|
229
|
+
rubygems_version: 2.7.6
|
230
|
+
signing_key:
|
231
|
+
specification_version: 4
|
232
|
+
summary: A REST server and a client that knows how to talk to it, so be used for test
|
233
|
+
fakes.
|
234
|
+
test_files: []
|