oliver 1.7.1 → 1.7.2

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: afaedbe728c36e3d1940909c711ba421cb241054
4
- data.tar.gz: 915821dbaa27de4530325bec8f92d62141a10dbf
3
+ metadata.gz: a455aed1b36608bdb77e8ea7d91743dc3dcbfd1a
4
+ data.tar.gz: 2cdf9f5bc16b093d318441064ccf119593636e4c
5
5
  SHA512:
6
- metadata.gz: 2f21cda30a9eec7b3c0cbfb38c7ee675847fe8aefe65913acfd336890ad304ed8d4da39e5fb9de80e01c22f2675a2d3c4dbedc10f2e30f545649957a6e9ba0a4
7
- data.tar.gz: bc37c34cf69145540dd12418446f80d6fe9708f1cd19088c75807e0d933b8dc4b92f0ecceaaa624b32d1065863539333fa6ddf8249532ab4393530de70ea5304
6
+ metadata.gz: fda0c3d5755f1b2d0e90cb60f829d26ffbc6fded99655c6f281c2c37a9fd1795c82b5bde9557e3f745c10ab155b4f56228210864b1f23d0609fc7043370ed020
7
+ data.tar.gz: de49f5e598580be8834a82915689b1637ba208d7c6615255fc43628c7f648d32622b4be1a6d91d3df48959b3d0c4a700f7cef83bd8ee43664f6c3f4ebddb3c1c
data/README.md CHANGED
@@ -122,6 +122,8 @@ repos:
122
122
  istx25:
123
123
  - "Fluorescent"
124
124
  - "dotfiles"
125
+ misc: # use the misc category for old syntax
126
+ - "trommel/calkoolator"
125
127
  ---
126
128
 
127
129
  # use 3 spaces for indentation, not tabs! :P
@@ -0,0 +1,16 @@
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`
@@ -6,8 +6,13 @@ def init
6
6
  dir_name = ARGV[2]
7
7
  end
8
8
  if ARGV[1].downcase == '--directory' || ARGV[1].downcase == '-d'
9
- Dir.mkdir dir_name
10
- Dir.chdir(dir_name)
9
+ if !File.directory?(dir_name)
10
+ Dir.mkdir(dir_name)
11
+ Dir.chdir(dir_name)
12
+ else
13
+ puts "#{Rainbow('Error').underline.red}: #{dir_name}/ already exists."
14
+ exit
15
+ end
11
16
  puts "#{Rainbow(dir_name).green}/ has been created."
12
17
  end
13
18
  end
@@ -17,7 +22,9 @@ def init
17
22
  file.write("---\nrepos:\n")
18
23
  file.write(" trommel:\n - \"oliver\"\n---\n")
19
24
  dir_name = '.' if dir_name.nil?
20
- puts "#{Rainbow(dir_name).green}/#{Rainbow(Name::OLIVER).green} has been created."
25
+ green_dir_name = Rainbow(dir_name).green
26
+ green_oliver_file_name = Rainbow(Name::OLIVER).green
27
+ puts "#{green_dir_name}/#{green_oliver_file_name} has been created."
21
28
  end
22
29
  else
23
30
  puts "#{Rainbow(Name::OLIVER).red} already exists."
@@ -1,5 +1,6 @@
1
1
  def install
2
2
 
3
+ # Make these public later :P
3
4
  success = "#{Rainbow('Success').underline.green}:"
4
5
  warning = "#{Rainbow('Warning').underline.yellow}:"
5
6
  error = "#{Rainbow('Error').underline.red}:"
@@ -13,29 +14,52 @@ Try adding something to the list for the time being."
13
14
  exit
14
15
  end
15
16
 
17
+ # Create the empty listed_repos array for later
16
18
  listed_repos = []
19
+
20
+ # Map out the username and repos(array)
17
21
  $yaml['repos'].map do |username, repos|
18
- if repos.nil?
19
- puts "#{error} Your repos folder is empty..?"
22
+ # Exit with error if the username or repos is empty
23
+ if username.nil?
24
+ puts "#{error} Your usernames look a little nil."
20
25
  exit
21
26
  end
22
- repos.each do |repo|
23
- listed_repos.push(repo)
27
+ if repos.nil?
28
+ puts "#{error} Your repos look a little nil."
29
+ exit
24
30
  end
25
- end
26
-
27
- # Map out the username and repos(array)
28
- $yaml['repos'].map do |username, repos|
29
31
  # Assign individual repo from repos array
30
32
  repos.each do |repo|
31
- if !File.directory?(repo)
32
- `git clone git://github.com/#{username}/#{repo} --quiet`
33
+ # Add each repo to the listed_repos array
34
+ repos.each do |repo|
35
+ listed_repos.push(repo)
36
+ end
37
+ if username.downcase == 'misc'
38
+ split = repo.split('/')
39
+ if !File.directory?(split[1])
40
+ `git clone git://github.com/#{repo} --silent`
41
+ if File.directory?(split[1])
42
+ puts "#{success} #{split[1]}/ was cloned."
43
+ else
44
+ puts "#{error} #{split[1]} was not cloned."
45
+ end
46
+ end
47
+ exit
48
+ end
49
+ if !File.directory?(repo)
50
+ # Clone the repo if the directory doesn't already exist
51
+ `git clone git://github.com/#{username}/#{repo} --quiet`
33
52
  if File.directory?(repo)
53
+ # If the directory exists after the repo
54
+ # has been cloned, give a success message
34
55
  puts "#{success} #{repo}/ has been cloned."
35
56
  else
57
+ # If the directory doesn't exist after the
58
+ # has been cloned, give an error message
36
59
  puts "#{error} Cloning #{repo}/ failed."
37
60
  end
38
61
  else
62
+ # Give a warning message if the repo already exists
39
63
  puts "#{warning} #{repo}/ already exists."
40
64
  end
41
65
  end
@@ -51,9 +75,8 @@ Try adding something to the list for the time being."
51
75
  current_repos.each do |directory|
52
76
  unless listed_repos.to_s.include?(directory) &&
53
77
  File.directory?(directory)
54
- print "#{warning} Would you like to delete #{directory}/? (y/n) "
78
+ print "#{warning} Would you like to delete #{directory}/? (y/n): "
55
79
  `yes | rm -r #{directory}` if STDIN.gets.chomp.downcase == 'y'
56
80
  end
57
81
  end
58
-
59
82
  end
@@ -21,10 +21,8 @@ def list
21
21
  else
22
22
  print Rainbow(repo).red
23
23
  end
24
- if counter % 4 == 0
25
- print "\t"
26
- end
27
- counter =+ 1
24
+ print "\t" if counter % 4 == 0
25
+ counter += 1
28
26
  end
29
27
  puts
30
28
  end
@@ -1,5 +1,5 @@
1
1
  # The main module for
2
2
  # Oliver's version
3
3
  module Oliver
4
- VERSION = '1.7.1'
4
+ VERSION = '1.7.2'
5
5
  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: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh
@@ -72,6 +72,7 @@ files:
72
72
  - attempts/test.yml
73
73
  - bin/olive
74
74
  - bin/oliver
75
+ - community/README.md
75
76
  - lib/oliver.rb
76
77
  - lib/oliver/argument_files/add.rb
77
78
  - lib/oliver/argument_files/help.rb
@@ -85,9 +86,7 @@ files:
85
86
  - lib/oliver/oliver_file_name.rb
86
87
  - lib/oliver/version.rb
87
88
  - oliver.gemspec
88
- - run.rb
89
89
  - spec/TESTING.md
90
- - test.yml
91
90
  homepage: https://github.com/trommel/oliver
92
91
  licenses: []
93
92
  metadata: {}
data/run.rb DELETED
@@ -1,23 +0,0 @@
1
- require 'yaml'
2
-
3
- file = File.read('test.yml')
4
- $yaml = YAML.load(file)
5
-
6
- def clone
7
- $yaml['repos'].map do |username, repos|
8
- repos.each do |repo|
9
- if !File.directory?(repo)
10
- `git clone git://github.com/#{username}/#{repo} --quiet`
11
- if File.directory? repo
12
- puts "Successfully cloned #{username}/#{repo}."
13
- else
14
- puts "There was an error while cloning #{repo}."
15
- end
16
- else
17
- puts "#{repo} already exists."
18
- end
19
- end
20
- end
21
- end
22
-
23
- clone
data/test.yml DELETED
@@ -1,10 +0,0 @@
1
- ---
2
- repos:
3
- trommel:
4
- - "oliver"
5
- - "calkoolator"
6
-
7
- istx25:
8
- - "dotfiles"
9
- - "Fluorescent"
10
- ---