file_spec 0.1.1 → 0.1.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.
- checksums.yaml +4 -4
- data/lib/file_spec.rb +5 -6
- data/lib/file_spec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef49123a80e21b7b0f217058af1996c8d5c0ce24
|
4
|
+
data.tar.gz: cf886acb7de49edfd2176aef4906e4b05a4b630d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0639b146a0026ec90919c925a15d6672432d81441b4df093511e28f703fd0a27cd609d1f1bbd35f66d7f1be664aea1c6010fc4c0820c8083b13c9ca6814a7fc8'
|
7
|
+
data.tar.gz: 2297098c23a8f954f5ca81a307315bc623ddfc1bec11dbade9651154a84c8e6d4ef13779a0014eccaf025bbb4a4c7b072a16d78896919c7b92db167e929ae82f
|
data/lib/file_spec.rb
CHANGED
@@ -83,14 +83,13 @@ module FileSpec
|
|
83
83
|
# @param path [String,Pathname] the path to observe
|
84
84
|
# @param opts [Hash] additional options passed to {#diff}
|
85
85
|
def record_changes(path, **opts)
|
86
|
-
basename = File.basename(path)
|
87
86
|
tmp_path = Dir.mktmpdir("file_spec")
|
88
|
-
before_path = File.join(tmp_path, "before"
|
89
|
-
after_path = File.join(tmp_path, "after"
|
87
|
+
before_path = File.join(tmp_path, "before")
|
88
|
+
after_path = File.join(tmp_path, "after")
|
90
89
|
|
91
|
-
|
92
|
-
mkdir
|
93
|
-
mkdir
|
90
|
+
if File.file?(path)
|
91
|
+
mkdir before_path
|
92
|
+
mkdir after_path
|
94
93
|
end
|
95
94
|
|
96
95
|
FileUtils.cp_r(path, before_path)
|
data/lib/file_spec/version.rb
CHANGED