soaspec 0.1.13 → 0.1.14
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 +4 -4
- data/ChangeLog +4 -0
- data/README.md +2 -2
- data/Todo.md +1 -1
- data/exe/soaspec +4 -9
- data/lib/soaspec/exe_helpers.rb +17 -0
- data/lib/soaspec/generator/config/data/default.yml.erb +1 -0
- data/lib/soaspec/generator/lib/package_service.rb.erb +3 -0
- data/lib/soaspec/generator/spec/rest_spec.rb.erb +9 -0
- data/lib/soaspec/generator/spec/spec_helper.rb.erb +3 -0
- data/lib/soaspec/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25d471f51cb613b7903ebc60c33980fbce658743
|
4
|
+
data.tar.gz: d35f4bc6a2ce7c6dceb65bba0ab4c5cf48867b37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6887184fda54087d7f880e2171b1826d2d684f4647e2a327da7289cfbf2bc8dec2135620ec2f311b1030dc6c82b5d24122f92fae91b16036fa9f7f1fdb618adb
|
7
|
+
data.tar.gz: 47299bc24373adb1adfea94e498f9ac905e680dda346eecbb93b50d9fdae29e64dfbfa1473b7ac411068b53ab8d462238bb727c3f324455ec98d4b921a8b58f0
|
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -24,14 +24,14 @@ Or install it yourself as:
|
|
24
24
|
|
25
25
|
## Getting Started
|
26
26
|
|
27
|
-
To create a new test suite using this you can use the
|
27
|
+
To create a new test suite using this you can use the `soaspec` binary.
|
28
28
|
|
29
29
|
Example:
|
30
30
|
|
31
31
|
```
|
32
32
|
mkdir 'api_test'
|
33
33
|
cd 'api_test'
|
34
|
-
soaspec new
|
34
|
+
soaspec new [rest/soap]
|
35
35
|
bundle install
|
36
36
|
```
|
37
37
|
|
data/Todo.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
+
* Get initial `soaspec new` working with TODOs as placeholders for how to get started
|
1
2
|
* Unit tests
|
2
3
|
* OAuth class, etc
|
3
4
|
* Request method from within exchange
|
4
5
|
* Use this in tests
|
5
6
|
* Basic service generator
|
6
7
|
* Give examples and convenience methods for building classes for each SOAP or REST operation
|
7
|
-
* For SOAP give example of basic_auth
|
8
8
|
* Potentially have in built use of 'vcr' and 'http_stub' gems
|
9
9
|
* Handle proxies to record traffic for MiddleWare testing
|
10
10
|
* Get wsdl generator working for non complex gems (Put on hold til new Savon version)
|
data/exe/soaspec
CHANGED
@@ -28,22 +28,17 @@ module Soaspec
|
|
28
28
|
option :virtual, type: :boolean, default: true, banner: 'Whether to set things up for a virtual server'
|
29
29
|
def new(type = 'initial')
|
30
30
|
@virtual = options[:virtual]
|
31
|
+
@type = type
|
31
32
|
puts "Creating files for soaspec. options are #{options}"
|
32
33
|
create_file(filename: 'Gemfile')
|
33
34
|
create_file(filename: 'Rakefile')
|
34
35
|
create_file(filename: '.rspec')
|
35
36
|
create_file(filename: 'README.md')
|
36
37
|
create_file(filename: '.travis.yml') if options[:ci] == 'travis'
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
end
|
41
|
-
create_file(filename: 'config/data/default.yml')
|
38
|
+
create_folder 'lib'
|
39
|
+
create_files_for type
|
40
|
+
create_file(filename: 'config/data/default.yml') # Example of data file
|
42
41
|
create_file(filename: 'spec/spec_helper.rb')
|
43
|
-
create_file(filename: 'spec/soap_spec.rb') if type == 'soap'
|
44
|
-
create_file(filename: 'template/soap_template.xml', erb: false) if type == 'soap'
|
45
|
-
create_folder 'logs'
|
46
|
-
|
47
42
|
puts "Run 'bundle install' to install necessary gems"
|
48
43
|
puts "Run 'rake spec' to run the tests"
|
49
44
|
end
|
data/lib/soaspec/exe_helpers.rb
CHANGED
@@ -4,6 +4,23 @@ module Soaspec
|
|
4
4
|
# Help with tasks common to soaspec executables
|
5
5
|
module ExeHelpers
|
6
6
|
|
7
|
+
# Create files in project depending on type of project
|
8
|
+
# @param [String] type Type of project to create, e.g., 'soap', 'rest'
|
9
|
+
def create_files_for(type)
|
10
|
+
case type
|
11
|
+
when 'soap'
|
12
|
+
create_file filename: 'lib/blz_service.rb'
|
13
|
+
create_file filename: 'lib/shared_example.rb'
|
14
|
+
create_file(filename: 'template/soap_template.xml', erb: false)
|
15
|
+
create_file(filename: 'spec/soap_spec.rb')
|
16
|
+
when 'rest'
|
17
|
+
create_file(filename: 'spec/rest_spec.rb')
|
18
|
+
create_file(filename: 'lib/package_service.rb')
|
19
|
+
else
|
20
|
+
# TODO: This needs to have placeholders explaining what to fill in
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
7
24
|
# Spec task string depending upon whether virtual is used
|
8
25
|
def spec_task
|
9
26
|
task_name = options[:virtual] ? 'spec: :start_test_server' : ':spec'
|
@@ -5,6 +5,9 @@ require_all 'lib'
|
|
5
5
|
require 'data_magic'
|
6
6
|
|
7
7
|
include DataMagic # Used as example of loading data smartly. Use 'data_for' method to load yml data
|
8
|
+
<% if @type == 'rest' %>
|
9
|
+
include Soaspec::RestMethods
|
10
|
+
<% end %>
|
8
11
|
|
9
12
|
RSpec.configure do |config|
|
10
13
|
# This will make backtrace much shorter by removing many lines from rspec failure message
|
data/lib/soaspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soaspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SamuelGarrattIQA
|
@@ -361,8 +361,10 @@ files:
|
|
361
361
|
- lib/soaspec/generator/config/data/default.yml.erb
|
362
362
|
- lib/soaspec/generator/lib/blz_service.rb.erb
|
363
363
|
- lib/soaspec/generator/lib/dynamic_class_content.rb.erb
|
364
|
+
- lib/soaspec/generator/lib/package_service.rb.erb
|
364
365
|
- lib/soaspec/generator/lib/shared_example.rb.erb
|
365
366
|
- lib/soaspec/generator/spec/dynamic_soap_spec.rb.erb
|
367
|
+
- lib/soaspec/generator/spec/rest_spec.rb.erb
|
366
368
|
- lib/soaspec/generator/spec/soap_spec.rb.erb
|
367
369
|
- lib/soaspec/generator/spec/spec_helper.rb.erb
|
368
370
|
- lib/soaspec/generator/template/soap_template.xml
|