dtk-network-client 1.0.3 → 1.0.4

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: 60294cb4242addf43fe09d861d20279bbbc8d1fe504dfd8579c2f26ac802ee4a
4
- data.tar.gz: 66d4697096d8741052f8a9987b60cb92f32165d804b9e6c5f507edc84d0fc48e
3
+ metadata.gz: 43fb05c6172661b351bab4af1aa3a88282ec6fd7a22596897c59ee0f103306d5
4
+ data.tar.gz: c48cc80d6bfc4d6a192005eb09f2556da21dbf2d25722a8e5471256ce988b4eb
5
5
  SHA512:
6
- metadata.gz: 5e868d8514a0c56abf2067eae5d80d1ba29080eb749ed6f17266557b7cdbe12bca875d07f4cf61067713be83eb295a3b7fe745ef04355d64857afea2e48aa163
7
- data.tar.gz: 03752513e6b7da71a876e2e896edff23054a8f9446c0765a4685bfdc8c480616de565f075db6aace4a723bbb0c31ba420c86fb9c88793101c8670f603b3ad00b
6
+ metadata.gz: a608e79ac6e54431e60759b058438be3157bb64d8a4214fe15f439ea1593e9e7df34fc2cab50abd9bdda6450a2b545c66fcdd23a3f7a7d6e8222e2faee7e7567
7
+ data.tar.gz: 8e0059693ce0a77787c08b3a77b67bd3024b69b1ac4854ceabf57f61e183e8f7687a705d3a570464e14edc969354c422e1fccd759f9cd86a20e0b02f0d9fd34a
@@ -17,7 +17,16 @@ module DTK::Network::Client
17
17
 
18
18
  def self.run(module_info, opts = {})
19
19
  module_ref = ModuleRef.new(module_info)
20
- dependency_tree = DependencyTree.get_or_create(module_ref, opts.merge(format: :hash))
20
+
21
+ begin
22
+ dependency_tree = DependencyTree.get_or_create(module_ref, opts.merge(format: :hash))
23
+ rescue Error::DependencyError => ex
24
+ raise Error::DependencyError, "#{ex.message}Use flag --download-if-fail to download module content to your local environment to fix the problem." unless opts[:download_if_fail]
25
+
26
+ new(module_ref, [], opts).install
27
+ raise ex
28
+ end
29
+
21
30
  new(module_ref, dependency_tree, opts).install
22
31
  end
23
32
 
@@ -78,7 +78,7 @@ module DTK::Network
78
78
  version_obj = dependency.version
79
79
  versions_in_range = version_obj.versions_in_range(dtkn_versions_w_deps)
80
80
 
81
- raise "No version matching requirement '#{version_obj.full_version}'" if versions_in_range.empty?
81
+ raise "No version matching requirement '#{version_obj.full_version}' for dependent module '#{dependency.full_name}'" if versions_in_range.empty?
82
82
 
83
83
  versions_in_range.sort!
84
84
  latest_version = versions_in_range.last
@@ -121,7 +121,7 @@ module DTK::Network
121
121
 
122
122
  def check_for_conflicts(dependency)
123
123
  if activated_mod = @activated.existing_name?(dependency.full_name)
124
- raise "There is already activated version '#{activated_mod[:version] || activated_mod['version']}' for module '#{dependency.full_name}' and it does not match required version '#{dependency.version.full_version}'"
124
+ raise Error::DependencyError, "There is already activated version '#{activated_mod[:version] || activated_mod['version']}' for module '#{dependency.full_name}' and it does not match required version '#{dependency.version.full_version}'"
125
125
  end
126
126
  end
127
127
 
@@ -287,4 +287,4 @@ module DTK::Network
287
287
 
288
288
  end
289
289
  end
290
- end
290
+ end
@@ -17,6 +17,18 @@ module DTK::Network::Client
17
17
  super(msg)
18
18
  end
19
19
  end
20
+
21
+ class DependencyError < self
22
+ def initialize(error_msg)
23
+ errors = {
24
+ 'errors' => {
25
+ 'message' => error_msg
26
+ }
27
+ }
28
+ super(errors)
29
+ end
30
+ end
31
+
20
32
  end
21
33
  end
22
34
 
@@ -1,7 +1,7 @@
1
1
  module DTK
2
2
  module Network
3
3
  module Client
4
- VERSION="1.0.3"
4
+ VERSION="1.0.4"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtk-network-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reactor8
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-18 00:00:00.000000000 Z
11
+ date: 2019-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git
@@ -175,8 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  - !ruby/object:Gem::Version
176
176
  version: '0'
177
177
  requirements: []
178
- rubyforge_project:
179
- rubygems_version: 2.7.8
178
+ rubygems_version: 3.0.2
180
179
  signing_key:
181
180
  specification_version: 4
182
181
  summary: Library for interaction with dtk network.