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 +4 -4
- data/lib/jenkins2/client.rb +5 -1
- data/lib/jenkins2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ba54e27b6825938f528fce8c70d77c74b924769
|
4
|
+
data.tar.gz: 6c1bb33d1c0222772ecef7c8064bcb1c55ff6fc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc3ab9903dd6572e041fe80043dc7bde7894ff3d0949a93e1da0322f43b50a7e28d531f708d02194d2c9603d05d21640f3e053eb06b63a27787262c50e45ff7a
|
7
|
+
data.tar.gz: 207f188a8535039a6fb918aa1beaef81042355def49050b9bd4c468deb3badc67c26d71cbb34df6d04a1452192d1b689b5fc480479cfe348bba8ff23366324a5
|
data/lib/jenkins2/client.rb
CHANGED
@@ -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
|
data/lib/jenkins2/version.rb
CHANGED
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.
|
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.
|
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.
|