wiremock_mapper 2.1.0 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86a2777faadebed7a325fa8e2511073cffa866f6
4
- data.tar.gz: 5591b069dac9203f4389ae0aeaaf351b734c6bad
3
+ metadata.gz: c3fdaf71440c51a4648dcc4534f688c62abe7755
4
+ data.tar.gz: 7af614da1cda843e0748057ac7f45e50180b091d
5
5
  SHA512:
6
- metadata.gz: 0233ebdf76153f89d662d7582ed2987210e7b0c08a81defeca637b6ec458ee352bef37cd7dbde02ff8b350d537988eae935bcdc6f765cf9be30b64aee7e5311c
7
- data.tar.gz: 15494092a60bd952b260a44f3d81b28783557cde98673abe49efd2e439f9ecdaf2b66629b6f41ede32e858b70243221bf658f14a18265e7a187e7603bed33776
6
+ metadata.gz: 63e5efb18734e6e456a31b7843565f86c865a189b340348acc0608bf89e323ee3b5ac8cc9a1e708838093498ac75cd8bee08ddfad15836249126e50e81d531a7
7
+ data.tar.gz: f9102da2871d5be756d3c895c790c2ec4b1ddee258299610a2bc82b8a3cc725b7af4aee647f955e14dac2f1e40b86eb026ce3c5497c946193e71134160ba7545
data/.gitignore CHANGED
@@ -4,3 +4,4 @@ vendor
4
4
  .bundle
5
5
  Gemfile.lock
6
6
  *.gem
7
+ coverage
@@ -2,7 +2,6 @@ language: ruby
2
2
  script: 'bundle exec rake; bundle exec codeclimate-test-reporter'
3
3
  cache: bundler
4
4
  rvm:
5
- - 2.0.0
6
5
  - 2.3.0
7
6
  - ruby-head
8
7
  env:
@@ -47,6 +47,7 @@ module WireMockMapper
47
47
  def clear_wiremock_mappings(url)
48
48
  uri = URI([url, WIREMOCK_CLEAR_MAPPINGS_PATH].join('/'))
49
49
  http = Net::HTTP.new(uri.host, uri.port)
50
+ http.use_ssl = true if uri.port == 443
50
51
  request = Net::HTTP::Post.new(uri.path)
51
52
  http.request(request)
52
53
  end
@@ -54,6 +55,7 @@ module WireMockMapper
54
55
  def delete_from_wiremock(url, mapping_id)
55
56
  uri = URI([url, WIREMOCK_MAPPINGS_PATH, mapping_id].join('/'))
56
57
  http = Net::HTTP.new(uri.host, uri.port)
58
+ http.use_ssl = true if uri.port == 443
57
59
  request = Net::HTTP::Delete.new(uri.path)
58
60
  http.request(request)
59
61
  end
@@ -61,6 +63,7 @@ module WireMockMapper
61
63
  def send_to_wiremock(url, body)
62
64
  uri = URI([url, WIREMOCK_MAPPINGS_PATH].join('/'))
63
65
  http = Net::HTTP.new(uri.host, uri.port)
66
+ http.use_ssl = true if uri.port == 443
64
67
  request = Net::HTTP::Post.new(uri.path, 'Content-Type' => 'application/json')
65
68
  request.body = body.to_json
66
69
  http.request(request)
@@ -69,6 +72,7 @@ module WireMockMapper
69
72
  def reset_wiremock_scenarios(url)
70
73
  uri = URI([url, WIREMOCK_RESET_SCENARIOS_PATH].join('/'))
71
74
  http = Net::HTTP.new(uri.host, uri.port)
75
+ http.use_ssl = true if uri.port == 443
72
76
  request = Net::HTTP::Post.new(uri.path)
73
77
  http.request(request)
74
78
  end
@@ -2,7 +2,7 @@ $LOAD_PATH.unshift(File.expand_path('../lib', __FILE__))
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'wiremock_mapper'
5
- spec.version = '2.1.0'
5
+ spec.version = '2.2.0'
6
6
  spec.platform = Gem::Platform::RUBY
7
7
  spec.required_ruby_version = '>= 2.0.0'
8
8
  spec.authors = ['Isaac Datlof']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wiremock_mapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Datlof
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-02 00:00:00.000000000 Z
11
+ date: 2019-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: codeclimate-test-reporter