oliver 0.1.5 → 0.1.6
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/IDEAS.md +48 -0
- data/README.md +5 -24
- data/lib/oliver/arguments.rb +10 -12
- data/lib/oliver/methods.rb +14 -13
- data/lib/oliver/version.rb +1 -1
- data/lib/oliver.rb +7 -4
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85fd3cdde0ee0ccc0172826fc700fae494483040
|
4
|
+
data.tar.gz: ab3ac6f19f8a885303762df0220316935cc3538a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38674b0aa515b3beee4320f5d7f8b6f6be88dd01b1c354b7718048e2be1029e3cf510231fdbb263d89e57b0fc85c42d94ecf140cb6335de8ff7bf206b894d185
|
7
|
+
data.tar.gz: 449cbd1353ba22e8a278942a4844b8f8743075b9c45cc5f0859a230578ce504fd9c6815a7d0cc01a7910c2266fcab294a11c7a63be7e610707968a804923e2a3
|
data/IDEAS.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
ideas
|
2
|
+
=====
|
3
|
+
|
4
|
+
ideas that should or have already been implemented.
|
5
|
+
|
6
|
+
- [x] make the backup directory hidden (`.backup`)
|
7
|
+
|
8
|
+
- [ ] add verbose mode (`--verbose`) so things like `olive install` will have output like
|
9
|
+
|
10
|
+
```bash
|
11
|
+
olive/ already exists.
|
12
|
+
dotfiles was cloned.
|
13
|
+
```
|
14
|
+
|
15
|
+
etc, etc. otherwise, this should be defaulted to silent.
|
16
|
+
|
17
|
+
this should also be able to be set through the Olivefile
|
18
|
+
|
19
|
+
```bash
|
20
|
+
repos:
|
21
|
+
- "trommel/oliver"
|
22
|
+
|
23
|
+
prefs:
|
24
|
+
- "verbose"
|
25
|
+
- "no colour" # this too :P
|
26
|
+
```
|
27
|
+
|
28
|
+
- [ ] [Douglas](https://twitter.com/istx25) gave me this cool
|
29
|
+
idea that [CocoaPods](https://github.com/CocoaPods/CocoaPods) uses, where
|
30
|
+
you can run
|
31
|
+
|
32
|
+
```bash
|
33
|
+
$ olive install
|
34
|
+
```
|
35
|
+
|
36
|
+
it can not only install the repos on the list, but remove the repos
|
37
|
+
that have been installed locally but are no longer on the list.
|
38
|
+
this way, if you want to delete a bunch of repositories, you can simply
|
39
|
+
remove them from the list and run
|
40
|
+
|
41
|
+
```bash
|
42
|
+
$ olive install
|
43
|
+
```
|
44
|
+
|
45
|
+
I spent, like, 50 minutes on this and I can't figure out a good way
|
46
|
+
to do it, though, so.. yeah
|
47
|
+
|
48
|
+
I'll add it as soon as I can figure it out.
|
data/README.md
CHANGED
@@ -141,7 +141,7 @@ repos:
|
|
141
141
|
you can then run
|
142
142
|
|
143
143
|
```bash
|
144
|
-
$ olive
|
144
|
+
$ olive install # installs / removes listed repos
|
145
145
|
```
|
146
146
|
|
147
147
|
### start tracking a repo
|
@@ -204,30 +204,11 @@ branch, if you want to check it out.
|
|
204
204
|
the official gem that's hosted on rubygems, though, is
|
205
205
|
the gem of the master branch, and that's how it's going to stay.
|
206
206
|
|
207
|
-
|
208
|
-
|
207
|
+
ideas
|
208
|
+
=====
|
209
209
|
|
210
|
-
|
211
|
-
|
212
|
-
when we run
|
213
|
-
|
214
|
-
```bash
|
215
|
-
$ olive install
|
216
|
-
```
|
217
|
-
|
218
|
-
it can not only install the repos on the list, but remove the repos
|
219
|
-
that have been installed locally but are no longer on the list.
|
220
|
-
this way, if you want to delete a bunch of repositories, you can simply
|
221
|
-
remove them from the list and run
|
222
|
-
|
223
|
-
```bash
|
224
|
-
$ olive install
|
225
|
-
```
|
226
|
-
|
227
|
-
I spent, like, 50 minutes on this and I can't figure out a good way
|
228
|
-
to do it, though, so.. yeah
|
229
|
-
|
230
|
-
I'll add it as soon as I can figure it out.
|
210
|
+
refer to
|
211
|
+
[IDEAS.md](https://github.com/trommel/oliver/blob/master/spec/IDEAS.md).
|
231
212
|
|
232
213
|
versions
|
233
214
|
========
|
data/lib/oliver/arguments.rb
CHANGED
@@ -2,20 +2,18 @@
|
|
2
2
|
# (Make this into a case statement asap)
|
3
3
|
# (It'll be way easier and cleaner to work with later)
|
4
4
|
def different_arguments
|
5
|
-
if
|
6
|
-
if ARGV[0].downcase == 'init'
|
5
|
+
if ARGV[0].downcase == 'init'
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
end
|
14
|
-
else
|
15
|
-
puts "#{Rainbow(Name::OLIVER).red} already exists."
|
7
|
+
if !File.file?(Name::OLIVER)
|
8
|
+
File.open(Name::OLIVER, 'w') do |file|
|
9
|
+
file.write("repos:\n")
|
10
|
+
file.write(" - \"trommel/oliver\"\n")
|
11
|
+
puts "#{Rainbow(Name::OLIVER.green)} has been created."
|
16
12
|
end
|
17
|
-
|
18
|
-
|
13
|
+
else
|
14
|
+
puts "#{Rainbow(Name::OLIVER).red} already exists."
|
19
15
|
end
|
16
|
+
|
17
|
+
Jib.exit
|
20
18
|
end
|
21
19
|
end
|
data/lib/oliver/methods.rb
CHANGED
@@ -1,14 +1,3 @@
|
|
1
|
-
# If the user can't even
|
2
|
-
# specify basic arguments
|
3
|
-
# just give him/her some help
|
4
|
-
# and heavy medication
|
5
|
-
def are_you_serious?
|
6
|
-
if ARGV[0].nil?
|
7
|
-
help
|
8
|
-
Jib.exit
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
1
|
# Help the user with their heavy troubles
|
13
2
|
def help
|
14
3
|
|
@@ -41,6 +30,16 @@ def help
|
|
41
30
|
[
|
42
31
|
"update",
|
43
32
|
"pull updates from each tracked repo on the #{Name::OLIVER}"
|
33
|
+
],
|
34
|
+
|
35
|
+
[
|
36
|
+
"-v",
|
37
|
+
"return oliver's version"
|
38
|
+
],
|
39
|
+
|
40
|
+
[
|
41
|
+
"-h",
|
42
|
+
"return this help menu"
|
44
43
|
]
|
45
44
|
]
|
46
45
|
|
@@ -54,16 +53,18 @@ def help
|
|
54
53
|
puts "#{Rainbow(line).green} # => #{Rainbow(blurb).blue}"
|
55
54
|
end
|
56
55
|
|
56
|
+
Jib.exit
|
57
|
+
|
57
58
|
end
|
58
59
|
|
59
60
|
# Be totally ready if the user asks
|
60
61
|
# a question like "what version is oliver?"
|
61
62
|
# or "I need some help"
|
62
63
|
def other_things
|
63
|
-
|
64
|
-
case ARGV[0].to_s.downcase
|
64
|
+
case ARGV[0].downcase
|
65
65
|
when '-v' || '--version'
|
66
66
|
puts "#{Rainbow('oliver').red} #{Rainbow("v#{Oliver::VERSION}").green}"
|
67
|
+
Jib.exit
|
67
68
|
when '-h' || '--help'
|
68
69
|
help
|
69
70
|
else
|
data/lib/oliver/version.rb
CHANGED
data/lib/oliver.rb
CHANGED
@@ -21,6 +21,9 @@ end
|
|
21
21
|
# (Literally) different arguments
|
22
22
|
different_arguments
|
23
23
|
|
24
|
+
# (Literally) other things
|
25
|
+
other_things
|
26
|
+
|
24
27
|
# if `Name::OLIVER` (string)
|
25
28
|
# exists as a file continue with oliver
|
26
29
|
if File.file? Name::OLIVER
|
@@ -28,12 +31,12 @@ if File.file? Name::OLIVER
|
|
28
31
|
run_main
|
29
32
|
Jib.exit
|
30
33
|
else
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
+
name_install = Rainbow('oliver install').red
|
35
|
+
name_color = Rainbow(Name::OLIVER).red
|
36
|
+
puts "#{name_install} requires an #{name_color} to do its magic."
|
34
37
|
Jib.exit
|
35
38
|
end
|
36
39
|
else
|
37
|
-
|
40
|
+
help
|
38
41
|
Jib.exit
|
39
42
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oliver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- ".gitignore"
|
78
78
|
- CONTRIBUTING.md
|
79
79
|
- Gemfile
|
80
|
+
- IDEAS.md
|
80
81
|
- README.md
|
81
82
|
- Rakefile
|
82
83
|
- bin/olive
|