ruby-multipart-post 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -1,3 +1,4 @@
1
+ Manifest
1
2
  README
2
3
  README.rdoc
3
4
  Rakefile
@@ -6,7 +7,7 @@ lib/multi_part_post.rb
6
7
  lib/parts.rb
7
8
  lib/ruby-multipart-post.rb
8
9
  lib/stream.rb
10
+ ruby-multipart-post.gemspec
9
11
  test/file_upload_io_test.rb
10
12
  test/files/file_0.txt
11
13
  test/parts_test.rb
12
- Manifest
data/README.rdoc CHANGED
@@ -6,6 +6,19 @@
6
6
 
7
7
  Multipart form post thru Ruby script, headers content-type and content-length properly set
8
8
 
9
+ == SYNOPSIS
10
+
11
+ require 'ruby-multipart-post'
12
+
13
+ params = {
14
+ "param_0" => "value_0", "param_1" => "value_1",
15
+ "file_0" => FileUploadIO.new(path_to_file, file_content_type),
16
+ "file_1" => FileUploadIO.new(path_to_file, file_content_type)
17
+ }
18
+
19
+ multipart_post = MultiPart::Post.new(params) # MultiPart::Post.new(params, some_extra_headers)
20
+ multipart_post.submit(to_url) # multipart_post.submit(to_url, query_string)
21
+
9
22
  == REQUIREMENTS
10
23
 
11
24
  None
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('ruby-multipart-post', '0.1.0') do |p|
5
+ Echoe.new('ruby-multipart-post', '0.2.0') do |p|
6
6
  p.description = "Multipart form post thru Ruby script, headers content-type and content-length properly set"
7
7
  p.url = "http://github.com/toamitkumar/ruby-multipart-post"
8
8
  p.author = "Amit Kumar"
@@ -12,7 +12,7 @@ module FileUploadIO
12
12
  end
13
13
 
14
14
  def file_size
15
- "#{File.size(file_path)}"
15
+ "#{File.size(file_path)}".to_i
16
16
  end
17
17
  EOS
18
18
  file_io
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ruby-multipart-post}
5
- s.version = "0.1.0"
5
+ s.version = "0.2.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Amit Kumar"]
9
- s.date = %q{2010-02-11}
9
+ s.date = %q{2010-03-13}
10
10
  s.description = %q{Multipart form post thru Ruby script, headers content-type and content-length properly set}
11
11
  s.email = %q{toamitkumar@gmail.com}
12
12
  s.extra_rdoc_files = ["README", "README.rdoc", "lib/file_upload_io.rb", "lib/multi_part_post.rb", "lib/parts.rb", "lib/ruby-multipart-post.rb", "lib/stream.rb"]
13
- s.files = ["README", "README.rdoc", "Rakefile", "lib/file_upload_io.rb", "lib/multi_part_post.rb", "lib/parts.rb", "lib/ruby-multipart-post.rb", "lib/stream.rb", "test/file_upload_io_test.rb", "test/files/file_0.txt", "test/parts_test.rb", "Manifest", "ruby-multipart-post.gemspec"]
13
+ s.files = ["Manifest", "README", "README.rdoc", "Rakefile", "lib/file_upload_io.rb", "lib/multi_part_post.rb", "lib/parts.rb", "lib/ruby-multipart-post.rb", "lib/stream.rb", "ruby-multipart-post.gemspec", "test/file_upload_io_test.rb", "test/files/file_0.txt", "test/parts_test.rb"]
14
14
  s.homepage = %q{http://github.com/toamitkumar/ruby-multipart-post}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Ruby-multipart-post", "--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
@@ -25,6 +25,6 @@ class FileUploadIOTest < Test::Unit::TestCase
25
25
  end
26
26
 
27
27
  def test_should_have_file_size
28
- assert_equal("41", @file_io.file_size)
28
+ assert_equal(41, @file_io.file_size)
29
29
  end
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-multipart-post
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amit Kumar
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-11 00:00:00 -02:00
12
+ date: 2010-03-13 00:00:00 -02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -28,6 +28,7 @@ extra_rdoc_files:
28
28
  - lib/ruby-multipart-post.rb
29
29
  - lib/stream.rb
30
30
  files:
31
+ - Manifest
31
32
  - README
32
33
  - README.rdoc
33
34
  - Rakefile
@@ -36,11 +37,10 @@ files:
36
37
  - lib/parts.rb
37
38
  - lib/ruby-multipart-post.rb
38
39
  - lib/stream.rb
40
+ - ruby-multipart-post.gemspec
39
41
  - test/file_upload_io_test.rb
40
42
  - test/files/file_0.txt
41
43
  - test/parts_test.rb
42
- - Manifest
43
- - ruby-multipart-post.gemspec
44
44
  has_rdoc: true
45
45
  homepage: http://github.com/toamitkumar/ruby-multipart-post
46
46
  licenses: []