smdev 0.9.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smdev/ecs_exec.rb +6 -1
  3. data/lib/smdev.rb +11 -19
  4. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd3bd438e2a171908e6227b3361cfa8d851a04d8a7e72c76eb1b7fbf53f52b48
4
- data.tar.gz: 9b45204d34f2b68fa9c8f693290e0fc67b9ca61d2d07831cf44e3f9a760cfb6b
3
+ metadata.gz: 03607b816958d106b4c4981fba6938d16a3118029b5bb282d8e5707f10d48d47
4
+ data.tar.gz: 37c0c19e3b9ee5260e6d58191fd31af74c8128aabe661bd2f48f71b4e4314e5d
5
5
  SHA512:
6
- metadata.gz: 3eaf68d9b2d3c6e8cb85255d59df6415b6255db21328f1835442340dd7efe47601421efc348277282013f3256265647d4a2afe99d983fab16efb0f1c38c9acf5
7
- data.tar.gz: 2f2ad3110f162fc18abe33e1c59d2633169a8cd3dd2aee8c5f45fd393fce5be9fadc8c149777180860ea84430a66849aec9c2985d35b55fc95cd4015ea21e0c4
6
+ metadata.gz: 44dd951859764366fde729d238429806d1d4a4bc1eebe85ddba0b1fc34b18ba2bb58197723dd784b0658fb8be37df9807ac0df4c4f860ec93006b8de2a822c8e
7
+ data.tar.gz: fb1c468f62a4664e213f06bb68721509c94661275aa9f576c6fe6bc0aa2bcd9e1930b949a317d9e50362d1501cc1ded7ce2538a0200e52501e08a36e2874a1b9
@@ -48,9 +48,14 @@ module Smdev
48
48
 
49
49
  def self.service_name(options, cluster_name)
50
50
  service = options[:service]
51
- command = "aws ecs list-services --cluster #{cluster_name} | grep #{service}"
51
+ command = "aws ecs list-services --cluster #{cluster_name} | grep #{service}\\\""
52
52
  stdout, stderr, status = Open3.capture3(command)
53
53
 
54
+ unless status.success?
55
+ command = "aws ecs list-services --cluster #{cluster_name} | grep #{service}"
56
+ stdout, stderr, status = Open3.capture3(command)
57
+ end
58
+
54
59
  if status.success?
55
60
  match = stdout.match(/#{cluster_name}\/([^"]+)/)
56
61
  service_name = match[1] if match
data/lib/smdev.rb CHANGED
@@ -10,7 +10,8 @@ module Smdev
10
10
  options = {}
11
11
  commands = ["local_app_setup : Install local requirements for application. (Rails Only Currently)\n",
12
12
  "system_install : Install Homebrew, Ruby, PostgreSQL, and Ruby on Rails\n",
13
- "checkout_repos : Checkout all repositories for StrongMind\n",
13
+ "clone_repos : Checkout all repositories for StrongMind\n",
14
+ "update_repos : Checkout all repositories for StrongMind\n",
14
15
  "console : Open a rails console on ECS\n",
15
16
  "ssh : Open a bash shell on ECS\n"
16
17
  ]
@@ -64,8 +65,8 @@ module Smdev
64
65
  system('rails', 'db:migrate')
65
66
  when "system_install"
66
67
  system_install
67
- when "checkout_repos"
68
- checkout_repos(options)
68
+ when "clone_repos"
69
+ clone_repos(options)
69
70
  when "update_repos"
70
71
  update_repos(options)
71
72
  when "console"
@@ -146,14 +147,12 @@ module Smdev
146
147
  end
147
148
 
148
149
  def get_repos(options)
149
- if options[:https]
150
- token = ENV['GITHUB_TOKEN']
151
- if token.nil?
152
- # Prompt the user for their GitHub personal access token
153
- print "GitHub personal access token: "
154
- token = STDIN.noecho(&:gets).chomp
155
- puts ""
156
- end
150
+ token = ENV['GITHUB_TOKEN']
151
+ if token.nil?
152
+ # Prompt the user for their GitHub personal access token
153
+ print "GitHub personal access token: "
154
+ token = STDIN.noecho(&:gets).chomp
155
+ puts ""
157
156
  end
158
157
 
159
158
  # Authenticate with the GitHub API using the user's credentials
@@ -220,16 +219,9 @@ module Smdev
220
219
  end
221
220
 
222
221
 
223
- def checkout_repos(options)
222
+ def clone_repos(options)
224
223
  repos = get_repos(options)
225
224
 
226
- unless options[:https]
227
- puts "*************************************************************************"
228
- puts "* You must use https to get private repositories. *"
229
- puts "* If you have not setup your github token, you will be prompted for it. *"
230
- puts "* Use smdev -s to use https. *"
231
- puts "*************************************************************************"
232
- end
233
225
 
234
226
  # Clone each repository to a local directory
235
227
  repos.each do |repo|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smdev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Neighbors
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-22 00:00:00.000000000 Z
11
+ date: 2024-05-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: StrongMind Development Tool
14
14
  email: derek.neighbors@strongmind.com
@@ -24,7 +24,7 @@ homepage: https://github.com/StrongMind/Helpers/tree/main/smdev
24
24
  licenses:
25
25
  - MIT
26
26
  metadata: {}
27
- post_install_message:
27
+ post_install_message:
28
28
  rdoc_options: []
29
29
  require_paths:
30
30
  - lib
@@ -39,8 +39,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  requirements: []
42
- rubygems_version: 3.4.13
43
- signing_key:
42
+ rubygems_version: 3.3.5
43
+ signing_key:
44
44
  specification_version: 4
45
45
  summary: StrongMind Development Tool
46
46
  test_files: []