gito 0.4.9 → 0.4.10

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: a85c3491174797ae615e8813408296ec576aa961
4
- data.tar.gz: 474751d9fb58d4c7e2acb018d6c13fe01b7f2106
3
+ metadata.gz: ec9dc7c8ba9fa9a6e354b9869e407c011d6b4ce1
4
+ data.tar.gz: c4b3e9c2d494a8b85d622ab34686d167fe2bd816
5
5
  SHA512:
6
- metadata.gz: 9b75428890252e0cb8386bbc0b6269bff49aeac67164af731d7c2ca1caab6a0dddfc23f553c7cdf729136949e7b84185472f56813bb2cf53108bbabec1963350
7
- data.tar.gz: fda5014a0c155278ca8e1b304e2c3b8c84038dbf4b9f88937275f20426eb837ec24df0ef12cd7ef0fb7cfb114d25d28723d502ba60cb12905c9ca721ce131639
6
+ metadata.gz: 656d7706405a6f0987fa407740ec042a6a74173c1e2de4450cc35b70e2ebb588455b5ff988661d9342dc0ebcacc6ce02513fb41be8039f8e8ccdd915fc306a90
7
+ data.tar.gz: 52448da1016af99f414c6e2457d7e8bdf942e8da5da3cd63c4d677ea17acf7168af7387446117868e062e154bb190575eab7b06a39cad2c1fa0008de33a611f8
@@ -124,6 +124,8 @@ class MainApp
124
124
  project.install_dependencies
125
125
  end
126
126
 
127
+ puts "\n🚘 Finished".yellow
128
+
127
129
  # Change to directory
128
130
  project.change_directory
129
131
 
@@ -8,7 +8,7 @@ class AppUtils
8
8
  puts "\n\n======================================================\n\n"
9
9
  puts ' Something went wrong while executing this:'.red
10
10
  puts " $ #{command}\n".yellow
11
- puts "======================================================\n\n"
11
+ puts "======================================================\n"
12
12
  exit 1 if should_exit
13
13
  end
14
14
  end
@@ -23,7 +23,7 @@ class ConfigManager
23
23
 
24
24
  def get
25
25
  if File.exists? (@conf_path)
26
- file = File.open(@conf_path, "rb")
26
+ file = File.open(@conf_path, 'rb')
27
27
  contents = file.read
28
28
  config = YAML.load(contents, :safe => true)
29
29
  else
@@ -34,35 +34,25 @@ class Project
34
34
 
35
35
  def destination
36
36
  stripped_url = @base_url.gsub('.git', '')
37
- stripped_url = stripped_url.gsub('.git', '')
38
- stripped_url = stripped_url.gsub('git@github.com:', '')
39
- stripped_url = stripped_url.gsub('https://github.com/', '')
40
- stripped_url.gsub('http://github.com/', '')
41
37
 
42
38
  if stripped_url.start_with?('http')
43
- stripped_url = stripped_url.split('/').last(2).join('/')
39
+ stripped_url = stripped_url.split('/').last
44
40
  end
45
41
 
46
42
  if stripped_url.include?(':') && stripped_url.start_with?('git@')
47
- stripped_url = stripped_url.split(':').last
43
+ stripped_url = stripped_url.split(':').last.split('/').last
48
44
  end
49
45
 
50
- stripped_url.gsub('/','-')
46
+ stripped_url
51
47
  end
52
48
 
53
49
  def change_directory
54
- # TODO aparently this doesn't work because ruby forks the terminal process and can't communicate with his parent
55
-
56
- # temp_script_name = './temp.sh'
57
- # AppUtils::execute 'echo "cd '+@destination+'" > ' + temp_script_name
58
- # AppUtils::execute '. '+temp_script_name
59
- # AppUtils::execute 'rm -rf ' + temp_script_name
60
50
  short_path = @destination_dir.to_s.gsub(Dir.home, '~')
61
51
 
62
- puts "-------------------------------------------"
52
+ puts "\n-------------------------------------------"
63
53
  puts "Please change directory"
64
54
  puts "cd #{short_path.yellow}"
65
- puts "-------------------------------------------"
55
+ puts "-------------------------------------------\n\n"
66
56
  end
67
57
 
68
58
  def install_dependencies
@@ -74,7 +64,7 @@ class Project
74
64
 
75
65
  types.each do |item|
76
66
  if File.exists? (item['file_requirement'])
77
- puts "#{item['type']} detected...".yellow
67
+ puts "\nšŸ˜Ž #{item['type']} detected...\n".yellow
78
68
  go_inside_and_run item['installation_command']
79
69
  end
80
70
  end
@@ -108,10 +98,11 @@ class Project
108
98
  @destination_dir = prefix + "#{@destination}"
109
99
 
110
100
  if File.directory?(@destination_dir)
111
- puts "The folder #{@destination_dir.green} is not empty..."
101
+ puts "\nšŸ¤” The folder #{@destination_dir.green} is not empty...\n\n"
112
102
  go_inside_and_run "git reset --hard HEAD"
113
103
  go_inside_and_run "git pull"
114
104
  else
105
+ puts "\nšŸ˜™ Cloning #{url.green}...\n\n"
115
106
  shell_copy_string = shell_copy ? '--depth 1' : ''
116
107
  AppUtils.execute("git clone #{shell_copy_string} --recursive #{url} #{@destination_dir}")
117
108
  end
@@ -120,12 +111,12 @@ class Project
120
111
  end
121
112
 
122
113
  def open_editor(app)
123
- puts "Opening editor...".yellow
114
+ puts "\nšŸ˜ā€ Opening editor...".yellow
124
115
  go_inside_and_run "#{app} ."
125
116
  end
126
117
 
127
118
  def open_folder
128
- puts 'Opening folder...'.yellow
119
+ puts "\n😳 Opening folder...".yellow
129
120
  go_inside_and_run 'open .'
130
121
  end
131
122
 
@@ -1,3 +1,3 @@
1
1
  module Gito
2
- VERSION = '0.4.9'
2
+ VERSION = '0.4.10'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gito
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - cesar ferreira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-19 00:00:00.000000000 Z
11
+ date: 2017-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake