ngzip 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ ### 1.0.6 (2013-12-12)
2
+
3
+ * Fixed a regression from 1.0.5 where directories were included due to the changed pattern
4
+
5
+
1
6
  ### 1.0.5 (2013-12-12)
2
7
 
3
8
  * Fixed issue #2 (files without extensions being ignored)
@@ -75,7 +75,7 @@ module Ngzip
75
75
  def file_list(files)
76
76
  Array(files).map do |e|
77
77
  if File.directory?(e)
78
- Dir.glob("#{e}/**/*")
78
+ Dir.glob("#{e}/**/*").reject { |f| File.directory?(f) }
79
79
  else
80
80
  e
81
81
  end
@@ -1,3 +1,3 @@
1
1
  module Ngzip
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -0,0 +1 @@
1
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -15,6 +15,7 @@ describe Ngzip::Builder do
15
15
  let(:lorem) {File.expand_path('../../../data/a/lorem.txt', __FILE__)}
16
16
  let(:ipsum) {File.expand_path('../../../data/a/ipsum.txt', __FILE__)}
17
17
  let(:without_dot) {File.expand_path('../../../data/a/filename-without-a-dot', __FILE__)}
18
+ let(:my_file) {File.expand_path('../../../data/a/d/my_file.txt', __FILE__)}
18
19
  let(:whitespaced) {File.expand_path('../../../data/a/A filename with whitespace.txt', __FILE__)}
19
20
  let(:plused) {File.expand_path('../../../data/c/A filename with space and + in it.txt', __FILE__)}
20
21
  let(:cargo) {File.expand_path('../../../data/b/Cargo.png', __FILE__)}
@@ -62,6 +63,7 @@ describe Ngzip::Builder do
62
63
 
63
64
  it 'must return a correct list for all files in a directory' do
64
65
  expected = "8f92322f 446 #{URI.escape(whitespaced)} A filename with whitespace.txt"
66
+ expected << "\n8f92322f 446 #{my_file} d/my_file.txt"
65
67
  expected << "\n8f92322f 446 #{without_dot} filename-without-a-dot"
66
68
  expected << "\n8f92322f 446 #{ipsum} ipsum.txt"
67
69
  expected << "\n8f92322f 446 #{lorem} lorem.txt"
@@ -70,6 +72,7 @@ describe Ngzip::Builder do
70
72
 
71
73
  it 'must allow to mix files and directories' do
72
74
  expected = "8f92322f 446 #{URI.escape(whitespaced)} a/A filename with whitespace.txt"
75
+ expected << "\n8f92322f 446 #{my_file} a/d/my_file.txt"
73
76
  expected << "\n8f92322f 446 #{without_dot} a/filename-without-a-dot"
74
77
  expected << "\n8f92322f 446 #{ipsum} a/ipsum.txt"
75
78
  expected << "\n8f92322f 446 #{lorem} a/lorem.txt"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ngzip
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -63,6 +63,7 @@ files:
63
63
  - lib/ngzip/version.rb
64
64
  - ngzip.gemspec
65
65
  - test/data/a/A filename with whitespace.txt
66
+ - test/data/a/d/my_file.txt
66
67
  - test/data/a/filename-without-a-dot
67
68
  - test/data/a/ipsum.txt
68
69
  - test/data/a/lorem.txt
@@ -88,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
89
  version: '0'
89
90
  segments:
90
91
  - 0
91
- hash: 3162045522527369733
92
+ hash: 4602707169932349817
92
93
  required_rubygems_version: !ruby/object:Gem::Requirement
93
94
  none: false
94
95
  requirements:
@@ -97,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
98
  version: '0'
98
99
  segments:
99
100
  - 0
100
- hash: 3162045522527369733
101
+ hash: 4602707169932349817
101
102
  requirements: []
102
103
  rubyforge_project:
103
104
  rubygems_version: 1.8.25
@@ -106,6 +107,7 @@ specification_version: 3
106
107
  summary: Provides a nginx mod_zip compatible file manifest for streaming support
107
108
  test_files:
108
109
  - test/data/a/A filename with whitespace.txt
110
+ - test/data/a/d/my_file.txt
109
111
  - test/data/a/filename-without-a-dot
110
112
  - test/data/a/ipsum.txt
111
113
  - test/data/a/lorem.txt