oliver 2.3.1 → 3.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 12e16a94eb0b3fc9a78fa41effafbdd725674522
4
- data.tar.gz: 6028fb2a025d624c8de041e901f2a8bc6d78f7c9
3
+ metadata.gz: 078daf1b4ed6c5f58f39156d61bb4545ffd99811
4
+ data.tar.gz: 2a3fe8e9b9e1ed5d8fda8dab840c88e9db5e1bee
5
5
  SHA512:
6
- metadata.gz: 90f9293ccfc0ff8bf8f7baea47c5f24299c023b488e628f28c270be21d47704c898f864f447420f21859359573bcb12b11abdf80c785cab2234654f8aee55d6c
7
- data.tar.gz: e512ce697f569bbaaeadb410b32c0f30687e7d7c8bf7fc2fcea79be38fec22479744d05067724f4b3a35f9743fd3de19a55fecb5dffef08df6ac59c7b4febdff
6
+ metadata.gz: 3778c771aded393c46871eb28028842be5896bc79b654893ccf9fb64015087299ffaa661b318f74cfc4a0090c81251b1675cdcfef559459605d6982657081e9e
7
+ data.tar.gz: 7de66347b5ed013937231a638048f018dc0ead549313820c71cc2a7ebe06ced626e861787addf98134784b9321f1e83f39c89a6f1ab20e75deed0af6706200d2
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015 Josh Trommel
3
+ Copyright (c) 2016 Josh Trommel
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  oliver
2
2
  ======
3
3
 
4
- [![Dependency Status](http://img.shields.io/gemnasium/trommel/oliver.svg)](https://gemnasium.com/trommel/oliver)
4
+ [![Dependency Status](http://img.shields.io/gemnasium/probablyjosh/oliver.svg)](https://gemnasium.com/probablyjosh/oliver)
5
5
  [![Gem Version](http://img.shields.io/gem/v/oliver.svg)](https://rubygems.org/gems/oliver)
6
- [![License](http://img.shields.io/:license-mit-blue.svg)](http://trommel.mit-license.org)
6
+ [![License](http://img.shields.io/:license-mit-blue.svg)](http://probablyjosh.mit-license.org)
7
7
 
8
+ oliver keeps track of your git repos in one simple dotfile, making it easy to keep track of the projects you're working on.
8
9
 
9
- oliver manages your local GitHub projects in one simple file. It's like
10
- [CocoaPod's](http://cocoapods.org/) "podfiles", but for your Git repos.
10
+ > "[CocoaPods](http://cocoapods.org/) for your git repos."
11
11
 
12
12
  Installation
13
13
  ------------
@@ -18,106 +18,71 @@ You can install oliver through [RubyGems](https://rubygems.org/gems/oliver)
18
18
  $ gem install oliver
19
19
  ```
20
20
 
21
- Documentation
22
- ----
23
-
24
- ### Example
25
-
26
- Create the base `.oliver`
21
+ Syntax
22
+ -------
27
23
 
28
- ```bash
29
- $ cd projects
30
- $ olive init
31
- $ $EDITOR .oliver
32
- ```
33
- and then add whatever you'd like to the file (write in JSON)
24
+ Write in JSON, and format `.oliver` with the GitHub username as the key and the repos in an array as the value.
34
25
 
35
26
  ```json
36
27
  {
37
- "trommel": [
38
- "oliver",
39
- "textymous"
28
+ "trmml": [
29
+ "oliver", "textymous"
40
30
  ],
41
- "istx25": [
42
- "Fluorescent",
43
- "dotfiles"
44
- ],
45
- "Braeden-Mayer": [
46
- "Top-Hat"
31
+ "madebybright": [
32
+ "Nimble", "madebybright.github.io"
47
33
  ]
48
34
  }
49
35
  ```
50
36
 
51
- ### Initializing the root
37
+ Documentation
38
+ -------------
39
+
40
+ ### `oliver init [username=repos]`
52
41
 
53
- Creates the base `.oliver` file
42
+ 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)
54
43
 
55
44
  ```bash
56
- $ olive init
57
- $ cat .oliver
45
+ oliver init trmml=oliver,cameron,wobble
46
+
47
+ less .oliver
58
48
  ```
59
49
 
60
50
  ```json
61
51
  {
62
- "trommel": [
52
+ "trmml": [
53
+ "textymous",
63
54
  "oliver"
55
+ ],
56
+ "madebybright": [
57
+ "nimble"
64
58
  ]
65
59
  }
66
60
  ```
67
61
 
68
- ### Clone/Remove repos based on `.olive`
62
+ ### `oliver update`
69
63
 
70
- Clones repos listedy and
71
- removes ones saved locally that aren't found
72
- in the file. Careful removing directories from the list because
73
- [Olive will delete them without a second thought](#to-do).
64
+ Updates the local repos to match `.oliver`. Any repo that exists in `.oliver` that doesn't exist locally will be cloned, and any repo that exists locally but not in `.oliver` will be removed.
74
65
 
75
- ```bash
76
- $ olive install
66
+ ```
67
+ oliver update # ==> Cloning trmml/oliver
77
68
  ```
78
69
 
79
- ### List tracked repos
70
+ ### `oliver list`
80
71
 
81
- List all of the repos that are being tracked
72
+ List all tracked repos.
82
73
 
83
74
  ```bash
84
- $ olive list
75
+ oliver list # - oliver, wobble, nimble, raven
85
76
  ```
86
77
 
87
- The + (plus sign) next to the repo shows that it'll be cloned on the next
88
- `olive install`. The # (pound sign) next to the repo
89
- means it'll remain unaffected.
78
+ ### `oliver pull`
90
79
 
91
- ### Pull/Update repos
92
-
93
- Essentially run `git pull` in each
94
- individual repo
80
+ Essentially `git pull` each repo.
95
81
 
96
82
  ```bash
97
- $ olive pull
98
- $ olive update # Either work, who cares
83
+ oliver pull
99
84
  ```
100
85
 
101
- To-Do
102
- -----
103
-
104
- - [x] Remake the help/info thing to be slimmer & look better
105
- - [x] Expand repo support to Git in general, not just GitHub
106
- - [ ] Add `.settings` file for better customization and easier options usage
107
- - [ ] In `.settings`, give option to enable a "safe barrier", essentially
108
- Oliver will prompt you before it removes any directory
109
- - [ ] Add support to `olive list` so that it'll list repos that're already cloned but not on the list (so the user knows that it's being removed on the next `olive install`)
110
- - [ ] Clean up the mess that is [`commands.rb`](https://github.com/trommel/oliver/blob/cleanup/lib/oliver/commands.rb)
111
- - [ ] Convert the argument parsing to [Clamp](https://github.com/mdub/clamp)
112
-
113
- Ideas
114
- -----
115
- Refer to [IDEAS.md](IDEAS.md).
116
-
117
- Contribution
118
- ------------
119
- Refer to [CONTRIBUTING.md](CONTRIBUTING.md).
120
-
121
86
  Licensing
122
87
  ---------
123
- Refer to [LICENSE](LICENSE).
88
+ [MIT](LICENSE).
data/bin/oliver CHANGED
@@ -1,2 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
- puts "Use the 'olive' binary"
2
+
3
+ lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
4
+ $LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
5
+
6
+ require 'oliver'
7
+ Oliver.run(*ARGV.map(&:downcase))
8
+
@@ -1,81 +1,33 @@
1
- require_relative 'oliver/hash'
2
1
  require_relative 'oliver/version'
2
+ require_relative 'oliver/helpers'
3
+ require_relative 'oliver/commands'
4
+ require 'colorize'
5
+ require 'json'
6
+ require 'git'
7
+ require 'fileutils'
3
8
 
4
- # Main Oliver module
5
9
  module Oliver
6
10
  module_function
7
11
 
8
- def command
9
- @command ||= ''
10
- end
11
-
12
12
  def run(*args)
13
13
  if args.empty?
14
- advice
14
+ Commands.help
15
15
  else
16
16
  process args
17
17
  end
18
18
  end
19
19
 
20
- def process(*args)
21
- # Address 'passing through methods' issues (nesting arrays)
22
- args = args.first
23
-
24
- # Store commands
25
- @command = ''
26
-
27
- # Get strings of keys of commands
28
- basicCommands = advice(silent:true).keys_to_s
29
-
30
- # Command-line arguments
31
- @options = { verbose: true }
32
-
33
- # Option parsing, essentially
34
- until args.empty?
35
- case arg = args.shift
36
- when '--silent' then @options[:verbose] = false
37
- when '--directory' then @options[:directory] = true
38
- when 'version', '--version' then puts "oliver v#{Oliver::Version::STRING}"
39
- when 'help', '--help' then advice
40
- when *basicCommands
41
- @command << arg + ' '
42
- else
43
- puts "Unknown command: #{arg}"
44
- advice
45
- # exit
46
- end
47
- end
48
-
49
- # Build the command and do what you must
50
- build @command unless @command.empty?
51
- end
52
-
53
- def advice(info={}) # since help is a Ruby keyword
54
- advice = {
55
- init: 'initializes the main directory by creating a base dotfile',
56
- install: 'clones/removes repos if they\'re listed',
57
- list: 'list user repos',
58
- pull: 'pull updates from each tracked repo',
59
- version: 'return the current version',
60
- help: 'return this help menu',
61
- }
62
-
63
- unless info[:silent]
64
- puts 'usage: olive [command] [arguments]'
65
- advice.map { |key, value| puts "#{key} \t#{value}" }
20
+ def process(args)
21
+ case arg = args.shift
22
+ when 'init' then Commands.init(args)
23
+ when 'update' then Commands.update(args)
24
+ when 'list' then Commands.list(args)
25
+ when 'pull' then Commands.pull(args)
26
+ when 'help' then Commands.help
27
+ when 'version' then puts "oliver version #{Version::VERSION}".colorize(:green)
28
+ else
29
+ puts "oliver: '#{arg}' is not a recognized command.".colorize(:red)
66
30
  end
67
-
68
- advice # Return advice
69
31
  end
70
32
 
71
- def build(commands)
72
- require_relative 'oliver/commands'
73
- @command = @command.split(' ')
74
- case @command.first
75
- when 'init' then init
76
- when 'install' then install
77
- when 'list' then list
78
- when 'pull', 'update' then pull
79
- else end
80
- end
81
33
  end
@@ -1,126 +1,88 @@
1
- require 'json'
2
- require 'git'
3
- require 'fileutils'
4
- require_relative 'file_name'
5
- require_relative 'file_manager'
6
-
7
- # Main commands
8
- module Oliver
9
- module_function
10
-
11
- def get_local_repos
12
- temp = []
13
- temp = Dir.entries('.').reject do |f|
14
- f['.'] || f['..'] || f[Oliver::NAME]
15
- end
16
- return temp.sort
17
- end
18
-
19
- def get_tracked_repos
20
- temp = []
21
- FileManager::BODY.map do |user, repo|
22
- temp << repo
23
- end
24
- return temp.sort.flatten
25
- end
26
-
27
- def init
28
- unless File.exists?(Oliver::NAME)
29
- File.open(Oliver::NAME, 'w') do |file|
30
- tempHash = { probablyjosh: ["oliver"] }
31
- file.write(JSON.pretty_generate(tempHash))
32
- puts "#{Oliver::NAME} created sucessfully" if @options[:verbose]
33
- end
34
- end
35
- end
36
-
37
- # I'm honestly ashamed of this piece of shit, it's hack as fuck
38
- def install
39
- unless FileManager::BODY.nil?
40
- FileManager::BODY.map do |user, repos|
41
- user ||= ''
42
- repos ||= []
43
-
44
- # Add options[:verbose] support as soon as this doesn't look awful
45
- unless user.empty? || repos.nil?
46
- repos.each do |repo|
47
-
48
- unless File.directory?(repo)
49
- puts "Cloning #{repo}/"
50
- if user.downcase == 'misc'
51
- cloned_repo = Git.clone(
52
- repo,
53
- repo.split('/').last
54
- )
55
- else
56
- cloned_repo = Git.clone(
57
- "https://github.com/#{user}/#{repo}",
58
- repo
59
- )
60
- end
61
-
62
- if !cloned_repo.nil?
63
- puts "Success: #{repo}/ has been cloned" if @options[:verbose]
64
- else
65
- puts "Warning: #{repo}/ failed to clone"
66
- end
67
-
68
- end
69
- end
70
- end
71
- end
72
-
73
- dirRepos = get_local_repos
74
- trackedRepos = get_tracked_repos
75
-
76
- unless dirRepos == trackedRepos
77
- dirRepos ||= []
78
- trackedRepos ||= []
79
- dirRepos -= trackedRepos
80
- unless dirRepos.empty?
81
- dirRepos.each do |dirRepo|
82
- puts "Removing #{dirRepo}" if @options[:verbose]
83
- FileUtils.rm_rf(dirRepo)
84
- end
85
- end
86
- end
87
-
88
- end
89
- end
90
-
91
- def list
92
- dirRepos = get_local_repos
93
- trackedRepos = get_tracked_repos
94
-
95
- # If repo exists in
96
- # - .oliver and in directory, print "#" (neutral)
97
- # - only .oliver, print "+" (clone)
98
- # - only directory, print "-" (remove)
99
-
100
- # If the repo is in both, print #
101
- dirRepos.each do |repo|
102
- puts "# #{repo}" if trackedRepos.include? repo
103
- end
104
-
105
- # If repo only exists in .oliver, print '+'
106
- dirRepos.each do |repo|
107
- puts "- #{repo}" unless trackedRepos.include? repo
108
- end
109
-
110
- # If repo only exists in directory, print '-'
111
- trackedRepos.each do |repo|
112
- puts "+ #{repo}" unless dirRepos.include? repo
113
- end
114
- end
115
-
116
- # Still buggy, afaik
117
- def pull
118
- dirs = Dir.glob('*').select { |f| File.directory? f }
119
- dirs.each do |dir|
120
- Dir.chdir(dir)
121
- `git pull` # Hacks
122
- # puts "#{dir}/ has been updated" unless pull.include? 'Already up-to-date'
123
- Dir.chdir('..')
124
- end
125
- end
1
+ module Commands
2
+ module_function
3
+
4
+ def help
5
+ commands = {
6
+ init: 'initializes the main directory by creating a base dotfile',
7
+ update: 'clones/removes repos if they\'re listed',
8
+ list: 'list user repos',
9
+ pull: 'pull updates from each tracked repo',
10
+ version: 'return the current version',
11
+ help: 'return this help menu',
12
+ }
13
+ text = <<-EOS
14
+ Usage:\n
15
+ \t#{'oliver'.colorize(:blue)} <command> [<args>]
16
+ Commands:\n
17
+ EOS
18
+ commands.map { |key, value| text += ("\t#{key}\t#{value}\n") }
19
+ puts text
20
+ end
21
+
22
+ def init(args)
23
+ template = {}
24
+ unless args.empty?
25
+ args.each do |pair|
26
+ # syntax: oliver init trmml=oliver,site,etc
27
+ buffer = pair.split('=')
28
+ username = buffer[0]
29
+ repos = buffer[1].split(',')
30
+ template[username] = repos
31
+ end
32
+ end
33
+ if Helpers.oliver_exists?
34
+ puts Helpers.log('.oliver exists', 'warning')
35
+ else
36
+ File.open('.oliver', 'w') do |f|
37
+ f.write(JSON.pretty_generate(template))
38
+ puts Helpers.log('.oliver created.', 'success')
39
+ end
40
+ end
41
+ end
42
+
43
+ def pull(args)
44
+ # array with all folders in directory
45
+ dirs = Dir.glob('*').select { |f| File.directory? f }
46
+ dirs.each do |dir|
47
+ g = Git.open(dir)
48
+ puts Helpers.log("Pulling #{dir}")
49
+ g.pull
50
+ end
51
+ puts Helpers.log('All repos updated successfully', 'success')
52
+ end
53
+
54
+ def update(args)
55
+ Helpers.remove
56
+ Helpers.install
57
+ end
58
+
59
+ def list(args)
60
+ # check if listed and local (good)
61
+ # star if listed but not local
62
+ # x if local but not listed
63
+ log('.oliver does not exist', 'error') unless Helpers.oliver_exists?
64
+ log('.oliver is empty', 'error') if Helpers.file.empty?
65
+
66
+ Helpers.file.map do |user, repos|
67
+ repos.each do |repo|
68
+ # repo is definitely listed at this point
69
+ if Helpers.local_repos.include? repo
70
+ emblem = '✓'.colorize(:green)
71
+ elsif !Helpers.local_repos.include? repo
72
+ emblem = '*'.colorize(:blue)
73
+ end
74
+
75
+ puts "#{emblem} #{user}/#{repo}"
76
+ end
77
+ end
78
+
79
+ Helpers.local_repos.each do |repo|
80
+ # check if local repos are listed
81
+ # check remotes for fetch and push URL to add user in the future
82
+ if !Helpers.tracked_repos.include? repo
83
+ emblem = '✗'.colorize(:red)
84
+ puts "#{emblem} #{repo}"
85
+ end
86
+ end
87
+ end
126
88
  end
@@ -0,0 +1,86 @@
1
+ module Helpers
2
+ module_function
3
+
4
+ def file
5
+ file = File.read('.oliver')
6
+ return JSON.parse(file)
7
+ end
8
+
9
+ def local_repos
10
+ folders = Dir.entries('.').reject do |folder|
11
+ folder['.'] || folder['..'] | folder['.oliver']
12
+ end
13
+ return folders.sort
14
+ end
15
+
16
+ def tracked_repos
17
+ tracked = []
18
+ file.map do |user, repos|
19
+ tracked.push(repos)
20
+ end
21
+ return tracked.sort.flatten
22
+ end
23
+
24
+ def oliver_exists?
25
+ File.exists?('.oliver')
26
+ end
27
+
28
+ def log(text, priority='normal')
29
+ message = "==> "
30
+ case priority
31
+ when 'normal'
32
+ message.colorize(:blue) + text
33
+ when 'warning'
34
+ message.colorize(:yellow) + text
35
+ when 'error'
36
+ message.colorize(:red) + text
37
+ exit
38
+ when 'success'
39
+ message.colorize(:green) + text
40
+ else
41
+ message.colorize(:blue) + text
42
+ end
43
+ end
44
+
45
+ def install
46
+ # install all repos on the list that aren't local
47
+ log('.oliver does not exist', 'error') unless oliver_exists?
48
+ log('.oliver is empty', 'error') if file.empty?
49
+
50
+ file.map do |user, repos|
51
+ repos.each do |repo|
52
+ url = 'https://github.com/'
53
+ endpoint = "#{user}/#{repo}"
54
+
55
+ if File.directory? repo
56
+ puts log("#{repo} already exists", 'warning')
57
+ else
58
+ begin
59
+ g = Git.clone(url + endpoint, repo, :path => '.')
60
+ puts log("#{repo} was cloned successfully", 'success') if File.directory? repo
61
+ rescue
62
+ puts log("#{repo} failed to clone", 'warning')
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+
69
+ def remove
70
+ # check local repos and remove them if they're not in tracked_repos
71
+ local_repos.each do |repo|
72
+ unless tracked_repos.include? repo
73
+ # remove repo
74
+ # check w user first!! be like, yo are you sure about this buddy
75
+ print log("Delete #{repo}? (y/n): ", 'warning')
76
+ response = STDIN.gets.chomp.downcase
77
+ if response == 'y'
78
+ puts log("Deleting #{repo}")
79
+ FileUtils.rm_rf(repo)
80
+ else
81
+ puts log("Keeping #{repo}")
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -1,8 +1,3 @@
1
- module Oliver
2
- module Version
3
- MAJOR = 2
4
- MINOR = 3
5
- PATCH = 1
6
- STRING = [MAJOR, MINOR, PATCH].compact.join('.')
7
- end
8
- end
1
+ module Version
2
+ VERSION = '3.0.0'
3
+ end
@@ -3,21 +3,22 @@ require File.expand_path('../lib/oliver/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.authors = ['Josh Trommel']
6
- gem.email = ['joshtrommel@gmail.com']
6
+ gem.email = 'joshtrommel@gmail.com'
7
7
  gem.description = 'Local Git(Hub) made easy.'
8
8
  gem.summary = 'Manage your Git(Hub) repos/projects easier.'
9
- gem.homepage = 'https://github.com/trommel/oliver'
9
+ gem.homepage = 'https://github.com/trmml/oliver'
10
10
  gem.licenses = ['MIT']
11
11
 
12
12
  gem.files = `git ls-files`.split($ORS)
13
- gem.executables = %w(olive oliver)
13
+ gem.executables = %w(oliver)
14
14
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
15
15
  gem.name = 'oliver'
16
16
  gem.require_paths = %w(oliver)
17
- gem.version = Oliver::Version::STRING
17
+ gem.version = Version::VERSION
18
18
 
19
19
  gem.add_development_dependency 'bundler', '~> 1.6'
20
20
  gem.add_development_dependency 'rake', '~> 10.4', '>= 10.4.2'
21
- gem.add_dependency 'git', '~> 1.2.9', '>= 1.2.8'
22
- gem.add_dependency 'json', '~> 1.8.2', '>= 1.8.0'
21
+ gem.add_runtime_dependency 'git', '~> 1.3', '>= 1.3.0'
22
+ gem.add_runtime_dependency 'json', '~> 1.8', '>= 1.8.3'
23
+ gem.add_runtime_dependency 'colorize', '~> 0.7.7', '>= 0.7.0'
23
24
  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: 2.3.1
4
+ version: 3.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: 2015-03-20 00:00:00.000000000 Z
11
+ date: 2016-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -50,73 +50,80 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.2.9
53
+ version: '1.3'
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: 1.2.8
56
+ version: 1.3.0
57
57
  type: :runtime
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: 1.2.9
63
+ version: '1.3'
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: 1.2.8
66
+ version: 1.3.0
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: json
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: 1.8.2
73
+ version: '1.8'
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 1.8.0
76
+ version: 1.8.3
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: 1.8.2
83
+ version: '1.8'
84
84
  - - ">="
85
85
  - !ruby/object:Gem::Version
86
- version: 1.8.0
86
+ version: 1.8.3
87
+ - !ruby/object:Gem::Dependency
88
+ name: colorize
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - "~>"
92
+ - !ruby/object:Gem::Version
93
+ version: 0.7.7
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 0.7.0
97
+ type: :runtime
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.7.7
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: 0.7.0
87
107
  description: Local Git(Hub) made easy.
88
- email:
89
- - joshtrommel@gmail.com
108
+ email: joshtrommel@gmail.com
90
109
  executables:
91
- - olive
92
110
  - oliver
93
111
  extensions: []
94
112
  extra_rdoc_files: []
95
113
  files:
96
114
  - ".gitignore"
97
115
  - ".rspec"
98
- - CONTRIBUTING.md
99
116
  - Gemfile
100
- - IDEAS.md
101
117
  - LICENSE
102
118
  - README.md
103
119
  - Rakefile
104
- - bin/olive
105
120
  - bin/oliver
106
- - community/README.md
107
- - community/iOS-external-libraries-istx25.json
108
- - community/main-repos-trommel.json
109
121
  - lib/oliver.rb
110
122
  - lib/oliver/commands.rb
111
- - lib/oliver/file_manager.rb
112
- - lib/oliver/file_name.rb
113
- - lib/oliver/hash.rb
114
- - lib/oliver/settings.rb
123
+ - lib/oliver/helpers.rb
115
124
  - lib/oliver/version.rb
116
125
  - oliver.gemspec
117
- - spec/oliver_spec.rb
118
- - spec/spec_helper.rb
119
- homepage: https://github.com/trommel/oliver
126
+ homepage: https://github.com/trmml/oliver
120
127
  licenses:
121
128
  - MIT
122
129
  metadata: {}
@@ -136,10 +143,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
143
  version: '0'
137
144
  requirements: []
138
145
  rubyforge_project:
139
- rubygems_version: 2.4.5
146
+ rubygems_version: 2.5.2
140
147
  signing_key:
141
148
  specification_version: 4
142
149
  summary: Manage your Git(Hub) repos/projects easier.
143
- test_files:
144
- - spec/oliver_spec.rb
145
- - spec/spec_helper.rb
150
+ test_files: []
@@ -1,8 +0,0 @@
1
- contribution
2
- ============
3
-
4
- there'll be more here when..
5
-
6
- yeah, I'm not too sure.
7
-
8
- in the mean time; PULL REQUESTS PULL REQUESTS PULL REQUESTS.
data/IDEAS.md DELETED
@@ -1,51 +0,0 @@
1
- ideas
2
- =====
3
-
4
- ideas that should or have already been implemented.
5
-
6
- - [x] ~~make the backup directory hidden (`.backup`)~~
7
-
8
- - [x] add silent mode (`--silent`) so commands will hide output
9
-
10
- - [x] when running `olive list`, list the repos that are currently in the directory against
11
- the repos that are currently being tracked. repos that are in both (the `Olivefile` and the current directory)
12
- should be listed as green (using rainbow), and directories that are only found in one of the two options
13
- will be listed as red.
14
-
15
- - [x] [Douglas](https://twitter.com/istx25) gave me this cool
16
- idea that [CocoaPods](https://github.com/CocoaPods/CocoaPods) uses, where
17
- you can run
18
-
19
- ```bash
20
- $ olive install
21
- ```
22
-
23
- it can not only install the repos on the list, but remove the repos
24
- that have been installed locally but are no longer on the list.
25
- this way, if you want to delete a bunch of repositories, you can simply
26
- remove them from the list and run
27
-
28
- ```bash
29
- $ olive install
30
- ```
31
-
32
- ~~I spent, like, 50 minutes on this and I can't figure out a good way
33
- to do it, though, so.. yeah~~
34
-
35
- ~~I'll add it as soon as I can figure it out.~~
36
-
37
- - [ ] when deleting repos check if everything's been pushed and only
38
- delete without prompting the user first if everything has. if there's still shit
39
- that hasn't been pushed ask the user and double check if they wanted
40
- to do all that work for nothin'
41
-
42
- - [ ] on `olive init` give an argument like `--user`/`--username`/`-u` followed
43
- by the user's GitHub username for easy initialization. after running
44
- `olive init -u trommel`, it would create a JSON file like this
45
-
46
- ```json
47
- {
48
- "trommel": [
49
- ]
50
- }
51
- ```
data/bin/olive DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
4
- $LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
5
-
6
- require 'oliver'
7
- Oliver.run(*ARGV.map(&:downcase))
@@ -1,16 +0,0 @@
1
- community
2
- =========
3
-
4
- there might be a time where you just want a ton
5
- of random iOS projects, or something.
6
-
7
- maybe you don't want to write out a long list of repos.
8
- thank the heavens for the community(!)
9
-
10
- hopefully people will start submitting their `.Olivefile`s
11
- and we can all collaborate and stuff. it (might) be cool :)
12
-
13
- if you want to be a part of this, just fork Oliver and add your
14
- Olivefile into this directory. name your Olivefile the category of
15
- what your Olivefile is for-what your GitHub username is.yml.
16
- for example, `ruby-projects-trommel.yml`
@@ -1,72 +0,0 @@
1
- {
2
- "samvermette": [
3
- "UIAlertView-Blocks",
4
- "Montreal-Collective",
5
- "SVSegmentedControl",
6
- "iOS-Simulator-Raindrop",
7
- "RaptureXML",
8
- "emphasize.js",
9
- "objc-geohash",
10
- "SVStatusHUD"
11
- ],
12
- "gcamp": [
13
- "services-to-omnifocus",
14
- "OpenTripPlanner",
15
- "github-omnifocus-sync"
16
- ],
17
- "TransitApp": [
18
- "SVProgressHUD",
19
- "SVHTTPRequest",
20
- "SVWebViewController"
21
- ],
22
- "misc": [
23
- "stefanceriu/SCSiriWaveformView",
24
- "KjulyKYCircleMenu",
25
- "chillok/AnimatedCircularCollectionMenu",
26
- "YoApp/hey",
27
- "opentripplanner/OpenTripPlanner",
28
- "ghvillasboas/CloudKitTest",
29
- "lovell/sharp",
30
- "davidluzgouveia/ParallaxScrolling",
31
- "ellisonleao/magictools",
32
- "buger/gor",
33
- "OpenRA/OpenRA",
34
- "cocos2d/cocos2d-x",
35
- "AdamsLair/duality",
36
- "quicksilver/Quicksilver",
37
- "muan/github-gmail",
38
- "AgileBits/onepassword-app-extension",
39
- "snowshoestamp/python_sdk",
40
- "abraham/twitteroauth",
41
- "rs/SDWebImage",
42
- "maddox/regexkit",
43
- "tonymillion/Reachability",
44
- "ole/OBGradientView",
45
- "stig/json-framework",
46
- "flori/json",
47
- "crino/instagram-ios-sdk",
48
- "dalexsoto/HardwareInfo",
49
- "nicklockwood/FXPageControl",
50
- "fhsjaagshs/FHSTwitterEngine",
51
- "enormego/EGOTableViewPullRefresh",
52
- "Darktt/DTAlertView",
53
- "kriskowal/transcode",
54
- "pokeb/asi-http-request",
55
- "Cue/CueTableReloader",
56
- "AFNetworking/AFNetworking",
57
- "yashigani/YSViewer",
58
- "nicklockwood/SwipeView",
59
- "CEWendel/SWTableViewCell",
60
- "stefanoa/SASlideMenu",
61
- "datwelk/RDRStickyKeyboardView",
62
- "MacMannes/MKInfoPanel",
63
- "jdg/MBProgressHUD",
64
- "JLZ/JZSwipeCell",
65
- "autresphere/ASDepthModal",
66
- "marshluca/PolylineDemo",
67
- "wit-ai/wit-ios-sdk",
68
- "koenbok/Framer",
69
- "mattdonnelly/Swifter",
70
- "cloudapp/api"
71
- ]
72
- }
@@ -1,19 +0,0 @@
1
- {
2
- "trommel": [
3
- "oliver", "site", "trommel.github.io", "shampoo", "dotfiles", "molly",
4
- "ebooks_tutorial", "ideas", "unswear", "extras", "treehouse", "lyrix",
5
- "rails-testing", "bobby", "elementic", "shelly", "make-ebooks", "cards",
6
- "mcdonalds", "10frank10_ebook", "rmv", "school", "yoga", "get-ebola",
7
- "how-to-be-an-asshole-on-someone-else-s-computer", "get-twitter-ebooks",
8
- "endure", "hidenewsstand", "love-moe", "storie", "textymous", "odot",
9
- "The-Nick-Pomes-Hot-Pockets-Story", "space", "rightNow", "musik",
10
- "gibberish", "random", "mathematicrobot", "hibbot", "lemonade",
11
- "whatstylersayingrightnow", "libretto", "arrg", "wikiconvert",
12
- "calkoolator", "10frank10_ebook",
13
- ],
14
- "coodles": ["josh-doodles", "brad-doodles"],
15
- "hellamoe": ["love-josh"],
16
- "musicalcomputergeek": ["hearingaid_"],
17
- "pickhardt": ["betty"],
18
- "blaise-io": ["xssnake"]
19
- }
@@ -1,12 +0,0 @@
1
- require 'json'
2
-
3
- # Reads and parses the .olive file
4
- module FileManager
5
- if File.file?(Oliver::NAME)
6
- body = File.read(Oliver::NAME)
7
- BODY = JSON.parse(body)
8
- else
9
- puts "#{Oliver::NAME} does not exist."
10
- BODY = nil
11
- end
12
- end
@@ -1,4 +0,0 @@
1
- # Oliver's file name that the user edits
2
- module Oliver
3
- NAME = '.oliver'
4
- end
@@ -1,10 +0,0 @@
1
- # Add a method to hash for easier conversion of keys to string
2
- class Hash
3
- def keys_to_s
4
- commands = keys.to_s
5
- commands.tr!(':', '')
6
- commands.tr!('[', '')
7
- commands.tr!(']', '')
8
- commands.split(', ')
9
- end
10
- end
@@ -1,14 +0,0 @@
1
- require 'yaml'
2
-
3
- # Load .settings.yml to get user settings set to default
4
- # For example, if the user specifies colour=on, do that by default
5
- # Make this short and concise if possible
6
-
7
- module SettingsManager
8
- settingsName = '.settings.yml'
9
- if File.file? settingsName
10
- body = File.read(settingsName)
11
- YAML = YAML.load(body)
12
- Rainbow.enabled = true if SettingsManager::YAML["colour"] == 'on'
13
- end
14
- end
@@ -1,20 +0,0 @@
1
- require 'spec_helper'
2
- require_relative '../lib/oliver'
3
-
4
- describe Oliver do
5
- before :each do
6
-
7
- describe "#new" do
8
- it "creates a new instance of oliver with no arguments" do
9
- Oliver.run(''))
10
- end
11
- end
12
-
13
- describe "#version" do
14
- it "returns the version" do
15
- Oliver.run('version')
16
- end
17
- end
18
-
19
- end
20
- end
@@ -1,91 +0,0 @@
1
- # This file was generated by the `rspec --init` command. Conventionally, all
2
- # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
- # The generated `.rspec` file contains `--require spec_helper` which will cause
4
- # this file to always be loaded, without a need to explicitly require it in any
5
- # files.
6
- #
7
- # Given that it is always loaded, you are encouraged to keep this file as
8
- # light-weight as possible. Requiring heavyweight dependencies from this file
9
- # will add to the boot time of your test suite on EVERY test run, even for an
10
- # individual file that may not need all of that loaded. Instead, consider making
11
- # a separate helper file that requires the additional dependencies and performs
12
- # the additional setup, and require it from the spec files that actually need
13
- # it.
14
- #
15
- # The `.rspec` file also contains a few flags that are not defaults but that
16
- # users commonly want.
17
- #
18
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
- RSpec.configure do |config|
20
- # rspec-expectations config goes here. You can use an alternate
21
- # assertion/expectation library such as wrong or the stdlib/minitest
22
- # assertions if you prefer.
23
- config.expect_with :rspec do |expectations|
24
- # This option will default to `true` in RSpec 4. It makes the `description`
25
- # and `failure_message` of custom matchers include text for helper methods
26
- # defined using `chain`, e.g.:
27
- # be_bigger_than(2).and_smaller_than(4).description
28
- # # => "be bigger than 2 and smaller than 4"
29
- # ...rather than:
30
- # # => "be bigger than 2"
31
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32
- end
33
-
34
- # rspec-mocks config goes here. You can use an alternate test double
35
- # library (such as bogus or mocha) by changing the `mock_with` option here.
36
- config.mock_with :rspec do |mocks|
37
- # Prevents you from mocking or stubbing a method that does not exist on
38
- # a real object. This is generally recommended, and will default to
39
- # `true` in RSpec 4.
40
- mocks.verify_partial_doubles = true
41
- end
42
-
43
- # The settings below are suggested to provide a good initial experience
44
- # with RSpec, but feel free to customize to your heart's content.
45
- =begin
46
- # These two settings work together to allow you to limit a spec run
47
- # to individual examples or groups you care about by tagging them with
48
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
49
- # get run.
50
- config.filter_run :focus
51
- config.run_all_when_everything_filtered = true
52
-
53
- # Limits the available syntax to the non-monkey patched syntax that is
54
- # recommended. For more details, see:
55
- # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
56
- # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
57
- # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
58
- config.disable_monkey_patching!
59
-
60
- # This setting enables warnings. It's recommended, but in some cases may
61
- # be too noisy due to issues in dependencies.
62
- config.warnings = true
63
-
64
- # Many RSpec users commonly either run the entire suite or an individual
65
- # file, and it's useful to allow more verbose output when running an
66
- # individual spec file.
67
- if config.files_to_run.one?
68
- # Use the documentation formatter for detailed output,
69
- # unless a formatter has already been configured
70
- # (e.g. via a command-line flag).
71
- config.default_formatter = 'doc'
72
- end
73
-
74
- # Print the 10 slowest examples and example groups at the
75
- # end of the spec run, to help surface which specs are running
76
- # particularly slow.
77
- config.profile_examples = 10
78
-
79
- # Run specs in random order to surface order dependencies. If you find an
80
- # order dependency and want to debug it, you can fix the order by providing
81
- # the seed, which is printed after each run.
82
- # --seed 1234
83
- config.order = :random
84
-
85
- # Seed global randomization in this process using the `--seed` CLI option.
86
- # Setting this allows you to use `--seed` to deterministically reproduce
87
- # test failures related to randomization by passing the same `--seed` value
88
- # as the one that triggered the failure.
89
- Kernel.srand config.seed
90
- =end
91
- end