oliver 1.8.8.5 → 1.8.9

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: 3a695a0e64fb58c699acf05d59d7594a40312f85
4
- data.tar.gz: abcd2dbca6b78923e7e5e5313dfc1e5ab7091b90
3
+ metadata.gz: 62fa71edd07d84bf406fad3497ef9f1e8f3486fc
4
+ data.tar.gz: 7cb6421bb8959fcf918d58f9d4fae3e5e10228e5
5
5
  SHA512:
6
- metadata.gz: 3e4b354a77aa8916afd0bb7d626c6a7122a97ee93b89a5c00eed84268aee24d57c9f25293feea516eb6a72cf1ef82dd32885f4fce8bf71fa83d3b52245586645
7
- data.tar.gz: eb8a2793cf5cf571b9b6e752b5662f9879555d4d819e6c22d947bc29194d8d8ab794abf1752dc8d854d9a386c7893021eb18666b5753dcaed528f2a87fa3c658
6
+ metadata.gz: 9832f34bfc646f712f40c49795767802e2a45c4ebab73a7f03a077a42486022e5574d7cc7a054418e0469f8fa43fe8478327ac631eabc271c9b93efb16647de9
7
+ data.tar.gz: 0f61dbf8bfc1a36a7d3e4acead1a0ee9de0334b1867e6b51517bf3bddac0501e2a5c4a68256c95619e8c0cb6c9ec5d3ced0f08b78ac0e0dfdc97307c21186e31
data/OLD_README.md ADDED
@@ -0,0 +1,334 @@
1
+ oliver
2
+ ======
3
+
4
+ [![Gem Version](https://badge.fury.io/rb/oliver.svg)](http://badge.fury.io/rb/oliver)
5
+
6
+ Oliver manages your local GitHub projects
7
+ in a simple YAML file.
8
+
9
+ > "Like podfiles for Git repos."
10
+ -- [@istx25](https://github.com/istx25)
11
+
12
+ installation
13
+ ------------
14
+
15
+ You can install Oliver through [RubyGems](https://rubygems.org/gems/oliver)
16
+
17
+ ```bash
18
+ $ gem install oliver
19
+ ```
20
+
21
+ now, [skip the shit in this readme](https://github.com/trommel/oliver#docs)
22
+
23
+ what the heck
24
+ -------------
25
+
26
+ users can then `git clone` a list of repos, easily,
27
+ and delete tracked repos as well.
28
+
29
+ think of this as a directory full of repos (that contain
30
+ `.git` directories) that can be tracked.
31
+
32
+ it's 1:05 AM right now, so this is probably just
33
+ a silly idea that doesn't actually make any sense.
34
+
35
+
36
+ idea
37
+ ----
38
+
39
+ managing an area where you keep local (cloned)
40
+ Git repos is kind of annoying, and since everybody's
41
+ making scripts and stuff to manage files, I thought
42
+ "hey, why not make one for managing local git repos?"
43
+
44
+ the plan is that the user is to have a single
45
+ directory (stored wherever they want) that contains
46
+ all of the different git repos they've cloned.
47
+
48
+ for example (I might just make a "physical"
49
+ demonstration of this in this repo):
50
+
51
+ ```
52
+ main_directory/
53
+ |- git_project_1/
54
+ |----- bin/
55
+ |----- lib/
56
+ |----- README.md
57
+ |----- .git/
58
+ |
59
+ |- git_project_2/
60
+ |----- bin/
61
+ |----- lib/
62
+ |----- README.md
63
+ |----- .git/
64
+ |
65
+ |- git_project_3/
66
+ |----- bin/
67
+ |----- lib/
68
+ |----- README.md
69
+ |----- .git/
70
+ ```
71
+
72
+ and then, if you want to see
73
+ all of the directories that
74
+ you're tracking, you can run
75
+ `oliver list`.
76
+
77
+ you're probably thinking:
78
+ *"can't I just run `ls` inside the directory
79
+ and it'll do the same thing?"*, **and the
80
+ answer to your question is _yes_**.
81
+
82
+ I have no idea what I'm doing.
83
+
84
+ ~~the thing that differentiates oliver with
85
+ typical things (no examples..) is that
86
+ it gives you access to the directory from
87
+ anywhere.. which you could easily do with a public
88
+ shell variable.~~
89
+
90
+ > I have no idea what I'm doing.
91
+
92
+
93
+ things I'm thinking so far
94
+ --------------------------
95
+
96
+ I'm not totally sure how this
97
+ is going to work. here's what I do know:
98
+
99
+ repos will be tracked and be kept in a list.
100
+ users can add a repo to the list, remove the repo,
101
+ view repos on the list and update the repo (essentially
102
+ run `git pull` on each individual repo).
103
+
104
+ docs
105
+ ----
106
+
107
+ ### setup the repo
108
+
109
+ create the base `.Olivefile.yml`
110
+
111
+ ```bash
112
+ $ olive init
113
+ ```
114
+
115
+ (and in the `.Olivefile.yml`)
116
+
117
+ ```yaml
118
+ ---
119
+ repos:
120
+ trommel:
121
+ - "oliver"
122
+ - "textymous"
123
+ istx25:
124
+ - "Fluorescent"
125
+ - "dotfiles"
126
+ misc: # use the misc category for old syntax. these don't really work, yet
127
+ - "trommel/calkoolator"
128
+ ---
129
+
130
+ # use 3 spaces for indentation, not tabs! :P
131
+ # I spent, like, an hour trying to fix a non-existent bug because of this
132
+ # smh so hard
133
+ # by the way, this is YAML, for anyone interested
134
+ # then again, you could just look at the code and determine that yourself
135
+ ```
136
+
137
+ you can also initialize the repo
138
+ with a folder, if you want to skip a couple
139
+ of steps (things surrounded by '[]' means
140
+ that they're optional)
141
+
142
+ ```bash
143
+ $ olive init [-d|--directory] [directory name (defaulted to 'olives')]
144
+ ```
145
+
146
+ ### install and/or remove listed repos
147
+
148
+ ```bash
149
+ $ olive install
150
+ ```
151
+
152
+ ### clone and start tracking a repo
153
+
154
+ this will add it to the tracking list
155
+
156
+ ```bash
157
+ $ olive add username/repo
158
+ ```
159
+ ### remove (delete) and stop tracking a repo
160
+
161
+ this will remove it from the tracking list
162
+ and locally delete the repo
163
+
164
+ ```bash
165
+ $ olive remove username/repo
166
+ ```
167
+
168
+ ### list tracked repos
169
+
170
+ list all of the repos that're being tracked
171
+
172
+ ```bash
173
+ $ olive list
174
+ ```
175
+
176
+ ### update (`git pull`) each repo
177
+
178
+ essentially `cd` into each individual
179
+ repo and run `git pull`
180
+
181
+ ```bash
182
+ $ olive update
183
+ ```
184
+
185
+ extras
186
+ ------
187
+
188
+ ~~oliver uses [rainbow](https://github.com/sickill/rainbow),
189
+ a sick gem / library for making Terminal all colourful and stuff.~~
190
+
191
+ ~~it's pretty cool, but if you don't like it, just
192
+ append `colour=off` to any statement~~
193
+
194
+ ~~don't forget to spell *"colour"* **the proper way**.~~
195
+
196
+ things to remember
197
+ -----------------
198
+
199
+ - run everything with `olive`, not `oliver`. "oliver" is the name
200
+ of the project, `olive` is the name of the CLI.
201
+
202
+ - if you want to clone a repo from somewhere other than GitHub (GitHub
203
+ is defaulted), just use the full git URL instead of the simple
204
+ `username/repo-name`, for example `git://projects.josh.com/oliver.git`.
205
+
206
+ - arguments after the actual arguments will be ignored, i.e.:
207
+
208
+ ```bash
209
+ # everything after -d will be ignored
210
+ $ olive init -d hey here are more arguments
211
+ ```
212
+
213
+ branches
214
+ -------
215
+
216
+ (there may or may not be an unstable branch at the moment.
217
+ I'm constantly adding it and deleting it. i won't push gems
218
+ from the unstable branch, only from master.)
219
+
220
+ I kept fixing bugs and then I would frantically
221
+ push the fixes because I was worried people, if anyone actually
222
+ uses oliver, would experience problems with it if I didn't push
223
+ the fix immediately. the problem, obviously, with this
224
+ is that I didn't catch other things I needed to fix, and now I have,
225
+ like, a billion commits, even though most of them are just me changing
226
+ the version variable.
227
+
228
+ anyways, there's an [unstable](https://github.com/trommel/oliver/tree/unstable)
229
+ branch, if you want to check it out.
230
+ the official gem that's hosted on rubygems, though, is
231
+ the gem of the master branch, and that's how it's going to stay.
232
+
233
+ also, the unstable branch probably maybe won't work.
234
+
235
+ there also might be a "clean" branch, which is basically a (possibly) outdated
236
+ version of oliver that'll backup your directories when you run `olive install`
237
+ (if the repo isn't on the list of repos to track). the master branch
238
+ is now considered "unsafe", meaning that it will simply delete the repo
239
+ if it's not on the list when `olive install` is run.
240
+
241
+ this is probably maybe a bad idea, but it's a lot easier to maintain.
242
+ if you don't like this, fix it, and make it work properly :)
243
+
244
+ ideas
245
+ -----
246
+
247
+ refer to
248
+ [IDEAS.md](https://github.com/trommel/oliver/blob/master/IDEAS.md).
249
+
250
+ versions
251
+ --------
252
+
253
+ for some reason, I was using things like "1.5" as oliver's
254
+ version for a bit, even though oliver isn't even finished (to
255
+ even the help menu), so if you check the previous gem versions,
256
+ the newest gem version is probably (maybe) smaller / below
257
+ previous gem versions. this was me being silly and not thinking.
258
+
259
+ as of right now (July 18, 2014, 6:19 PM), oliver's version
260
+ is 0.1.5, and it will continue to build off from there.
261
+
262
+ sorry about doing that silly thing.
263
+
264
+ reference (mostly for me but kind of helpful if you don't want to go looking through code shit)
265
+ --------------------------------------------
266
+
267
+ `FileManager::YAML['repos']` is where you can reference the repos in the `.Olivefile.yml`
268
+
269
+ you can use this by `require`ing `file_manager.rb` and then using modules and stuff
270
+
271
+ for example,
272
+
273
+ ```ruby
274
+ require_relative '../file_manager'
275
+
276
+ FileManager::YAML['repos'].map |username, repos| do
277
+ puts username
278
+ repos.each do |repo|
279
+ puts repo
280
+ end
281
+ end
282
+ ```
283
+
284
+ etcetera, etcetera
285
+
286
+ to do
287
+ -----
288
+
289
+ there's no checkmarked things right now because i just made this list, please
290
+ don't think i'm some unproductive asshole who does nothing all day or something
291
+ idk
292
+
293
+ - [ ] remake the help/info thing to be slimmer and look better
294
+ - [ ] get `add` working
295
+ - [ ] get `remove` working
296
+ - [ ] fix bugs with `update` (tons)
297
+ - [ ] fix bugs with `install` (not as many)
298
+ - [ ] fix bugs with `list` (hardly any, afaik)
299
+
300
+ known bugs
301
+ ----------
302
+
303
+ - for some reason, cloning private
304
+ repos isn't working right now.
305
+ I don't know why. Oliver uses standard
306
+ git, so this shouldn't be an issue.
307
+
308
+ testing
309
+ -------
310
+
311
+ refer to
312
+ [TESTING.md](https://github.com/trommel/oliver/blob/master/spec/TESTING.md).
313
+
314
+ contribution
315
+ ------------
316
+
317
+ refer to
318
+ [CONTRIBUTING.md](https://github.com/trommel/oliver/blob/master/spec/CONTRIBUTING.md).
319
+
320
+ if you think this is cool
321
+ -------------------------
322
+
323
+ I hate dropping a link for donations,
324
+ but a dude's gotta eat.
325
+
326
+ [![Support via Gittip](https://rawgithub.com/twolfson/gittip-badge/0.2.0/dist/gittip.png)](https://www.gittip.com/trommel)
327
+
328
+
329
+ licensing
330
+ ---------
331
+
332
+ refer to
333
+ [LICENSE](https://github.com/trommel/oliver/blob/master/spec/LICENSE).
334
+
data/README.md CHANGED
@@ -3,117 +3,35 @@ oliver
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/oliver.svg)](http://badge.fury.io/rb/oliver)
5
5
 
6
- oliver manages your local GitHub
7
- repositories for you with a simple `.Olivefile.yml`.
6
+ oliver manages your local GitHub projects
7
+ in a simple YAML file.
8
8
 
9
- > "like podfiles, but for git repositories"
9
+ > "Like podfiles for Git repos."
10
10
  -- [@istx25](https://github.com/istx25)
11
11
 
12
- installation
12
+ Installation
13
13
  ------------
14
14
 
15
- oliver is a CLI that you can install
16
- through [RubyGems](https://rubygems.org/gems/oliver)
15
+ You can install oliver through [RubyGems](https://rubygems.org/gems/oliver)
17
16
 
18
17
  ```bash
19
18
  $ gem install oliver
20
19
  ```
21
20
 
22
- now, [skip the shit in this readme](https://github.com/trommel/oliver#docs)
23
-
24
- what the heck
25
- -------------
26
-
27
- users can then `git clone` a list of repos, easily,
28
- and delete tracked repos as well.
29
-
30
- think of this as a directory full of repos (that contain
31
- `.git` directories) that can be tracked.
32
-
33
- it's 1:05 AM right now, so this is probably just
34
- a silly idea that doesn't actually make any sense.
35
-
36
-
37
- idea
38
- ----
39
-
40
- managing an area where you keep local (cloned)
41
- Git repos is kind of annoying, and since everybody's
42
- making scripts and stuff to manage files, I thought
43
- "hey, why not make one for managing local git repos?"
44
-
45
- the plan is that the user is to have a single
46
- directory (stored wherever they want) that contains
47
- all of the different git repos they've cloned.
48
-
49
- for example (I might just make a "physical"
50
- demonstration of this in this repo):
51
-
52
- ```
53
- main_directory/
54
- |- git_project_1/
55
- |----- bin/
56
- |----- lib/
57
- |----- README.md
58
- |----- .git/
59
- |
60
- |- git_project_2/
61
- |----- bin/
62
- |----- lib/
63
- |----- README.md
64
- |----- .git/
65
- |
66
- |- git_project_3/
67
- |----- bin/
68
- |----- lib/
69
- |----- README.md
70
- |----- .git/
71
- ```
72
-
73
- and then, if you want to see
74
- all of the directories that
75
- you're tracking, you can run
76
- `oliver list`.
77
-
78
- you're probably thinking:
79
- *"can't I just run `ls` inside the directory
80
- and it'll do the same thing?"*, **and the
81
- answer to your question is _yes_**.
82
-
83
- I have no idea what I'm doing.
84
-
85
- ~~the thing that differentiates oliver with
86
- typical things (no examples..) is that
87
- it gives you access to the directory from
88
- anywhere.. which you could easily do with a public
89
- shell variable.~~
90
-
91
- > I have no idea what I'm doing.
92
-
93
-
94
- things I'm thinking so far
95
- --------------------------
96
-
97
- I'm not totally sure how this
98
- is going to work. here's what I do know:
99
-
100
- repos will be tracked and be kept in a list.
101
- users can add a repo to the list, remove the repo,
102
- view repos on the list and update the repo (essentially
103
- run `git pull` on each individual repo).
104
-
105
- docs
21
+ Documentation
106
22
  ----
107
23
 
108
- ### setup the repo
24
+ ### Example
109
25
 
110
- create the base `.Olivefile.yml`
26
+ Create the base `.Olivefile.yml`
111
27
 
112
28
  ```bash
29
+ $ cd projects
113
30
  $ olive init
31
+ $ $EDITOR .Olivefile.yml
114
32
  ```
115
-
116
- (and in the `.Olivefile.yml`)
33
+ and then add whatever you'd like to the
34
+ YAML file
117
35
 
118
36
  ```yaml
119
37
  ---
@@ -124,211 +42,78 @@ repos:
124
42
  istx25:
125
43
  - "Fluorescent"
126
44
  - "dotfiles"
127
- misc: # use the misc category for old syntax. these don't really work, yet
45
+ misc:
128
46
  - "trommel/calkoolator"
129
47
  ---
130
-
131
- # use 3 spaces for indentation, not tabs! :P
132
- # I spent, like, an hour trying to fix a non-existent bug because of this
133
- # smh so hard
134
- # by the way, this is YAML, for anyone interested
135
- # then again, you could just look at the code and determine that yourself
136
48
  ```
137
49
 
138
- you can also initialize the repo
139
- with a folder, if you want to skip a couple
140
- of steps (things surrounded by '[]' means
141
- that they're optional)
142
-
143
- ```bash
144
- $ olive init [-d|--directory] [directory name (defaulted to 'olives')]
145
- ```
50
+ - Remember to use spaces for indentation, not tabs.
51
+ - `Misc` is preferred syntax for use
52
+ when there's only one repo by an author in
53
+ your YAML file.
146
54
 
147
- ### install and/or remove listed repos
55
+ ### Initializing the root
148
56
 
149
57
  ```bash
150
- $ olive install
58
+ $ olive init [-d|--directory] [directory name (defaulted to 'olives')]
151
59
  ```
152
60
 
153
- ### clone and start tracking a repo
61
+ ### Clones/Remove repos based on YAML file
154
62
 
155
- this will add it to the tracking list
63
+ Clones repos listed in the YAML file and
64
+ removes ones saved locally that aren't found
65
+ in the file
156
66
 
157
67
  ```bash
158
- $ olive add username/repo
159
- ```
160
- ### remove (delete) and stop tracking a repo
161
-
162
- this will remove it from the tracking list
163
- and locally delete the repo
164
-
165
- ```bash
166
- $ olive remove username/repo
68
+ $ olive install
167
69
  ```
168
70
 
169
- ### list tracked repos
71
+ ### List tracked repos
170
72
 
171
- list all of the repos that're being tracked
73
+ List all of the repos that are being tracked
172
74
 
173
75
  ```bash
174
76
  $ olive list
175
77
  ```
176
78
 
177
- ### update (`git pull`) each repo
79
+ ### Update (`git pull`) each repo
178
80
 
179
- essentially `cd` into each individual
180
- repo and run `git pull`
81
+ Essentially run `git pull` in each
82
+ individual repo
181
83
 
182
84
  ```bash
183
85
  $ olive update
184
86
  ```
185
87
 
186
- extras
187
- ------
188
-
189
- ~~oliver uses [rainbow](https://github.com/sickill/rainbow),
190
- a sick gem / library for making Terminal all colourful and stuff.~~
191
-
192
- ~~it's pretty cool, but if you don't like it, just
193
- append `colour=off` to any statement~~
194
-
195
- ~~don't forget to spell *"colour"* **the proper way**.~~
196
-
197
- things to remember
198
- -----------------
199
-
200
- - run everything with `olive`, not `oliver`. "oliver" is the name
201
- of the project, `olive` is the name of the CLI.
202
-
203
- - if you want to clone a repo from somewhere other than GitHub (GitHub
204
- is defaulted), just use the full git URL instead of the simple
205
- `username/repo-name`, for example `git://projects.josh.com/oliver.git`.
88
+ Notes
89
+ -----
206
90
 
207
- - arguments after the actual arguments will be ignored, i.e.:
91
+ - Arguments after the actual arguments will be ignored, for example:
208
92
 
209
93
  ```bash
210
- # everything after -d will be ignored
211
- $ olive init -d hey here are more arguments
94
+ # everything after "repo_name" will be ignored
95
+ $ olive init -d repo_name here are more arguments
212
96
  ```
213
97
 
214
- branches
215
- -------
216
-
217
- (there may or may not be an unstable branch at the moment.
218
- I'm constantly adding it and deleting it. i won't push gems
219
- from the unstable branch, only from master.)
220
-
221
- I kept fixing bugs and then I would frantically
222
- push the fixes because I was worried people, if anyone actually
223
- uses oliver, would experience problems with it if I didn't push
224
- the fix immediately. the problem, obviously, with this
225
- is that I didn't catch other things I needed to fix, and now I have,
226
- like, a billion commits, even though most of them are just me changing
227
- the version variable.
228
-
229
- anyways, there's an [unstable](https://github.com/trommel/oliver/tree/unstable)
230
- branch, if you want to check it out.
231
- the official gem that's hosted on rubygems, though, is
232
- the gem of the master branch, and that's how it's going to stay.
233
-
234
- also, the unstable branch probably maybe won't work.
235
-
236
- there also might be a "clean" branch, which is basically a (possibly) outdated
237
- version of oliver that'll backup your directories when you run `olive install`
238
- (if the repo isn't on the list of repos to track). the master branch
239
- is now considered "unsafe", meaning that it will simply delete the repo
240
- if it's not on the list when `olive install` is run.
241
-
242
- this is probably maybe a bad idea, but it's a lot easier to maintain.
243
- if you don't like this, fix it, and make it work properly :)
244
-
245
- ideas
246
- -----
247
-
248
- refer to
249
- [IDEAS.md](https://github.com/trommel/oliver/blob/master/IDEAS.md).
250
-
251
- versions
252
- --------
253
-
254
- for some reason, I was using things like "1.5" as oliver's
255
- version for a bit, even though oliver isn't even finished (to
256
- even the help menu), so if you check the previous gem versions,
257
- the newest gem version is probably (maybe) smaller / below
258
- previous gem versions. this was me being silly and not thinking.
259
-
260
- as of right now (July 18, 2014, 6:19 PM), oliver's version
261
- is 0.1.5, and it will continue to build off from there.
262
-
263
- sorry about doing that silly thing.
264
-
265
- reference (mostly for me but kind of helpful if you don't want to go looking through code shit)
266
- --------------------------------------------
267
-
268
- `FileManager::YAML['repos']` is where you can reference the repos in the `.Olivefile.yml`
269
-
270
- you can use this by `require`ing `file_manager.rb` and then using modules and stuff
271
-
272
- for example,
273
-
274
- ```ruby
275
- require_relative '../file_manager'
276
-
277
- FileManager::YAML['repos'].map |username, repos| do
278
- puts username
279
- repos.each do |repo|
280
- puts repo
281
- end
282
- end
283
- ```
98
+ Extras
99
+ ------
284
100
 
285
- etcetera, etcetera
101
+ oliver uses [rainbow](https://github.com/sickill/rainbow), a gem for colouring the Terminal prompt.
102
+ If you want to use it, just prepend `colour=on` to any olive command.
286
103
 
287
- to do
104
+ To-Do
288
105
  -----
289
106
 
290
- there's no checkmarked things right now because i just made this list, please
291
- don't think i'm some unproductive asshole who does nothing all day or something
292
- idk
293
-
294
- - [ ] remake the help/info thing to be slimmer and look better
295
- - [ ] get `add` working
296
- - [ ] get `remove` working
297
- - [ ] fix bugs with `update` (tons)
298
- - [ ] fix bugs with `install` (not as many)
299
- - [ ] fix bugs with `list` (hardly any, afaik)
300
-
301
- known bugs
302
- ----------
303
-
304
- - for some reason, cloning private
305
- repos isn't working right now.
306
- I don't know why. Oliver uses standard
307
- git, so this shouldn't be an issue.
308
-
309
- testing
310
- -------
311
-
312
- refer to
313
- [TESTING.md](https://github.com/trommel/oliver/blob/master/spec/TESTING.md).
314
-
315
- contribution
316
- ------------
317
-
318
- refer to
319
- [CONTRIBUTING.md](https://github.com/trommel/oliver/blob/master/spec/CONTRIBUTING.md).
320
-
321
- if you think this is cool
322
- -------------------------
323
-
324
- I hate dropping a link for donations,
325
- but a dude's gotta eat.
107
+ - [ ] Remake the help/info thing to be slimmer & look better
108
+ - [ ] Fix bugs with..
109
+ - [ ] `update` (tons)
110
+ - [ ] `install` (not as many)
111
+ - [ ] `list` (hardly any, I think)
326
112
 
327
- [![Support via Gittip](https://rawgithub.com/twolfson/gittip-badge/0.2.0/dist/gittip.png)](https://www.gittip.com/trommel)
113
+ ##[ideas.md](https://github.com/trommel/oliver/blob/master/IDEAS.md)
328
114
 
115
+ ##[testing.md](https://github.com/trommel/oliver/blob/master/spec/TESTING.md)
329
116
 
330
- licensing
331
- ---------
117
+ ##[contribution.md](https://github.com/trommel/oliver/blob/master/spec/CONTRIBUTING.md)
332
118
 
333
- refer to
334
- [LICENSE](https://github.com/trommel/oliver/blob/master/spec/LICENSE).
119
+ ##[LICENSE](https://github.com/trommel/oliver/blob/master/spec/LICENSE)
@@ -1,46 +1,43 @@
1
1
  require_relative '../oliver_file_name'
2
2
  # Help the user with their heavy troubles
3
- def help
4
- helper = [
5
- [
6
- 'init',
7
- "initializes the main directory by creating a base dotfile"
8
- ],
9
-
10
- [
11
- 'install',
12
- "clones/removes repos if they're listed"
13
- ],
14
-
15
- [
16
- 'list',
17
- "list repos currently on #{Name::OLIVER}"
18
- ],
19
-
20
- [
21
- 'update',
22
- "pull updates from each tracked repo"
23
- ],
24
-
25
- [
26
- '-v',
27
- 'return oliver\'s version'
28
- ],
29
-
30
- [
31
- '-h',
32
- 'return this help menu'
33
- ]
3
+ helper = [
4
+ [
5
+ 'init',
6
+ "initializes the main directory by creating a base dotfile"
7
+ ],
8
+
9
+ [
10
+ 'install',
11
+ "clones/removes repos if they're listed"
12
+ ],
13
+
14
+ [
15
+ 'list',
16
+ "list repos currently on #{Name::OLIVER}"
17
+ ],
18
+
19
+ [
20
+ 'update',
21
+ "pull updates from each tracked repo"
22
+ ],
23
+
24
+ [
25
+ '-v',
26
+ 'return oliver\'s version'
27
+ ],
28
+
29
+ [
30
+ '-h',
31
+ 'return this help menu'
34
32
  ]
33
+ ]
35
34
 
36
- top_message = 'oliver - help / usage'
35
+ top_message = 'oliver - help / usage'
37
36
 
38
- puts Rainbow(top_message).red
39
- (top_message.length + 1).times { print Rainbow('=').yellow }
40
- puts
37
+ puts Rainbow(top_message).red
38
+ (top_message.length + 1).times { print Rainbow('=').yellow }
39
+ puts
41
40
 
42
- helper.map do |line, blurb|
43
- puts "#{Rainbow(line).green} # => #{Rainbow(blurb).blue}"
44
- end
45
- exit
41
+ helper.map do |line, blurb|
42
+ puts "#{Rainbow(line).green} # => #{Rainbow(blurb).blue}"
46
43
  end
@@ -79,7 +79,7 @@ end
79
79
  current_repos.each do |directory|
80
80
  unless listed_repos.to_s.include?(directory) &&
81
81
  File.directory?(directory)
82
- print "#{warning} Would you like to delete #{directory}/? (y/n): "
83
- FileUtils.rm_rf(directory) if STDIN.gets.chomp.downcase == 'y'
82
+ print "#{warning} Enter #{directory}'s name to delete it: "
83
+ FileUtils.rm_rf(directory) if STDIN.gets.chomp.downcase == directory
84
84
  end
85
85
  end
@@ -1,28 +1,42 @@
1
1
  # Require files
2
2
  require_relative 'oliver_file_name'
3
- require_relative 'argument_files/help'
3
+ require_relative 'version'
4
+
5
+ def help
6
+ require_relative 'argument_files/help'
7
+ end
4
8
 
5
9
  # Default options
6
10
  options = {
7
- :verbose => true,
8
- :silent => false,
9
- :directory => false
11
+ :verbose => true,
12
+ :silent => false,
13
+ :directory => false,
14
+ :colour => ARGV[-1] == '--color'
10
15
  }
11
16
 
12
- case ARGV[0].downcase
13
- when 'install'
14
- require_relative 'argument_files/install'
15
- when 'init'
16
- require_relative 'argument_files/init'
17
- when 'list'
18
- require_relative 'argument_files/list'
19
- when 'update'
20
- require_relative 'argument_files/update'
21
- when '-h' || '--help' || 'help'
17
+ # Enable/Disable Rainbow
18
+ Rainbow.enabled = options[:colour]
19
+
20
+ # Help if user doesn't specify proper arguments
21
+ if ARGV.empty? || (ARGV[0] && ARGV[-1]) == 'colour=on'
22
22
  help
23
- when '-v' || '--version' || 'version'
24
- puts "#{Rainbow('oliver').red} #{Rainbow("v#{Oliver::VERSION}").green}"
25
- exit
26
23
  else
27
- puts "#{Rainbow('Error').underline.red}: Unknown argument: #{ARGV[0]}"
24
+ # Case for arguments
25
+ case ARGV[0].downcase
26
+ when 'install'
27
+ require_relative 'argument_files/install'
28
+ when 'init'
29
+ require_relative 'argument_files/init'
30
+ when 'list'
31
+ require_relative 'argument_files/list'
32
+ when 'update'
33
+ require_relative 'argument_files/update'
34
+ when '-h' || '--help' || 'help'
35
+ help
36
+ when '-v' || '--version' || 'version'
37
+ puts "#{Rainbow('oliver').red} #{Rainbow("v#{Oliver::VERSION}").green}"
38
+ exit
39
+ else
40
+ puts "#{Rainbow('Error').underline.red}: Unknown argument: #{ARGV[0]}"
41
+ end
28
42
  end
@@ -1,5 +1,5 @@
1
1
  # The main module for
2
2
  # Oliver's version
3
3
  module Oliver
4
- VERSION = '1.8.8.5'
4
+ VERSION = '1.8.9'
5
5
  end
data/lib/oliver.rb CHANGED
@@ -1,13 +1,5 @@
1
1
  # Require files
2
2
  require 'rainbow'
3
- require_relative 'oliver/version'
4
- require_relative 'oliver/argument_files/help'
5
-
6
- # Provide help if no arguments are specified
7
- help && exit if ARGV[0].nil?
8
-
9
- # if the user wants to use rainbow
10
- Rainbow.enabled = true if ARGV[-1] == 'colour=on'
11
3
 
12
4
  # Arguments
13
5
  require_relative 'oliver/arguments'
data/oliver.gemspec CHANGED
@@ -17,6 +17,6 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.add_development_dependency 'bundler', '~> 1.6'
19
19
  gem.add_development_dependency 'rake'
20
- gem.add_dependency 'rainbow', '>= 2.0.0'
21
- gem.add_dependency 'git', '>= 1.2.8'
20
+ gem.add_dependency 'rainbow', '~> 2.0', '>= 2.0.0'
21
+ gem.add_dependency 'git', '~> 1.2', '>= 1.2.8'
22
22
  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.8.5
4
+ version: 1.8.9
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-27 00:00:00.000000000 Z
11
+ date: 2014-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -42,6 +42,9 @@ dependencies:
42
42
  name: rainbow
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.0'
45
48
  - - ">="
46
49
  - !ruby/object:Gem::Version
47
50
  version: 2.0.0
@@ -49,6 +52,9 @@ dependencies:
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '2.0'
52
58
  - - ">="
53
59
  - !ruby/object:Gem::Version
54
60
  version: 2.0.0
@@ -56,6 +62,9 @@ dependencies:
56
62
  name: git
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1.2'
59
68
  - - ">="
60
69
  - !ruby/object:Gem::Version
61
70
  version: 1.2.8
@@ -63,6 +72,9 @@ dependencies:
63
72
  prerelease: false
64
73
  version_requirements: !ruby/object:Gem::Requirement
65
74
  requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: '1.2'
66
78
  - - ">="
67
79
  - !ruby/object:Gem::Version
68
80
  version: 1.2.8
@@ -80,6 +92,7 @@ files:
80
92
  - Gemfile
81
93
  - IDEAS.md
82
94
  - LICENSE
95
+ - OLD_README.md
83
96
  - README.md
84
97
  - Rakefile
85
98
  - bin/olive