jenkins_api_client 0.12.1 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -21,6 +21,8 @@ before_install:
21
21
  script:
22
22
  - bundle exec rake unit_tests
23
23
  - bundle exec rake func_tests
24
+ - travis/setup_crumb.sh
25
+ - bundle exec rake func_tests
24
26
  notifications:
25
27
  email: false
26
28
  irc:
data/CHANGELOG.md CHANGED
@@ -4,6 +4,35 @@ CHANGELOG
4
4
  upcoming
5
5
  --------
6
6
 
7
+ v0.13.0 [09-JUL-2013]
8
+ ----------------------
9
+ * Jenkins XSS disable option is now supported. No inputs are required - the
10
+ jenkins_api_client will automatically detech whether to use the crumbs or not
11
+ when making the POST requests.
12
+ * Support for logging is added. Logs can be redirected to a log file and the
13
+ log level can be customized. This implementation uses the `Logger` class so
14
+ it follows the nice format in logging messages.
15
+ * The job `build` method will now optionally return the build number. This
16
+ option should be used with care as the build method will wait till the
17
+ jenkins job is placed on an executor from the build queue. By default the
18
+ build number will NOT be returned. nil will be returned if the build number
19
+ is not available. Also a Timeout error will be raised if the job waits in the
20
+ queue for longer than the 'timeout' parameter. This timeout parameter can be
21
+ set during the client initialization.
22
+ * Improved documentation
23
+ * Support for enabling/disabling jobs. Credit: @dieterdemeyer
24
+ * Added functionality for copying jobs. Credit: @dieterdemeyer
25
+ * Added functionality for wiping out the workspace of a job.
26
+ Credit: @dieterdemeyer
27
+ * Added functionality for listing jenkins users. Credit: @dieterdemeyer
28
+ * Fixed a bug where the exceptions where not thrown when using the
29
+ `get_console_output` method.
30
+ * Fixed a bug where the jenkins_path attribute was ignored when the server_url
31
+ input argument is given. Credit: @woodbusy
32
+ * support public/private key pair authentication for Jenkins CLI.
33
+ Credit: @missedone
34
+
35
+
7
36
  v0.12.1 [25-JUN-2013]
8
37
  ----------------------
9
38
  * Fixed a bug where the SSL support was not working properly with Ruby
@@ -27,7 +56,7 @@ v0.12.0 [18-JUN-2013]
27
56
  This was resulting in an exception and the exception handling is modified to
28
57
  handle this condition.
29
58
  * The jobs that are not built yet have a new color (`notbuilt`) in the recent
30
- version of jenkins (> 1.517) whih resulted in `invalid` status. This is fixed.
59
+ version of jenkins (> 1.517) which resulted in `invalid` status. This is fixed.
31
60
 
32
61
  v0.11.0 [09-JUN-2013]
33
62
  ----------------------
data/CONTRIBUTORS.md ADDED
@@ -0,0 +1,13 @@
1
+ Thank you very much to all who contributed to this project.
2
+
3
+ * [Niarfe](https://github.com/Niarfe)
4
+ * [dieterdemeyer](https://github.com/dieterdemeyer)
5
+ * [kevinhcross](https://github.com/kevinhcross)
6
+ * [drnic](https://github.com/drnic)
7
+ * [woodbusy](https://github.com/woodbusy)
8
+ * [missedone](https://github.com/missedone)
9
+ * [cylol](https://github.com/cylol)
10
+ * [madisp](https://github.com/madisp)
11
+ * [rubytester](https://github.com/rubytester)
12
+ * [dougforpres](https://github.com/dougforpres)
13
+ * [brettporter](https://github.com/brettporter)
data/README.md CHANGED
@@ -17,20 +17,18 @@ Google Group: https://groups.google.com/group/jenkins_api_client
17
17
 
18
18
  OVERVIEW:
19
19
  ---------
20
- This project is a simple API client for interacting with Jenkins Continuous Integration server.
21
- Jenkins provides three kinds of remote access API. 1. XML API, 2. JSON API, and 3. Python API.
22
- This project aims at consuming the JSON API and provides some useful functions for controlling
23
- jobs on the Jenkins programatically. Even though Jenkins provides an awesome UI for controlling
24
- jobs, it would be nice and helpful to have a programmable interface so we can dynamically and
25
- automatically manage jobs and other artifacts.
20
+ This project is a simple API client for interacting with Jenkins Continuous
21
+ Integration server. Jenkins provides three kinds of remote access API.
22
+ 1. XML API, 2. JSON API, and 3. Python API. This project aims at consuming the
23
+ JSON API and provides some useful functions for controlling jobs on the Jenkins
24
+ programatically. Even though Jenkins provides an awesome UI for controlling
25
+ jobs, it would be nice and helpful to have a programmable interface so we can
26
+ dynamically and automatically manage jobs and other artifacts.
26
27
 
27
28
  DETAILS:
28
29
  --------
29
- This projects currently only provides functionality for the <tt>jobs, node, and system</tt> interfaces.
30
- This is still a work-in-progress project. I mainly use the functionality of this project for my autmation
31
- work and the functionality mainly focussed on my usage and I believe others might find it useful
32
- too. I would love to add more features to it and I will continue working on improving existing
33
- features and add more interfaces such as nodes, views, build queue, etc,.
30
+ This projects currently only provides functionality for the
31
+ <tt>jobs, node, view, system, and build queue</tt> interfaces.
34
32
 
35
33
  USAGE:
36
34
  ------
@@ -44,33 +42,37 @@ Include this gem in your code as a require statement.
44
42
 
45
43
  ### Using with IRB
46
44
 
47
- If you want to just play with it and not actually want to write a script, you can just use the
48
- irb launcher script which is available in <tt>scripts/login_with_irb.rb</tt>. But make sure that
49
- you have your credentials available in the correct location. By default the script assumes that
50
- you have your credentials file in <tt>~/.jenkins_api_client/login.yml</tt>. If you don't prefer this
51
- location and would like to use a different location, just modify that script to point to the
52
- location where the credentials file exists.
45
+ If you want to just play with it and not actually want to write a script, you
46
+ can just use the irb launcher script which is available in
47
+ <tt>scripts/login_with_irb.rb</tt>. But make sure that you have your credentials
48
+ available in the correct location. By default the script assumes that you have
49
+ your credentials file in <tt>~/.jenkins_api_client/login.yml</tt>. If you don't
50
+ prefer this location and would like to use a different location, just modify
51
+ that script to point to the location where the credentials file exists.
53
52
 
54
53
  ruby scripts/login_with_irb.rb
55
54
 
56
- You will see the that it entered IRB session and you can play with the API client with the
57
- <tt>@client</tt> object that it has returned.
55
+ You will see the that it entered IRB session and you can play with the API
56
+ client with the <tt>@client</tt> object that it has returned.
58
57
 
59
58
  ### Authentication
60
59
 
61
- Supplying credentials to the client is optional, as not all Jenkins instances require authentication.
62
- This project supports two types of password-based authentication. You can just you the plain
63
- password by using <tt>password</tt> parameter. If you don't prefer leaving plain passwords in the
64
- credentials file, you can encode your password in base64 format and use <tt>password_base64</tt>
65
- parameter to specify the password either in the arguments or in the credentials file.
66
- To use the client without credentials, just leave out the <tt>username</tt> and <tt>password</tt> parameters. The
67
- <tt>password</tt> parameter is only required if <tt>username</tt> is specified.
60
+ Supplying credentials to the client is optional, as not all Jenkins instances
61
+ require authentication. This project supports two types of password-based
62
+ authentication. You can just you the plain password by using <tt>password</tt>
63
+ parameter. If you don't prefer leaving plain passwords in the credentials file,
64
+ you can encode your password in base64 format and use <tt>password_base64</tt>
65
+ parameter to specify the password either in the arguments or in the credentials
66
+ file. To use the client without credentials, just leave out the
67
+ <tt>username</tt> and <tt>password</tt> parameters. The <tt>password</tt>
68
+ parameter is only required if <tt>username</tt> is specified.
68
69
 
69
70
  ### Basic Usage
70
71
 
71
- As discussed earlier, you can either specify all the credentials and server information as
72
- parameters to the Client or have a credentials file and just parse the yaml file and pass it in.
73
- The following call just passes the information as parameters
72
+ As discussed earlier, you can either specify all the credentials and server
73
+ information as parameters to the Client or have a credentials file and just
74
+ parse the yaml file and pass it in. The following call just passes the
75
+ information as parameters
74
76
 
75
77
  ```ruby
76
78
  @client = JenkinsApi::Client.new(:server_ip => '0.0.0.0',
@@ -79,8 +81,8 @@ The following call just passes the information as parameters
79
81
  puts @client.job.list("^Testjob")
80
82
  ```
81
83
 
82
- The following example passes the YAML file contents. An example yaml file is located in
83
- <tt>config/login.yml.example</tt>.
84
+ The following example passes the YAML file contents. An example yaml file is
85
+ located in <tt>config/login.yml.example</tt>.
84
86
 
85
87
  ```ruby
86
88
  @client = JenkinsApi::Client.new(YAML.Load_file(File.expand_path(
@@ -91,8 +93,8 @@ puts @client.job.list_all
91
93
 
92
94
  ### Chaining and Building Jobs
93
95
 
94
- Sometimes we want certain jobs to be added as downstream projects and run them sequencially.
95
- The following example will explain how this could be done.
96
+ Sometimes we want certain jobs to be added as downstream projects and run them
97
+ sequencially. The following example will explain how this could be done.
96
98
 
97
99
  ```ruby
98
100
  require 'jenkins_api_client'
@@ -120,28 +122,35 @@ code = @client.job.build(initial_jobs[0])
120
122
  raise "Could not build the job specified" unless code == 302
121
123
  ```
122
124
 
123
- In the above example, you might have noticed that the chain method returns an array instead of a
124
- single job. There is a reason behind it. In simple chain, such as the one in the example above, all
125
- jobs specified are chained one by one. But in some cases they might not be dependent on the previous
126
- jobs and we might want to run some jobs parallelly. We just have to specify that as a parameter.
127
-
128
- For example: <tt>parallel = 3</tt> in the parameter list to the <tt>chain</tt> method will take the first three
129
- jobs and chain them with the next three jobs and so forth till it reaches the end of the list.
130
-
131
- There is another filter option you can specify for the method to take only jobs that are in a
132
- particular state. In case if we want to build only jobs that are failed or unstable, we can achieve
133
- that by passing in the states in the third parameter. In the example above, we wanted build all jobs.
134
- If we just want to build failed and unstable jobs, just pass <tt>["failure", "unstable"]</tt>. Also if you
135
- pass in an empty array, it will assume that you want to consider all jobs and no filtering will be
136
- performed.
137
-
138
- There is another parameter called <tt>threshold</tt> you can specify for the chaining and this is used
139
- to decide whether to move forward with the next job in the chain or not. A <tt>success</tt> will move to
140
- the next job only if the current build succeeds, <tt>failure</tt> will move to the next job even if the build
141
- fails, and <tt>unstable</tt> will move to the job even if the build is unstable.
142
-
143
- The following call to the <tt>chain</tt> method will consider only failed and unstable jobs, chain then
144
- with 'failure' as the threshold, and also chain three jobs in parallel.
125
+ In the above example, you might have noticed that the chain method returns an
126
+ array instead of a single job. There is a reason behind it. In simple chain,
127
+ such as the one in the example above, all jobs specified are chained one by
128
+ one. But in some cases they might not be dependent on the previous jobs and we
129
+ might want to run some jobs parallelly. We just have to specify that as a
130
+ parameter.
131
+
132
+ For example: <tt>parallel = 3</tt> in the parameter list to the <tt>chain</tt>
133
+ method will take the first three jobs and chain them with the next three jobs
134
+ and so forth till it reaches the end of the list.
135
+
136
+ There is another filter option you can specify for the method to take only
137
+ jobs that are in a particular state. In case if we want to build only jobs
138
+ that are failed or unstable, we can achieve that by passing in the states in
139
+ the third parameter. In the example above, we wanted build all jobs. If we just
140
+ want to build failed and unstable jobs, just pass
141
+ <tt>["failure", "unstable"]</tt>. Also if you pass in an empty array, it will
142
+ assume that you want to consider all jobs and no filtering will be performed.
143
+
144
+ There is another parameter called <tt>threshold</tt> you can specify for the
145
+ chaining and this is used to decide whether to move forward with the next job
146
+ in the chain or not. A <tt>success</tt> will move to the next job only if the
147
+ current build succeeds, <tt>failure</tt> will move to the next job even if the
148
+ build fails, and <tt>unstable</tt> will move to the job even if the build is
149
+ unstable.
150
+
151
+ The following call to the <tt>chain</tt> method will consider only failed and
152
+ unstable jobs, chain then with 'failure' as the threshold, and also chain three
153
+ jobs in parallel.
145
154
 
146
155
  ```ruby
147
156
  initial_jobs = @client.job.chain(jobs, 'failure', ["failure", "unstable"], 3)
@@ -155,17 +164,34 @@ end
155
164
  ### Running Jenkins CLI
156
165
  To running [Jenkins CLI](https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI)
157
166
 
167
+ * authentication with username/password (deprecated)
168
+
158
169
  ```ruby
159
- @client = JenkinsApi::Client.new(:server_ip => '0.0.0.0',
170
+ @client = JenkinsApi::Client.new(:server_ip => '127.0.0.1',
160
171
  :username => 'somename', :password => 'secret password')
161
172
  # The following call will return the version of Jenkins instance
162
173
  puts @client.exec_cli("version")
163
174
  ```
164
175
 
165
- Before you run the CLI, please make sure the following requirements are fulfilled:
166
- * JRE/JDK 6 (or above) is installed, and 'java' is on the $PATH environment variable
167
- * The ```jenkins_api_client/java_deps/jenkins-cli.jar``` is required as the client to run the CLI. You can retrieve the available commands via accessing the URL: ```http://<server>:<port>/cli```
168
- * (Optional) required if you run the Groovy Script through CLI, make sure the *user* have the privilige to run script
176
+ * authentication with public/private key file
177
+ remember to upload the public key to http://#{server_ip}:#{server_port}/user/#{my_username}/configure
178
+
179
+ ```ruby
180
+ @client = JenkinsApi::Client.new(:server_ip => '127.0.0.1',
181
+ :identity_file => '~/.ssh/id_rsa')
182
+ # The following call will return the version of Jenkins instance
183
+ puts @client.exec_cli("version")
184
+ ```
185
+
186
+ Before you run the CLI, please make sure the following requirements are
187
+ fulfilled:
188
+ * JRE/JDK 6 (or above) is installed, and 'java' is on the $PATH environment
189
+ variable
190
+ * The ```jenkins_api_client/java_deps/jenkins-cli.jar``` is required as the
191
+ client to run the CLI. You can retrieve the available commands via accessing
192
+ the URL: ```http://<server>:<port>/cli```
193
+ * (Optional) required if you run the Groovy Script through CLI, make sure
194
+ the *user* have the privilige to run script
169
195
 
170
196
  ### Using with command line
171
197
  Command line interface is supported only from version 0.2.0.
@@ -174,12 +200,46 @@ See help using <tt>jenkinscli help</tt>
174
200
  There are three ways for authentication using command line interface
175
201
  1. Passing all credentials and server information using command line parameters
176
202
  2. Passing the credentials file as the command line parameter
177
- 3. Having the credentials file in the default location <tt>HOME/.jenkins_api_client/login.yml</tt>
203
+ 3. Having the credentials file in the default location
204
+ <tt>HOME/.jenkins_api_client/login.yml</tt>
178
205
 
179
206
  ### Debug
180
207
 
181
- The call to client initialization accepts a debug parameter. If it is set to <tt>true</tt> it will print
182
- some debug information to the console. By default it is set to false.
208
+ As of v0.13.0, this debug parameter is removed. Use the logger instead. See the
209
+ next section for more information about this option.
210
+
211
+ ### Logger
212
+
213
+ As of v0.13.0, support for logger is introduced. Since it would be nice to have
214
+ the activities of the jenkins_api_client in a log file, this feature is
215
+ implemented using the Ruby's standard Logger class. For using this feature,
216
+ there are two new input arguments used during the initialization of Client.
217
+
218
+ 1. `:log_location` - This argument specifies the location for the log file. A
219
+ good location for linux based systems would be
220
+ '/var/log/jenkins_api_client.log'. The default for this values is STDOUT.
221
+ This will print the log messages on the console itself.
222
+ 2. `:log_level` - This argument specifies the level of messages to be logged.
223
+ It should be one of Logger::DEBUG (0), Logger::INFO (1), Logger::WARN (2),
224
+ Logger::ERROR (3), Logger::FATAL (4). It can be specified either using the
225
+ constants available in the Logger class or using these integers provided
226
+ here. The default for this argument is Logger::INFO (1)
227
+
228
+ If you want customization on the functionality Logger provides such as leave n
229
+ old log files, open the log file in append mode, create your own logger and
230
+ then set that in the client.
231
+
232
+ #### Examples
233
+
234
+ ```ruby
235
+ @client = JenkinsApi::Client.new(...)
236
+ # Create a logger which ages logfile once it reaches a certain size. Leave 10
237
+ # “old log files” and each file is about 1,024,000 bytes.
238
+ @client.logger = Logger.new('foo.log', 10, 1024000)
239
+ ```
240
+ Please refer to [Ruby
241
+ Logger](http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html)
242
+ for more information.
183
243
 
184
244
  CONTRIBUTING:
185
245
  -------------
@@ -198,6 +258,6 @@ Please take a look at the issues page if you want to get started.
198
258
  FEATURE REQUEST:
199
259
  ----------------
200
260
 
201
- If you use this gem for your project and you think it would be nice to have a particular feature
202
- that is presently not implemented, I would love to hear that and consider working on it.
203
- Just open an issue in Github as a feature request.
261
+ If you use this gem for your project and you think it would be nice to have a
262
+ particular feature that is presently not implemented, I would love to hear that
263
+ and consider working on it. Just open an issue in Github as a feature request.
data/Vagrantfile ADDED
@@ -0,0 +1,85 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ Vagrant.configure("2") do |config|
5
+ # All Vagrant configuration is done here. The most common configuration
6
+ # options are documented and commented below. For a complete reference,
7
+ # please see the online documentation at vagrantup.com.
8
+
9
+ config.vm.hostname = "jenkins-api-client"
10
+
11
+ # Every Vagrant virtual environment requires a box to build off of.
12
+ config.vm.box = "Ubuntu-12.04-LTS"
13
+
14
+ # The url from where the 'config.vm.box' box will be fetched if it
15
+ # doesn't already exist on the user's system.
16
+ config.vm.box_url = "https://s3-us-west-2.amazonaws.com/squishy.vagrant-boxes/precise64_squishy_2013-02-09.box"
17
+
18
+ # Assign this VM to a host-only network IP, allowing you to access it
19
+ # via the IP. Host-only networks can talk to the host machine as well as
20
+ # any other machines on the same network, but cannot be accessed (through this
21
+ # network interface) by any external networks.
22
+ config.vm.network :private_network, ip: "33.33.33.10"
23
+
24
+ # Create a public network, which generally matched to bridged network.
25
+ # Bridged networks make the machine appear as another physical device on
26
+ # your network.
27
+
28
+ # config.vm.network :public_network
29
+
30
+ # Create a forwarded port mapping which allows access to a specific port
31
+ # within the machine from a port on the host machine. In the example below,
32
+ # accessing "localhost:8080" will access port 80 on the guest machine.
33
+
34
+ # Share an additional folder to the guest VM. The first argument is
35
+ # the path on the host to the actual folder. The second argument is
36
+ # the path on the guest to mount the folder. And the optional third
37
+ # argument is a set of non-required options.
38
+ # config.vm.synced_folder "../data", "/vagrant_data"
39
+
40
+ # Provider-specific configuration so you can fine-tune various
41
+ # backing providers for Vagrant. These expose provider-specific options.
42
+ # Example for VirtualBox:
43
+ #
44
+ # config.vm.provider :virtualbox do |vb|
45
+ # # Don't boot with headless mode
46
+ # vb.gui = true
47
+ #
48
+ # # Use VBoxManage to customize the VM. For example to change memory:
49
+ # vb.customize ["modifyvm", :id, "--memory", "1024"]
50
+ # end
51
+ #
52
+ # View the documentation for the provider you're using for more
53
+ # information on available options.
54
+
55
+ config.ssh.max_tries = 40
56
+ config.ssh.timeout = 120
57
+
58
+ # The path to the Berksfile to use with Vagrant Berkshelf
59
+ # config.berkshelf.berksfile_path = "./Berksfile"
60
+
61
+ # Enabling the Berkshelf plugin. To enable this globally, add this configuration
62
+ # option to your ~/.vagrant.d/Vagrantfile file
63
+ #config.berkshelf.enabled = true
64
+
65
+ # An array of symbols representing groups of cookbook described in the Vagrantfile
66
+ # to exclusively install and copy to Vagrant's shelf.
67
+ # config.berkshelf.only = []
68
+
69
+ # An array of symbols representing groups of cookbook described in the Vagrantfile
70
+ # to skip installing and copying to Vagrant's shelf.
71
+ # config.berkshelf.except = []
72
+
73
+ config.vm.synced_folder ".", "/opt/jenkins_api_client"
74
+
75
+ config.vm.provision :shell, :inline =>
76
+ " sudo apt-get install -y git rubygems libxslt-dev libxml2-dev;" +
77
+ " cd /opt/jenkins_api_client;" +
78
+ " ls -lrt;" +
79
+ " ruby --version;" +
80
+ " sudo gem install bundler;" +
81
+ " bundle install;" +
82
+ " travis/setup.sh;" +
83
+ " bundle exec rake unit_tests;" +
84
+ " bundle exec rake func_tests"
85
+ end
@@ -21,3 +21,7 @@
21
21
  :username: my_username
22
22
 
23
23
  :password: my_password
24
+
25
+ # The priviate key file for Jenkins CLI authentication
26
+ # remember to upload the public key to http://#{server_ip}:#{server_port}/user/#{my_username}/configure
27
+ :identity_file: ~/.ssh/id_rsa
@@ -4,16 +4,13 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{jenkins_api_client}
8
- s.version = "0.12.1"
7
+ s.name = "jenkins_api_client"
8
+ s.version = "0.13.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kannan Manickam"]
12
- s.date = %q{2013-06-26}
13
- s.default_executable = %q{jenkinscli}
14
- s.description = %q{
15
- This is a simple and easy-to-use Jenkins Api client with features focused on
16
- automating Job configuration programaticaly and so forth}
12
+ s.date = "2013-07-10"
13
+ s.description = "\nThis is a simple and easy-to-use Jenkins Api client with features focused on\nautomating Job configuration programaticaly and so forth"
17
14
  s.email = ["arangamani.kannan@gmail.com"]
18
15
  s.executables = ["jenkinscli"]
19
16
  s.files = [
@@ -21,10 +18,12 @@ automating Job configuration programaticaly and so forth}
21
18
  ".jenkins.yml",
22
19
  ".travis.yml",
23
20
  "CHANGELOG.md",
21
+ "CONTRIBUTORS.md",
24
22
  "Gemfile",
25
23
  "LICENCE",
26
24
  "README.md",
27
25
  "Rakefile",
26
+ "Vagrantfile",
28
27
  "bin/jenkinscli",
29
28
  "config/login.yml.example",
30
29
  "java_deps/jenkins-cli.jar",
@@ -60,20 +59,21 @@ automating Job configuration programaticaly and so forth}
60
59
  "spec/unit_tests/system_spec.rb",
61
60
  "spec/unit_tests/view_spec.rb",
62
61
  "travis/jenkins_config.xml",
62
+ "travis/jenkins_config_with_crumb.xml",
63
63
  "travis/setup.sh",
64
+ "travis/setup_crumb.sh",
64
65
  "travis/spec.yml",
65
66
  "travis/user_config.xml"
66
67
  ]
67
- s.homepage = %q{https://github.com/arangamani/jenkins_api_client}
68
+ s.homepage = "https://github.com/arangamani/jenkins_api_client"
68
69
  s.require_paths = ["lib"]
69
- s.rubygems_version = %q{1.3.6}
70
- s.summary = %q{Jenkins JSON API Client}
70
+ s.rubygems_version = "1.8.23"
71
+ s.summary = "Jenkins JSON API Client"
71
72
 
72
73
  if s.respond_to? :specification_version then
73
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
74
74
  s.specification_version = 3
75
75
 
76
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
76
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
77
77
  s.add_runtime_dependency(%q<nokogiri>, ["~> 1.5.0"])
78
78
  s.add_runtime_dependency(%q<thor>, [">= 0.16.0"])
79
79
  s.add_runtime_dependency(%q<json>, [">= 0"])