ghpages_deploy 1.3.3 → 1.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 +4 -4
- data/lib/ghpages_deploy/deployer.rb +11 -2
- data/lib/ghpages_deploy/handler.rb +1 -0
- data/lib/ghpages_deploy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01f5f65cbc71f29bcaafa00a24f4d8aff32ce84a
|
4
|
+
data.tar.gz: 6cf0b9d63779886639b5ed7b64ac2f0b08e7b7b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57738a93eef1bb0d8b13a88623bfcd7fb3080cad78fe1588bd2883239132e45f32bc1e0451ca4e0f32ba9ee99123b27c2146853752d4c531da12e563fd6590a1
|
7
|
+
data.tar.gz: 3348968a54ed9a84317ddc10d380e5ecc6da7eb960ff8464925a698da210cd11342082b5cdff73602c13d3ba5066c37c14d1e8d1c003d7b266955c47fad88a03
|
@@ -25,12 +25,21 @@ module GithubPages
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
+
# remove files that are already cached in the destination directory
|
29
|
+
# or have return false when passed to {Handler#precheck_delete?}
|
30
|
+
def clean_destination(dest)
|
31
|
+
to_delete = @git.ls_files(dest)
|
32
|
+
|
33
|
+
to_delete.select! { |file| @handler.precheck_delete?(file) } if @handler
|
34
|
+
|
35
|
+
@git.remove(*to_delete)
|
36
|
+
end
|
37
|
+
|
28
38
|
private
|
29
39
|
|
30
40
|
# @return [Boolean] true if there were changes to the destination
|
31
41
|
def deploy_site_to(dest)
|
32
|
-
|
33
|
-
@git.remove(*@git.ls_files(dest))
|
42
|
+
clean_destination(dest)
|
34
43
|
|
35
44
|
# create the full path to the destination
|
36
45
|
FileUtils.mkdir_p(dest)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghpages_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Currier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|