dock_test 0.3.7 → 0.4.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: ada1a72ed2ceadf1e955cfe5c2962933cbf439dd
4
- data.tar.gz: 0fdee3e0aac1b09bf1670ec988e89a88ac18e841
3
+ metadata.gz: 157fe0eea84880c5f589a3ec037d4ef915cc5413
4
+ data.tar.gz: 368d62035d8889d13ca342551ec9c00dbad90dbe
5
5
  SHA512:
6
- metadata.gz: d8228b12ea7e584da8546cd33ba5cdc68ea5cca4fa26e069b7adef990f5d3eec057e821070468d9dc8a676dd1191d1ed9550a3d44ed87bd40a0183cb0bd7d505
7
- data.tar.gz: 9a69efbbf9c976647ec61c8d7684cf91dccfd1d512392bf7aefefa3a7bfac2f4892632dd8fe90fb8135699fd6b34f50dcfe4b3794da80468a7aefd31771d6092
6
+ metadata.gz: 9db4f8772c6c8848cf2c9df759bb8672af9d7ce1967a5df633da93ce2a12cfcb970f2ad4090fcc1352d118ca9cb51ff28897273550080143ef358a7ec089224b
7
+ data.tar.gz: e5e808045293c045a9cce19fa7cae3f54b1489493a2139552e6b888b0f0661c8a0707375984557af6aa8bb97727ce80f659e99a9b09781e92e74afeaa53d5b43
data/README.md CHANGED
@@ -18,6 +18,7 @@ Different from the popular [Rack::Test], DockTest focuses on just on service app
18
18
  7. support for OAuth requests
19
19
  8. support for displaying equivalent curl command using `OUTPUT_CURL` environment variable.
20
20
  9. support for script_name localhost testing.
21
+ 10. support `verify_ssl` for specifying whether to enforce ssl verification in http connection. Optional, default is true.
21
22
 
22
23
  ### Sample Application
23
24
 
data/lib/dock_test/dsl.rb CHANGED
@@ -53,6 +53,18 @@ module DockTest
53
53
  @skippy || false
54
54
  end
55
55
 
56
+ def verify_ssl=(verify_ssl)
57
+ @verify_ssl = verify_ssl
58
+ end
59
+
60
+ def verify_mode
61
+ if @verify_ssl.nil? || @verify_ssl
62
+ OpenSSL::SSL::VERIFY_PEER
63
+ else
64
+ OpenSSL::SSL::VERIFY_NONE
65
+ end
66
+ end
67
+
56
68
  def configure(&block)
57
69
  block.call(DockTest)
58
70
  end
@@ -41,8 +41,9 @@ module DockTest
41
41
  end
42
42
 
43
43
  # execute the request
44
- @last_response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => (uri.scheme == 'https')) do |http|
45
-
44
+ @last_response = Net::HTTP.start(uri.hostname, uri.port,
45
+ :use_ssl => (uri.scheme == 'https'),
46
+ :verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http|
46
47
  # processing oauth signing
47
48
  if DockTest.oauth?
48
49
  oauth_consumer = OAuth::Consumer.new(DockTest.oauth_consumer_key, DockTest.oauth_consumer_secret, site: request_url)
@@ -1,3 +1,3 @@
1
1
  module DockTest
2
- VERSION = "0.3.7"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,113 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dock_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Xu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-11 00:00:00.000000000 Z
11
+ date: 2015-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: multi_json
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
14
  requirement: !ruby/object:Gem::Requirement
21
15
  requirements:
22
16
  - - '>='
23
17
  - !ruby/object:Gem::Version
24
18
  version: '0'
19
+ name: multi_json
25
20
  prerelease: false
26
21
  type: :runtime
27
- - !ruby/object:Gem::Dependency
28
- name: rack
29
22
  version_requirements: !ruby/object:Gem::Requirement
30
23
  requirements:
31
24
  - - '>='
32
25
  - !ruby/object:Gem::Version
33
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
34
28
  requirement: !ruby/object:Gem::Requirement
35
29
  requirements:
36
30
  - - '>='
37
31
  - !ruby/object:Gem::Version
38
32
  version: '0'
33
+ name: rack
39
34
  prerelease: false
40
35
  type: :runtime
41
- - !ruby/object:Gem::Dependency
42
- name: json-schema
43
36
  version_requirements: !ruby/object:Gem::Requirement
44
37
  requirements:
45
38
  - - '>='
46
39
  - !ruby/object:Gem::Version
47
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
48
42
  requirement: !ruby/object:Gem::Requirement
49
43
  requirements:
50
44
  - - '>='
51
45
  - !ruby/object:Gem::Version
52
46
  version: '0'
47
+ name: json-schema
53
48
  prerelease: false
54
49
  type: :runtime
55
- - !ruby/object:Gem::Dependency
56
- name: nokogiri
57
50
  version_requirements: !ruby/object:Gem::Requirement
58
51
  requirements:
59
52
  - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
62
56
  requirement: !ruby/object:Gem::Requirement
63
57
  requirements:
64
58
  - - '>='
65
59
  - !ruby/object:Gem::Version
66
60
  version: '0'
61
+ name: nokogiri
67
62
  prerelease: false
68
63
  type: :runtime
69
- - !ruby/object:Gem::Dependency
70
- name: oauth
71
64
  version_requirements: !ruby/object:Gem::Requirement
72
65
  requirements:
73
66
  - - '>='
74
67
  - !ruby/object:Gem::Version
75
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
76
70
  requirement: !ruby/object:Gem::Requirement
77
71
  requirements:
78
72
  - - '>='
79
73
  - !ruby/object:Gem::Version
80
74
  version: '0'
75
+ name: oauth
81
76
  prerelease: false
82
77
  type: :runtime
83
- - !ruby/object:Gem::Dependency
84
- name: bundler
85
78
  version_requirements: !ruby/object:Gem::Requirement
86
79
  requirements:
87
- - - ~>
80
+ - - '>='
88
81
  - !ruby/object:Gem::Version
89
- version: '1.6'
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
90
84
  requirement: !ruby/object:Gem::Requirement
91
85
  requirements:
92
86
  - - ~>
93
87
  - !ruby/object:Gem::Version
94
88
  version: '1.6'
89
+ name: bundler
95
90
  prerelease: false
96
91
  type: :development
97
- - !ruby/object:Gem::Dependency
98
- name: rake
99
92
  version_requirements: !ruby/object:Gem::Requirement
100
93
  requirements:
101
- - - '>='
94
+ - - ~>
102
95
  - !ruby/object:Gem::Version
103
- version: '0'
96
+ version: '1.6'
97
+ - !ruby/object:Gem::Dependency
104
98
  requirement: !ruby/object:Gem::Requirement
105
99
  requirements:
106
100
  - - '>='
107
101
  - !ruby/object:Gem::Version
108
102
  version: '0'
103
+ name: rake
109
104
  prerelease: false
110
105
  type: :development
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
111
  description: an outside-in service api test framework.
112
112
  email:
113
113
  - jackxxu@gmail.com