multipart-post 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ begin
4
4
  require 'hoe'
5
5
  require 'multipart_post'
6
6
 
7
- Hoe.plugin :gemcutter
7
+ Hoe.plugin :rubyforge
8
8
  hoe = Hoe.spec("multipart-post") do |p|
9
9
  p.version = MultipartPost::VERSION
10
10
  p.rubyforge_name = "caldersphere"
@@ -20,6 +20,6 @@ begin
20
20
  File.open("#{hoe.name}.gemspec", "w") {|f| f << hoe.spec.to_ruby }
21
21
  end
22
22
  task :package => :gemspec
23
- rescue LoadError
23
+ rescue LoadError
24
24
  puts "You really need Hoe installed to be able to package this gem"
25
25
  end
data/lib/composite_io.rb CHANGED
@@ -66,7 +66,9 @@ class UploadIO
66
66
  io = filename_or_io
67
67
  local_path = ""
68
68
  if io.respond_to? :read
69
- local_path = filename_or_io.path
69
+ # in Ruby 1.9.2, StringIOs no longer respond to path
70
+ # (since they respond to :length, so we don't need their local path, see parts.rb:41)
71
+ local_path = filename_or_io.respond_to?(:path) ? filename_or_io.path : "local.path"
70
72
  else
71
73
  io = File.open(filename_or_io)
72
74
  local_path = filename_or_io
@@ -12,7 +12,7 @@ class CompositeReadIOTest < Test::Unit::TestCase
12
12
  assert_equal 'the quick brown fox', @io.read
13
13
  end
14
14
 
15
- unless RUBY_VERSION < '1.9'
15
+ unless RUBY_VERSION < '1.9'
16
16
  def test_read_from_multibyte
17
17
  utf8 = File.open(File.dirname(__FILE__)+'/multibyte.txt')
18
18
  binary = StringIO.new("\x86")
@@ -21,7 +21,6 @@ class CompositeReadIOTest < Test::Unit::TestCase
21
21
  end
22
22
  end
23
23
 
24
-
25
24
  def test_partial_read
26
25
  assert_equal 'the quick', @io.read(9)
27
26
  end
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multipart-post
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease: false
6
- segments:
7
- - 1
8
- - 1
9
- - 0
10
- version: 1.1.0
4
+ prerelease:
5
+ version: 1.1.1
11
6
  platform: ruby
12
7
  authors:
13
8
  - Nick Sieger
@@ -15,8 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-01-11 00:00:00 -06:00
19
- default_executable:
13
+ date: 2011-05-13 00:00:00 Z
20
14
  dependencies: []
21
15
 
22
16
  description: "Use with Net::HTTP to do multipart form posts. IO values that have #content_type, #original_filename, and #local_path will be posted as a binary file."
@@ -38,7 +32,6 @@ files:
38
32
  - README.txt
39
33
  - test/test_composite_io.rb
40
34
  - test/net/http/post/test_multipart.rb
41
- has_rdoc: true
42
35
  homepage: http://github.com/nicksieger/multipart-post
43
36
  licenses: []
44
37
 
@@ -53,7 +46,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
46
  requirements:
54
47
  - - ">="
55
48
  - !ruby/object:Gem::Version
56
- hash: 3
49
+ hash: -4205397351257484112
57
50
  segments:
58
51
  - 0
59
52
  version: "0"
@@ -62,14 +55,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
55
  requirements:
63
56
  - - ">="
64
57
  - !ruby/object:Gem::Version
65
- hash: 3
66
- segments:
67
- - 0
68
58
  version: "0"
69
59
  requirements: []
70
60
 
71
61
  rubyforge_project: caldersphere
72
- rubygems_version: 1.3.7
62
+ rubygems_version: 1.7.2
73
63
  signing_key:
74
64
  specification_version: 3
75
65
  summary: Creates a multipart form post accessory for Net::HTTP.