smdev 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/smdev.rb +11 -19
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f2fae9ae96c661cbdb81f9b27096a033349ab411fce5335fca146f6536369d0
|
4
|
+
data.tar.gz: c4ff658ccfb0480de1da964564cad094f622586a67870020769a6647fa75a8b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b265c8da2ed9c07e6ca935ce1edca112e56f5939d241b9ec3234c85cadf08a886aa2f950f8aee17a01b60be0fb143980db9ca50797a169f465448f5b80daabed
|
7
|
+
data.tar.gz: d9a1204f361399e3cd86b54dd6d759665c578bd14edf32615ecf4ffd39fbfdaabd825284b1130252a2f26902f4177e16070dd94601e5ffaedb21427b9bd12721
|
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
|
-
"
|
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 "
|
68
|
-
|
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
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
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
|
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|
|