sfctl 1.0.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
  SHA256:
3
- metadata.gz: 8b7cfd503a3b18b2441f5cff3c07e2fbfa595abb035b93d4ecba4acb9765ff29
4
- data.tar.gz: 7c73df09e0f4b7b1b9093744e09ea662165612e468efd9e0c850f81725d61af4
3
+ metadata.gz: 30138753cd7927ab7010451f88efb8845d5f8b3034db46cefaafd15fc36c2795
4
+ data.tar.gz: 3be71cf7f62719cd3c56d82c1c4741872bf48c341f047c986756f8ec76c84277
5
5
  SHA512:
6
- metadata.gz: bc9efd5ac1521f8d519dfde47a46366995b9ecb5a8ed40db41ba0b8e419689f785f6a9c1f148022db78e6794840ceade2de4c9ee192b3a6c4d0e24acf91bee23
7
- data.tar.gz: cd16f04c78c00f8b54e1e45e201a32f93cc1733040934a2a2aa1dfdc9ca36bcddc630c53995f526518e9f33bbc8fbc3df0c99de83515a24d5ef8fabce4faa477
6
+ metadata.gz: ed03923a889a0b07dcc31e155e54a67152b6b918f8f3e4eb3baac97e44f1cf1ed37ee6e633142076418d4bc2b4721eafe181fae01d712d8f43e49e2df2c75eb3
7
+ data.tar.gz: 22afbfcb272debee7d7d716ab80d8ea22a66da59316d0175932639134073eb0b1806a54cd026cf442f777561bc6da1f7386c54b1ef72e60fc2b7faeb1026b136
@@ -21,7 +21,7 @@ module Sfctl
21
21
  def execute(output: $stdout)
22
22
  return if !config_present?(output) || !link_config_present?(output)
23
23
 
24
- if read_link_config['connections'].length.zero?
24
+ if connections.length.zero?
25
25
  output.puts @pastel.red('Please add a connection before continue.')
26
26
  return
27
27
  end
@@ -34,8 +34,12 @@ module Sfctl
34
34
 
35
35
  private
36
36
 
37
+ def connections
38
+ @connections ||= read_link_config.fetch('connections', [])
39
+ end
40
+
37
41
  def assignments_from_connections
38
- read_link_config['connections'].map do |con|
42
+ connections.map do |con|
39
43
  id = con[0]
40
44
  asmnt = con[1]
41
45
  {
@@ -70,7 +74,7 @@ module Sfctl
70
74
  def sync_assignments(output, list)
71
75
  list.each do |assignment|
72
76
  assignment_id = assignment['id'].to_s
73
- connection = read_link_config['connections'].select { |c| c == assignment_id }
77
+ connection = connections.select { |c| c == assignment_id }
74
78
  sync(output, assignment, connection[assignment_id])
75
79
  end
76
80
  end
@@ -1,3 +1,3 @@
1
1
  module Sfctl
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sfctl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serhii Rudik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-07-01 00:00:00.000000000 Z
12
+ date: 2020-07-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -447,7 +447,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
447
447
  - !ruby/object:Gem::Version
448
448
  version: '0'
449
449
  requirements: []
450
- rubygems_version: 3.1.4
450
+ rubygems_version: 3.1.3
451
451
  signing_key:
452
452
  specification_version: 4
453
453
  summary: sfctl is a command line interface for the Starfish API.