codelation-cli 0.0.2 → 0.0.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fb52626503436cff1d68ee7f0bf6daf85f667f1
|
4
|
+
data.tar.gz: afd66011de47f69b74a6bbce6658a7b16103b396
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4e28031c763878591f3c28ccdc28451f9abc675fa30b83ee584e8898d3af9917dbe42d7067dfe2c9e5841529b8ed92af9869cf4fed50f1e678dc3edaf8c1625
|
7
|
+
data.tar.gz: ffe1b6edf1d7fcef678d17399a3a713951b5e8b408036da8bdb501b1e666b8d39aa386f04df42e285cc91a52f834c2fd8ee2799829b93e6fdac2a86179eb170f
|
@@ -4,26 +4,26 @@ module Codelation
|
|
4
4
|
class Cli < Thor
|
5
5
|
desc "development:install", "Install the development tools used by Codelation"
|
6
6
|
def development_install
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
7
|
+
print_heading("Installing Atom.app")
|
8
|
+
install_atom
|
9
|
+
|
10
|
+
print_heading("Installing Atom Packages")
|
11
|
+
install_atom_packages
|
12
|
+
|
13
|
+
print_heading("Installing Dot Files")
|
14
|
+
install_dot_files
|
15
|
+
|
16
|
+
print_heading("Installing Postgres.app")
|
17
|
+
install_postgres
|
18
18
|
|
19
19
|
print_heading("Installing Ruby")
|
20
20
|
install_ruby
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
print_heading("Installing Sequel Pro.app")
|
23
|
+
install_sequel_pro
|
24
|
+
|
25
|
+
print_heading("Installing Codelation CLI to PATH")
|
26
|
+
install_codelation_cli
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -32,11 +32,11 @@ module Codelation
|
|
32
32
|
write_downloaded_file(@download_uri)
|
33
33
|
end
|
34
34
|
|
35
|
-
# Save the file downloaded with #download_file to
|
35
|
+
# Save the file downloaded with #download_file to ~/.codelation/temp.
|
36
36
|
# @param uri [URI] The URI of the file to be saved
|
37
37
|
def write_downloaded_file(uri)
|
38
38
|
file_name = File.basename(uri.path)
|
39
|
-
@downloaded_file_path = File.join(
|
39
|
+
@downloaded_file_path = File.join("~/.codelation", "temp", file_name)
|
40
40
|
open(@downloaded_file_path, "wb") do |file|
|
41
41
|
file.write(@download_uri.read)
|
42
42
|
end
|
@@ -11,9 +11,11 @@ module Codelation
|
|
11
11
|
|
12
12
|
# Install Ruby binary and add it to PATH.
|
13
13
|
def install_ruby
|
14
|
-
puts RUBY_VERSION
|
15
14
|
return if `~/.codelation/ruby/bin/ruby -v`.include?(RUBY_VERSION)
|
16
15
|
|
16
|
+
# Create the directory ~/.codelation/temp if it doesn't exist
|
17
|
+
FileUtils.mkdir_p("~/.codelation/temp")
|
18
|
+
|
17
19
|
print_command("Installing ruby-install")
|
18
20
|
install_ruby_install
|
19
21
|
|
@@ -35,11 +37,11 @@ module Codelation
|
|
35
37
|
|
36
38
|
# Install ruby-install from https://github.com/postmodern/ruby-install.
|
37
39
|
def install_ruby_install
|
38
|
-
@downloaded_file_path = File.join(
|
40
|
+
@downloaded_file_path = File.join("~/.codelation", "temp", "ruby-install.tar.gz")
|
39
41
|
`curl -L -o #{@downloaded_file_path} #{RUBY_INSTALL_URL}`
|
40
|
-
`tar -xzvf #{@downloaded_file_path} -C #{File.join(
|
42
|
+
`tar -xzvf #{@downloaded_file_path} -C #{File.join("~/.codelation", "temp")}`
|
41
43
|
|
42
|
-
@extracted_path = File.join(
|
44
|
+
@extracted_path = File.join("~/.codelation", "temp", "ruby-install-#{RUBY_INSTALL_VERSION}")
|
43
45
|
`cd #{@extracted_path} && sudo make install`
|
44
46
|
end
|
45
47
|
|
data/lib/codelation/version.rb
CHANGED