eac_fs 0.10.0 → 0.12.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e852c4bca2367df238571d8d843e2440fe0c7e91f564dab685f4ea1e5188d7a2
4
- data.tar.gz: aa31fa42eedb2bb8ed49642dadd57d2c548fca7c484e9d0e766bf3c8712f1f44
3
+ metadata.gz: 460e2f56af274d37b57c527511acc8d8b4aec079165f3a92c33cb913b1219bc1
4
+ data.tar.gz: e2da59b6a80da2bf26b6d3783be7a83abaabc23ee6d06d9ace6369db303c56b7
5
5
  SHA512:
6
- metadata.gz: f2f4aabd8d31321f475f67545db56fa49fdc54bf46fcb007478589e1d365fb45050dc0f988536c7e3232b8839d9b3a72a1c2ce612bfcc1ddd4a0481cc000610a
7
- data.tar.gz: c89c848cb937e1bb100584d7974180a7dd8725d8b233837ee04ae12f649fd424966a7b82e29dd2fdb1f64886e3a9f18b844a46e42cfbdd191a9197336f180860
6
+ metadata.gz: fc791ad8df8fd8059eb738ec8dbdc8eba49abb9c4bf730c8187857eb17effd06c8bdd164b2397aedbb09ec07c25bfa0222914ba3d76d2fcbbfb703adc5b12118
7
+ data.tar.gz: 7b71696042786fbf5f539960e53e0b536486cbad047389ca0d19ca2b1bdebdd49179486f5c01535a2a67bb366447ba5298cc30ebdd8b1bc59ec50bfaaae12d37
@@ -3,13 +3,13 @@
3
3
  require 'eac_fs/patches'
4
4
  require 'eac_ruby_utils/fs/temp'
5
5
 
6
- module Avm
6
+ module EacFs
7
7
  class CachedDownload
8
8
  attr_reader :url, :fs_cache
9
9
 
10
10
  def initialize(url, parent_fs_cache = nil)
11
11
  @url = url
12
- @fs_cache = (parent_fs_cache || fs_cache).child(url.parameterize)
12
+ @fs_cache = (parent_fs_cache || fs_cache).child(url.to_s.parameterize)
13
13
  end
14
14
 
15
15
  def assert
@@ -10,7 +10,12 @@ class Object
10
10
  def fs_#{type}
11
11
  oid = fs_object_id_by_type(:'#{type}')
12
12
  oid = [oid.to_s] unless oid.is_a?(::Enumerable)
13
- oid.inject(self.class.fs_#{type}) { |a, e| a.child(e.to_s) }
13
+ oid.inject(fs_#{type}_parent) { |a, e| a.child(e.to_s) }
14
+ end
15
+
16
+ # @return [EacFs::StorageTree]
17
+ def fs_#{type}_parent
18
+ self.class.fs_#{type}
14
19
  end
15
20
  CODE
16
21
  end
@@ -27,7 +27,7 @@ module EacFs
27
27
  ::File.read(content_path)
28
28
  end
29
29
 
30
- def read_or_cache
30
+ def read_or_store
31
31
  write(yield) unless stored?
32
32
 
33
33
  read
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacFs
4
- VERSION = '0.10.0'
4
+ VERSION = '0.12.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_fs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-24 00:00:00.000000000 Z
11
+ date: 2022-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: content-type