api_tester 0.0.2 → 0.0.3

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: d943b8aa97d5eb53abc18ff23349f30d3e0cdb23
4
- data.tar.gz: d97f29d9c467cee24f4a3a55b021781a32596de7
3
+ metadata.gz: 095c03023153a592e189ba0189bf3fdc40523294
4
+ data.tar.gz: 26c734161d007dbdeffaee619e7ea2ec18157e15
5
5
  SHA512:
6
- metadata.gz: 5645f4c6d1bde7acaf187f267da510831023dc2e955967a8eac286659233862a2e99ebf50c1588d87d7a5726d9012c90b5135bc46b004154dfd758827ea0d832
7
- data.tar.gz: 3c48463f729c4df1ed9e5661ae6c4d070999f281181b4d70909866093193c63b2b468f6fc9603b2c77d181f480adda3496dcaa271cbf8ec47b9fbe4d6d44aacc
6
+ metadata.gz: eb26e7c72507ac30d5a61b5581a7396382debd8f0daa21f38cf35315d30fcb1f73f40cb87779c80ae05ddcadd02609727579d48ac272117613befb9e82857fc3
7
+ data.tar.gz: 8d239a3dd05b81c471d502441c2bead7482fd37ae2da4a35d5ddb4f3bf5aa99d451b67b2e911704b0862de4a33739924cd57501a933f7ac205c3031f013f7706
@@ -22,13 +22,19 @@ module ApiTester
22
22
  def post(api, body)
23
23
  resp = connection.post do |req|
24
24
  req.url api
25
+ req.options.timeout = 3600
26
+ req.options.open_timeout = 3600
25
27
  req.headers['Content-Type'] = headers
26
28
  req.body = body
27
29
  end
28
30
  end
29
31
 
30
32
  def pretty_print(resp)
31
- puts JSON.pretty_generate(JSON.parse(resp.body))
33
+ begin
34
+ puts JSON.pretty_generate(JSON.parse(resp.body))
35
+ rescue
36
+ puts resp.body
37
+ end
32
38
  end
33
39
  end
34
40
  end
@@ -1,3 +1,3 @@
1
1
  module ApiTester
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_tester
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Faizal Zakaria
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-01 00:00:00.000000000 Z
11
+ date: 2014-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: faraday
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: json
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description: Helper for testing API
@@ -73,7 +73,7 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - .gitignore
76
+ - ".gitignore"
77
77
  - Gemfile
78
78
  - LICENSE.txt
79
79
  - README.md
@@ -92,17 +92,17 @@ require_paths:
92
92
  - lib
93
93
  required_ruby_version: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - '>='
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - '>='
100
+ - - ">="
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
104
  rubyforge_project:
105
- rubygems_version: 2.2.2
105
+ rubygems_version: 2.4.2
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Helper for testing API