dtk-network-client 1.0.1.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: 074e87ffd8e8637cc10edf504211b68e7e964f7d
4
- data.tar.gz: eace69876b3ed30670c6d12c13a3f0e1503320b5
3
+ metadata.gz: 6069940b8ecc824b0299134430a145129da1c280
4
+ data.tar.gz: 7ed0dbd9e76fe0651db5e92683078c11db7b8411
5
5
  SHA512:
6
- metadata.gz: 35e47a6974977ddd171956234df8280893d353e0acd3b19c9fe0a7308c416bfb5be834fc8eb86d4c07463d077e90a1abd4e585735ac6a6e6456c196534478cad
7
- data.tar.gz: a46749ebbea8af42cfe81673b1a4633e5a09f16facbb26a45c040eb5aa5c6cbd2de622760f5d07fa2c3cff9c708d81b6b65cf54003e0b6abce5136af8093df8e
6
+ metadata.gz: 011c0fb261444f334079b68d7330bd8a04dd84c1ae791e1db35df7584908f6d67f0ef40d7ebb5421622e92d3ab2659c866639464251e0baa7f3b92390b77e5f5
7
+ data.tar.gz: 64c5ec2c1516fb0e32e2b1655a4954fd1fda1ae0d9662e4d1a603a71d48874562f87628bb8d03dd1a6e425cf7a92487808a09f69bc6500863c9b2cce96b63b23
@@ -20,5 +20,5 @@ Gem::Specification.new do |spec|
20
20
  # spec.add_dependency 'aws-sdk', '~> 3'
21
21
  spec.add_dependency 'aws-sdk-s3', '~> 1.8'
22
22
  spec.add_dependency 'dtk-dsl', '~> 1.1.0'
23
- spec.add_dependency 'dtk-common-core', '0.11.1.1'
23
+ spec.add_dependency 'dtk-common-core', '0.12.0'
24
24
  end
@@ -131,7 +131,7 @@ module DTK::Network::Client
131
131
  end
132
132
 
133
133
  def install_named_version(module_info, target_location = nil)
134
- codecommit_uri = construct_clone_url(module_info['codecommit_uri'])#module_info['codecommit_uri']
134
+ codecommit_uri = construct_clone_url(module_info)
135
135
  install_location = target_location || "#{dtk_modules_location}/#{module_info['name']}-#{module_info['version']}"
136
136
 
137
137
  FileUtils.rm_rf(install_location) if Dir.exist?(install_location)
@@ -162,20 +162,23 @@ module DTK::Network::Client
162
162
  return [bucket, object_name]
163
163
  end
164
164
 
165
- def construct_clone_url(codecommit_uri)
165
+ def construct_clone_url(module_info)
166
166
  require 'open-uri'
167
167
 
168
- if codecommit_uri # = module_info.dig('meta', 'aws', 'codecommit', 'repository_metadata', 'codecommit_uri')
169
- codecommit_data = Session.get_codecommit_data
170
- # service_user_name = codecommit_data.dig('service_specific_credential', 'service_user_name')
168
+ public_user_meta = module_info['public_user_meta']
169
+ codecommit_uri = module_info['codecommit_uri']
170
+
171
+ if codecommit_uri
172
+ codecommit_data = public_user_meta || Session.get_codecommit_data
171
173
  service_user_name = codecommit_data['service_specific_credential']['service_user_name']
172
- # service_password = codecommit_data.dig('service_specific_credential', 'service_password')
173
174
  service_password = codecommit_data['service_specific_credential']['service_password']
174
175
  encoded_password = URI.encode_www_form_component(service_password)
176
+
175
177
  url = nil
176
178
  if match = codecommit_uri.match(/^(https:\/\/)(.*)$/)
177
179
  url = "#{match[1]}#{service_user_name}:#{encoded_password}@#{match[2]}"
178
180
  end
181
+
179
182
  url
180
183
  else
181
184
  raise "Unable to find codecommit https url"
@@ -17,7 +17,7 @@ module DTK::Network::Client
17
17
  end
18
18
 
19
19
  def publish
20
- module_info = rest_post('modules', { name: @module_ref.name, namespace: @module_ref.namespace, return_if_exists: true })
20
+ module_info = rest_post('modules', { name: @module_ref.name, namespace: @module_ref.namespace, return_if_exists: true, version: @module_ref.version.str_version })
21
21
  dependencies = []
22
22
 
23
23
  if @parsed_module
@@ -99,7 +99,8 @@ module DTK::Network::Client
99
99
  require 'open-uri'
100
100
 
101
101
  if clone_url_http = module_info['meta']['aws']['codecommit']['repository_metadata']['clone_url_http']
102
- codecommit_data = Session.get_codecommit_data
102
+ public_user_meta = module_info['public_user_meta']
103
+ codecommit_data = public_user_meta || Session.get_codecommit_data
103
104
  service_user_name = codecommit_data['service_specific_credential']['service_user_name']
104
105
  service_password = codecommit_data['service_specific_credential']['service_password']
105
106
  encoded_password = URI.encode_www_form_component(service_password)
@@ -30,11 +30,10 @@ module DTK::Network::Client
30
30
  def construct_remote_url(module_info)
31
31
  require 'open-uri'
32
32
 
33
- # if clone_url_http = module_info.dig('meta', 'aws', 'codecommit', 'repository_metadata', 'clone_url_http')
34
33
  if clone_url_http = module_info['meta']['aws']['codecommit']['repository_metadata']['clone_url_http']
35
- codecommit_data = Session.get_codecommit_data
36
- # service_user_name = codecommit_data.dig('service_specific_credential', 'service_user_name')
37
- # service_password = codecommit_data.dig('service_specific_credential', 'service_password')
34
+ public_user_meta = module_info['public_user_meta']
35
+ codecommit_data = public_user_meta || Session.get_codecommit_data
36
+ # codecommit_data = Session.get_codecommit_data
38
37
  service_user_name = codecommit_data['service_specific_credential']['service_user_name']
39
38
  service_password = codecommit_data['service_specific_credential']['service_password']
40
39
  encoded_password = URI.encode_www_form_component(service_password)
@@ -40,12 +40,11 @@ module DTK::Network::Client
40
40
  def construct_remote_url(module_info)
41
41
  require 'open-uri'
42
42
 
43
- # if clone_url_http = module_info.dig('meta', 'aws', 'codecommit', 'repository_metadata', 'clone_url_http')
44
43
  if clone_url_http = module_info['meta']['aws']['codecommit']['repository_metadata']['clone_url_http']
45
- codecommit_data = Session.get_codecommit_data
46
- # service_user_name = codecommit_data.dig('service_specific_credential', 'service_user_name')
44
+ public_user_meta = module_info['public_user_meta']
45
+ codecommit_data = public_user_meta || Session.get_codecommit_data
46
+ # codecommit_data = Session.get_codecommit_data
47
47
  service_user_name = codecommit_data['service_specific_credential']['service_user_name']
48
- # service_password = codecommit_data.dig('service_specific_credential', 'service_password')
49
48
  service_password = codecommit_data['service_specific_credential']['service_password']
50
49
  encoded_password = URI.encode_www_form_component(service_password)
51
50
  url = nil
@@ -1,7 +1,7 @@
1
1
  module DTK
2
2
  module Network
3
3
  module Client
4
- VERSION="1.0.1.1"
4
+ VERSION="1.0.2"
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.1.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reactor8
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-23 00:00:00.000000000 Z
11
+ date: 2018-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 0.11.1.1
89
+ version: 0.12.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 0.11.1.1
96
+ version: 0.12.0
97
97
  description: Library for interaction with dtk network.
98
98
  email: support@reactor8.com
99
99
  executables: []
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  requirements: []
178
178
  rubyforge_project:
179
- rubygems_version: 2.6.11
179
+ rubygems_version: 2.4.1
180
180
  signing_key:
181
181
  specification_version: 4
182
182
  summary: Library for interaction with dtk network.