gitlab-grit 2.6.1 → 2.6.2

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: af275c881c0a7a0f9b5bd97093b3817ed9208a7b
4
- data.tar.gz: a8a61cbffd8d271e4dcb03e5ba096aad81620c77
3
+ metadata.gz: 51dd36ad6344dca95142a1b1aad17b57fb215332
4
+ data.tar.gz: 6f61c249d2f98c60da293ab78a5202b69544039c
5
5
  SHA512:
6
- metadata.gz: 20070e9bea6fb2278b24b48574f12a6101363feadef525eb80058a57700753f0108b8db66849ca8fbd1b5484581758174595a2138f6a13cb347f53b02d00ce55
7
- data.tar.gz: 65ff74cd753406728149809b196ff2fe2e281d4539f7c533d1054e5aa43098b6c3373a80055bee588e3ad918bda2642b9bf3165b7a05818f46a9384c0d106933
6
+ metadata.gz: 1bbd77f134862fcc323a21eaf15821e088011210c4c74e514429311bbe1642c7a3b75f9eeb8e19be7c71dfce694f6db6b41787037960f68c21cb00ebada28a22
7
+ data.tar.gz: 939277d6a7f2f010ca0c34f7c7ca7e40c71868bfa099c687fe225e30bec380809acd67bd04e1f17f76b1a0cdfd4fedda3697dd2aecfd873ed0dd52ed0364b9de
@@ -125,6 +125,11 @@ module Grit
125
125
  end
126
126
  end
127
127
 
128
+ # Filenames can have weird characters that throw grit's text parsing
129
+ def safe_name
130
+ name.gsub(/[\r\n\0]/, '')
131
+ end
132
+
128
133
  def type
129
134
  case @mode & S_IFMT
130
135
  when S_IFGITLINK
@@ -223,7 +228,7 @@ module Grit
223
228
  def raw_content
224
229
  # TODO: sort correctly
225
230
  #@entry.sort { |a,b| a.name <=> b.name }.
226
- @entry.collect { |e| [[e.format_mode, e.format_type, e.sha1].join(' '), e.name].join("\t") }.join("\n")
231
+ @entry.collect { |e| [[e.format_mode, e.format_type, e.sha1].join(' '), e.safe_name].join("\t") }.join("\n")
227
232
  end
228
233
 
229
234
  def actual_raw
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-grit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-10-31 00:00:00.000000000 Z
13
+ date: 2013-11-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: charlock_holmes