skynet-deploy 0.9.1 → 0.9.2

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.
@@ -34,9 +34,6 @@ module Skynet
34
34
  end
35
35
 
36
36
  build_repository
37
-
38
- Skynet.logger.debug "Removing #{destination}/*"
39
- FileUtils.rm_rf Dir.glob(File.join destination, '*'), secure: true
40
37
  end
41
38
 
42
39
  private
@@ -8,6 +8,9 @@ module Skynet
8
8
  Skynet.logger.info "Static running for #{app}..."
9
9
  super
10
10
 
11
+ Skynet.logger.debug "Removing #{destination}/*"
12
+ FileUtils.rm_rf Dir.glob(File.join destination, '*'), secure: true
13
+
11
14
  Skynet.logger.debug "Copying #{source} to #{destination}"
12
15
  FileUtils.cp_r source, destination
13
16
 
@@ -1,3 +1,3 @@
1
1
  module Skynet
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
@@ -20,14 +20,9 @@ describe Skynet::Builder::Base do
20
20
 
21
21
  describe "#build" do
22
22
  context "when valid" do
23
- it "removes files in the destination first" do
24
- Dir.stub(:glob).and_return [:one, :two]
25
- subject.stub :build_repository
26
- FileUtils.should_receive(:rm_rf).with [:one, :two], secure: true
27
- subject.build
28
- end
23
+ before(:each) { subject.stub :build_repository }
24
+ it { expect { subject.build }.to_not raise_error }
29
25
  end
30
-
31
26
  context "when invalid" do
32
27
  let(:options) { {} }
33
28
  it { expect { subject.build }.to raise_error ArgumentError }
@@ -12,7 +12,6 @@ describe Skynet::Builder::Jekyll do
12
12
  before(:each) do
13
13
  subject.should_receive :build_repository
14
14
  subject.stub(:valid?).and_return true
15
- FileUtils.stub :rm_rf
16
15
  end
17
16
 
18
17
  it "runs jekyll with the source and destination" do
@@ -12,7 +12,14 @@ describe Skynet::Builder::Static do
12
12
  before(:each) do
13
13
  subject.should_receive :build_repository
14
14
  subject.stub(:valid?).and_return true
15
- FileUtils.stub :rm_rf
15
+ Dir.stub(:glob).and_return [:one, :two]
16
+ end
17
+
18
+ it "removes destination files first" do
19
+ FileUtils.stub :remove_entry_secure
20
+ FileUtils.stub :cp_r
21
+ FileUtils.should_receive(:rm_rf).with [:one, :two], secure: true
22
+ subject.build
16
23
  end
17
24
 
18
25
  it "copies files to the destination" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skynet-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: