gito 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 878d27d0cf1c2d6fade9eb0570a46707698e3c73
4
- data.tar.gz: 891be10307a00af1bf810c3c3bf558fd911cf71a
3
+ metadata.gz: 0053fe8bf7703418329f7c2f3ca44c0596a33f81
4
+ data.tar.gz: 8a5c320f13b6a1df59e0dd26582beb7c094951a2
5
5
  SHA512:
6
- metadata.gz: aba5528a7df2f40abc56788ca29abc4b55540275b2276d69d19fcee060976ec87b89d4abccaf1152a476c16134e6d311d397748949f29e4efc6e072e65f486b3
7
- data.tar.gz: 4909f2c70cbe1b9ed5e1d06b6ea634cb627a5c4c00310c848ca96432ce1c6151a57a99c613056929ead23d915f5a8c507d3000e3a1fa5089ed2101abee65b0de
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
- cloneable = cloneable_url
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
- AppUtils.execute("git clone --depth 1 #{cloneable} #{@destination_dir}")
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
@@ -1,3 +1,3 @@
1
1
  module Gito
2
- VERSION = '0.4.6'
2
+ VERSION = '0.4.7'
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.6
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 00:00:00.000000000 Z
11
+ date: 2017-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake