oliver 1.5.5.2 → 1.5.5.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 +4 -4
- data/.gitignore +4 -1
- data/Rakefile +1 -2
- data/lib/oliver/argument_files/help.rb +13 -16
- data/lib/oliver/argument_files/init.rb +2 -3
- data/lib/oliver/argument_files/install.rb +14 -17
- data/lib/oliver/argument_files/list.rb +1 -1
- data/lib/oliver/argument_files/remove.rb +0 -1
- data/lib/oliver/argument_files/update.rb +1 -1
- data/lib/oliver/arguments.rb +2 -2
- data/lib/oliver/main.rb +1 -1
- data/lib/oliver/oliver_file_name.rb +2 -0
- data/lib/oliver/version.rb +3 -1
- data/lib/oliver.rb +3 -4
- data/oliver.gemspec +7 -7
- metadata +2 -3
- data/Gemfile.lock +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 718119f26160876ed08c73e056c6c6a6fac928d4
|
4
|
+
data.tar.gz: 4ab87dc3f02770f23a464839c1103b202d8734d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78717d85e30cd944a62a5ff52124a10fa4f0c2d97816a6c6d986b4a207f4b54bd405dc49e205e843215c4260dab03d12b4c10d68fce36cbdd8df8dc248bc5925
|
7
|
+
data.tar.gz: cc97d7773f5d4eb4c0332d5577cc57749dc05ba55897c4e2704c11915823ae2387767dd669e9a50f78257370e968c534e386e3dbd0f08f059b71e89029b13450
|
data/.gitignore
CHANGED
@@ -18,6 +18,9 @@
|
|
18
18
|
.repl_history
|
19
19
|
build/
|
20
20
|
|
21
|
+
# I don't want Gemfile.lock
|
22
|
+
Gemfile.lock
|
23
|
+
|
21
24
|
## Documentation cache and generated files:
|
22
25
|
/.yardoc/
|
23
26
|
/_yardoc/
|
@@ -35,4 +38,4 @@ build/
|
|
35
38
|
# .ruby-gemset
|
36
39
|
|
37
40
|
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
38
|
-
.rvmrc
|
41
|
+
.rvmrc
|
data/Rakefile
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
require
|
2
|
-
|
1
|
+
require 'bundler/gem_tasks'
|
@@ -1,58 +1,55 @@
|
|
1
1
|
# Help the user with their heavy troubles
|
2
2
|
def help
|
3
|
-
|
4
3
|
helper = [
|
5
4
|
[
|
6
|
-
|
5
|
+
'init',
|
7
6
|
"initializes the main directory by creating a base #{Name::OLIVER}"
|
8
7
|
],
|
9
8
|
|
10
9
|
[
|
11
|
-
|
10
|
+
'install',
|
12
11
|
"clones / removes directories if they're listed on the #{Name::OLIVER}"
|
13
12
|
],
|
14
13
|
|
15
14
|
[
|
16
|
-
|
17
|
-
"clone repo and add it to the #{Name::OLIVER}"
|
15
|
+
'add username/repo',
|
16
|
+
"clone repo and add it to the #{Name::OLIVER}"
|
18
17
|
],
|
19
18
|
|
20
19
|
[
|
21
|
-
|
22
|
-
"delete repo and remove it from the #{Name::OLIVER}"
|
20
|
+
'remove username/repo',
|
21
|
+
"delete repo and remove it from the #{Name::OLIVER}"
|
23
22
|
],
|
24
23
|
|
25
24
|
[
|
26
|
-
|
25
|
+
'list',
|
27
26
|
"list repos currently on the #{Name::OLIVER}"
|
28
27
|
],
|
29
28
|
|
30
29
|
[
|
31
|
-
|
30
|
+
'update',
|
32
31
|
"pull updates from each tracked repo on the #{Name::OLIVER}"
|
33
32
|
],
|
34
33
|
|
35
34
|
[
|
36
|
-
|
37
|
-
|
35
|
+
'-h',
|
36
|
+
'return oliver\'s version'
|
38
37
|
],
|
39
38
|
|
40
39
|
[
|
41
|
-
|
42
|
-
|
40
|
+
'-h',
|
41
|
+
'return this help menu'
|
43
42
|
]
|
44
43
|
]
|
45
44
|
|
46
45
|
top_message = 'oliver - help / usage'
|
47
46
|
|
48
47
|
puts Rainbow(top_message).red
|
49
|
-
(top_message.length + 1).times { print Rainbow(
|
48
|
+
(top_message.length + 1).times { print Rainbow('=').yellow }
|
50
49
|
puts
|
51
50
|
|
52
51
|
helper.map do |line, blurb|
|
53
52
|
puts "#{Rainbow(line).green} # => #{Rainbow(blurb).blue}"
|
54
53
|
end
|
55
|
-
|
56
54
|
exit
|
57
|
-
|
58
55
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
def init
|
2
|
-
|
3
|
-
if !ARGV[1].nil?
|
2
|
+
unless ARGV[1].nil?
|
4
3
|
if ARGV[2].nil?
|
5
4
|
dir_name = 'olives'
|
6
5
|
else
|
@@ -9,7 +8,7 @@ def init
|
|
9
8
|
if ARGV[1].downcase == '--directory'
|
10
9
|
Dir.mkdir dir_name
|
11
10
|
Dir.chdir(dir_name)
|
12
|
-
random_text = Rainbow(
|
11
|
+
random_text = Rainbow('Changed directory').blue
|
13
12
|
puts "#{Rainbow(dir_name).green}/ has been created."
|
14
13
|
puts "#{random_text} into #{Rainbow(dir_name).green}/."
|
15
14
|
end
|
@@ -1,13 +1,12 @@
|
|
1
1
|
def install
|
2
|
-
|
2
|
+
unless File.file? Name::OLIVER
|
3
3
|
puts "#{Rainbow('Olivefile').red} does not exist."
|
4
4
|
init
|
5
5
|
end
|
6
6
|
|
7
7
|
# Back up your files, man
|
8
|
-
|
9
|
-
|
10
|
-
end
|
8
|
+
backup_directory_name = '.backup'
|
9
|
+
Dir.mkdir backup_directory_name unless File.directory? backup_directory_name
|
11
10
|
|
12
11
|
# The buggiest code in the world
|
13
12
|
# (that's probably totally untrue)
|
@@ -15,7 +14,7 @@ def install
|
|
15
14
|
final = YAML.load("---\n#{body}\n---")
|
16
15
|
|
17
16
|
# Fix this ASAP
|
18
|
-
if final[
|
17
|
+
if final['repos'].nil?
|
19
18
|
message = "This will normally return a bug, so I'm just not going to do it.
|
20
19
|
You have an empty repos list, though, and that's what's causing this bug.
|
21
20
|
Try adding something to the list for the time being."
|
@@ -25,14 +24,13 @@ Try adding something to the list for the time being."
|
|
25
24
|
|
26
25
|
listed_repos = []
|
27
26
|
|
28
|
-
final[
|
27
|
+
final['repos'].each do |what|
|
29
28
|
listed_repos.push(what)
|
30
29
|
end
|
31
|
-
final[
|
30
|
+
final['repos'].each do |url|
|
32
31
|
|
33
32
|
# Split the url in half
|
34
33
|
splitted = url.split '/'
|
35
|
-
username = splitted[0]
|
36
34
|
repo = splitted[1]
|
37
35
|
current_repos = Dir.entries '.'
|
38
36
|
['.', '..', '.backup', Name::OLIVER].each do |i|
|
@@ -41,7 +39,7 @@ Try adding something to the list for the time being."
|
|
41
39
|
|
42
40
|
# Clone the repo if it doesn't already exist
|
43
41
|
if !File.directory?(repo)
|
44
|
-
|
42
|
+
`git clone git://github.com/#{url} --quiet`
|
45
43
|
if File.directory?(repo)
|
46
44
|
puts "#{Rainbow(repo).green}/ has been successfully cloned."
|
47
45
|
else
|
@@ -54,14 +52,13 @@ Try adding something to the list for the time being."
|
|
54
52
|
# If the directory doesn't exist
|
55
53
|
# in `Name::OLIVER`, move it to .backup
|
56
54
|
current_repos.each do |directory_thing|
|
57
|
-
if !listed_repos.to_s.include?
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
end
|
55
|
+
if !listed_repos.to_s.include?(directory_thing) &&
|
56
|
+
File.directory?(directory_thing)
|
57
|
+
`mv #{directory_thing} .backup`
|
58
|
+
else
|
59
|
+
backup_color = Rainbow('.backup/').red
|
60
|
+
repo_color = Rainbow(repo).red
|
61
|
+
puts "There was an error moving #{repo_color}/ to #{backup_color}"
|
65
62
|
end
|
66
63
|
end
|
67
64
|
end
|
data/lib/oliver/arguments.rb
CHANGED
data/lib/oliver/main.rb
CHANGED
data/lib/oliver/version.rb
CHANGED
data/lib/oliver.rb
CHANGED
@@ -2,10 +2,9 @@
|
|
2
2
|
# twss
|
3
3
|
require 'rainbow'
|
4
4
|
require 'YAML'
|
5
|
-
|
6
|
-
require_relative "oliver
|
7
|
-
|
8
|
-
require_relative "oliver/main"
|
5
|
+
%w(oliver_file_name arguments version main).each do |file|
|
6
|
+
require_relative "oliver/#{file}"
|
7
|
+
end
|
9
8
|
|
10
9
|
# if the user doesn't want to use rainbow
|
11
10
|
# just disable it completely
|
data/oliver.gemspec
CHANGED
@@ -4,18 +4,18 @@ require File.expand_path('../lib/oliver/version', __FILE__)
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ['Josh']
|
6
6
|
gem.email = ['joshception@icloud.com']
|
7
|
-
gem.description =
|
8
|
-
gem.summary =
|
7
|
+
gem.description = 'Local Git(Hub) made easy.'
|
8
|
+
gem.summary = 'Manage your Git(Hub) easier.'
|
9
9
|
gem.homepage = 'https://github.com/trommel/oliver'
|
10
10
|
|
11
|
-
gem.files = `git ls-files`.split(
|
12
|
-
gem.executables =
|
11
|
+
gem.files = `git ls-files`.split($ORS)
|
12
|
+
gem.executables = %w(olive oliver)
|
13
13
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
14
|
gem.name = 'oliver'
|
15
|
-
gem.require_paths =
|
15
|
+
gem.require_paths = %w(oliver)
|
16
16
|
gem.version = Oliver::VERSION
|
17
17
|
|
18
|
-
gem.add_development_dependency
|
19
|
-
gem.add_development_dependency
|
18
|
+
gem.add_development_dependency 'bundler', '~> 1.6'
|
19
|
+
gem.add_development_dependency 'rake'
|
20
20
|
gem.add_dependency 'rainbow', '>= 2.0.0'
|
21
21
|
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.5.5.
|
4
|
+
version: 1.5.5.3
|
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
|
+
date: 2014-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -64,7 +64,6 @@ files:
|
|
64
64
|
- ".gitignore"
|
65
65
|
- CONTRIBUTING.md
|
66
66
|
- Gemfile
|
67
|
-
- Gemfile.lock
|
68
67
|
- IDEAS.md
|
69
68
|
- LICENSE
|
70
69
|
- README.md
|
data/Gemfile.lock
DELETED