bundle_depot 0.0.1 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe6c5d3b98232534a27a5aaeda7fbe7192c6ab49
4
- data.tar.gz: 997b3dfcdf0ff3456686da9b1938bba0491f6b3b
3
+ metadata.gz: 63e72c9148f40b7ace2d997a480820ce363d9541
4
+ data.tar.gz: c1f4d9b72b40bf9c91ef5efcce320af9178bcbdf
5
5
  SHA512:
6
- metadata.gz: 9e11b20a1feca221f50cbeaaecb906c020afe4006be5c30ec0191f44aa95b720ff10ffc208a46e38a2391a23ac496175f360d7fcc3a02325eb095ac3244b12a8
7
- data.tar.gz: 29f6de7f423d7a9875a9705eba61aaca6d825706afd8d2d5ff46b17d047f7fc7eacd25ad6cf00037e3207324ba8915b0d391b204503549c9f31e094b271f859e
6
+ metadata.gz: 121188693046d0144ba2ed6fa47726baf32d4b255ec892c4bbd5ca7b56f36c575f946049a16b83a0a987b829e3e7f104b0be9f2ee3ac3953627a96114f17191d
7
+ data.tar.gz: 405d0da59a791722126f723b2123b124262ba319a898f1abea3f8b7afbf1717eb78e4277925195fa57c057222386542173faeb7ccd1a916ca97b5c7b4319b9c8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bundle_depot (0.0.1)
4
+ bundle_depot (0.0.2)
5
5
  thor
6
6
 
7
7
  GEM
@@ -21,12 +21,15 @@ Feature: Fetch remotely stored bundle
21
21
  And the remote cache contains the packed bundle for "json"
22
22
  And the local cache does not contain the bundle "json"
23
23
  And the following environment variables are set:
24
- | variable | value |
25
- | BUNDLE_DEPOT_PATH | special/depot |
24
+ | variable | value |
25
+ | BUNDLE_DEPOT_CACHE_PATH | special/depot/cache |
26
26
  When I run `bundle-depot fetch`
27
- Then the following directories should exist:
28
- | special/depot/cache |
29
- | special/depot/current |
27
+ Then the following directories should exist:
28
+ | special/depot/cache/bde95daa2ce7dede336b4367b9e3a0690027bd6f071e0fdcb1b3047cf988963c |
29
+ And the following symlinks should exist:
30
+ | source | target |
31
+ | .bundle/depot/current | special/depot/cache/bde95daa2ce7dede336b4367b9e3a0690027bd6f071e0fdcb1b3047cf988963c |
32
+
30
33
 
31
34
  Scenario: Does nothing if local cache contains the bundle
32
35
  Given there is the project "json" in the current directory
@@ -33,8 +33,8 @@ module BundleDepot
33
33
 
34
34
  attr_reader :local, :remote
35
35
 
36
- def initialize(local = FileSystemStore.new(File.join(Cache.path, "cache")),
37
- remote = FileSystemStore.new(File.join(Cache.path, "remote")))
36
+ def initialize(local = FileSystemStore.new(Cache.cache_path),
37
+ remote = FileSystemStore.new(File.join(Cache.depot_path, "remote")))
38
38
 
39
39
  @local = local
40
40
  @remote = remote
@@ -67,15 +67,23 @@ module BundleDepot
67
67
  end
68
68
 
69
69
 
70
- def self.path
70
+ def self.depot_path
71
71
  ENV["BUNDLE_DEPOT_PATH"] || DEFAULT_BUNDLE_DEPOT_PATH
72
72
  end
73
73
 
74
+ def self.cache_path
75
+ ENV["BUNDLE_DEPOT_CACHE_PATH"] || File.join(Cache.depot_path, "cache")
76
+ end
77
+
78
+ def self.current_bundle_path
79
+ ENV["BUNDLE_DEPOT_CURRENT_PATH"] || File.join(Cache.depot_path, "current")
80
+ end
81
+
74
82
  private
75
83
 
76
84
  def link
77
85
  source = unpacked_bundle
78
- target = File.join(Cache.path, "current")
86
+ target = Cache.current_bundle_path
79
87
 
80
88
  if File.exist?(target)
81
89
  if File.symlink?(target)
@@ -1,3 +1,3 @@
1
1
  module BundleDepot
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundle_depot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Schmidt