diffend 0.2.42 → 0.2.43

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: 358cc105e2ad7cf14855c23c3f661c9473fcdc6bdf46ccd38c37a6239df84063
4
- data.tar.gz: 6aee0be769db07c076d190aefb35c10ab432296c78b63221a76d82bf48aecaae
3
+ metadata.gz: 00ff9a1819f62275a52e0d531ac9a3d9061e388867ec5e73ea0dc923a9ba30ed
4
+ data.tar.gz: '092ac2a98fd88ca4c8cc014aec5a2e485c6a280b17e44e3000b99d5dddbb0bf3'
5
5
  SHA512:
6
- metadata.gz: b9f396679d536dab840175ac5a80c65a25f6edb05a38830586c517afca1c9951ad57460fe396e581c4f25c53b3778dab59b9070c7a8d18bfd5ea5d9fada2d958
7
- data.tar.gz: 6b104626a4f76adcfbbcc0a209245265c96afff5bba585f9d81eaedbffa17862174abaca664860d46096176b9a821ad8e2c5c127ce6d9247c1fd9f9fe5c557e6
6
+ metadata.gz: 6f6d630a67a621c4a92c1835340ef2195834ba9c2717de4d4da4256b31cbf709347d2129593b167de4dfb8bdf27d771127b9fcefdde2e3b4ee5cfe05b8f2e666
7
+ data.tar.gz: feee0a4cd775f6aa3a7324294975e20c9edb51fb9bc733c33765bc0f3c31a130315f94d92779acab7d5ac6f3b3783d9b9ed992f48fd741a5069e58d88cbcdd03
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased][master]
4
4
 
5
+ ## [0.2.43] (2021-03-16)
6
+ - introduce `DIFFEND_TAGS` ([#119](https://github.com/diffend-io/diffend-ruby/pull/119))
7
+ - add support for `bundle add` command ([#118](https://github.com/diffend-io/diffend-ruby/pull/118))
8
+
5
9
  ## [0.2.42] (2021-03-09)
6
10
  - introduce `DIFFEND_SKIP_DENY` flag
7
11
  - fix config not being passed properly to `build_error` in `Diffend::Execute` ([#116](https://github.com/diffend-io/diffend-ruby/pull/116))
@@ -134,7 +138,8 @@
134
138
 
135
139
  - initial release
136
140
 
137
- [master]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.42...HEAD
141
+ [master]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.43...HEAD
142
+ [0.2.43]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.42...v0.2.43
138
143
  [0.2.42]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.41...v0.2.42
139
144
  [0.2.41]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.40...v0.2.41
140
145
  [0.2.40]: https://github.com/diffend-io/diffend-ruby/compare/v0.2.39...v0.2.40
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- diffend (0.2.42)
4
+ diffend (0.2.43)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -11,5 +11,7 @@ module Diffend
11
11
  EXEC = 'exec'
12
12
  # Bundler secure command introduced by diffend plugin
13
13
  SECURE = 'secure'
14
+ # Bundler add command
15
+ ADD = 'add'
14
16
  end
15
17
  end
@@ -56,7 +56,7 @@ module Diffend
56
56
  #
57
57
  # @return [Array]
58
58
  def tags
59
- tags = []
59
+ tags = prepare_user_tags
60
60
 
61
61
  if ENV.key?('GITHUB_ACTIONS')
62
62
  tags << 'ci'
@@ -71,6 +71,17 @@ module Diffend
71
71
  tags
72
72
  end
73
73
 
74
+ # Prepare user tags
75
+ #
76
+ # @return [Array]
77
+ def prepare_user_tags
78
+ if ENV.key?('DIFFEND_TAGS')
79
+ ENV['DIFFEND_TAGS'].split(',')
80
+ else
81
+ []
82
+ end
83
+ end
84
+
74
85
  # @param str [String] that we want to clean and truncate
75
86
  def clean(str)
76
87
  str
@@ -39,8 +39,7 @@ module Diffend
39
39
  ::Bundler.ui.silence { instance.resolve }
40
40
 
41
41
  case command
42
- when Commands::INSTALL, Commands::EXEC, Commands::SECURE then instance.build_install
43
- when Commands::UPDATE then instance.build_update
42
+ when Commands::INSTALL, Commands::EXEC, Commands::SECURE, Commands::UPDATE, Commands::ADD then instance.build
44
43
  else
45
44
  raise ArgumentError, "invalid command: #{command}"
46
45
  end
@@ -65,34 +64,10 @@ module Diffend
65
64
  @cached ? @definition.resolve_with_cache! : @definition.resolve_remotely!
66
65
  end
67
66
 
68
- # Build install specification
67
+ # Build specification
69
68
  #
70
69
  # @return [Hash]
71
- def build_install
72
- hash = build_main
73
-
74
- @definition.resolve.each do |spec|
75
- # Skip metadata
76
- next if spec.instance_variable_get(:@specification).nil?
77
- next if skip?(spec.source)
78
-
79
- locked_spec = @locked_specs.find { |s| s.name == spec.name }
80
-
81
- hash['dependencies'][spec.name] = {
82
- 'platform' => build_spec_platform(spec, locked_spec),
83
- 'source' => build_spec_source(spec),
84
- 'type' => build_dependency_type(spec.name),
85
- 'versions' => build_versions(spec, locked_spec)
86
- }
87
- end
88
-
89
- hash
90
- end
91
-
92
- # Build update specification
93
- #
94
- # @return [Hash]
95
- def build_update
70
+ def build
96
71
  hash = build_main
97
72
 
98
73
  @definition.resolve.each do |spec|
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Diffend
4
4
  # Current version
5
- VERSION = '0.2.42'
5
+ VERSION = '0.2.43'
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.42
4
+ version: 0.2.43
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: 2021-03-09 00:00:00.000000000 Z
37
+ date: 2021-03-16 00:00:00.000000000 Z
38
38
  dependencies:
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: bundler
metadata.gz.sig CHANGED
Binary file