doo_dah 0.3.0 → 0.4.0

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
@@ -4,16 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{doo_dah}
8
- s.version = "0.3.0"
7
+ s.name = "doo_dah"
8
+ s.version = "0.4.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Collas"]
12
- s.date = %q{2012-06-22}
13
- s.description = %q{ This gem creates zip files using the STORE method - i.e. with no compression. This enables the generation of
14
- zip files with a known size from streamed data, providing the size of the input files is known.
15
- }
16
- s.email = %q{mcollas@yahoo.com}
12
+ s.date = "2014-02-14"
13
+ s.description = " This gem creates zip files using the STORE method - i.e. with no compression. This enables the generation of\n zip files with a known size from streamed data, providing the size of the input files is known. \n"
14
+ s.email = "mcollas@yahoo.com"
17
15
  s.extra_rdoc_files = [
18
16
  "README"
19
17
  ]
@@ -42,10 +40,10 @@ Gem::Specification.new do |s|
42
40
  "spec/zip_header_spec.rb",
43
41
  "spec/zip_output_stream_spec.rb"
44
42
  ]
45
- s.homepage = %q{http://github.com/michaelcollas/doo_dah}
43
+ s.homepage = "http://github.com/michaelcollas/doo_dah"
46
44
  s.require_paths = ["lib"]
47
- s.rubygems_version = %q{1.5.2}
48
- s.summary = %q{Creates zip files suitable for streaming.}
45
+ s.rubygems_version = "1.8.23"
46
+ s.summary = "Creates zip files suitable for streaming."
49
47
 
50
48
  if s.respond_to? :specification_version then
51
49
  s.specification_version = 3
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'rubygems'
2
4
  require 'doo_dah'
3
5
  require 'zlib'
@@ -54,7 +54,7 @@ module DooDah
54
54
  end
55
55
 
56
56
  def self.name_size(name)
57
- name.length
57
+ name.bytesize
58
58
  end
59
59
 
60
60
  def write_common_header()
@@ -69,7 +69,7 @@ module DooDah
69
69
  crc,
70
70
  size, # compressed_size = size (stored)
71
71
  size,
72
- name ? name.length : 0,
72
+ name ? name.bytesize : 0,
73
73
  0 # extra length
74
74
  ].pack('vvvvvVVVvv'))
75
75
  end
@@ -1,4 +1,4 @@
1
- $KCODE = 'U'
1
+ $KCODE = 'U' if RUBY_VERSION < '1.9.0'
2
2
  require 'zlib'
3
3
 
4
4
  module DooDah
@@ -1,4 +1,5 @@
1
1
  $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..'))
2
3
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
4
  require 'rubygems'
4
5
  require 'doo_dah'
@@ -68,8 +68,10 @@ module DooDah
68
68
  written[18, 4].should have_bytes(0x64, 0x53, 0x42, 0x31)
69
69
  end
70
70
 
71
- it 'should write the length of the file name in the two bytes starting at byte 22' do
72
- @header.stub(:name => 'x' * 258)
71
+ it 'should write the byte length of the file name in the two bytes starting at byte 22' do
72
+ multiply_character_string = [0xC3, 0x97].pack('C*')
73
+ multiply_character_string.force_encoding('utf-8') if RUBY_VERSION >= '1.9.0'
74
+ @header.stub(:name => multiply_character_string * 129)
73
75
  @header.write_common_header
74
76
  written[22, 2].should have_bytes(0x02, 0x01)
75
77
  end
metadata CHANGED
@@ -1,80 +1,73 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: doo_dah
3
- version: !ruby/object:Gem::Version
4
- hash: 19
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.0
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 3
9
- - 0
10
- version: 0.3.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Michael Collas
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-06-22 00:00:00 +10:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2014-02-14 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: rspec
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 47
30
- segments:
31
- - 2
32
- - 8
33
- - 0
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
34
21
  version: 2.8.0
35
22
  type: :development
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: reek
39
23
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 2.8.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: reek
32
+ requirement: !ruby/object:Gem::Requirement
41
33
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 15
46
- segments:
47
- - 1
48
- - 2
49
- - 8
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
50
37
  version: 1.2.8
51
38
  type: :development
52
- version_requirements: *id002
53
- - !ruby/object:Gem::Dependency
54
- name: sexp_processor
55
39
  prerelease: false
56
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
57
41
  none: false
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- hash: 15
62
- segments:
63
- - 3
64
- - 0
65
- - 4
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.2.8
46
+ - !ruby/object:Gem::Dependency
47
+ name: sexp_processor
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
66
53
  version: 3.0.4
67
54
  type: :development
68
- version_requirements: *id003
69
- description: " This gem creates zip files using the STORE method - i.e. with no compression. This enables the generation of\n zip files with a known size from streamed data, providing the size of the input files is known. \n"
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 3.0.4
62
+ description: ! " This gem creates zip files using the STORE method - i.e. with
63
+ no compression. This enables the generation of\n zip files with a known size
64
+ from streamed data, providing the size of the input files is known. \n"
70
65
  email: mcollas@yahoo.com
71
66
  executables: []
72
-
73
67
  extensions: []
74
-
75
- extra_rdoc_files:
68
+ extra_rdoc_files:
76
69
  - README
77
- files:
70
+ files:
78
71
  - .rspec
79
72
  - README
80
73
  - Rakefile
@@ -98,39 +91,28 @@ files:
98
91
  - spec/zip_entry_spec.rb
99
92
  - spec/zip_header_spec.rb
100
93
  - spec/zip_output_stream_spec.rb
101
- has_rdoc: true
102
94
  homepage: http://github.com/michaelcollas/doo_dah
103
95
  licenses: []
104
-
105
96
  post_install_message:
106
97
  rdoc_options: []
107
-
108
- require_paths:
98
+ require_paths:
109
99
  - lib
110
- required_ruby_version: !ruby/object:Gem::Requirement
100
+ required_ruby_version: !ruby/object:Gem::Requirement
111
101
  none: false
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- hash: 3
116
- segments:
117
- - 0
118
- version: "0"
119
- required_rubygems_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
120
107
  none: false
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- hash: 3
125
- segments:
126
- - 0
127
- version: "0"
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
128
112
  requirements: []
129
-
130
113
  rubyforge_project:
131
- rubygems_version: 1.5.2
114
+ rubygems_version: 1.8.23
132
115
  signing_key:
133
116
  specification_version: 3
134
117
  summary: Creates zip files suitable for streaming.
135
118
  test_files: []
136
-