stashify 2.1.1 → 3.0.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/.reek.yml +1 -0
- data/Gemfile.lock +1 -1
- data/lib/stashify/directory/local.rb +0 -8
- data/lib/stashify/directory.rb +8 -0
- data/lib/stashify/file/local.rb +8 -0
- data/lib/stashify/file.rb +8 -0
- data/lib/stashify/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d58d66a14fbcb4c923eadefaf83b0df6a163c2a1fd78a204445e051d90609c8f
|
4
|
+
data.tar.gz: d677085f1b105082435520617d3e545d2d206c3e040b4fa21585d7b29ffe0c0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 374b7a1aacdaca2f0ea4a889670bccec77fbebeb7113bf396f16cdd9bb799606b0bfd4acecb809f73721399c4e32ee7b6a15b03610f30bc8bb0337131858ec93
|
7
|
+
data.tar.gz: cacebe50a69383c925921dea17cfaabec77b2ad7dc020a3c5b5922dbf43c8ca2bd7c63eb33aa200430e80992a65966fd8a9b8e597bff8d7e48693d9f6bcb9da5
|
data/.reek.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -11,10 +11,6 @@ module Stashify
|
|
11
11
|
super
|
12
12
|
end
|
13
13
|
|
14
|
-
def write_file(file)
|
15
|
-
::File.write(path_of(file.name), file.contents)
|
16
|
-
end
|
17
|
-
|
18
14
|
def files
|
19
15
|
Dir.entries(path).grep_v(/^[.][.]?$/).map do |file_name|
|
20
16
|
find(::File.basename(file_name))
|
@@ -42,10 +38,6 @@ module Stashify
|
|
42
38
|
def delete_directory(name)
|
43
39
|
FileUtils.rm_r(path_of(name))
|
44
40
|
end
|
45
|
-
|
46
|
-
def delete_file(name)
|
47
|
-
::File.delete(path_of(name))
|
48
|
-
end
|
49
41
|
end
|
50
42
|
end
|
51
43
|
end
|
data/lib/stashify/directory.rb
CHANGED
@@ -33,6 +33,10 @@ module Stashify
|
|
33
33
|
directory.files.each { |file| subdir.write(file) }
|
34
34
|
end
|
35
35
|
|
36
|
+
def write_file(file)
|
37
|
+
file(file.name).write(file.contents)
|
38
|
+
end
|
39
|
+
|
36
40
|
def delete(name)
|
37
41
|
if directory?(name)
|
38
42
|
delete_directory(name)
|
@@ -46,6 +50,10 @@ module Stashify
|
|
46
50
|
subdir.files.each { |file| subdir.delete(file.name) }
|
47
51
|
end
|
48
52
|
|
53
|
+
def delete_file(name)
|
54
|
+
file(name).delete
|
55
|
+
end
|
56
|
+
|
49
57
|
def ==(other)
|
50
58
|
files == other.files
|
51
59
|
end
|
data/lib/stashify/file/local.rb
CHANGED
data/lib/stashify/file.rb
CHANGED
data/lib/stashify/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stashify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lambda Null
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Provides an abstraction to various services (local filesystem, S3, etc)
|
14
14
|
email:
|