vault-test-tools 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
- # TODO: move to vault-test-tools
2
1
  require 'fileutils'
2
+ require 'net/http'
3
3
 
4
4
  module Vault::Test
5
5
  module SpecHelpers
@@ -39,12 +39,12 @@ module Vault::Test
39
39
  # Uses JSON at URL when it can, but will use
40
40
  # the cached statement when it can't
41
41
  def read_spec(name)
42
- data = Net::HTTP.get(URI.parse(url(name)))
42
+ data = ::Net::HTTP.get(URI.parse(url(name)))
43
43
  FileUtils.mkdir_p(File.dirname(file(name)))
44
44
  File.open(file(name), 'w') { |f| f << data }
45
45
  data
46
46
  rescue => e
47
- $stderr.puts "Using cached #{name}"
47
+ $stderr.puts "#{e.message} -> Using cached #{name}"
48
48
  File.read(file(name))
49
49
  end
50
50
  end
@@ -1,5 +1,5 @@
1
1
  module Vault
2
2
  module Test
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vault-test-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -204,7 +204,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
204
204
  version: '0'
205
205
  segments:
206
206
  - 0
207
- hash: 435186238280720439
207
+ hash: -2708165873792433116
208
208
  required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  none: false
210
210
  requirements:
@@ -213,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  version: '0'
214
214
  segments:
215
215
  - 0
216
- hash: 435186238280720439
216
+ hash: -2708165873792433116
217
217
  requirements: []
218
218
  rubyforge_project:
219
219
  rubygems_version: 1.8.23