oliver 3.0.4 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -7
- data/lib/oliver.rb +2 -0
- data/lib/oliver/commands.rb +51 -1
- data/lib/oliver/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd9a793b77efeee8526fd3ae61c9b3f73d2830e0
|
4
|
+
data.tar.gz: 87cbf0608b5a56f5fd3919928e196f1375dba2e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9661039dec4fe55075988e9eabc6202ecd06395c529d59cd31709b3e8871743857a8b3a7e1340f9d7206e7726be271dd55cb9c184ff3802d6978f4d5d0b3a504
|
7
|
+
data.tar.gz: 3713ff2383755627724c6602cf6d4c33d56127a8d38c274b83ec8dda5e569c248a9492620f056b8f3ca4902970b5defde0ae19bca176b95d26160de183702390
|
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
oliver
|
2
2
|
======
|
3
3
|
|
4
|
-
[![Dependency Status](http://img.shields.io/gemnasium/probablyjosh/oliver.svg)](https://gemnasium.com/probablyjosh/oliver)
|
5
4
|
[![Gem Version](http://img.shields.io/gem/v/oliver.svg)](https://rubygems.org/gems/oliver)
|
6
5
|
[![License](http://img.shields.io/:license-mit-blue.svg)](http://probablyjosh.mit-license.org)
|
7
6
|
|
@@ -42,7 +41,7 @@ Documentation
|
|
42
41
|
Create an `.oliver` with the optional addition of username(s) and repo(s). The following will create a file with one user (trmml) and three repos belonging to that user (oliver, cameron, wobble)
|
43
42
|
|
44
43
|
```bash
|
45
|
-
oliver init trmml=oliver,cameron,wobble
|
44
|
+
oliver init trmml=oliver,cameron,wobble ravenpoetry=raven
|
46
45
|
|
47
46
|
less .oliver
|
48
47
|
```
|
@@ -50,11 +49,12 @@ less .oliver
|
|
50
49
|
```json
|
51
50
|
{
|
52
51
|
"trmml": [
|
53
|
-
"
|
54
|
-
"
|
52
|
+
"oliver",
|
53
|
+
"cameron",
|
54
|
+
"wobble"
|
55
55
|
],
|
56
|
-
"
|
57
|
-
"
|
56
|
+
"ravenpoetry": [
|
57
|
+
"raven"
|
58
58
|
]
|
59
59
|
}
|
60
60
|
```
|
@@ -65,6 +65,7 @@ Updates the local repos to match `.oliver`. Any repo that exists in `.oliver` th
|
|
65
65
|
|
66
66
|
```
|
67
67
|
oliver update # ==> Cloning trmml/oliver
|
68
|
+
...
|
68
69
|
```
|
69
70
|
|
70
71
|
### `oliver list`
|
@@ -83,6 +84,22 @@ Essentially `git pull` each repo.
|
|
83
84
|
oliver pull
|
84
85
|
```
|
85
86
|
|
86
|
-
|
87
|
+
### `oliver add [username/repo]`
|
88
|
+
|
89
|
+
Add repo to list.
|
90
|
+
|
91
|
+
```bash
|
92
|
+
oliver add 'trmml/oliver'
|
93
|
+
```
|
94
|
+
|
95
|
+
### `oliver remove [username/repo]`
|
96
|
+
|
97
|
+
Remove repo from list.
|
98
|
+
|
99
|
+
```bash
|
100
|
+
oliver remove 'trmml/oliver'
|
101
|
+
```
|
102
|
+
|
103
|
+
LICENSE
|
87
104
|
---------
|
88
105
|
[MIT](LICENSE).
|
data/lib/oliver.rb
CHANGED
@@ -28,6 +28,8 @@ module Oliver
|
|
28
28
|
when 'update' then Commands.update(args)
|
29
29
|
when 'list' then Commands.list(args)
|
30
30
|
when 'pull' then Commands.pull(args)
|
31
|
+
when 'add' then Commands.add(args)
|
32
|
+
when 'remove' then Commands.remove(args)
|
31
33
|
when 'help' then Commands.help
|
32
34
|
when 'version' then puts version
|
33
35
|
else
|
data/lib/oliver/commands.rb
CHANGED
@@ -56,6 +56,56 @@ Commands:\n
|
|
56
56
|
Helpers.install
|
57
57
|
end
|
58
58
|
|
59
|
+
def add(args)
|
60
|
+
if !Helpers.oliver_exists?
|
61
|
+
puts Helpers.log('.oliver does not exist', :error)
|
62
|
+
else
|
63
|
+
content = Helpers.file
|
64
|
+
|
65
|
+
args.each do |arg|
|
66
|
+
profile = arg.split('/')
|
67
|
+
username = profile[0]
|
68
|
+
repo = profile[1]
|
69
|
+
|
70
|
+
content[username].push(repo)
|
71
|
+
|
72
|
+
File.open('.oliver', 'w') do |f|
|
73
|
+
f.write(JSON.pretty_generate(content))
|
74
|
+
puts Helpers.log("#{repo} added", :success)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
def remove(args)
|
82
|
+
if !Helpers.oliver_exists?
|
83
|
+
puts Helpers.log('.oliver dose not exist', :error)
|
84
|
+
else
|
85
|
+
content = Helpers.file
|
86
|
+
|
87
|
+
args.each do |arg|
|
88
|
+
profile = arg.split('/')
|
89
|
+
username = profile[0]
|
90
|
+
repo = profile[1]
|
91
|
+
|
92
|
+
if content[username].include?(repo)
|
93
|
+
# good
|
94
|
+
index = content[username].index(repo)
|
95
|
+
content[username].delete_at(index)
|
96
|
+
|
97
|
+
File.open('.oliver', 'w') do |f|
|
98
|
+
f.write(JSON.pretty_generate(content))
|
99
|
+
puts Helpers.log("#{repo} removed", :success)
|
100
|
+
end
|
101
|
+
else
|
102
|
+
puts Helpers.log("#{repo} is not listed")
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
59
109
|
def list(args)
|
60
110
|
# check if listed and local (good)
|
61
111
|
# star if listed but not local
|
@@ -80,7 +130,7 @@ Commands:\n
|
|
80
130
|
# check if local repos are listed
|
81
131
|
# check remotes for fetch and push URL to add user in the future
|
82
132
|
if !Helpers.tracked_repos.include? repo
|
83
|
-
emblem = '✗'.colorize(:red)
|
133
|
+
emblem = '✗'.colorize(:red)
|
84
134
|
puts "#{emblem} #{repo}"
|
85
135
|
end
|
86
136
|
end
|
data/lib/oliver/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Version
|
2
|
-
VERSION = '
|
3
|
-
end
|
2
|
+
VERSION = '4.0.0'
|
3
|
+
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:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Trommel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
145
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.5.
|
146
|
+
rubygems_version: 2.5.1
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Manage your Git(Hub) repos/projects easier.
|