swaggy_jenkins 2.0.1.pre.pre.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +28 -26
  3. data/README.md +8 -6
  4. data/bin/bundle +5 -10
  5. data/bin/byebug +1 -1
  6. data/bin/coderay +1 -1
  7. data/bin/htmldiff +1 -1
  8. data/bin/ldiff +1 -1
  9. data/bin/pry +1 -1
  10. data/bin/racc +27 -0
  11. data/bin/rake +1 -1
  12. data/bin/rspec +1 -1
  13. data/bin/rubocop +1 -1
  14. data/bin/ruby-parse +1 -1
  15. data/bin/ruby-rewrite +1 -1
  16. data/lib/swaggy_jenkins/api/base_api.rb +3 -3
  17. data/lib/swaggy_jenkins/api/blue_ocean_api.rb +3 -3
  18. data/lib/swaggy_jenkins/api/remote_access_api.rb +3 -3
  19. data/lib/swaggy_jenkins/api_client.rb +25 -23
  20. data/lib/swaggy_jenkins/api_error.rb +4 -3
  21. data/lib/swaggy_jenkins/configuration.rb +29 -10
  22. data/lib/swaggy_jenkins/models/all_view.rb +16 -21
  23. data/lib/swaggy_jenkins/models/branch_impl.rb +16 -21
  24. data/lib/swaggy_jenkins/models/branch_impllinks.rb +16 -21
  25. data/lib/swaggy_jenkins/models/branch_implpermissions.rb +16 -21
  26. data/lib/swaggy_jenkins/models/cause_action.rb +16 -21
  27. data/lib/swaggy_jenkins/models/cause_user_id_cause.rb +16 -21
  28. data/lib/swaggy_jenkins/models/classes_by_class.rb +16 -21
  29. data/lib/swaggy_jenkins/models/clock_difference.rb +16 -21
  30. data/lib/swaggy_jenkins/models/computer_set.rb +16 -21
  31. data/lib/swaggy_jenkins/models/default_crumb_issuer.rb +16 -21
  32. data/lib/swaggy_jenkins/models/disk_space_monitor_descriptor_disk_space.rb +16 -21
  33. data/lib/swaggy_jenkins/models/empty_change_log_set.rb +16 -21
  34. data/lib/swaggy_jenkins/models/extension_class_container_impl1.rb +16 -21
  35. data/lib/swaggy_jenkins/models/extension_class_container_impl1links.rb +16 -21
  36. data/lib/swaggy_jenkins/models/extension_class_container_impl1map.rb +16 -21
  37. data/lib/swaggy_jenkins/models/extension_class_impl.rb +16 -21
  38. data/lib/swaggy_jenkins/models/extension_class_impllinks.rb +16 -21
  39. data/lib/swaggy_jenkins/models/favorite_impl.rb +16 -21
  40. data/lib/swaggy_jenkins/models/favorite_impllinks.rb +16 -21
  41. data/lib/swaggy_jenkins/models/free_style_build.rb +16 -21
  42. data/lib/swaggy_jenkins/models/free_style_project.rb +16 -21
  43. data/lib/swaggy_jenkins/models/free_style_projectactions.rb +16 -21
  44. data/lib/swaggy_jenkins/models/free_style_projecthealth_report.rb +16 -21
  45. data/lib/swaggy_jenkins/models/generic_resource.rb +16 -21
  46. data/lib/swaggy_jenkins/models/github_content.rb +16 -21
  47. data/lib/swaggy_jenkins/models/github_file.rb +16 -21
  48. data/lib/swaggy_jenkins/models/github_organization.rb +16 -21
  49. data/lib/swaggy_jenkins/models/github_organizationlinks.rb +16 -21
  50. data/lib/swaggy_jenkins/models/github_repositories.rb +16 -21
  51. data/lib/swaggy_jenkins/models/github_repositorieslinks.rb +16 -21
  52. data/lib/swaggy_jenkins/models/github_repository.rb +16 -21
  53. data/lib/swaggy_jenkins/models/github_repositorylinks.rb +16 -21
  54. data/lib/swaggy_jenkins/models/github_repositorypermissions.rb +16 -21
  55. data/lib/swaggy_jenkins/models/github_respository_container.rb +16 -21
  56. data/lib/swaggy_jenkins/models/github_respository_containerlinks.rb +16 -21
  57. data/lib/swaggy_jenkins/models/github_scm.rb +16 -21
  58. data/lib/swaggy_jenkins/models/github_scmlinks.rb +16 -21
  59. data/lib/swaggy_jenkins/models/hudson.rb +16 -21
  60. data/lib/swaggy_jenkins/models/hudson_master_computer.rb +16 -21
  61. data/lib/swaggy_jenkins/models/hudson_master_computerexecutors.rb +16 -21
  62. data/lib/swaggy_jenkins/models/hudson_master_computermonitor_data.rb +16 -21
  63. data/lib/swaggy_jenkins/models/hudsonassigned_labels.rb +16 -21
  64. data/lib/swaggy_jenkins/models/input_step_impl.rb +16 -21
  65. data/lib/swaggy_jenkins/models/input_step_impllinks.rb +16 -21
  66. data/lib/swaggy_jenkins/models/label1.rb +16 -21
  67. data/lib/swaggy_jenkins/models/link.rb +16 -21
  68. data/lib/swaggy_jenkins/models/list_view.rb +16 -21
  69. data/lib/swaggy_jenkins/models/multibranch_pipeline.rb +16 -21
  70. data/lib/swaggy_jenkins/models/null_scm.rb +16 -21
  71. data/lib/swaggy_jenkins/models/organisation.rb +16 -21
  72. data/lib/swaggy_jenkins/models/pipeline.rb +16 -21
  73. data/lib/swaggy_jenkins/models/pipeline_activity.rb +16 -21
  74. data/lib/swaggy_jenkins/models/pipeline_activityartifacts.rb +16 -21
  75. data/lib/swaggy_jenkins/models/pipeline_branchesitem.rb +16 -21
  76. data/lib/swaggy_jenkins/models/pipeline_branchesitemlatest_run.rb +16 -21
  77. data/lib/swaggy_jenkins/models/pipeline_branchesitempull_request.rb +16 -21
  78. data/lib/swaggy_jenkins/models/pipeline_branchesitempull_requestlinks.rb +16 -21
  79. data/lib/swaggy_jenkins/models/pipeline_folder_impl.rb +16 -21
  80. data/lib/swaggy_jenkins/models/pipeline_impl.rb +16 -21
  81. data/lib/swaggy_jenkins/models/pipeline_impllinks.rb +16 -21
  82. data/lib/swaggy_jenkins/models/pipeline_run.rb +16 -21
  83. data/lib/swaggy_jenkins/models/pipeline_run_impl.rb +16 -21
  84. data/lib/swaggy_jenkins/models/pipeline_run_impllinks.rb +16 -21
  85. data/lib/swaggy_jenkins/models/pipeline_run_node.rb +16 -21
  86. data/lib/swaggy_jenkins/models/pipeline_run_nodeedges.rb +16 -21
  87. data/lib/swaggy_jenkins/models/pipeline_runartifacts.rb +16 -21
  88. data/lib/swaggy_jenkins/models/pipeline_step_impl.rb +16 -21
  89. data/lib/swaggy_jenkins/models/pipeline_step_impllinks.rb +16 -21
  90. data/lib/swaggy_jenkins/models/pipelinelatest_run.rb +16 -21
  91. data/lib/swaggy_jenkins/models/pipelinelatest_runartifacts.rb +16 -21
  92. data/lib/swaggy_jenkins/models/queue.rb +16 -21
  93. data/lib/swaggy_jenkins/models/queue_blocked_item.rb +16 -21
  94. data/lib/swaggy_jenkins/models/queue_item_impl.rb +16 -21
  95. data/lib/swaggy_jenkins/models/queue_left_item.rb +16 -21
  96. data/lib/swaggy_jenkins/models/response_time_monitor_data.rb +16 -21
  97. data/lib/swaggy_jenkins/models/string_parameter_definition.rb +16 -21
  98. data/lib/swaggy_jenkins/models/string_parameter_value.rb +16 -21
  99. data/lib/swaggy_jenkins/models/swap_space_monitor_memory_usage2.rb +16 -21
  100. data/lib/swaggy_jenkins/models/unlabeled_load_statistics.rb +16 -21
  101. data/lib/swaggy_jenkins/models/user.rb +16 -21
  102. data/lib/swaggy_jenkins/version.rb +4 -4
  103. data/lib/swaggy_jenkins.rb +3 -3
  104. data/spec/api/base_api_spec.rb +4 -4
  105. data/spec/api/blue_ocean_api_spec.rb +40 -40
  106. data/spec/api/remote_access_api_spec.rb +23 -23
  107. data/spec/models/all_view_spec.rb +9 -7
  108. data/spec/models/branch_impl_spec.rb +19 -17
  109. data/spec/models/branch_impllinks_spec.rb +11 -9
  110. data/spec/models/branch_implpermissions_spec.rb +11 -9
  111. data/spec/models/cause_action_spec.rb +8 -6
  112. data/spec/models/cause_user_id_cause_spec.rb +10 -8
  113. data/spec/models/classes_by_class_spec.rb +8 -6
  114. data/spec/models/clock_difference_spec.rb +8 -6
  115. data/spec/models/computer_set_spec.rb +11 -9
  116. data/spec/models/default_crumb_issuer_spec.rb +9 -7
  117. data/spec/models/disk_space_monitor_descriptor_disk_space_spec.rb +10 -8
  118. data/spec/models/empty_change_log_set_spec.rb +8 -6
  119. data/spec/models/extension_class_container_impl1_spec.rb +9 -7
  120. data/spec/models/extension_class_container_impl1links_spec.rb +8 -6
  121. data/spec/models/extension_class_container_impl1map_spec.rb +9 -7
  122. data/spec/models/extension_class_impl_spec.rb +9 -7
  123. data/spec/models/extension_class_impllinks_spec.rb +8 -6
  124. data/spec/models/favorite_impl_spec.rb +9 -7
  125. data/spec/models/favorite_impllinks_spec.rb +8 -6
  126. data/spec/models/free_style_build_spec.rb +24 -22
  127. data/spec/models/free_style_project_spec.rb +33 -31
  128. data/spec/models/free_style_projectactions_spec.rb +7 -5
  129. data/spec/models/free_style_projecthealth_report_spec.rb +11 -9
  130. data/spec/models/generic_resource_spec.rb +12 -10
  131. data/spec/models/github_content_spec.rb +14 -12
  132. data/spec/models/github_file_spec.rb +8 -6
  133. data/spec/models/github_organization_spec.rb +10 -8
  134. data/spec/models/github_organizationlinks_spec.rb +9 -7
  135. data/spec/models/github_repositories_spec.rb +12 -10
  136. data/spec/models/github_repositorieslinks_spec.rb +8 -6
  137. data/spec/models/github_repository_spec.rb +14 -12
  138. data/spec/models/github_repositorylinks_spec.rb +8 -6
  139. data/spec/models/github_repositorypermissions_spec.rb +10 -8
  140. data/spec/models/github_respository_container_spec.rb +9 -7
  141. data/spec/models/github_respository_containerlinks_spec.rb +8 -6
  142. data/spec/models/github_scm_spec.rb +11 -9
  143. data/spec/models/github_scmlinks_spec.rb +8 -6
  144. data/spec/models/hudson_master_computer_spec.rb +22 -20
  145. data/spec/models/hudson_master_computerexecutors_spec.rb +12 -10
  146. data/spec/models/hudson_master_computermonitor_data_spec.rb +13 -11
  147. data/spec/models/hudson_spec.rb +21 -19
  148. data/spec/models/hudsonassigned_labels_spec.rb +7 -5
  149. data/spec/models/input_step_impl_spec.rb +13 -11
  150. data/spec/models/input_step_impllinks_spec.rb +8 -6
  151. data/spec/models/label1_spec.rb +7 -5
  152. data/spec/models/link_spec.rb +8 -6
  153. data/spec/models/list_view_spec.rb +11 -9
  154. data/spec/models/multibranch_pipeline_spec.rb +20 -18
  155. data/spec/models/null_scm_spec.rb +7 -5
  156. data/spec/models/organisation_spec.rb +8 -6
  157. data/spec/models/pipeline_activity_spec.rb +21 -19
  158. data/spec/models/pipeline_activityartifacts_spec.rb +10 -8
  159. data/spec/models/pipeline_branchesitem_spec.rb +15 -13
  160. data/spec/models/pipeline_branchesitemlatest_run_spec.rb +20 -18
  161. data/spec/models/pipeline_branchesitempull_request_spec.rb +12 -10
  162. data/spec/models/pipeline_branchesitempull_requestlinks_spec.rb +8 -6
  163. data/spec/models/pipeline_folder_impl_spec.rb +13 -11
  164. data/spec/models/pipeline_impl_spec.rb +15 -13
  165. data/spec/models/pipeline_impllinks_spec.rb +11 -9
  166. data/spec/models/pipeline_run_impl_spec.rb +21 -19
  167. data/spec/models/pipeline_run_impllinks_spec.rb +12 -10
  168. data/spec/models/pipeline_run_node_spec.rb +14 -12
  169. data/spec/models/pipeline_run_nodeedges_spec.rb +8 -6
  170. data/spec/models/pipeline_run_spec.rb +21 -19
  171. data/spec/models/pipeline_runartifacts_spec.rb +10 -8
  172. data/spec/models/pipeline_spec.rb +14 -12
  173. data/spec/models/pipeline_step_impl_spec.rb +15 -13
  174. data/spec/models/pipeline_step_impllinks_spec.rb +9 -7
  175. data/spec/models/pipelinelatest_run_spec.rb +21 -19
  176. data/spec/models/pipelinelatest_runartifacts_spec.rb +10 -8
  177. data/spec/models/queue_blocked_item_spec.rb +18 -16
  178. data/spec/models/queue_item_impl_spec.rb +11 -9
  179. data/spec/models/queue_left_item_spec.rb +19 -17
  180. data/spec/models/queue_spec.rb +8 -6
  181. data/spec/models/response_time_monitor_data_spec.rb +9 -7
  182. data/spec/models/string_parameter_definition_spec.rb +11 -9
  183. data/spec/models/string_parameter_value_spec.rb +9 -7
  184. data/spec/models/swap_space_monitor_memory_usage2_spec.rb +11 -9
  185. data/spec/models/unlabeled_load_statistics_spec.rb +7 -5
  186. data/spec/models/user_spec.rb +11 -9
  187. data/spec/spec_helper.rb +3 -3
  188. data/swaggy_jenkins.gemspec +7 -6
  189. metadata +75 -78
  190. data/spec/api_client_spec.rb +0 -226
  191. data/spec/configuration_spec.rb +0 -42
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64c7775cc1b5bf9da916dd0d6fc1b1d438dc07417d7ea0cc80e0521ff9462724
4
- data.tar.gz: ec57c5f43fc7bf30466feefed1b370a576c8173f7a1db2421913612118338d99
3
+ metadata.gz: 47eb72a5b56c1425a651c2e344cb23c2f719c62bb58befbde279908e1a75e6b8
4
+ data.tar.gz: 31c178f76fe170bc4eee8806daffe76324e9ecdd64a0d1defa668f9521c459a6
5
5
  SHA512:
6
- metadata.gz: a46121b38f86ba8e50319e2e1eb00adfc98aa55e327d1fb4c0ab83734cc5321de2cdceee7ee15392c9bc56bae84608952393e241b85ddb55ac1983d7f7c21a82
7
- data.tar.gz: 23cc8eb4fc920d1bc78b608cfd6a631f535c6fb377deb67e5fa833f0290715780fd312d96521906598f192ecabde441339db1d29838dc1828d36f91de214262a
6
+ metadata.gz: 75f7295bece94c4684d656bf7bd9571ee303369cf5790ac67b6a5a08ec0fe1f711db26fed27d9188487ad791055a6c37152dec1762adf8e899d9cb8f185ce7c4
7
+ data.tar.gz: 5f1ed9ab001659a78f0597dc80181ad40c3356ba984841ae39b8fe617eed5ac1e8a1fd7495c2f854ff92a3bf47f838d30b989313ab33ed39777772d75c556979
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- swaggy_jenkins (2.0.1.pre.pre.0)
4
+ swaggy_jenkins (3.0.1)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -10,38 +10,40 @@ GEM
10
10
  ast (2.4.2)
11
11
  byebug (11.1.3)
12
12
  coderay (1.1.3)
13
- diff-lcs (1.5.0)
14
- ethon (0.15.0)
13
+ diff-lcs (1.5.1)
14
+ ethon (0.16.0)
15
15
  ffi (>= 1.15.0)
16
- ffi (1.15.5)
17
- jaro_winkler (1.5.4)
16
+ ffi (1.16.3)
17
+ jaro_winkler (1.5.6)
18
18
  method_source (1.0.0)
19
- parallel (1.22.1)
20
- parser (3.1.2.0)
19
+ parallel (1.24.0)
20
+ parser (3.3.0.5)
21
21
  ast (~> 2.4.1)
22
- pry (0.13.1)
22
+ racc
23
+ pry (0.14.2)
23
24
  coderay (~> 1.1)
24
25
  method_source (~> 1.0)
25
- pry-byebug (3.9.0)
26
+ pry-byebug (3.10.1)
26
27
  byebug (~> 11.0)
27
- pry (~> 0.13.0)
28
- psych (4.0.4)
28
+ pry (>= 0.13, < 0.15)
29
+ psych (5.1.2)
29
30
  stringio
31
+ racc (1.7.3)
30
32
  rainbow (3.1.1)
31
33
  rake (13.0.6)
32
- rspec (3.11.0)
33
- rspec-core (~> 3.11.0)
34
- rspec-expectations (~> 3.11.0)
35
- rspec-mocks (~> 3.11.0)
36
- rspec-core (3.11.0)
37
- rspec-support (~> 3.11.0)
38
- rspec-expectations (3.11.0)
34
+ rspec (3.13.0)
35
+ rspec-core (~> 3.13.0)
36
+ rspec-expectations (~> 3.13.0)
37
+ rspec-mocks (~> 3.13.0)
38
+ rspec-core (3.13.0)
39
+ rspec-support (~> 3.13.0)
40
+ rspec-expectations (3.13.0)
39
41
  diff-lcs (>= 1.2.0, < 2.0)
40
- rspec-support (~> 3.11.0)
41
- rspec-mocks (3.11.1)
42
+ rspec-support (~> 3.13.0)
43
+ rspec-mocks (3.13.0)
42
44
  diff-lcs (>= 1.2.0, < 2.0)
43
- rspec-support (~> 3.11.0)
44
- rspec-support (3.11.0)
45
+ rspec-support (~> 3.13.0)
46
+ rspec-support (3.13.1)
45
47
  rubocop (0.66.0)
46
48
  jaro_winkler (~> 1.5.1)
47
49
  parallel (~> 1.10)
@@ -50,9 +52,9 @@ GEM
50
52
  rainbow (>= 2.2.2, < 4.0)
51
53
  ruby-progressbar (~> 1.7)
52
54
  unicode-display_width (>= 1.4.0, < 1.6)
53
- ruby-progressbar (1.11.0)
54
- stringio (3.0.2)
55
- typhoeus (1.4.0)
55
+ ruby-progressbar (1.13.0)
56
+ stringio (3.1.0)
57
+ typhoeus (1.4.1)
56
58
  ethon (>= 0.9.0)
57
59
  unicode-display_width (1.5.0)
58
60
 
@@ -67,4 +69,4 @@ DEPENDENCIES
67
69
  swaggy_jenkins!
68
70
 
69
71
  BUNDLED WITH
70
- 2.3.11
72
+ 2.4.22
data/README.md CHANGED
@@ -6,10 +6,11 @@ Jenkins API clients generated from Swagger / Open API specification
6
6
 
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
- - API version: 2.0.1-pre.0
10
- - Package version: 2.0.1-pre.0
9
+ - API version: 3.0.1
10
+ - Package version: 3.0.1
11
+ - Generator version: 7.4.0
11
12
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
- For more information, please visit [http://github.com/cliffano/swaggy-jenkins](http://github.com/cliffano/swaggy-jenkins)
13
+ For more information, please visit [https://github.com/oapicf/swaggy-jenkins](https://github.com/oapicf/swaggy-jenkins)
13
14
 
14
15
  ## Installation
15
16
 
@@ -24,16 +25,16 @@ gem build swaggy_jenkins.gemspec
24
25
  Then either install the gem locally:
25
26
 
26
27
  ```shell
27
- gem install ./swaggy_jenkins-2.0.1-pre.0.gem
28
+ gem install ./swaggy_jenkins-3.0.1.gem
28
29
  ```
29
30
 
30
- (for development, run `gem install --dev ./swaggy_jenkins-2.0.1-pre.0.gem` to install the development dependencies)
31
+ (for development, run `gem install --dev ./swaggy_jenkins-3.0.1.gem` to install the development dependencies)
31
32
 
32
33
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
34
 
34
35
  Finally add this to the Gemfile:
35
36
 
36
- gem 'swaggy_jenkins', '~> 2.0.1-pre.0'
37
+ gem 'swaggy_jenkins', '~> 3.0.1'
37
38
 
38
39
  ### Install from Git
39
40
 
@@ -228,6 +229,7 @@ Class | Method | HTTP request | Description
228
229
  ## Documentation for Authorization
229
230
 
230
231
 
232
+ Authentication schemes defined for the API:
231
233
  ### jenkins_auth
232
234
 
233
235
  - **Type**: HTTP basic authentication
data/bin/bundle CHANGED
@@ -47,7 +47,7 @@ m = Module.new do
47
47
  def lockfile
48
48
  lockfile =
49
49
  case File.basename(gemfile)
50
- when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
50
+ when "gems.rb" then gemfile.sub(/\.rb$/, ".locked")
51
51
  else "#{gemfile}.lock"
52
52
  end
53
53
  File.expand_path(lockfile)
@@ -62,8 +62,9 @@ m = Module.new do
62
62
 
63
63
  def bundler_requirement
64
64
  @bundler_requirement ||=
65
- env_var_version || cli_arg_version ||
66
- bundler_requirement_for(lockfile_version)
65
+ env_var_version ||
66
+ cli_arg_version ||
67
+ bundler_requirement_for(lockfile_version)
67
68
  end
68
69
 
69
70
  def bundler_requirement_for(version)
@@ -71,13 +72,7 @@ m = Module.new do
71
72
 
72
73
  bundler_gem_version = Gem::Version.new(version)
73
74
 
74
- requirement = bundler_gem_version.approximate_recommendation
75
-
76
- return requirement unless Gem.rubygems_version < Gem::Version.new("2.7.0")
77
-
78
- requirement += ".a" if bundler_gem_version.prerelease?
79
-
80
- requirement
75
+ bundler_gem_version.approximate_recommendation
81
76
  end
82
77
 
83
78
  def load_bundler!
data/bin/byebug CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/coderay CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/htmldiff CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/ldiff CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/pry CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/racc ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby2.7
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'racc' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
+
13
+ bundle_binstub = File.expand_path("bundle", __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
+ end
22
+ end
23
+
24
+ require "rubygems"
25
+ require "bundler/setup"
26
+
27
+ load Gem.bin_path("racc", "racc")
data/bin/rake CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/rspec CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/rubocop CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/ruby-parse CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/ruby-rewrite CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -17,6 +17,7 @@ require 'tempfile'
17
17
  require 'time'
18
18
  require 'typhoeus'
19
19
 
20
+
20
21
  module SwaggyJenkinsClient
21
22
  class ApiClient
22
23
  # The Configuration object holding settings to be used in the API client.
@@ -45,9 +46,10 @@ module SwaggyJenkinsClient
45
46
  # Call an API with given options.
46
47
  #
47
48
  # @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
48
- # the data deserialized from response body (could be nil), response status code and response headers.
49
+ # the data deserialized from response body (may be a Tempfile or nil), response status code and response headers.
49
50
  def call_api(http_method, path, opts = {})
50
51
  request = build_request(http_method, path, opts)
52
+ tempfile = download_file(request) if opts[:return_type] == 'File'
51
53
  response = request.run
52
54
 
53
55
  if @config.debugging
@@ -69,7 +71,9 @@ module SwaggyJenkinsClient
69
71
  end
70
72
  end
71
73
 
72
- if opts[:return_type]
74
+ if opts[:return_type] == 'File'
75
+ data = tempfile
76
+ elsif opts[:return_type]
73
77
  data = deserialize(response, opts[:return_type])
74
78
  else
75
79
  data = nil
@@ -125,9 +129,7 @@ module SwaggyJenkinsClient
125
129
  end
126
130
  end
127
131
 
128
- request = Typhoeus::Request.new(url, req_opts)
129
- download_file(request) if opts[:return_type] == 'File'
130
- request
132
+ Typhoeus::Request.new(url, req_opts)
131
133
  end
132
134
 
133
135
  # Builds the HTTP request body
@@ -165,6 +167,8 @@ module SwaggyJenkinsClient
165
167
  # process can use.
166
168
  #
167
169
  # @see Configuration#temp_folder_path
170
+ #
171
+ # @return [Tempfile] the tempfile generated
168
172
  def download_file(request)
169
173
  tempfile = nil
170
174
  encoding = nil
@@ -179,21 +183,24 @@ module SwaggyJenkinsClient
179
183
  prefix = prefix + '-' unless prefix.end_with?('-')
180
184
  encoding = response.body.encoding
181
185
  tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
182
- @tempfile = tempfile
183
186
  end
184
187
  request.on_body do |chunk|
185
188
  chunk.force_encoding(encoding)
186
189
  tempfile.write(chunk)
187
190
  end
188
- request.on_complete do |response|
189
- if tempfile
190
- tempfile.close
191
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
192
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
193
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
194
- "explicitly with `tempfile.delete`"
195
- end
191
+ # run the request to ensure the tempfile is created successfully before returning it
192
+ request.run
193
+ if tempfile
194
+ tempfile.close
195
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
196
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
197
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
198
+ "explicitly with `tempfile.delete`"
199
+ else
200
+ fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}")
196
201
  end
202
+
203
+ tempfile
197
204
  end
198
205
 
199
206
  # Check if the given MIME is a JSON MIME.
@@ -214,15 +221,10 @@ module SwaggyJenkinsClient
214
221
  # @param [String] return_type some examples: "User", "Array<User>", "Hash<String, Integer>"
215
222
  def deserialize(response, return_type)
216
223
  body = response.body
217
-
218
- # handle file downloading - return the File instance processed in request callbacks
219
- # note that response body is empty when the file is written in chunks in request on_body callback
220
- return @tempfile if return_type == 'File'
221
-
222
224
  return nil if body.nil? || body.empty?
223
225
 
224
226
  # return response body directly for String return type
225
- return body if return_type == 'String'
227
+ return body.to_s if return_type == 'String'
226
228
 
227
229
  # ensuring a default content type
228
230
  content_type = response.headers['Content-Type'] || 'application/json'
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -32,6 +32,7 @@ module SwaggyJenkinsClient
32
32
  end
33
33
  else
34
34
  super arg
35
+ @message = arg
35
36
  end
36
37
  end
37
38
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -62,6 +62,16 @@ module SwaggyJenkinsClient
62
62
  # Defines the access token (Bearer) used with OAuth2.
63
63
  attr_accessor :access_token
64
64
 
65
+ # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2.
66
+ # Overrides the access_token if set
67
+ # @return [Proc]
68
+ attr_accessor :access_token_getter
69
+
70
+ # Set this to return data as binary instead of downloading a temp file. When enabled (set to true)
71
+ # HTTP responses with return type `File` will be returned as a stream of binary data.
72
+ # Default to false.
73
+ attr_accessor :return_binary_data
74
+
65
75
  # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
66
76
  # details will be logged with `logger.debug` (see the `logger` attribute).
67
77
  # Default to false.
@@ -142,7 +152,7 @@ module SwaggyJenkinsClient
142
152
  @scheme = 'http'
143
153
  @host = 'localhost'
144
154
  @base_path = ''
145
- @server_index = 0
155
+ @server_index = nil
146
156
  @server_operation_index = {}
147
157
  @server_variables = {}
148
158
  @server_operation_variables = {}
@@ -190,10 +200,12 @@ module SwaggyJenkinsClient
190
200
 
191
201
  # Returns base URL for specified operation based on server settings
192
202
  def base_url(operation = nil)
193
- index = server_operation_index.fetch(operation, server_index)
194
- return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
195
-
196
- server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
203
+ if operation_server_settings.key?(operation) then
204
+ index = server_operation_index.fetch(operation, server_index)
205
+ server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
206
+ else
207
+ server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil)
208
+ end
197
209
  end
198
210
 
199
211
  # Gets API key (with prefix if set).
@@ -208,6 +220,12 @@ module SwaggyJenkinsClient
208
220
  end
209
221
  end
210
222
 
223
+ # Gets access_token using access_token_getter or uses the static access_token
224
+ def access_token_with_refresh
225
+ return access_token if access_token_getter.nil?
226
+ access_token_getter.call
227
+ end
228
+
211
229
  # Gets Basic Auth token string
212
230
  def basic_auth_token
213
231
  'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
@@ -256,8 +274,8 @@ module SwaggyJenkinsClient
256
274
  servers = server_settings if servers == nil
257
275
 
258
276
  # check array index out of bound
259
- if (index < 0 || index >= servers.size)
260
- fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
277
+ if (index.nil? || index < 0 || index >= servers.size)
278
+ fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}"
261
279
  end
262
280
 
263
281
  server = servers[index]
@@ -282,5 +300,6 @@ module SwaggyJenkinsClient
282
300
  url
283
301
  end
284
302
 
303
+
285
304
  end
286
305
  end