jenkins2 0.0.2 → 0.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: 755ca5e600a8dcf27d558a859feb3dcea22cf14c
4
- data.tar.gz: 6bd09c8366e2e0069a6139d25ba51bb6c87ceb4d
3
+ metadata.gz: 1ba54e27b6825938f528fce8c70d77c74b924769
4
+ data.tar.gz: 6c1bb33d1c0222772ecef7c8064bcb1c55ff6fc2
5
5
  SHA512:
6
- metadata.gz: dfce468bca6cf11efdc4cbaee51a7ae142bd0a7cb0d8e3e24827f3facbdf71085f816e162df80c035749c8ccad0b16cec736c6f789841cb55c0d5fc012af47d7
7
- data.tar.gz: e9af7dca064ea182b7e8d3bd6ca66de161438d1a7ceb89ab231588ff72a7d630515ffee33f9bedba8fe723ac1b4aa12f2bbc490d466847aa8b705ce60370e64d
6
+ metadata.gz: fc3ab9903dd6572e041fe80043dc7bde7894ff3d0949a93e1da0322f43b50a7e28d531f708d02194d2c9603d05d21640f3e053eb06b63a27787262c50e45ff7a
7
+ data.tar.gz: 207f188a8535039a6fb918aa1beaef81042355def49050b9bd4c468deb3badc67c26d71cbb34df6d04a1452192d1b689b5fc480479cfe348bba8ff23366324a5
@@ -74,7 +74,7 @@ module Jenkins2
74
74
  when :post then Net::HTTP::Post
75
75
  end.new( URI File.join( @server, URI.escape( path ) ) )
76
76
  Log.debug { "Request: #{method} #{req.uri}" }
77
- req.basic_auth @user, @key
77
+ req.basic_auth @user, @key if credentials_provided?
78
78
  yield req if block_given?
79
79
  req.content_type ||= 'application/x-www-form-urlencoded'
80
80
  Log.debug { "Request content_type: #{req.content_type}, body: #{req.body}" }
@@ -101,5 +101,9 @@ module Jenkins2
101
101
  response.value
102
102
  end
103
103
  end
104
+
105
+ def credentials_provided?
106
+ @user and @key
107
+ end
104
108
  end
105
109
  end
@@ -1,3 +1,3 @@
1
1
  module Jenkins2
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jenkins2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juri Timošin
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  version: '0'
125
125
  requirements: []
126
126
  rubyforge_project:
127
- rubygems_version: 2.5.1
127
+ rubygems_version: 2.6.11
128
128
  signing_key:
129
129
  specification_version: 4
130
130
  summary: Command line interface and API client for Jenkins 2.