diffend 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: '0780c79922b3857482318780ad968af290af191fd0c59e032f9a0f94d671ad6d'
4
- data.tar.gz: d2f91acc6e7ea5d3a59bd8b86c49c5c4d763eff6bf3af3ecf6b00d99730da36b
3
+ metadata.gz: 76c744c4aef5eaa735b131f3f866f9e89d01b9ae79e04cfa1a922419f4be4a3c
4
+ data.tar.gz: 3ebbd02c2a0b693e57d9b4d7d73c8c9e490236189983a30e7c24caaffb7b5843
5
5
  SHA512:
6
- metadata.gz: 15ec791f3eea3e174ad8a09d68f9f5b20511e9728c3f4481b9b2c97e377cdb5eb6e0faee215a24979b18f846e8a2bd01cc9569634c4307ccf448e4bcb73e035d
7
- data.tar.gz: a5b7b8ab500fa6dcb187f46137d89337bc1f4bd3eaa006c5ba43dada667ffbce01ea61a68678a5f04a211b91cbdc8e73f55fcb3350db7bb74a93dc50d3051cd7
6
+ metadata.gz: a166de7306a536d75d20d50c5fe27f27fe77cc4a3332446a85543f42a617b180d3bc97a1a0800c5ada0189eb59d923e8d0a7bd823d3f2f9e31ef2113263a616f
7
+ data.tar.gz: 5b1890d48842a54166c3eae9d500d43f8c81172f66df9b5f768460fd65e97a2460f542eba99970db8fceb630c97a6fd71f1dd9fe7170c425d5f89b06f448499c
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1,3 @@
1
- �2��oa)qN���Q6���@`Sb-��8��!=4
1
+ E�|��i�,u+i��JP*��Z���Ѝc����kPZv���3#=�I�.�|��?������k���u[NZ�� ��my?�`vQo:����S��T�H�1�����S�.�����Z3��J
2
+ ��������/}T+[{J����؊����E�T�'��U�� ��ˋ�:R�b�/8�e��L_��s��U
3
+ �g{?~��?4_���|�pII�T�F��+fo���>������7�j��\5R�;N�<���P�`�?W$O�JqL�Y�؜`�[��e��>\��*�-J2�腜e{�1 2\h\���9h�6W�l?���h���k�Tx�}h�-�p/$��x�#��|㋴>���^���hi�tĞЗ �T��X��x
@@ -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
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