gito 0.4.6 → 0.4.7
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/gito.rb +6 -1
- data/lib/gito/project.rb +4 -3
- data/lib/gito/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0053fe8bf7703418329f7c2f3ca44c0596a33f81
|
|
4
|
+
data.tar.gz: 8a5c320f13b6a1df59e0dd26582beb7c094951a2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b63080069f2725f3e7c03b5c2a2fbfb2f66ffa267dd35fd70657d0b8fe0aa7e6dbf014f365a2362817b7f2b6c3f48cac94b33197cc8050e796aad133e73f93da
|
|
7
|
+
data.tar.gz: fc2d514fa33fb3d2827de3341681b449e13ac0cb679d11c97d32947f6c72f743244086d105d838b755cf373bd488f3ae71b4a6a0abf8161d37960ce2b1e76d89
|
data/lib/gito.rb
CHANGED
|
@@ -23,6 +23,7 @@ class MainApp
|
|
|
23
23
|
@options[:editor] = nil
|
|
24
24
|
@options[:setting_up] = false
|
|
25
25
|
@options[:is_temp] = false
|
|
26
|
+
@options[:shell_copy] = true
|
|
26
27
|
|
|
27
28
|
# Parse Options
|
|
28
29
|
create_options_parser(arguments)
|
|
@@ -55,6 +56,10 @@ class MainApp
|
|
|
55
56
|
@options[:is_temp] = true
|
|
56
57
|
end
|
|
57
58
|
|
|
59
|
+
opts.on('-k', '--keep', 'Clones the whole git history and not just the last snapshot') do |is_temp|
|
|
60
|
+
@options[:shell_copy] = false
|
|
61
|
+
end
|
|
62
|
+
|
|
58
63
|
opts.on('-h', '--help', 'Displays help') do
|
|
59
64
|
puts opts.help
|
|
60
65
|
exit
|
|
@@ -102,7 +107,7 @@ class MainApp
|
|
|
102
107
|
project = Project.new(@url)
|
|
103
108
|
|
|
104
109
|
# Clone the repository
|
|
105
|
-
project.clone(@options[:is_temp])
|
|
110
|
+
project.clone(@options[:is_temp], @options[:shell_copy])
|
|
106
111
|
|
|
107
112
|
# Open in editor
|
|
108
113
|
if @options[:should_edit]
|
data/lib/gito/project.rb
CHANGED
|
@@ -91,8 +91,8 @@ class Project
|
|
|
91
91
|
##
|
|
92
92
|
## CLONE THE REPOSITORY
|
|
93
93
|
##
|
|
94
|
-
def clone(is_temp_folder=false)
|
|
95
|
-
|
|
94
|
+
def clone(is_temp_folder=false, shell_copy=true)
|
|
95
|
+
url = cloneable_url
|
|
96
96
|
|
|
97
97
|
unless is_temp_folder
|
|
98
98
|
prefix = Dir.pwd + '/'
|
|
@@ -105,7 +105,8 @@ class Project
|
|
|
105
105
|
if File.directory?(@destination_dir)
|
|
106
106
|
puts "The folder #{@destination_dir.green} is not empty..."
|
|
107
107
|
else
|
|
108
|
-
|
|
108
|
+
concat = shell_copy ? '--depth 1' : ''
|
|
109
|
+
AppUtils.execute("git clone #{concat} #{url} #{@destination_dir}")
|
|
109
110
|
end
|
|
110
111
|
|
|
111
112
|
@destination_dir
|
data/lib/gito/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.4.7
|
|
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-
|
|
11
|
+
date: 2017-04-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|