stashify 2.1.1 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.reek.yml +1 -0
- data/.rubocop.yml +1 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +7 -4
- data/lib/st +9 -0
- data/lib/stashify/directory/local.rb +6 -12
- data/lib/stashify/directory.rb +9 -1
- data/lib/stashify/file/local.rb +12 -0
- data/lib/stashify/file.rb +8 -0
- data/lib/stashify/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15c432cdab53f9a20369203af0e05bb8157413a622655ae28d4c36131f318a8b
|
4
|
+
data.tar.gz: 5e2d87b9a660825c36d4140fa1a5c30b1a5e10573edc34df7fb6cbcff7e5f802
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73612ebce48eaf45c396d4277ea4e73a591ffb976589049101dc28c6cd8b4fbbd3ad376852db2a8e5deb0a8864982e10071821da47a2ca19e05b443e0054613a
|
7
|
+
data.tar.gz: a897048fb68343a37408a5bdc43bcf93f629621fea1d21235896f32b0800e643ab791feac51d32b17df73ed2fcc3141652e43fd4bc85deac757abd78c1410080
|
data/.reek.yml
CHANGED
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
stashify (
|
4
|
+
stashify (3.1.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -70,7 +70,7 @@ GEM
|
|
70
70
|
rspec-expectations (3.12.2)
|
71
71
|
diff-lcs (>= 1.2.0, < 2.0)
|
72
72
|
rspec-support (~> 3.12.0)
|
73
|
-
rspec-mocks (3.12.
|
73
|
+
rspec-mocks (3.12.5)
|
74
74
|
diff-lcs (>= 1.2.0, < 2.0)
|
75
75
|
rspec-support (~> 3.12.0)
|
76
76
|
rspec-support (3.12.0)
|
@@ -84,10 +84,13 @@ GEM
|
|
84
84
|
rubocop-ast (>= 1.26.0, < 2.0)
|
85
85
|
ruby-progressbar (~> 1.7)
|
86
86
|
unicode-display_width (>= 2.4.0, < 3.0)
|
87
|
-
rubocop-ast (1.
|
87
|
+
rubocop-ast (1.28.0)
|
88
88
|
parser (>= 3.2.1.0)
|
89
89
|
ruby-progressbar (1.13.0)
|
90
90
|
shellany (0.0.1)
|
91
|
+
stashify-contract (1.0.1)
|
92
|
+
rantly (~> 2.0.0)
|
93
|
+
rspec (~> 3.0)
|
91
94
|
thor (1.2.1)
|
92
95
|
unicode-display_width (2.4.2)
|
93
96
|
|
@@ -101,11 +104,11 @@ DEPENDENCIES
|
|
101
104
|
guard-rspec
|
102
105
|
guard-rubocop
|
103
106
|
rake (~> 13.0)
|
104
|
-
rantly
|
105
107
|
reek (~> 6.1.4)
|
106
108
|
rspec (~> 3.0)
|
107
109
|
rubocop (~> 1.21)
|
108
110
|
stashify!
|
111
|
+
stashify-contract
|
109
112
|
|
110
113
|
BUNDLED WITH
|
111
114
|
2.2.33
|
data/lib/st
ADDED
@@ -11,8 +11,12 @@ module Stashify
|
|
11
11
|
super
|
12
12
|
end
|
13
13
|
|
14
|
-
def
|
15
|
-
::
|
14
|
+
def parent
|
15
|
+
Stashify::Directory::Local.new(path: ::File.dirname(path))
|
16
|
+
end
|
17
|
+
|
18
|
+
def exists?(name)
|
19
|
+
::File.exist?(path_of(name))
|
16
20
|
end
|
17
21
|
|
18
22
|
def files
|
@@ -21,12 +25,6 @@ module Stashify
|
|
21
25
|
end
|
22
26
|
end
|
23
27
|
|
24
|
-
private
|
25
|
-
|
26
|
-
def file?(name)
|
27
|
-
::File.exist?(path_of(name))
|
28
|
-
end
|
29
|
-
|
30
28
|
def file(name)
|
31
29
|
Stashify::File::Local.new(path: path_of(name))
|
32
30
|
end
|
@@ -42,10 +40,6 @@ module Stashify
|
|
42
40
|
def delete_directory(name)
|
43
41
|
FileUtils.rm_r(path_of(name))
|
44
42
|
end
|
45
|
-
|
46
|
-
def delete_file(name)
|
47
|
-
::File.delete(path_of(name))
|
48
|
-
end
|
49
43
|
end
|
50
44
|
end
|
51
45
|
end
|
data/lib/stashify/directory.rb
CHANGED
@@ -15,7 +15,7 @@ module Stashify
|
|
15
15
|
def find(name)
|
16
16
|
if directory?(name)
|
17
17
|
directory(name)
|
18
|
-
elsif
|
18
|
+
elsif exists?(name)
|
19
19
|
file(name)
|
20
20
|
end
|
21
21
|
end
|
@@ -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.1.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-
|
11
|
+
date: 2023-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Provides an abstraction to various services (local filesystem, S3, etc)
|
14
14
|
email:
|
@@ -29,6 +29,7 @@ files:
|
|
29
29
|
- Rakefile
|
30
30
|
- bin/console
|
31
31
|
- bin/setup
|
32
|
+
- lib/st
|
32
33
|
- lib/stashify.rb
|
33
34
|
- lib/stashify/directory.rb
|
34
35
|
- lib/stashify/directory/local.rb
|