ruby_fly 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 55f06ac3ecbfb72364c48953f73b46619d1937ee
4
- data.tar.gz: e266ff7f151957e273f9b804cf88c30e459a1c46
3
+ metadata.gz: a8ea251b06d2d70cb0127363df0ca4a50bebcadd
4
+ data.tar.gz: 8e97b3aef74ed646434768292218191134067824
5
5
  SHA512:
6
- metadata.gz: 0e215a82abc9987016c0e1403f7777d85042b6a3795a13c0a422407b5a31e657d9b524d503acae16a36296bd10e37a6bf19aebf59b01918cbae2ab675d7523b6
7
- data.tar.gz: 2082b22b3d3caf662ad2d80cfc579829ae4b40b7b96401935af03b96847554c2a9e308289241c44c7559291c9fd0db350d65802633b460cce7afa178ac7695ab
6
+ metadata.gz: 94d53292baaf092f5efa3c049c8f00d2051f5605086d6885d68c129822b111f0ea323cf36813b72fbab7519beefd0a63aea29b0a5bd6b2a1f4df070e6d053be8
7
+ data.tar.gz: b8f3c7961612ceafe8e60fcda48df6513898dcd6ba55ebba7a31159595870f5394e94e5ea51b61b2ce82bb3972aa08bf8a39d8a8d8521703019d1b7732a3ce56
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_fly (0.4.0)
4
+ ruby_fly (0.4.1)
5
5
  lino (~> 1.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -21,7 +21,108 @@ Or install it yourself as:
21
21
 
22
22
  ## Usage
23
23
 
24
- TODO: Write usage instructions here
24
+ ### Binary Location
25
+
26
+ RubyFly needs to know where the fly binary is located before it can do anything.
27
+ By default, RubyFly looks on the path however this can be configured with:
28
+
29
+ ```ruby
30
+ RubyFly.configure do |config|
31
+ config.binary = 'vendor/fly/bin/fly'
32
+ end
33
+ ```
34
+
35
+ In addition, each command takes a `binary` keyword argument at initialisation
36
+ that overrides the global configuration value.
37
+
38
+ ### Login
39
+
40
+ Currently the library doesn't support logging in to a Concourse instance so if
41
+ the target instance requires authentication, a session must be manually
42
+ established before any commands are executed. If there are recommendations for
43
+ a good approach to automatic login, please raise an issue or a pull request.
44
+
45
+ ### Commands
46
+
47
+ Currently, there is partial support for the following commands:
48
+ * `RubyFly::Commands::GetPipeline`: fetches the current configuration of a
49
+ pipeline from a target Concourse (`fly get-pipeline`)
50
+ * `RubyFly::Commands::SetPipeline`: submits a pipeline configuration to
51
+ a target Concourse (`fly set-pipeline`)
52
+ * `RubyFly::Commands::UnpausePipeline`: unpauses a pipeline on a target
53
+ Concourse (`fly unpause-pipeline`)
54
+ * `RubyFly::Commands::Version`: returns the version of the fly binary
55
+
56
+ #### `RubyFly::Commands::GetPipeline`
57
+
58
+ The get-pipeline command can be called in the following ways:
59
+
60
+ ```ruby
61
+ RubyFly.get_pipeline(
62
+ target: 'supercorp-ci',
63
+ pipeline: 'supercorp-service')
64
+ RubyFly::Commands::GetPipeline.new.execute(
65
+ target: 'supercorp-ci',
66
+ pipeline: 'supercorp-service')
67
+ ```
68
+
69
+ The get-pipeline command supports the following options passed as keyword
70
+ arguments (as in the example above):
71
+ * `target`: the Concourse instance to target
72
+ * `pipeline`: the pipeline for which to get configuration
73
+
74
+ #### `RubyFly::Commands::SetPipeline`
75
+
76
+ The set-pipeline command can be called in the following ways:
77
+
78
+ ```ruby
79
+ RubyFly.set_pipeline(
80
+ target: 'supercorp-ci',
81
+ pipeline: 'supercorp-service',
82
+ config: 'ci/pipeline.yml')
83
+ RubyFly::Commands::SetPipeline.new.execute(
84
+ target: 'supercorp-ci',
85
+ pipeline: 'supercorp-service',
86
+ config: 'ci/pipeline.yml')
87
+ ```
88
+
89
+ The set-pipeline command supports the following options passed as keyword
90
+ arguments (as in the example above):
91
+ * `target`: the Concourse instance to target
92
+ * `pipeline`: the pipeline for which to set configuration
93
+ * `config`: the local file containing the pipeline configuration
94
+ * `vars`: an hash of variables to be accessible as interpolations
95
+ * `var_files`: an array of paths to files containing variables to be accessible
96
+ as interpolations
97
+ * `non_interactive`: if `false`, any missing variables will be prompted for,
98
+ if `true`, any missing variables will cause the command to fail
99
+
100
+ #### `RubyFly::Commands::UnpausePipeline`
101
+
102
+ The unpause-pipeline command can be called in the following ways:
103
+
104
+ ```ruby
105
+ RubyFly.unpause_pipeline(
106
+ target: 'supercorp-ci',
107
+ pipeline: 'supercorp-service')
108
+ RubyFly::Commands::UnpausePipeline.new.execute(
109
+ target: 'supercorp-ci',
110
+ pipeline: 'supercorp-service')
111
+ ```
112
+
113
+ The get-pipeline command supports the following options passed as keyword
114
+ arguments (as in the example above):
115
+ * `target`: the Concourse instance to target
116
+ * `pipeline`: the pipeline to unpause
117
+
118
+ #### `RubyFly::Commands::Version`
119
+
120
+ The version command can be called in the following ways:
121
+
122
+ ```ruby
123
+ version = RubyFly.version
124
+ version = RubyFly::Commands::Version.new.execute
125
+ ```
25
126
 
26
127
  ## Development
27
128
 
data/lib/ruby_fly.rb CHANGED
@@ -29,7 +29,7 @@ module RubyFly
29
29
  end
30
30
 
31
31
  def version
32
- Commands::Version.new.execute()
32
+ Commands::Version.new.execute
33
33
  end
34
34
  end
35
35
  extend ClassMethods
@@ -1,3 +1,3 @@
1
1
  module RubyFly
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_fly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-20 00:00:00.000000000 Z
11
+ date: 2017-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lino