oliver 1.5.3.8 → 1.5.4

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: 343cc6a19fb36d97ebbde1360658d20d34703277
4
- data.tar.gz: 5fdbdfd77b6e1966333e268c5941f25e1e5d2c1e
3
+ metadata.gz: da2ecaad510efd0abec8b967399cc325d08fab78
4
+ data.tar.gz: 8fa51c10f1bb1e56ff2a46b90508686f1507ea16
5
5
  SHA512:
6
- metadata.gz: 10f2869788b0b7e1e3cf61cc6575a76ce5fad6ae1a63c34afda474edfc1c6bd35e114ab1b584a7fbb1ffb39f97c5141fdaa0b02d19564550dcfa663fdb24b4dc
7
- data.tar.gz: b5a2a10e46508b1c76d2504ff3a2d1cb84e009fd7b98106f63cea4aacaa083d621e797474b5efea6be9c628e33d393a2e9cf2ac9cc1960b20023475afd1a239f
6
+ metadata.gz: 570f3c5c3daee5435451f9925281fa13c83c73cede0b36d865e72623a9dcfbded4120145577353f96eeac9f9944252e000b71f3f02f1727d3a5fefca13e0aba7
7
+ data.tar.gz: db67d9ff6e87210541f5edf4dadcac253f68fef756dfd2662025b11f20321cede08dc3c5e1e6559bc2c35e947265ec95fa679ce2d4ae5ad05b4da9a409ee07b1
@@ -1,15 +1,10 @@
1
- def argument?(i)
2
- if ARGV[i].nil?
3
- help
4
- exit
5
- end
6
- end
7
-
8
1
  # Different arguments
9
2
  # (Make this into a case statement asap)
10
3
  # (It'll be way easier and cleaner to work with later)
11
4
  def different_arguments
12
5
  case ARGV[0].downcase
6
+ when 'install'
7
+ run_main
13
8
  when 'init'
14
9
  if !File.file?(Name::OLIVER)
15
10
  File.open(Name::OLIVER, 'w') do |file|
@@ -26,11 +21,16 @@ def different_arguments
26
21
  when 'update'
27
22
  puts "pull updates from each tracked repo on the Olivefile"
28
23
  when 'add'
29
- argument?(1)
30
24
  puts "added #{ARGV[1]} to Olivefile"
31
25
  when 'remove'
32
- argument?(1)
33
26
  puts "removed #{ARGV[1]} from Olivefile"
34
- end
27
+ when '-v' || '--version'
28
+ puts "#{Rainbow('oliver').red} #{Rainbow("v#{Oliver::VERSION}").green}"
29
+ exit
30
+ when '-h' || '--help'
31
+ help
32
+ else
33
+ help
34
+ end
35
35
  exit
36
36
  end
@@ -56,16 +56,3 @@ def help
56
56
  exit
57
57
 
58
58
  end
59
-
60
- # Be totally ready if the user asks
61
- # a question like "what version is oliver?"
62
- # or "I need some help"
63
- def other_things
64
- case ARGV[0].downcase
65
- when '-v' || '--version'
66
- puts "#{Rainbow('oliver').red} #{Rainbow("v#{Oliver::VERSION}").green}"
67
- exit
68
- when '-h' || '--help'
69
- help
70
- end
71
- end
data/lib/oliver/main.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # Main oliver file
2
2
  def run_main
3
+ help if !File.file? Name::OLIVER
3
4
 
4
5
  # Back up your files, man
5
6
  if !File.directory?('.backup')
@@ -1,3 +1,3 @@
1
1
  module Oliver
2
- VERSION = "1.5.3.8"
2
+ VERSION = "1.5.4"
3
3
  end
data/lib/oliver.rb CHANGED
@@ -5,7 +5,7 @@ require 'YAML'
5
5
  require_relative "oliver/oliver_file_name"
6
6
  require_relative "oliver/arguments"
7
7
  require_relative "oliver/version"
8
- require_relative "oliver/methods"
8
+ require_relative "oliver/help"
9
9
  require_relative "oliver/main"
10
10
 
11
11
  # if the user doesn't want to use rainbow
@@ -26,17 +26,5 @@ different_arguments
26
26
  # (Literally) other things
27
27
  other_things
28
28
 
29
- # if `Name::OLIVER` (string)
30
- # exists as a file continue with oliver
31
- if File.file? Name::OLIVER
32
- if ARGV[0].downcase == 'install'
33
- run_main
34
- exit
35
- else
36
- help
37
- exit
38
- end
39
- else
40
- help
41
- exit
42
- end
29
+ # just exit
30
+ exit
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.3.8
4
+ version: 1.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-21 00:00:00.000000000 Z
11
+ date: 2014-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,8 +72,8 @@ files:
72
72
  - bin/oliver
73
73
  - lib/oliver.rb
74
74
  - lib/oliver/arguments.rb
75
+ - lib/oliver/help.rb
75
76
  - lib/oliver/main.rb
76
- - lib/oliver/methods.rb
77
77
  - lib/oliver/oliver_file_name.rb
78
78
  - lib/oliver/version.rb
79
79
  - oliver.gemspec