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: c85934c0306870e1f8d25b2138a30d43499766b7
4
- data.tar.gz: 51a0e8d75c9f428478d595f2bec61e02bcad156f
3
+ metadata.gz: 4fb52626503436cff1d68ee7f0bf6daf85f667f1
4
+ data.tar.gz: afd66011de47f69b74a6bbce6658a7b16103b396
5
5
  SHA512:
6
- metadata.gz: adbc4e22f3a81e94a8408dc6fe616c057976f4e14be51ae25313f3711c6eedebca5c7d502a21dbf7198dff3c7e336e44223cf9a1994e3fbbfd6d9a761ab3a1e5
7
- data.tar.gz: 4d8af70a159d4892c7176ec86923da3bfe08992a7596ede7713a6efcf295faead3718e7326cc2b19960f21e93e5cd2105798f93647f42de6a65d4c5bf3d9cd97
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
- # 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
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
- # print_heading("Installing Sequel Pro.app")
23
- # install_sequel_pro
24
- #
25
- # print_heading("Installing Codelation CLI to PATH")
26
- # install_codelation_cli
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 resources/temp.
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(Cli.source_root, "temp", file_name)
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(Cli.source_root, "temp", "ruby-install.tar.gz")
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(Cli.source_root, "temp")}`
42
+ `tar -xzvf #{@downloaded_file_path} -C #{File.join("~/.codelation", "temp")}`
41
43
 
42
- @extracted_path = File.join(Cli.source_root, "temp", "ruby-install-#{RUBY_INSTALL_VERSION}")
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
 
@@ -3,7 +3,7 @@ require "open-uri"
3
3
  require "thor"
4
4
 
5
5
  module Codelation
6
- VERSION = "0.0.2"
6
+ VERSION = "0.0.3"
7
7
 
8
8
  class Cli < Thor
9
9
  desc "update", "Update codelation-cli to latest version"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codelation-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pattison