diffend-monitor 0.2.35 → 0.2.36

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: 4752936e9019b4f29efaaff31b9dac04a941c485c8f1edda527fe8c307e7253a
4
- data.tar.gz: 656f56cf62c0684ad19df36a143bd680f0e745b64444048176e5d9ed81c36ddb
3
+ metadata.gz: 6894ce2349ae65f5159d8604b0ca268fceed97c1f03c4508d91b0149a6b2c52d
4
+ data.tar.gz: d7f457c94fd72d9be57e52535c40b6b49533da918e613a694cbd1be0db9749b3
5
5
  SHA512:
6
- metadata.gz: 5287a81123ca427438e9271fd7bcb87e1eb5cdf3e32376908f35c7cd89cd0f6f3c72b5f464368c7aeea0e60e3a10a8ca433b12c509e05fbd4bced75df0cf69f5
7
- data.tar.gz: 67cece4be9ee2ce57b471bb99289eceafe6abf785afb419c5c609a929f4afcf3f946f4c38f25d3c0b08588eba758531b0d8c01cc6f9db8846ec92a5bda68e9a9
6
+ metadata.gz: c2ada266ca68ee8fd17047b4156c22df8360bf55f070885ad77338b6d5b4f1c1adcf73945b6bb0ec47b006c01cafa5c1538cde8235e1dfe80576cd367a59cea4
7
+ data.tar.gz: c29713c40743d4c4489e22940446746f0418ae46cac74070535fa79f76110f0840b018c8ce2333a9e74556bbdbffa1a2a299c538a9554a179f25122fc498da6b
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased][master]
4
4
 
5
+ ## [0.2.36] (2020-12-06)
6
+ - handle `Bundler::PermissionError` ([#79](https://github.com/diffend-io/diffend-ruby/pull/79))
7
+ - use cache to resolve dependencies in exec mode ([#78](https://github.com/diffend-io/diffend-ruby/pull/78))
8
+
5
9
  ## [0.2.35] (2020-11-04)
6
10
  - clean command name and title of a process ([#76](https://github.com/diffend-io/diffend-ruby/pull/76))
7
11
  - handle `uninitialized constant #<Class:Diffend::Configs::Fetcher>::ERB` ([#75](https://github.com/diffend-io/diffend-ruby/pull/75))
@@ -98,7 +102,8 @@
98
102
 
99
103
  - initial release
100
104
 
101
- [master]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.35...HEAD
105
+ [master]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.36...HEAD
106
+ [0.2.36]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.35...v0.2.36
102
107
  [0.2.35]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.34...v0.2.35
103
108
  [0.2.34]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.33...v0.2.34
104
109
  [0.2.33]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.32...v0.2.33
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- diffend (0.2.35)
4
+ diffend (0.2.36)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -34,9 +34,9 @@ module Diffend
34
34
  # @param command [String] command executed via bundler
35
35
  # @param definition [Bundler::Definition] definition for your source
36
36
  def call(command, definition)
37
- Bundler.ui.silence { definition.resolve_remotely! }
37
+ instance = new(command, definition)
38
38
 
39
- instance = new(definition)
39
+ Bundler.ui.silence { instance.resolve }
40
40
 
41
41
  case command
42
42
  when Commands::INSTALL, Commands::EXEC then instance.build_install
@@ -47,14 +47,22 @@ module Diffend
47
47
  end
48
48
  end
49
49
 
50
+ # @param command [String] command executed via bundler
50
51
  # @param definition [Bundler::Definition] definition for your source
51
52
  #
52
53
  # @return [Hash] local dependencies
53
- def initialize(definition)
54
+ def initialize(command, definition)
55
+ @command = command
54
56
  @definition = definition
55
57
  @direct_dependencies = Hash[definition.dependencies.map { |val| [val.name, val] }]
56
58
  # Support case without Gemfile.lock
57
59
  @locked_specs = @definition.locked_gems ? @definition.locked_gems.specs : []
60
+ @cached = command == Commands::EXEC
61
+ end
62
+
63
+ # Resolve definition
64
+ def resolve
65
+ @cached ? @definition.resolve_with_cache! : @definition.resolve_remotely!
58
66
  end
59
67
 
60
68
  # Build install specification
@@ -209,12 +217,7 @@ module Diffend
209
217
 
210
218
  case spec.source
211
219
  when Bundler::Source::Rubygems
212
- spec
213
- .source
214
- .send(:remote_specs)
215
- .search(Bundler::Dependency.new(spec.name, spec.version))
216
- .last
217
- .remote
220
+ Bundler::Source::Rubygems::Remote.new(spec.source.remotes.last)
218
221
  when Bundler::Source::Metadata, Bundler::Source::Git, Bundler::Source::Path
219
222
  spec.source
220
223
  else
@@ -8,8 +8,9 @@ module Diffend
8
8
  # Exceptions that we handle when there is a resolve issue
9
9
  RESOLVE_EXCEPTIONS = [
10
10
  Bundler::GemNotFound,
11
- Bundler::VersionConflict,
12
- Bundler::GitError
11
+ Bundler::GitError,
12
+ Bundler::PermissionError,
13
+ Bundler::VersionConflict
13
14
  ].freeze
14
15
 
15
16
  class << self
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Diffend
4
4
  # Current version
5
- VERSION = '0.2.35'
5
+ VERSION = '0.2.36'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diffend-monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.35
4
+ version: 0.2.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Pajor
@@ -34,7 +34,7 @@ cert_chain:
34
34
  9MmF6uCQa1EjK2p8tYT0MnbHrFkoehxdX4VO9y99GAkhZyJNKPYPtyAUFV27sT2V
35
35
  LfCJRk4ifKIN/FUCwDSn8Cz0m6oH265q0p6wdzI6qrWOjP8tGOMBTA==
36
36
  -----END CERTIFICATE-----
37
- date: 2020-11-04 00:00:00.000000000 Z
37
+ date: 2020-12-06 00:00:00.000000000 Z
38
38
  dependencies:
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: bundler
metadata.gz.sig CHANGED
Binary file