jbox-gitolite 1.1.6 → 1.1.7

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: 9d651fbaf5d5db7cca96889a86d1accfc5b6b59d
4
- data.tar.gz: 7600969d8420ebc9279f06b9e166041201ccaacf
3
+ metadata.gz: 714f2e33bc4c882682680b711ee0b0022f636868
4
+ data.tar.gz: 258f25b13f3d90650b5c4249ba1670e07696512c
5
5
  SHA512:
6
- metadata.gz: 9f12c7a03c8e2457f9d9cb29996779457bd950b9630261d1cfba72fff30a321f03878a645f66bfe0c357a86488d82fea0eee236f1cf9cdf1b3b98aa7b0c5c4b0
7
- data.tar.gz: 08e2ea510c5b81ef925bba172e2c978643a2dc854a219c6536143a6ebd364ba4cc5e46193d83b12860abc1df81e45143cc2a1d6b7eb5792c2ded41d8eb676346
6
+ metadata.gz: 07f630087ad97757d6915962f17cada1d53c674b562e065abe9277c463db8303f5f25bea0b70046e2f9c3a4c62ac85296f4910c8cfab3b84458bcb519a79ad1a
7
+ data.tar.gz: 73901f8a5198a0bcfbbb5ac58b42acb6c47f08fadfb11414772319003193f2e2f287ea67b065dcd4f0f2538ae6541ccbc05afa68b6f6ac97cbb0183ac64cd0e4
data/gitolite.gemspec CHANGED
@@ -22,7 +22,6 @@ Gem::Specification.new do |s|
22
22
  s.add_development_dependency "rake", "~> 10.0.2"
23
23
 
24
24
  s.add_dependency "gitlab-grit", "~> 2.6.0"
25
- s.add_dependency "hashery", "~> 1.5.0"
26
25
  s.add_dependency "gratr19", "~> 0.4.4.1"
27
26
 
28
27
  s.files = `git ls-files`.split("\n")
@@ -11,7 +11,7 @@ module Gitolite
11
11
  #Store the perm hash in a lambda since we have to create a new one on every deny rule
12
12
  #The perm hash is stored as a 2D hash, with individual permissions being the first
13
13
  #degree and individual refexes being the second degree. Both Hashes must respect order
14
- @perm_hash_lambda = lambda { OrderedHash.new {|k,v| k[v] = OrderedHash.new{|k2, v2| k2[v2] = [] }} }
14
+ @perm_hash_lambda = lambda { Hash.new {|k,v| k[v] = Hash.new{|k2, v2| k2[v2] = [] }} }
15
15
  @permissions = Array.new.push(@perm_hash_lambda.call)
16
16
 
17
17
  @name = name
@@ -62,7 +62,7 @@ module Gitolite
62
62
 
63
63
  #Writes all changed aspects out to the file system
64
64
  #will also stage all changes
65
- def save
65
+ def save(commit_message)
66
66
  confdir = File.join(@gl_admin.working_dir, @confdir)
67
67
  keydir = File.join(@gl_admin.working_dir, @keydir)
68
68
 
@@ -91,6 +91,8 @@ module Gitolite
91
91
  end
92
92
  end
93
93
  end
94
+
95
+ @gl_admin.commit_index(commit_message)
94
96
  end
95
97
 
96
98
  # This method will destroy all local tracked changes, resetting the local gitolite
@@ -111,20 +113,15 @@ module Gitolite
111
113
  @config = load_config
112
114
  end
113
115
 
114
- #commits all staged changes and pushes back
115
- #to origin
116
- #
117
- #TODO: generate a better commit message
118
- #TODO: add the ability to specify the remote and branch
119
- #TODO: detect existance of origin instead of just dying
120
- def apply(commit_message = DEFAULT_COMMIT_MSG)
121
- @gl_admin.commit_index(commit_message)
122
- @gl_admin.git.push({}, "origin", "master")
116
+ # Push back to origin
117
+ def apply
118
+ @gl_admin.git.native(:push, {:chdir => @gl_admin.working_dir}, "origin", "master")
123
119
  end
124
120
 
121
+ # Commits all staged changes and pushes back to origin
125
122
  def save_and_apply(commit_message = DEFAULT_COMMIT_MSG)
126
- self.save
127
- self.apply(commit_message)
123
+ self.save(commit_message)
124
+ self.apply
128
125
  end
129
126
 
130
127
  # Updates the repo with changes from remote master
@@ -188,7 +185,7 @@ module Gitolite
188
185
  keys = Hash.new {|k,v| k[v] = DirtyProxy.new([])}
189
186
 
190
187
  list_keys(path).each do |key|
191
- new_key = SSHKey.from_file(File.join(path, key))
188
+ new_key = SSHKey.from_file(key)
192
189
  owner = new_key.owner
193
190
 
194
191
  keys[owner] << new_key
@@ -205,7 +202,7 @@ module Gitolite
205
202
  end
206
203
 
207
204
  def list_keys(path)
208
- keys = %x[ find #{path} -name "\*.pub" -type f -exec basename {} \\; ].chomp.split("\n")
205
+ keys = Dir.glob(path + '/**/*.pub')
209
206
  keys
210
207
  end
211
208
  end
@@ -1,3 +1,3 @@
1
1
  module Gitolite
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jbox-gitolite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Rodriguez
@@ -94,20 +94,6 @@ dependencies:
94
94
  - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: 2.6.0
97
- - !ruby/object:Gem::Dependency
98
- name: hashery
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ~>
102
- - !ruby/object:Gem::Version
103
- version: 1.5.0
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ~>
109
- - !ruby/object:Gem::Version
110
- version: 1.5.0
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: gratr19
113
99
  requirement: !ruby/object:Gem::Requirement