dagger 2.0.1 → 2.2.0

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
  SHA256:
3
- metadata.gz: 87d4e9c75ae13a7295e19686dd8064f08a9311d4271454f97ceeb8e14da46618
4
- data.tar.gz: 84174088956cf7035c3a744be06900ca38ee011942d0bbca0cb68ae8ffd55a7d
3
+ metadata.gz: b5435e1639eeb130ce413215a7406e3db0c431dc3d4291cfcedc6373eae61d67
4
+ data.tar.gz: 0e8d27e62e1d14a704599f913ca634a324edc118c7433e644d6538fdefa715fe
5
5
  SHA512:
6
- metadata.gz: 0d6aef88856f8a279c2540fc74cedb532d2fdbd287860bbd2458d30c20d34f37c84cd5c40578ce66238430233341a1eb86888f7248c3d5ba8023442a0a554582
7
- data.tar.gz: b3debd2a802c83dbbafd69f06936c5ffbf2c73b0d62021bf02edd2ae1bc697a93c93a207b76dc9a15630342a71c8cf97acbab9826276076de3dfee7e2af8dc42
6
+ metadata.gz: 478af3e55a32f1abe612c2724d70a0d9df80acf6adef53ef7fe31e402d19db1d13416e5ffbf465240b3afa1644a3603b48b1fb9a63f3b02013178327ab4f6390
7
+ data.tar.gz: d463ab826e62bb5a282ea696ac780b56d69de58a0bdb200c00d645a27516c477c03ee08324b93716ec185cad7c9683caf2885b558c32069247fb2d602db6eb4e
data/dagger.gemspec CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |s|
19
19
  s.add_development_dependency "rspec-mocks"
20
20
  s.add_development_dependency "rspec-expectations"
21
21
 
22
- s.add_runtime_dependency "oj", "~> 2.1"
23
- s.add_runtime_dependency "ox", "~> 2.4"
22
+ s.add_runtime_dependency "oj", ">= 2.1"
23
+ s.add_runtime_dependency "ox", ">= 2.4"
24
24
 
25
25
  s.files = `git ls-files`.split("\n")
26
26
  s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
@@ -1,7 +1,7 @@
1
1
  module Dagger
2
2
  MAJOR = 2
3
- MINOR = 0
4
- PATCH = 1
3
+ MINOR = 2
4
+ PATCH = 0
5
5
 
6
6
  VERSION = [MAJOR, MINOR, PATCH].join('.')
7
7
  end
data/lib/dagger.rb CHANGED
@@ -47,6 +47,7 @@ module Dagger
47
47
  end
48
48
 
49
49
  def self.encode_body(obj, opts = {})
50
+ return if obj.nil? || obj.empty?
50
51
  if obj.is_a?(String)
51
52
  obj
52
53
  elsif opts[:json]
@@ -129,7 +130,7 @@ module Dagger
129
130
  opts[:follow] = 10 if opts[:follow] == true
130
131
  headers = opts[:headers] || {}
131
132
  headers['Accept'] = 'application/json' if opts[:json] && headers['Accept'].nil?
132
- headers['Content-Type'] = 'application/json' if opts[:json] && opts[:body]
133
+ headers['Content-Type'] = 'application/json' if opts[:json] && opts[:body] && opts[:body].size > 0
133
134
 
134
135
  if opts[:ip]
135
136
  headers['Host'] = uri.host
@@ -138,7 +139,7 @@ module Dagger
138
139
 
139
140
  request = Net::HTTP::Get.new(uri, DEFAULT_HEADERS.merge(headers))
140
141
  request.basic_auth(opts.delete(:username), opts.delete(:password)) if opts[:username]
141
- request.body = Utils.encode_body(opts[:body], opts) if opts[:body]
142
+ request.body = Utils.encode_body(opts[:body], opts) if opts[:body] && opts[:body].size > 0
142
143
 
143
144
  if @http.respond_to?(:started?) # regular Net::HTTP
144
145
  @http.start unless @http.started?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomás Pollak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-30 00:00:00.000000000 Z
11
+ date: 2023-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -70,28 +70,28 @@ dependencies:
70
70
  name: oj
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '2.1'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.1'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: ox
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '2.4'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '2.4'
97
97
  description: Dagger.post(url, params).body
@@ -140,8 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  - !ruby/object:Gem::Version
141
141
  version: 1.3.6
142
142
  requirements: []
143
- rubyforge_project: dagger
144
- rubygems_version: 2.7.3
143
+ rubygems_version: 3.4.6
145
144
  signing_key:
146
145
  specification_version: 4
147
146
  summary: Simplified Net::HTTP wrapper.