oliver 1.8.6.4 → 1.8.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: 1786adc795a3e857520c25e9ea2be5cbbc45513b
4
- data.tar.gz: 30d56b2a262334a4eaab258332f2c5cf97081422
3
+ metadata.gz: 26cc85b0ba6b6331ec8e173ab2d756d4e353508f
4
+ data.tar.gz: d2e99cdf3d828711beb0d98fc17adfd7daf12af8
5
5
  SHA512:
6
- metadata.gz: aeca1c30b0ce19d2caa59f1180da265ba64c7d650d5b941f561ef04d3c688fdece1822794e92f17a89fae056ca2a739b33b38fea82f3506aac5a6d974cda78ee
7
- data.tar.gz: b7a44cef440346da3495ae7f366b75e07e11d834415504301412af560736e367c2479d127c89db677603318ca33d7eacd33939025354193870cf91afa20b981e
6
+ metadata.gz: 238765d533ab004c4125258a7f92b0be216efa609302d56ad07566fa4f8891bd71671ba43a56abc08161fccd5d45894f2c3bec9b2c549566d4082dccc4a236c4
7
+ data.tar.gz: f6c0313fc54f21ca99f2ab6792331973bb39bd9323be0aac6c00c0f2210e6ac567fb26c0b4bf7fd9b3af12df10f05efd92a1a9c64a44e204e080a97538a316a7
@@ -1,4 +1,6 @@
1
1
  require_relative '../file_manager'
2
+ require 'fileutils'
3
+ require 'git'
2
4
 
3
5
  # Success, warning and error messages
4
6
  # (Make these public, sometime)
@@ -38,8 +40,9 @@ FileManager::YAML['repos'].map do |username, repos|
38
40
  if username.downcase == 'misc'
39
41
  split = repo.split('/')
40
42
  if !File.directory?(split[1])
41
- `git clone git://github.com/#{repo} --quiet`
42
- if File.directory?(split[1])
43
+ repo_replaced = repo.gsub('/', '-')
44
+ cloned_repo = Git.clone("git://github.com/#{repo}", repo_replaced, :path => '.')
45
+ if File.directory?(repo_replaced)
43
46
  puts "#{success} #{split[1]}/ was cloned."
44
47
  else
45
48
  puts "#{error} #{split[1]} was not cloned."
@@ -49,7 +52,7 @@ FileManager::YAML['repos'].map do |username, repos|
49
52
  end
50
53
  if !File.directory?(repo)
51
54
  # Clone the repo if the directory doesn't already exist
52
- `git clone git://github.com/#{username}/#{repo} --quiet`
55
+ cloned_repo = Git.clone("git://github.com/#{username}/#{repo}", repo, :path => '.')
53
56
  if File.directory?(repo)
54
57
  # If the directory exists after the repo
55
58
  # has been cloned, give a success message
@@ -77,6 +80,6 @@ current_repos.each do |directory|
77
80
  unless listed_repos.to_s.include?(directory) &&
78
81
  File.directory?(directory)
79
82
  print "#{warning} Would you like to delete #{directory}/? (y/n): "
80
- `yes | rm -r #{directory}` if STDIN.gets.chomp.downcase == 'y'
83
+ FileUtils.rm_rf(directory) if STDIN.gets.chomp.downcase == 'y'
81
84
  end
82
85
  end
@@ -1,5 +1,5 @@
1
1
  # The main module for
2
2
  # Oliver's version
3
3
  module Oliver
4
- VERSION = '1.8.6.4'
4
+ VERSION = '1.8.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oliver
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.6.4
4
+ version: 1.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-17 00:00:00.000000000 Z
11
+ date: 2014-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler