specinfra 2.38.1 → 2.39.0

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: 972b0b4d232e4437b861f29d76317693630733bf
4
- data.tar.gz: 266ceb8f83189aa3730c96c3a3c986bad4ca21cb
3
+ metadata.gz: 83f8986b7e61e1fe18c860c386604b900af92c90
4
+ data.tar.gz: 21db9c3ae87ec45f53aba9b05e4d34769c0a8cde
5
5
  SHA512:
6
- metadata.gz: c346d60997449ddb9148b252f1e766108d335e39a7a2869a8d533ae504a0e8ecb899ab4d1f86c44f8eb457b84019510e5434218a74125138c56f96e545940731
7
- data.tar.gz: 891c0baffa2a8b9ee7af9e22023092e94bf833e4b9328ceb3e4a6402df8574379bd5db94c526cb14e3db7d63e23082f47c493a5497242dd372ee8b7ef0c0bf2f
6
+ metadata.gz: fb1a61bae81df315ba6234b6146abcb6bfd80a9fc0ac40993f16e456f4d2589a99b34300cd2a41ca6a911dc296eba9575808df74616b25664638cd29ad5fd322
7
+ data.tar.gz: 27689856c2e6e1985e406f8cf0fd23367f2e0fd87ede7b3511a8bebc094fac19e0e577240e00d5056b5c3da6d59cc9cf16f9b545c717333096fc622263685b1d
@@ -171,5 +171,9 @@ class Specinfra::Command::Base::File < Specinfra::Command::Base
171
171
  def remove(file)
172
172
  "rm -rf #{escape(file)}"
173
173
  end
174
+
175
+ def download(src, dest)
176
+ "curl -sSL #{escape(src)} -o #{escape(dest)}"
177
+ end
174
178
  end
175
179
  end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.38.1"
2
+ VERSION = "2.39.0"
3
3
  end
@@ -85,3 +85,7 @@ end
85
85
  describe get_command(:get_file_size, '/tmp') do
86
86
  it { should eq 'stat -c %s /tmp' }
87
87
  end
88
+
89
+ describe get_command(:download_file, 'http://example.com/sample_file', '/tmp/sample_file') do
90
+ it { should eq 'curl -sSL http://example.com/sample_file -o /tmp/sample_file' }
91
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.38.1
4
+ version: 2.39.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-22 00:00:00.000000000 Z
11
+ date: 2015-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-scp
@@ -591,4 +591,3 @@ test_files:
591
591
  - spec/host_inventory/openbsd/filesystem_spec.rb
592
592
  - spec/host_inventory/solaris/filesystem_spec.rb
593
593
  - spec/spec_helper.rb
594
- has_rdoc: