soaspec 0.0.55 → 0.0.56

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: e30d17380c5f1c56d221e8bfe691cb49cfbbff4f
4
- data.tar.gz: dbebcc5454dd41d839084df03e35be3910c0cdfd
3
+ metadata.gz: 7ca711d0fe88c0b2181c2791c5908f76b9d9a5a7
4
+ data.tar.gz: 3d9d66498b61796dc9c6e8d8aa4717659f0fd8fd
5
5
  SHA512:
6
- metadata.gz: 101c8c3aa9fa6c9fd67fb99b83b0ff5fd48b4f61c1f3702fab7fa11011efa6bc7a769acfb18ad5479a6604d242a0f08a909d3b653116dc061e96a470b5421af6
7
- data.tar.gz: b1576e4284c9e92a61effd56f3aa8da325c61ac5170e8da24a2e8526436e39b46786be0acf01269570ac5e785a3c24690e5dab981145299751d54c67a6b4e195
6
+ metadata.gz: 22036e4d33d4b377816c9799ef717b99a1df24b68e0f8b475538889649efba711f03a4c45de38fe664be19026092d3fae0d3cb7c97adcdd6d50a38c7d0396b9b
7
+ data.tar.gz: 6be02c83421551ea9e0f1e94bb6c42a4a535d9cdc56c303f846cb5e376b3f25c8799e7284bc967e29b0105a3234c378496870c5a58788046e85b22e147afd11a
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Version 0.0.56
2
+ * Bug fix
3
+ * Handle creating of traffic.log file within lib properly
4
+
1
5
  Version 0.0.55
2
6
  * Enhancements
3
7
  * Made `soaspec-virtual-server` exe to handle self served test server. Will be used in wiki tutorial
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- soaspec (0.0.55)
4
+ soaspec (0.0.56)
5
5
  jsonpath
6
6
  rest-client (>= 2.0)
7
7
  rspec (~> 3.0)
data/Rakefile CHANGED
@@ -9,12 +9,6 @@ RSpec::Core::RakeTask.new(:run_spec) do |t|
9
9
  t.pattern = "{spec/*/#{ENV['folder']}*/,tmp/*/spec/}#{ENV['test']}*_spec.rb"
10
10
  end
11
11
 
12
- desc 'Prepare log files'
13
- task :logs do
14
- mkdir_p 'logs'
15
- touch 'logs/traffic.log'
16
- end
17
-
18
12
  desc 'Use soaspec_init in tmp to generate test files. Used for verifying it'
19
13
  task :use_soaspec_init do
20
14
  mkdir_p 'tmp'
@@ -24,7 +18,7 @@ end
24
18
 
25
19
 
26
20
  desc 'Run tests'
27
- task spec: %w[clean clobber use_soaspec_init logs start_test_server run_spec]
21
+ task spec: %w[clean clobber use_soaspec_init start_test_server run_spec]
28
22
 
29
23
  task default: :spec
30
24
 
data/Todo.md CHANGED
@@ -1,9 +1,4 @@
1
- * ouath2 - handler
2
- * Need to handle where username and password and no security token
3
- * Perform ERB on values taken by file
4
-
5
1
  * SoapHandler - define exhange method for each SOAP operation
6
- * Accessors - similar to HappyMapper
7
2
  * exchange add fields to overide parameters to support cucumber steps. exchange[from_temp] =
8
3
  * Demonstrate using Cucumber
9
4
  * Give examples and convenience methods for building classes for each SOAP or REST operation
data/lib/soaspec.rb CHANGED
@@ -49,6 +49,7 @@ module Soaspec
49
49
  @api_handler = handler
50
50
  end
51
51
 
52
+ # Exchange Handler class currently being used
52
53
  def api_handler
53
54
  @api_handler
54
55
  end
@@ -81,10 +81,3 @@ class Hash
81
81
  end
82
82
 
83
83
  end
84
-
85
- class Array
86
- # Call include key on 1st element of array
87
- def include_key?(key)
88
- first.include_key? key
89
- end
90
- end
@@ -1,14 +1,14 @@
1
1
 
2
2
  # Raised to represent when there's no element at an Xpath
3
3
  class NoElementAtPath < StandardError
4
- def initialize(msg="No element at path found")
4
+ def initialize(msg = 'No element at path found')
5
5
  super
6
6
  end
7
7
  end
8
8
 
9
9
  # Did not find any element by provided key in the Hash
10
10
  class NoElementInHash < StandardError
11
- def initialize(msg='No element in Hash found')
11
+ def initialize(msg = 'No element in Hash found')
12
12
  super
13
13
  end
14
14
  end
@@ -6,18 +6,22 @@ module Soaspec
6
6
 
7
7
  # Handles logs of API requests and responses
8
8
  class SpecLogger
9
- def self.create
10
- unless File.exist?('logs/traffic.log')
11
- FileUtils.mkdir_p 'logs'
12
- FileUtils.touch 'traffic.log'
9
+ class << self
10
+ def create
11
+ unless File.exist?('logs/traffic.log')
12
+ FileUtils.mkdir_p 'logs'
13
+ FileUtils.touch File.join('logs', 'traffic.log')
14
+ end
15
+ @logger = Logger.new('logs/traffic.log') # Where request and responses of APIs are stored
16
+ @logger.level = Logger::DEBUG
17
+ @logger
13
18
  end
14
- @logger = Logger.new('logs/traffic.log') # Where request and responses of APIs are stored
15
- @logger.level = Logger::DEBUG
16
- @logger
17
- end
18
19
 
19
- def self.add_to(message)
20
- @logger.info(message)
20
+ # Log a message using Soaspec logger
21
+ # @param [String] message The message to add to the logger
22
+ def add_to(message)
23
+ @logger.info(message)
24
+ end
21
25
  end
22
26
 
23
27
  end
@@ -1,3 +1,3 @@
1
1
  module Soaspec
2
- VERSION = '0.0.55'.freeze
2
+ VERSION = '0.0.56'.freeze
3
3
  end
data/soaspec.gemspec CHANGED
@@ -16,7 +16,7 @@ the same configuration "
16
16
  spec.license = 'MIT'
17
17
 
18
18
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
- f.match(%r{^(test|spec|features)/})
19
+ f.match(%r{^(test|spec|features|bin|config|template)/})
20
20
  end
21
21
  spec.bindir = 'exe'
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soaspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.55
4
+ version: 0.0.56
5
5
  platform: ruby
6
6
  authors:
7
7
  - SamuelGarrattIQA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-15 00:00:00.000000000 Z
11
+ date: 2018-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -161,9 +161,6 @@ files:
161
161
  - README.md
162
162
  - Rakefile
163
163
  - Todo.md
164
- - bin/console
165
- - bin/setup
166
- - config/data/default.yml
167
164
  - exe/soaspec-generate
168
165
  - exe/soaspec-init
169
166
  - exe/soaspec-virtual-server
@@ -189,7 +186,6 @@ files:
189
186
  - lib/soaspec/test_server/test_attribute.rb
190
187
  - lib/soaspec/version.rb
191
188
  - soaspec.gemspec
192
- - template/soap_template.xml
193
189
  - test.wsdl
194
190
  - test.xml
195
191
  - test_rest.rb
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "soaspec"
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(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,37 +0,0 @@
1
- small_id:
2
- blz: 100
3
-
4
- pet:
5
- id: '1122338409073'
6
- category:
7
- id: '5436'
8
- name: 'soaspec_test'
9
- name: 'test_rest'
10
- photoUrls:
11
- - 'string'
12
- tags:
13
- - id: '1'
14
- name: 'string'
15
- status: sold
16
-
17
- default_pet:
18
- id: '123987'
19
- category:
20
- id: '1'
21
- name: 'string'
22
- name: 'new_puppy'
23
- photoUrls:
24
- - 'string'
25
- tags:
26
- - id: '1'
27
- name: 'string'
28
- status: available
29
-
30
- pet1:
31
- id: '123987'
32
-
33
- pet2:
34
- id: '9998772'
35
-
36
- pet3:
37
- id: '554678'
@@ -1,7 +0,0 @@
1
- <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://thomas-bayer.com/blz/" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
2
- <env:Body>
3
- <tns:getBank>
4
- <tns:blz><%= test_values[:blz] || '70070010' %></tns:blz>
5
- </tns:getBank>
6
- </env:Body>
7
- </env:Envelope>