folder_stash 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ed23473d361dfa0ae4bd1f0a38b113668199c2d4c168c185db38b42d03aaa95
4
- data.tar.gz: ac7cdca3255197f1b1b53c8db011c212c5573cb765a15690d53534115a9da0f2
3
+ metadata.gz: 01d7fd1cefc4dd3fafb09e814c9c9085e5dad10560a3d336fc39d06a7cd2b32e
4
+ data.tar.gz: d14c717fe30eb05d0748545537f69f9b8ddc8a3ae3db84842ed4efdfa31c3230
5
5
  SHA512:
6
- metadata.gz: 307855d56e517dcf1bb729508a4bd273f66f8bcb26acdbe37b00a8377c8e73f29c2a0951a406c455edca926106ad6a3b0409cb8afb9c4ceadd8d11d397525a36
7
- data.tar.gz: 9252ff064589fde254252d8ec9a3f80b53bdc409eddc179adb558addafac69297fb611ddeaa73a55157cfb3d4375cf5242491c5a99f3e5b867c6abd3fc9dc38b
6
+ metadata.gz: 85839b1d7b841cb50f1180fcddf3bc6a63d13d6902b5dd9c0ae5a2f6390370f2d38c6e6a2d44ca19d4e477602c95d646f5198b0ee0a18592118f27e55a047601
7
+ data.tar.gz: 7f92a85de39800617d2c2c57fa3318058c63bc89a9c7d4400e037b1f755957ead5f5331c3da28b06c65d79b4b07a66f61b0d5b2e6a92f9b388432d07fdf645c5
@@ -119,8 +119,8 @@ module FolderStash
119
119
  tree.terminal
120
120
  end
121
121
 
122
- # Returns the path for +path+ as +:absolute+, +:relative+, or only the
123
- # nested subdirectories in the +:tree+.
122
+ # Returns the path for +path+ as +:absolute+, +:relative+, only the nested
123
+ # subdirectories in the +:tree+, or only the +:branch+.
124
124
  def file_path(path, pathtype)
125
125
  treepath = tree.branch_path.append(File.basename(path))
126
126
  case pathtype
@@ -129,6 +129,8 @@ module FolderStash
129
129
  when :relative
130
130
  treepath[0] = directory
131
131
  treepath.join('/')
132
+ when :branch
133
+ treepath[1..-1].join('/')
132
134
  when :tree
133
135
  treepath.join('/')
134
136
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: folder_stash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Stein
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-20 00:00:00.000000000 Z
11
+ date: 2019-10-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  The folder_stash gem will store files in a directory with a user definable
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0'
53
53
  requirements: []
54
- rubygems_version: 3.0.3
54
+ rubygems_version: 3.0.6
55
55
  signing_key:
56
56
  specification_version: 4
57
57
  summary: Keeps the number of files per directory within a limit by autogenerating