http-form_data 1.0.2 → 1.0.3

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: f646dc5084304effdd12a91b73151a0ee750db06
4
- data.tar.gz: 3514cd9ed1b7c91df984c26dc586d1882ad8196d
3
+ metadata.gz: 7a6ca603a4fcbd166b6144c239780cfc3b5d536c
4
+ data.tar.gz: a5ba2c8cd037579a827425a29d25aa6ffe5c385d
5
5
  SHA512:
6
- metadata.gz: 3faf8f17dc3f2a25997de4e9014009f706e336ab9f6948ec729a65dd2d6a71d4721e5d56d4e9f53e2f28827219c72ecda5213de18a05b30314e1bc9bf24b22ba
7
- data.tar.gz: aa5d4520dfe7a3febf86c6fdcc33db318d7a40089545c86380d65f341c181dcdb2359af5d33e48d45960ba5fc52558550fcfaa7e56435eba474418827b54e546
6
+ metadata.gz: f448941c9efd96ba33381419853940a1eb4059160d516f302d02656fb7b3109402c8e6511bbe28ea885e586d8086c011f26b538b33ea5152cbeff6a141a7e0bd
7
+ data.tar.gz: d4a2cd9d878a62f6b25e38f6656056c414576944587553096c6f3a4d6ce68f6e5b8d7f3179081069e40f29aef614befe3f4ec2fe007cd49e4bad06ebaba57074
@@ -15,7 +15,9 @@ env: JRUBY_OPTS="$JRUBY_OPTS --debug"
15
15
 
16
16
  rvm:
17
17
  # Include JRuby first because it takes the longest
18
+ - jruby-1.7.27
18
19
  - jruby-9.1.8.0
20
+ - 1.9.3
19
21
  - 2.0.0
20
22
  - 2.1
21
23
  - 2.2
@@ -24,9 +26,6 @@ rvm:
24
26
 
25
27
  matrix:
26
28
  fast_finish: true
27
- include:
28
- - rvm: 2.4.1
29
- env: SUITE="rubocop"
30
29
 
31
30
  branches:
32
31
  only:
data/CHANGES.md CHANGED
@@ -1,16 +1,23 @@
1
+ ## 1.0.2 (2017-05-18)
2
+
3
+ * [#16](https://github.com/httprb/form_data/issues/16)
4
+ Fix ruby < 2.0.0 support.
5
+ [@ixti][]
6
+
7
+
1
8
  ## 1.0.2 (2017-05-08)
2
9
 
3
10
  * [#5](https://github.com/httprb/form_data.rb/issues/5)
4
- Allow setting Content-Type non-file parts
5
- [@abotalov]
11
+ Allow setting Content-Type non-file parts.
12
+ [@abotalov][]
6
13
 
7
14
  * [#6](https://github.com/httprb/form_data.rb/issues/6)
8
- Creation of file parts without filename
9
- [@abotalov]
15
+ Creation of file parts without filename.
16
+ [@abotalov][]
10
17
 
11
18
  * [#11](https://github.com/httprb/form_data.rb/pull/11)
12
19
  Deprecate `HTTP::FormData::File#mime_type`. Use `#content_type` instead.
13
- [@ixti]
20
+ [@ixti][]
14
21
 
15
22
 
16
23
  ## 1.0.1 (2015-03-31)
@@ -34,5 +41,5 @@
34
41
 
35
42
  * First release ever!
36
43
 
37
- [@ixti] https://github.com/ixti
38
- [@abotalov] https://github.com/abotalov
44
+ [@ixti]: https://github.com/ixti
45
+ [@abotalov]: https://github.com/abotalov
data/Gemfile CHANGED
@@ -4,22 +4,8 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "rake"
6
6
 
7
- group :development do
8
- gem "guard"
9
- gem "guard-rspec", :require => false
10
- gem "pry"
11
- end
12
-
13
7
  group :test do
14
- gem "coveralls"
15
- gem "rspec", "~> 3.1"
16
- gem "rubocop", "= 0.48.1"
17
- gem "simplecov", ">= 0.9"
18
- end
19
-
20
- group :doc do
21
- gem "redcarpet"
22
- gem "yard"
8
+ gem "rspec", "~> 3.1"
23
9
  end
24
10
 
25
11
  # Specify your gem's dependencies in form_data.gemspec
data/README.md CHANGED
@@ -58,10 +58,13 @@ form = HTTP::FormData.create({
58
58
  This library aims to support and is [tested against][ci] the following Ruby
59
59
  versions:
60
60
 
61
+ * Ruby 1.9.x
62
+ * Ruby 2.0.x
61
63
  * Ruby 2.1.x
62
64
  * Ruby 2.2.x
63
65
  * Ruby 2.3.x
64
66
  * Ruby 2.4.x
67
+ * JRuby 1.7.x
65
68
  * JRuby 9.1.x.x
66
69
 
67
70
  If something doesn't work on one of these versions, it's a bug.
data/Rakefile CHANGED
@@ -5,20 +5,4 @@ require "bundler/gem_tasks"
5
5
  require "rspec/core/rake_task"
6
6
  RSpec::Core::RakeTask.new
7
7
 
8
- begin
9
- require "rubocop/rake_task"
10
- RuboCop::RakeTask.new
11
- rescue LoadError
12
- task :rubocop do
13
- $stderr.puts "RuboCop is disabled"
14
- end
15
- end
16
-
17
- if ENV["CI"].nil?
18
- task :default => %i[spec rubocop]
19
- else
20
- case ENV["SUITE"]
21
- when "rubocop" then task :default => :rubocop
22
- else task :default => :spec
23
- end
24
- end
8
+ task :default => :spec
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
18
18
  > `multipart/form-data` types.
19
19
  DESC
20
20
 
21
+ spec.required_ruby_version = ">= 1.9"
22
+
21
23
  spec.files = `git ls-files -z`.split("\x0")
22
24
  spec.executables = spec.files.grep(%r{^bin\/}).map { |f| File.basename(f) }
23
25
  spec.test_files = spec.files.grep(%r{^(test|spec|features)\/})
@@ -11,13 +11,14 @@ module HTTP
11
11
  class Part
12
12
  attr_reader :content_type, :filename
13
13
 
14
- # @param [#to_s] body
15
- # @param [String] content_type Value of Content-Type header
16
- # @param [String] filename Value of filename parameter
17
- def initialize(body, content_type: nil, filename: nil)
14
+ # @param body [#to_s]
15
+ # @param opts [Hash]
16
+ # @option opts [String] :content_type Value of Content-Type header
17
+ # @option opts [String] :filename Value of filename parameter
18
+ def initialize(body, opts = {})
18
19
  @body = body.to_s
19
- @content_type = content_type
20
- @filename = filename
20
+ @content_type = opts[:content_type]
21
+ @filename = opts[:filename]
21
22
  end
22
23
 
23
24
  # Returns content size.
@@ -3,6 +3,6 @@
3
3
  module HTTP
4
4
  module FormData
5
5
  # Gem version.
6
- VERSION = "1.0.2"
6
+ VERSION = "1.0.3"
7
7
  end
8
8
  end
@@ -1,5 +1,5 @@
1
- # frozen_string_literal: true
2
1
  # coding: utf-8
2
+ # frozen_string_literal: true
3
3
 
4
4
  RSpec.describe HTTP::FormData::File do
5
5
  let(:opts) { nil }
@@ -1,3 +1,4 @@
1
+ # coding: utf-8
1
2
  # frozen_string_literal: true
2
3
 
3
4
  RSpec.describe HTTP::FormData::Part do
@@ -1,5 +1,5 @@
1
- # frozen_string_literal: true
2
1
  # coding: utf-8
2
+ # frozen_string_literal: true
3
3
 
4
4
  RSpec.describe HTTP::FormData::Urlencoded do
5
5
  let(:data) { { "foo[bar]" => "test" } }
@@ -1,15 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "simplecov"
4
- require "coveralls"
5
-
6
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
7
- SimpleCov::Formatter::HTMLFormatter,
8
- Coveralls::SimpleCov::Formatter
9
- ]
10
-
11
- SimpleCov.start { add_filter "/spec/" }
12
-
13
3
  require "http/form_data"
14
4
  require "support/fixtures_helper"
15
5
 
metadata CHANGED
@@ -1,24 +1,24 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http-form_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksey V Zapparov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-08 00:00:00.000000000 Z
11
+ date: 2017-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
18
  version: '1.7'
20
- type: :development
19
+ name: bundler
21
20
  prerelease: false
21
+ type: :development
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
@@ -65,7 +65,7 @@ homepage: https://github.com/httprb/form_data.rb
65
65
  licenses:
66
66
  - MIT
67
67
  metadata: {}
68
- post_install_message:
68
+ post_install_message:
69
69
  rdoc_options: []
70
70
  require_paths:
71
71
  - lib
@@ -73,18 +73,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: '0'
76
+ version: '1.9'
77
77
  required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  requirements: []
83
- rubyforge_project:
84
- rubygems_version: 2.6.11
85
- signing_key:
83
+ rubyforge_project:
84
+ rubygems_version: 2.6.8
85
+ signing_key:
86
86
  specification_version: 4
87
- summary: http-form_data-1.0.2
87
+ summary: http-form_data-1.0.3
88
88
  test_files:
89
89
  - spec/fixtures/expected-multipart-body.tpl
90
90
  - spec/fixtures/the-http-gem.info