jujube 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80df34de2a96d739460c44eaa0eda01f6f6e7ea5
4
- data.tar.gz: 4d8b6e80aa1ad6a483465f11ae554a9ec1552352
3
+ metadata.gz: eac8dcc322729f19c5b0fd1a0db99ce632a80ece
4
+ data.tar.gz: 5273ed11c7de17307ac71275716f0545800246bb
5
5
  SHA512:
6
- metadata.gz: 52a68f97e65f9ed50feef8e13ccd5a57831f62198da01b4c4f210ba7b15c25347b6488d0a5e97a75e31ed35ba2a1b6fbb1eeb17e767e9c002bbb6fd3428d947b
7
- data.tar.gz: 6c5a4a2ae6f04d5c85e0ac3af8f84f83c18229698c51543a36da925a7a4e98db1826c09f758468ecec8c03e210626e1a3cfca8f79096d27145810ec5f8ce11fd
6
+ metadata.gz: 1125ab14a40bafbed7f3ba0c5f7891ab01a478325ceb71e987e9522f19736a856803b285401621b57533f89b65db03bad7af176fcc2072f7e7271e1e34a5e0b6
7
+ data.tar.gz: b6732b0f405b5e7b100156777c787db8cccd519622512f3a9ae92f16e4355859b1808f6976af18c0b5518a3fe5da74694f72c3568d0fd51acaf42b7cb6b91e04
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Jujube
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/jujube.png)](http://badge.fury.io/rb/jujube)
3
4
  [![Build Status](https://travis-ci.org/randycoulman/jujube.svg?branch=master)](https://travis-ci.org/randycoulman/jujube)
4
5
  [![Code Climate](https://codeclimate.com/github/randycoulman/jujube.png)](https://codeclimate.com/github/randycoulman/jujube)
5
6
 
@@ -178,3 +179,8 @@ tackle it, contact me and I'll be happy to help.
178
179
  3. Commit your changes (`git commit -am 'Add some feature'`)
179
180
  4. Push to the branch (`git push origin my-new-feature`)
180
181
  5. Create new Pull Request
182
+
183
+ ## Acknowledgements
184
+
185
+ Thanks to Jason Roelofs, Chris Gaffney, and Sarah Mei for their input and feedback as I worked
186
+ on this project.
@@ -8,6 +8,13 @@ job "endToEnd" do |j|
8
8
  j.axes << slave(:arch, %w{i386 amd64})
9
9
 
10
10
  j.scm << git(url: "URL", branches: %w{master dev}, wipe_workspace: false)
11
+ j.scm << store(script: "SCRIPT",
12
+ repository: "REPO",
13
+ version_regex: "REGEX",
14
+ parcel_builder_file: "FILENAME",
15
+ minimum_blessing: "BLESSING") do |pundles|
16
+ pundles << package("PACKAGE") << bundle("BUNDLE")
17
+ end
11
18
 
12
19
  j.triggers << pollscm("INTERVAL")
13
20
  j.triggers << pollurl(cron: "CRON", polling_node: "NODE") do |urls|
@@ -21,6 +21,15 @@
21
21
  - master
22
22
  - dev
23
23
  wipe-workspace: false
24
+ - store:
25
+ script: SCRIPT
26
+ repository: REPO
27
+ version-regex: REGEX
28
+ parcel-builder-file: FILENAME
29
+ minimum-blessing: BLESSING
30
+ pundles:
31
+ - package: PACKAGE
32
+ - bundle: BUNDLE
24
33
  triggers:
25
34
  - pollscm: INTERVAL
26
35
  - pollurl:
@@ -6,7 +6,7 @@ module Jujube
6
6
  extend Macros
7
7
 
8
8
  # @!method git(options = {})
9
- # Specify a `git` component for a job.
9
+ # Specify a `git` SCM for a job.
10
10
  #
11
11
  # See {http://ci.openstack.org/jenkins-job-builder/publishers.html#scm.git}.
12
12
  #
@@ -14,6 +14,50 @@ module Jujube
14
14
  # @return [Hash] The specification for the component.
15
15
  standard_component :git
16
16
 
17
+ # Specify a `store` SCM for a job.
18
+ #
19
+ # This trigger requires support in jenkins-job-builder that has not yet been merged.
20
+ # See {https://review.openstack.org/85729} for the patch.
21
+ #
22
+ # `store` can watch multiple pundles (packages or bundles) The specification for each
23
+ # pundle is added in a nested configuration block using the {#package} or {#bundle} method.
24
+ #
25
+ # @example
26
+ # job "store-example" do |j|
27
+ # j.scm << store(script: "SCRIPT", repository: "REPO") do |pundles|
28
+ # pundles << package("PACKAGE")
29
+ # pundles << bundle("BUNDLE")
30
+ # end
31
+ # end
32
+ #
33
+ # @param options [Hash] Top-level options for configuring the component.
34
+ # @yieldparam pundles [Array] An array to which nested pundle specifications should be
35
+ # added by the block.
36
+ # @return [Hash] The specification for the component.
37
+ def store(options = {}, &block)
38
+ to_config("store", nested_options(:pundles, options, &block))
39
+ end
40
+
41
+ # @!group store Pundle Specifications
42
+
43
+ # Specify a `package` to check for a {#store} SCM.
44
+ #
45
+ # @param name [String] The name of the package to check.
46
+ # @return [Hash] The specification for the package.
47
+ def package(name)
48
+ {"package" => name}
49
+ end
50
+
51
+ # Specify a `bundle` to check for a {#store} SCM.
52
+ #
53
+ # @param name [String] The name of the bundle to check.
54
+ # @return [Hash] The specification for the package.
55
+ def bundle(name)
56
+ {"bundle" => name}
57
+ end
58
+
59
+ # @!endgroup
60
+
17
61
  end
18
62
  end
19
63
  end
@@ -17,7 +17,7 @@ module Jujube
17
17
  # Specify a `pollurl` trigger for a job.
18
18
  #
19
19
  # This trigger requires support in jenkins-job-builder that has not yet been merged.
20
- # See {https://review.openstack.org/#/c/83524/} for the patch.
20
+ # See {https://review.openstack.org/83524/} for the patch.
21
21
  #
22
22
  # `pollurl` can poll several URLs. Each URL specification is added
23
23
  # in a nested configuration block using the {#url} method.
@@ -1,5 +1,5 @@
1
1
  # The main namespace for the Jujube gem.
2
2
  module Jujube
3
3
  # The current version of the Jujube gem.
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
@@ -8,4 +8,18 @@ class ScmTest < Minitest::Test
8
8
  actual = git(url: "URL", branches: %w{master dev}, wipe_workspace: false)
9
9
  assert_equal(expected, actual)
10
10
  end
11
+
12
+ def test_store
13
+ expected = {"store" =>
14
+ {
15
+ "script" => "SCRIPT",
16
+ "repository" => "REPO",
17
+ "pundles" => [{"package" => "PACKAGE"}, {"bundle" => "BUNDLE"}]
18
+ }
19
+ }
20
+ actual = store(script: "SCRIPT", repository: "REPO") do |pundles|
21
+ pundles << package("PACKAGE") << bundle("BUNDLE")
22
+ end
23
+ assert_equal(expected, actual)
24
+ end
11
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jujube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Randy Coulman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-29 00:00:00.000000000 Z
11
+ date: 2014-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler