rudder 0.1.0
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 +7 -0
- data/.gitignore +14 -0
- data/.rspec +3 -0
- data/.rubocop.yml +16 -0
- data/.travis.yml +5 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +53 -0
- data/LICENSE +21 -0
- data/README.md +101 -0
- data/Rakefile +24 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/docker-compose.yml +26 -0
- data/docs/Rudder.html +382 -0
- data/docs/Rudder/DSL.html +456 -0
- data/docs/Rudder/DSL/Component.html +645 -0
- data/docs/Rudder/DSL/Group.html +733 -0
- data/docs/Rudder/DSL/Job.html +487 -0
- data/docs/Rudder/DSL/Pipeline.html +1869 -0
- data/docs/Rudder/DSL/Resource.html +584 -0
- data/docs/Rudder/DSL/ResourceType.html +223 -0
- data/docs/Rudder/DSL/Util.html +324 -0
- data/docs/_index.html +211 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +496 -0
- data/docs/file.README.html +191 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +191 -0
- data/docs/js/app.js +303 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +347 -0
- data/docs/top-level-namespace.html +110 -0
- data/examples/README.md +6 -0
- data/examples/groups/README.md +12 -0
- data/examples/groups/groups_pipeline.rb +34 -0
- data/examples/groups/jobs/bash_stuff/date.rb +16 -0
- data/examples/groups/jobs/bash_stuff/hello.rb +17 -0
- data/examples/groups/jobs/git_stuff/log.rb +22 -0
- data/examples/groups/jobs/git_stuff/ls.rb +21 -0
- data/examples/groups/resources/rudder_git.rb +6 -0
- data/examples/groups/resources/timer.rb +5 -0
- data/examples/hello_world_pipeline.rb +44 -0
- data/examples/images/groups/groups_all.png +0 -0
- data/examples/images/groups/groups_bash_stuff.png +0 -0
- data/examples/images/groups/groups_git_stuff.png +0 -0
- data/examples/images/hello_world.png +0 -0
- data/examples/images/includes/includes.png +0 -0
- data/examples/images/shared/borrows.png +0 -0
- data/examples/images/shared/common.png +0 -0
- data/examples/images/shared/wrapper.png +0 -0
- data/examples/includes/README.md +7 -0
- data/examples/includes/includes_pipeline.rb +6 -0
- data/examples/includes/jobs/log.rb +15 -0
- data/examples/includes/resources/rudder_git.rb +5 -0
- data/examples/shared/README.md +21 -0
- data/examples/shared/borrows_pipeline.rb +31 -0
- data/examples/shared/common_pipeline.rb +34 -0
- data/examples/shared/wrapper_pipeline.rb +51 -0
- data/exe/rudder +52 -0
- data/lib/rudder.rb +35 -0
- data/lib/rudder/dsl.rb +54 -0
- data/lib/rudder/dsl/component.rb +79 -0
- data/lib/rudder/dsl/group.rb +110 -0
- data/lib/rudder/dsl/job.rb +65 -0
- data/lib/rudder/dsl/pipeline.rb +374 -0
- data/lib/rudder/dsl/resource.rb +82 -0
- data/lib/rudder/dsl/resource_type.rb +45 -0
- data/lib/rudder/dsl/util.rb +48 -0
- data/lib/rudder/version.rb +5 -0
- data/lib/tasks/docker.rb +11 -0
- data/rudder.gemspec +29 -0
- metadata +189 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 67ae445eade40e9098610ccf4afe8c88e54ab817d7ee633024640daffe2f75e1
|
|
4
|
+
data.tar.gz: 970c11471669d37bbc8dc9b715eac235ecfbf8b80c3d4543c0810b0bbbacbc72
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: cc99d9c92c252d6a3babb494e96aa794cfcf97f3163fa31d371bd1b02607bcb9a67f48c4ed94886e0fd6a8e4cf14d6613d6e884bfa31a3da3dde598de7336204
|
|
7
|
+
data.tar.gz: 82ff21ede8e730806944085a0f0bc2259669b220c83c02948276c1ed2a68c2747e4fdcfa28e07bb871fbf120d32ee36782b270be5ecc41acb0dc9e26c1540bce
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Metrics/LineLength:
|
|
2
|
+
Max: 100
|
|
3
|
+
|
|
4
|
+
Metrics/MethodLength:
|
|
5
|
+
Max: 15
|
|
6
|
+
|
|
7
|
+
# A few methods in pipeline.rb are a hair more complex
|
|
8
|
+
# than the default settings like
|
|
9
|
+
Metrics/AbcSize:
|
|
10
|
+
Max: 17
|
|
11
|
+
|
|
12
|
+
Metrics/BlockLength:
|
|
13
|
+
Enabled: true
|
|
14
|
+
Exclude:
|
|
15
|
+
- spec/**/*
|
|
16
|
+
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
rudder (0.1.0)
|
|
5
|
+
|
|
6
|
+
GEM
|
|
7
|
+
remote: https://rubygems.org/
|
|
8
|
+
specs:
|
|
9
|
+
ast (2.4.0)
|
|
10
|
+
diff-lcs (1.3)
|
|
11
|
+
jaro_winkler (1.5.3)
|
|
12
|
+
parallel (1.17.0)
|
|
13
|
+
parser (2.6.3.0)
|
|
14
|
+
ast (~> 2.4.0)
|
|
15
|
+
rainbow (3.0.0)
|
|
16
|
+
rake (10.5.0)
|
|
17
|
+
rspec (3.8.0)
|
|
18
|
+
rspec-core (~> 3.8.0)
|
|
19
|
+
rspec-expectations (~> 3.8.0)
|
|
20
|
+
rspec-mocks (~> 3.8.0)
|
|
21
|
+
rspec-core (3.8.2)
|
|
22
|
+
rspec-support (~> 3.8.0)
|
|
23
|
+
rspec-expectations (3.8.4)
|
|
24
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
25
|
+
rspec-support (~> 3.8.0)
|
|
26
|
+
rspec-mocks (3.8.1)
|
|
27
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
28
|
+
rspec-support (~> 3.8.0)
|
|
29
|
+
rspec-support (3.8.2)
|
|
30
|
+
rubocop (0.73.0)
|
|
31
|
+
jaro_winkler (~> 1.5.1)
|
|
32
|
+
parallel (~> 1.10)
|
|
33
|
+
parser (>= 2.6)
|
|
34
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
35
|
+
ruby-progressbar (~> 1.7)
|
|
36
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
|
37
|
+
ruby-progressbar (1.10.1)
|
|
38
|
+
unicode-display_width (1.6.0)
|
|
39
|
+
yard (0.9.20)
|
|
40
|
+
|
|
41
|
+
PLATFORMS
|
|
42
|
+
ruby
|
|
43
|
+
|
|
44
|
+
DEPENDENCIES
|
|
45
|
+
bundler (~> 1.16)
|
|
46
|
+
rake (~> 10.0)
|
|
47
|
+
rspec (~> 3.0)
|
|
48
|
+
rubocop (~> 0.73.0)
|
|
49
|
+
rudder!
|
|
50
|
+
yard (~> 0.9.2)
|
|
51
|
+
|
|
52
|
+
BUNDLED WITH
|
|
53
|
+
1.16.1
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 jhmcstanton
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Rudder
|
|
2
|
+
|
|
3
|
+
This gem provides a DSL for building [Concourse CI](https://concourse-ci.org/) pipelines.
|
|
4
|
+
|
|
5
|
+
Head over to [jhmcstanton.github.io/rudder](https://jhmcstanton.github.io/rudder)
|
|
6
|
+
for the rendered docs.
|
|
7
|
+
|
|
8
|
+
## Goals
|
|
9
|
+
|
|
10
|
+
The intent of this project is to allow Concourse users to build complex pipelines with
|
|
11
|
+
a fully featured language rather than error-prone YAML files.
|
|
12
|
+
|
|
13
|
+
Related goals:
|
|
14
|
+
|
|
15
|
+
- Support referencing first-class concourse features (`resource-types`, `resources`,
|
|
16
|
+
`jobs`, etc) inside pipeline definition (for example, a task may be able to use
|
|
17
|
+
a previously defined resource as an input by passing a reference to it, rather
|
|
18
|
+
than just its name)
|
|
19
|
+
- Support breaking pipeline definitions into multiple pieces to allow composing
|
|
20
|
+
them together
|
|
21
|
+
- Small amounts of pipeline validation
|
|
22
|
+
|
|
23
|
+
### Current State
|
|
24
|
+
|
|
25
|
+
Currently this project supports building a pipeline from a single definition file.
|
|
26
|
+
Pipelines can utilize other pipeline definitions by either entirely importing
|
|
27
|
+
the contents or borrowing only specific pieces.
|
|
28
|
+
|
|
29
|
+
TODOs:
|
|
30
|
+
|
|
31
|
+
- Add more unit tests
|
|
32
|
+
|
|
33
|
+
## Non-Goals
|
|
34
|
+
|
|
35
|
+
- Tieing this project directly to concourse. The ecosystem is fairly large, so supporting
|
|
36
|
+
all resources the community creates or each new feature of concourse would be arduous.
|
|
37
|
+
Instead this aims to be general, at the cost of allowing users to create incorrect
|
|
38
|
+
pipelines
|
|
39
|
+
|
|
40
|
+
## Development
|
|
41
|
+
|
|
42
|
+
Use `bundle exec rake docker_up` to stand up a local concourse instance
|
|
43
|
+
for pipeline development. Credit goes to Stark and Wayne for their excellent
|
|
44
|
+
[Concourse tutorial](https://github.com/starkandwayne/concourse-tutorial/) that
|
|
45
|
+
includes the `docker-compose.yml` found here.
|
|
46
|
+
|
|
47
|
+
## Installation
|
|
48
|
+
|
|
49
|
+
Add this line to your application's Gemfile:
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
gem 'rudder'
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
And then execute:
|
|
56
|
+
|
|
57
|
+
$ bundle
|
|
58
|
+
|
|
59
|
+
Or install it yourself as:
|
|
60
|
+
|
|
61
|
+
$ gem install rudder
|
|
62
|
+
|
|
63
|
+
## Usage
|
|
64
|
+
|
|
65
|
+
### DSL
|
|
66
|
+
See the [DSL class documentation](https://jhmcstanton.github.io/rudder/Rudder/DSL.html)
|
|
67
|
+
for specific details.
|
|
68
|
+
|
|
69
|
+
### Compiling
|
|
70
|
+
|
|
71
|
+
Compile your `Rudder` definitions using the provided CLI tool:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Usage: rudder [options]
|
|
75
|
+
-o, --output YAML_PATH YAML_PATH to write the pipeline config
|
|
76
|
+
-c, --config RUDDER_CONFIG Path to the RUDDER_CONFIG file to evaluate
|
|
77
|
+
-v, --version Show version
|
|
78
|
+
```
|
|
79
|
+
## Development
|
|
80
|
+
|
|
81
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
82
|
+
|
|
83
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
84
|
+
|
|
85
|
+
### Docs
|
|
86
|
+
|
|
87
|
+
Build the docs with
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
bundle exec rake yard
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Contributing
|
|
94
|
+
|
|
95
|
+
Bug reports and pull requests are welcome on GitHub at
|
|
96
|
+
https://github.com/jhmcstanton/rudder.
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
The gem is available as open source under the terms of the
|
|
101
|
+
[MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'tasks/docker'
|
|
4
|
+
|
|
5
|
+
require 'bundler/gem_tasks'
|
|
6
|
+
require 'rspec/core/rake_task'
|
|
7
|
+
require 'yard'
|
|
8
|
+
|
|
9
|
+
RSpec::Core::RakeTask.new(:unit) do |t|
|
|
10
|
+
t.pattern = Dir['spec/*/**/*_spec.rb'].reject { |f| f['/integration'] }
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
RSpec::Core::RakeTask.new(:integration) do |t|
|
|
14
|
+
t.pattern = 'spec/integration/**/*_spec.rb'
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
task full_suite: %i[docker_up unit integration docker_down]
|
|
18
|
+
|
|
19
|
+
YARD::Rake::YardocTask.new do |t|
|
|
20
|
+
t.files = ['lib/**/*.rb', 'exe/rudder', 'README.md', 'LICENCE']
|
|
21
|
+
t.options = ['-o', 'docs/']
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
task default: :unit
|
data/bin/console
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require 'bundler/setup'
|
|
5
|
+
require 'rudder'
|
|
6
|
+
|
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
9
|
+
|
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
11
|
+
# require "pry"
|
|
12
|
+
# Pry.start
|
|
13
|
+
|
|
14
|
+
require 'irb'
|
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/docker-compose.yml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: "3"
|
|
3
|
+
|
|
4
|
+
services:
|
|
5
|
+
concourse-db:
|
|
6
|
+
image: postgres
|
|
7
|
+
environment:
|
|
8
|
+
- POSTGRES_DB=concourse
|
|
9
|
+
- POSTGRES_PASSWORD=concourse_pass
|
|
10
|
+
- POSTGRES_USER=concourse_user
|
|
11
|
+
- PGDATA=/database
|
|
12
|
+
|
|
13
|
+
concourse:
|
|
14
|
+
image: concourse/concourse:5.4.0
|
|
15
|
+
command: quickstart
|
|
16
|
+
privileged: true
|
|
17
|
+
depends_on: [concourse-db]
|
|
18
|
+
ports: ["8080:8080"]
|
|
19
|
+
environment:
|
|
20
|
+
- CONCOURSE_POSTGRES_HOST=concourse-db
|
|
21
|
+
- CONCOURSE_POSTGRES_USER=concourse_user
|
|
22
|
+
- CONCOURSE_POSTGRES_PASSWORD=concourse_pass
|
|
23
|
+
- CONCOURSE_POSTGRES_DATABASE=concourse
|
|
24
|
+
- CONCOURSE_EXTERNAL_URL
|
|
25
|
+
- CONCOURSE_ADD_LOCAL_USER=admin:admin
|
|
26
|
+
- CONCOURSE_MAIN_TEAM_LOCAL_USER=admin
|
data/docs/Rudder.html
ADDED
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Module: Rudder
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.9.20
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
pathId = "Rudder";
|
|
19
|
+
relpath = '';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="nav_wrap">
|
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
|
32
|
+
<div id="resizer"></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="main" tabindex="-1">
|
|
36
|
+
<div id="header">
|
|
37
|
+
<div id="menu">
|
|
38
|
+
|
|
39
|
+
<a href="_index.html">Index (R)</a> »
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<span class="title">Rudder</span>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="search">
|
|
47
|
+
|
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
|
49
|
+
href="class_list.html">
|
|
50
|
+
|
|
51
|
+
<svg width="24" height="24">
|
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
</svg>
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
<div class="clear"></div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="content"><h1>Module: Rudder
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<dl>
|
|
80
|
+
<dt>Defined in:</dt>
|
|
81
|
+
<dd>lib/rudder.rb<span class="defines">,<br />
|
|
82
|
+
lib/rudder/dsl.rb,<br /> lib/rudder/dsl/job.rb,<br /> lib/rudder/version.rb,<br /> lib/rudder/dsl/util.rb,<br /> lib/rudder/dsl/group.rb,<br /> lib/rudder/dsl/pipeline.rb,<br /> lib/rudder/dsl/resource.rb,<br /> lib/rudder/dsl/component.rb,<br /> lib/rudder/dsl/resource_type.rb</span>
|
|
83
|
+
</dd>
|
|
84
|
+
</dl>
|
|
85
|
+
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<h2>Overview</h2><div class="docstring">
|
|
89
|
+
<div class="discussion">
|
|
90
|
+
|
|
91
|
+
<p>Methods to compile Rudder definitions to Concourse Pipeline definitions</p>
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
<div class="tags">
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
</div><h2>Defined Under Namespace</h2>
|
|
100
|
+
<p class="children">
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Rudder/DSL.html" title="Rudder::DSL (module)">DSL</a></span>
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</p>
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
<h2>
|
|
112
|
+
Constant Summary
|
|
113
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
|
114
|
+
</h2>
|
|
115
|
+
|
|
116
|
+
<dl class="constants">
|
|
117
|
+
|
|
118
|
+
<dt id="VERSION-constant" class="">VERSION =
|
|
119
|
+
|
|
120
|
+
</dt>
|
|
121
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>'</span></span></pre></dd>
|
|
122
|
+
|
|
123
|
+
</dl>
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
<h2>
|
|
134
|
+
Class Method Summary
|
|
135
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
136
|
+
</h2>
|
|
137
|
+
|
|
138
|
+
<ul class="summary">
|
|
139
|
+
|
|
140
|
+
<li class="public ">
|
|
141
|
+
<span class="summary_signature">
|
|
142
|
+
|
|
143
|
+
<a href="#compile-class_method" title="compile (class method)">.<strong>compile</strong>(path) ⇒ Hash </a>
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
</span>
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
<span class="summary_desc"><div class='inline'>
|
|
158
|
+
<p>Compiles a <span class='object_link'><a href="Rudder/DSL/Pipeline.html" title="Rudder::DSL::Pipeline (class)">DSL::Pipeline</a></span> definition from <code>path</code> to a
|
|
159
|
+
Hash.</p>
|
|
160
|
+
</div></span>
|
|
161
|
+
|
|
162
|
+
</li>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
<li class="public ">
|
|
166
|
+
<span class="summary_signature">
|
|
167
|
+
|
|
168
|
+
<a href="#dump-class_method" title="dump (class method)">.<strong>dump</strong>(pipeline, output) ⇒ nil </a>
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
</span>
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
<span class="summary_desc"><div class='inline'>
|
|
183
|
+
<p>Dumps a <span class='object_link'><a href="Rudder/DSL/Pipeline.html" title="Rudder::DSL::Pipeline (class)">DSL::Pipeline</a></span> or Pipeline Hash to the provided file
|
|
184
|
+
handle <code>output</code>.</p>
|
|
185
|
+
</div></span>
|
|
186
|
+
|
|
187
|
+
</li>
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
</ul>
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
<div id="class_method_details" class="method_details_list">
|
|
196
|
+
<h2>Class Method Details</h2>
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
<div class="method_details first">
|
|
200
|
+
<h3 class="signature first" id="compile-class_method">
|
|
201
|
+
|
|
202
|
+
.<strong>compile</strong>(path) ⇒ <tt>Hash</tt>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
</h3><div class="docstring">
|
|
209
|
+
<div class="discussion">
|
|
210
|
+
|
|
211
|
+
<p>Compiles a <span class='object_link'><a href="Rudder/DSL/Pipeline.html" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span> definition from <code>path</code> to a
|
|
212
|
+
Hash</p>
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
<div class="tags">
|
|
218
|
+
<p class="tag_title">Parameters:</p>
|
|
219
|
+
<ul class="param">
|
|
220
|
+
|
|
221
|
+
<li>
|
|
222
|
+
|
|
223
|
+
<span class='name'>path</span>
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
—
|
|
231
|
+
<div class='inline'>
|
|
232
|
+
<p>the path to the <code>Rudder</code> definition</p>
|
|
233
|
+
</div>
|
|
234
|
+
|
|
235
|
+
</li>
|
|
236
|
+
|
|
237
|
+
</ul>
|
|
238
|
+
|
|
239
|
+
<p class="tag_title">Returns:</p>
|
|
240
|
+
<ul class="return">
|
|
241
|
+
|
|
242
|
+
<li>
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
—
|
|
250
|
+
<div class='inline'>
|
|
251
|
+
<p>Concourse YAML friendly hash</p>
|
|
252
|
+
</div>
|
|
253
|
+
|
|
254
|
+
</li>
|
|
255
|
+
|
|
256
|
+
</ul>
|
|
257
|
+
|
|
258
|
+
</div><table class="source_code">
|
|
259
|
+
<tr>
|
|
260
|
+
<td>
|
|
261
|
+
<pre class="lines">
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
20
|
|
265
|
+
21
|
|
266
|
+
22</pre>
|
|
267
|
+
</td>
|
|
268
|
+
<td>
|
|
269
|
+
<pre class="code"><span class="info file"># File 'lib/rudder.rb', line 20</span>
|
|
270
|
+
|
|
271
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_compile'>compile</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
|
272
|
+
<span class='const'><span class='object_link'><a href="" title="Rudder (module)">Rudder</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Rudder/DSL.html" title="Rudder::DSL (module)">DSL</a></span></span><span class='period'>.</span><span class='id identifier rubyid_eval_from_file'><span class='object_link'><a href="Rudder/DSL.html#eval_from_file-class_method" title="Rudder::DSL.eval_from_file (method)">eval_from_file</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_h'><span class='object_link'><a href="Rudder/DSL/Pipeline.html#to_h-instance_method" title="Rudder::DSL::Pipeline#to_h (method)">to_h</a></span></span>
|
|
273
|
+
<span class='kw'>end</span></pre>
|
|
274
|
+
</td>
|
|
275
|
+
</tr>
|
|
276
|
+
</table>
|
|
277
|
+
</div>
|
|
278
|
+
|
|
279
|
+
<div class="method_details ">
|
|
280
|
+
<h3 class="signature " id="dump-class_method">
|
|
281
|
+
|
|
282
|
+
.<strong>dump</strong>(pipeline, output) ⇒ <tt>nil</tt>
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
</h3><div class="docstring">
|
|
289
|
+
<div class="discussion">
|
|
290
|
+
|
|
291
|
+
<p>Dumps a <span class='object_link'><a href="Rudder/DSL/Pipeline.html" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span> or Pipeline Hash to the provided file
|
|
292
|
+
handle <code>output</code></p>
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
<div class="tags">
|
|
298
|
+
<p class="tag_title">Parameters:</p>
|
|
299
|
+
<ul class="param">
|
|
300
|
+
|
|
301
|
+
<li>
|
|
302
|
+
|
|
303
|
+
<span class='name'>pipeline</span>
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
<span class='type'>(<tt><span class='object_link'><a href="Rudder/DSL/Pipeline.html" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span></tt>)</span>
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
—
|
|
311
|
+
<div class='inline'>
|
|
312
|
+
<p>definition. Assumed to be evaluated.</p>
|
|
313
|
+
</div>
|
|
314
|
+
|
|
315
|
+
</li>
|
|
316
|
+
|
|
317
|
+
<li>
|
|
318
|
+
|
|
319
|
+
<span class='name'>output</span>
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
<span class='type'>(<tt>File</tt>)</span>
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
—
|
|
327
|
+
<div class='inline'>
|
|
328
|
+
<p>handle to dump YAML to</p>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
</li>
|
|
332
|
+
|
|
333
|
+
</ul>
|
|
334
|
+
|
|
335
|
+
<p class="tag_title">Returns:</p>
|
|
336
|
+
<ul class="return">
|
|
337
|
+
|
|
338
|
+
<li>
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
<span class='type'>(<tt>nil</tt>)</span>
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
</li>
|
|
346
|
+
|
|
347
|
+
</ul>
|
|
348
|
+
|
|
349
|
+
</div><table class="source_code">
|
|
350
|
+
<tr>
|
|
351
|
+
<td>
|
|
352
|
+
<pre class="lines">
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
32
|
|
356
|
+
33
|
|
357
|
+
34</pre>
|
|
358
|
+
</td>
|
|
359
|
+
<td>
|
|
360
|
+
<pre class="code"><span class="info file"># File 'lib/rudder.rb', line 32</span>
|
|
361
|
+
|
|
362
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span><span class='lparen'>(</span><span class='id identifier rubyid_pipeline'>pipeline</span><span class='comma'>,</span> <span class='id identifier rubyid_output'>output</span><span class='rparen'>)</span>
|
|
363
|
+
<span class='id identifier rubyid_output'>output</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span><span class='lparen'>(</span><span class='id identifier rubyid_pipeline'>pipeline</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
364
|
+
<span class='kw'>end</span></pre>
|
|
365
|
+
</td>
|
|
366
|
+
</tr>
|
|
367
|
+
</table>
|
|
368
|
+
</div>
|
|
369
|
+
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
</div>
|
|
373
|
+
|
|
374
|
+
<div id="footer">
|
|
375
|
+
Generated on Thu Aug 1 22:21:14 2019 by
|
|
376
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
377
|
+
0.9.20 (ruby-2.5.1).
|
|
378
|
+
</div>
|
|
379
|
+
|
|
380
|
+
</div>
|
|
381
|
+
</body>
|
|
382
|
+
</html>
|