gill 1.0.0.rc.2 → 1.0.0.rc.4

Sign up to get free protection for your applications and to get access to all the features.
data/.yardopts CHANGED
@@ -1 +1 @@
1
- --markup markdown --title 'Gill Documentation' --protected --files ChangeLog.md,LICENSE.txt
1
+ --markup rdoc --title 'Gill Documentation' --protected --files LICENSE.txt
data/gill.gemspec CHANGED
@@ -5,17 +5,17 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gill}
8
- s.version = "1.0.0.rc.2"
8
+ s.version = "1.0.0.rc.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dustin Willis Webber"]
12
- s.date = %q{2010-07-30}
12
+ s.date = %q{2010-08-03}
13
13
  s.default_executable = %q{gill}
14
14
  s.description = %q{Gill is a simple Ruby app to help keep your git clones clean and organized.}
15
15
  s.email = %q{dustin.webber@gmail.com}
16
16
  s.executables = ["gill"]
17
17
  s.extra_rdoc_files = [
18
- "LICENSE",
18
+ "LICENSE.txt",
19
19
  "README.rdoc"
20
20
  ]
21
21
  s.files = [
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  ".specopts",
24
24
  ".yardopts",
25
25
  "Gemfile",
26
- "LICENSE",
26
+ "LICENSE.txt",
27
27
  "README.rdoc",
28
28
  "Rakefile",
29
29
  "bin/gill",
data/lib/gill/git.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'tempfile'
2
2
  module Gill
3
-
3
+
4
4
  class Git
5
5
  # Include the gill cache convenience methods.
6
6
  include Config::Cache
@@ -18,9 +18,9 @@ module Gill
18
18
  # The git uri for the repository
19
19
  #
20
20
  def initialize(category,folder,repo)
21
-
21
+
22
22
  @repo, @category, @folder = repo, category, folder
23
-
23
+
24
24
  if @category
25
25
  @category_path = File.join(Gill.config.source_path, @category)
26
26
  else
@@ -30,15 +30,15 @@ module Gill
30
30
  @category = basename(Gill.config.default_path)
31
31
  @category_path = File.join(Gill.config.source_path, @category)
32
32
  end
33
-
33
+
34
34
  if @folder
35
35
  @folder_path = File.join(@category_path, @folder)
36
36
  else
37
37
  @folder_path = @category_path
38
38
  end
39
-
39
+
40
40
  end
41
-
41
+
42
42
  # Update A Repository
43
43
  #
44
44
  # @param [String] branch
@@ -55,22 +55,17 @@ module Gill
55
55
  STDOUT.puts "Failed to update #{@folder.capitalize} successfully."
56
56
  end
57
57
  end
58
-
58
+
59
59
  # Update the gill cache after cloning a new repository.
60
60
  def build_cache
61
61
  updated_cache = Gill.config.cache
62
-
63
- if updated_cache.nil?
64
- updated_cache = updated_cache.merge!({:"#{@category}" => {:"#{@folder}" => { :repo => @repo, :path => @folder_path }}})
62
+
63
+ if updated_cache[:"#{@category}"]
64
+ updated_cache[:"#{@category}"] = updated_cache[:"#{@category}"].merge!({:"#{@folder}" => { :repo => @repo, :path => @folder_path }})
65
65
  else
66
-
67
- if updated_cache[:"#{@category}"]
68
- updated_cache[:"#{@category}"] = updated_cache[:"#{@category}"].merge!({:"#{@folder}" => { :repo => @repo, :path => @folder_path }})
69
- else
70
- updated_cache = updated_cache.merge!({:"#{@category}" => {:"#{@folder}" => { :repo => @repo, :path => @folder_path }}})
71
- end
72
-
66
+ updated_cache.merge!({:"#{@category}" => {:"#{@folder}" => { :repo => @repo, :path => @folder_path }}})
73
67
  end
68
+
74
69
  rebuild_cache(updated_cache,Gill.config.cache_path)
75
70
  end
76
71
 
@@ -78,41 +73,30 @@ module Gill
78
73
  #
79
74
  # @param [Boolean] make_folder
80
75
  # Pass false to ignore the creation of the passed gill folder
81
- #
76
+ #
82
77
  def build_type_folder(make_folder=true)
83
78
  unless File.directory?(@category_path)
84
79
  FileUtils.mkdir_p(@category_path)
85
- if make_folder
86
- unless File.directory?(@folder_path)
87
- FileUtils.mkdir_p(@folder_path)
88
- end
89
- end
90
80
  end
91
81
  end
92
-
82
+
93
83
  #
94
84
  # Clone the passed repository uri name.
95
85
  #
96
86
  def clone
97
-
98
- if File.directory?(@folder_path) && @folder
99
-
87
+
88
+ if File.directory?(@folder_path)
89
+
100
90
  raise(DirectoryError, "destination path '#{@folder_path}' already exists and is not an empty directory.")
101
-
91
+
102
92
  else
103
-
104
- if @folder
105
- build_type_folder
106
- build_cache if system('git', 'clone', @repo, @folder_path)
107
- else
108
- build_type_folder(false)
109
- Dir.chdir(@folder_path)
110
- build_cache if system('git', 'clone', @repo)
111
- end
93
+
94
+ build_type_folder
95
+ build_cache if system('git', 'clone', @repo, @folder_path)
112
96
 
113
97
  end
114
98
  end
115
-
99
+
116
100
  end
117
-
101
+
118
102
  end
data/lib/gill/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Gill
2
2
  # Gill Version
3
- VERSION = "1.0.0.rc.2" unless defined?(::Gill::VERSION)
3
+ VERSION = "1.0.0.rc.4" unless defined?(::Gill::VERSION)
4
4
  end
metadata CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
7
7
  - 0
8
8
  - 0
9
9
  - rc
10
- - 2
11
- version: 1.0.0.rc.2
10
+ - 4
11
+ version: 1.0.0.rc.4
12
12
  platform: ruby
13
13
  authors:
14
14
  - Dustin Willis Webber
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-07-30 00:00:00 -07:00
19
+ date: 2010-08-03 00:00:00 -04:00
20
20
  default_executable: gill
21
21
  dependencies: []
22
22
 
@@ -27,14 +27,14 @@ executables:
27
27
  extensions: []
28
28
 
29
29
  extra_rdoc_files:
30
- - LICENSE
30
+ - LICENSE.txt
31
31
  - README.rdoc
32
32
  files:
33
33
  - .gitignore
34
34
  - .specopts
35
35
  - .yardopts
36
36
  - Gemfile
37
- - LICENSE
37
+ - LICENSE.txt
38
38
  - README.rdoc
39
39
  - Rakefile
40
40
  - bin/gill
@@ -77,7 +77,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
- hash: 1109104530552266926
80
+ hash: -3170879872428078693
81
81
  segments:
82
82
  - 0
83
83
  version: "0"
File without changes