docker_rack 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a5091e82378e3045eda7fb36313e9b701ab4fad4
4
+ data.tar.gz: afbf2b2d7c55033a42c307bf0753bf1a1aa64fd3
5
+ SHA512:
6
+ metadata.gz: f3e0ad2b9da8cb5358b0e6054287622f404206f55ec83efc4b62c0952a574cbc7a5776874b25b287c9cdaede352c4ce7fd2cd32c77d8648c6e859a1fdaa89d0d
7
+ data.tar.gz: a0db638f1bb5d5734de443c9dd617ea6c4adc9c9f3bf6d77bda5936ff33bc91c412ba99894d0d89bbb1bc91b7449dbaf5876221b3c1c18b73d16aaeb2de8e451
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ .idea/
2
+ *.gem
data/.rubocop.yml ADDED
@@ -0,0 +1,8 @@
1
+ #######
2
+ # WIP These should all go back to defaults at some point
3
+ Metrics/AbcSize:
4
+ Max: 22
5
+ Metrics/MethodLength:
6
+ Max: 20
7
+ Metrics/ClassLength:
8
+ Max: 190
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in jenkins_pipeline_builder.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 IgorShare
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ 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, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/bin/docker_rack ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
4
+ require 'docker_rack'
5
+ DockerRack::CLI::Base.start
@@ -0,0 +1,35 @@
1
+ require 'thor'
2
+
3
+ module DockerRack
4
+ module CLI
5
+ class Base < Thor
6
+ # class_option :username, aliases: '-u', desc: 'Name of Jenkins user'
7
+ # class_option :password, aliases: '-p', desc: 'Password of Jenkins user'
8
+ # class_option :password_base64, aliases: '-b', desc: 'Base 64 encoded password of Jenkins user'
9
+ # class_option :server, aliases: '-s', desc: 'Jenkins server IP address or URL'
10
+ # class_option :server_port, aliases: '-o', desc: 'Jenkins port'
11
+ # class_option :creds_file, aliases: '-c', desc: 'Credentials file for communicating with Jenkins server'
12
+ # class_option :debug, type: :boolean, aliases: '-d', desc: 'Run in debug mode (no Jenkins changes)', default: false
13
+
14
+ map '-v' => :version
15
+
16
+ desc 'version', 'Shows current version'
17
+ # CLI command that returns the version of Jenkins API Client
18
+ def version
19
+ puts DockerRack::VERSION
20
+ end
21
+
22
+ # desc 'pipeline [subcommand]', 'Provides functions to access pipeline functions of the Jenkins CI server'
23
+ # subcommand 'pipeline', CLI::Pipeline
24
+ #
25
+ # desc 'view [subcommand]', 'Provides functions to access view interface of Jenkins CI server'
26
+ # subcommand 'view', CLI::View
27
+ #
28
+ # desc 'list [type]', 'Lists all registered modules of a type'
29
+ # subcommand 'list', List
30
+ #
31
+ # desc 'describe [type]', 'Describe a module'
32
+ # subcommand 'describe', Describe
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,3 @@
1
+ module DockerRack
2
+ VERSION = '0.0.3'.freeze
3
+ end
@@ -0,0 +1,45 @@
1
+ require 'docker_rack/version'
2
+
3
+ module DockerRack
4
+ class << self
5
+ attr_reader :client, :credentials, :debug, :file_mode
6
+ attr_writer :logger
7
+ def generator
8
+ @_generator ||= Generator.new
9
+ end
10
+
11
+ def file_mode!
12
+ @file_mode = true
13
+ end
14
+
15
+ def normal_mode!
16
+ @file_mode = false
17
+ end
18
+
19
+ def debug!
20
+ @debug = true
21
+ logger.level = Logger::DEBUG
22
+ end
23
+
24
+ def no_debug!
25
+ @debug = false
26
+ logger.level = Logger::INFO
27
+ end
28
+
29
+ def credentials=(creds)
30
+ @credentials = creds
31
+ @client = JenkinsApi::Client.new(credentials)
32
+ @credentials
33
+ end
34
+
35
+ def logger
36
+ @logger ||= client ? client.logger : Logger.new(STDOUT)
37
+ end
38
+
39
+ def registry
40
+ generator.module_registry
41
+ end
42
+ end
43
+ end
44
+
45
+ require 'docker_rack/cli/base'
metadata ADDED
@@ -0,0 +1,194 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: docker_rack
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Igor Moochnick
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-02-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.18.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.18.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: bump
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: json
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: gem-release
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: yard-thor
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: yard
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description: Simple Docker Orchestration
154
+ email:
155
+ - igor.moochnick@gmail.com
156
+ executables:
157
+ - docker_rack
158
+ extensions: []
159
+ extra_rdoc_files: []
160
+ files:
161
+ - ".gitignore"
162
+ - ".rubocop.yml"
163
+ - Gemfile
164
+ - LICENSE
165
+ - bin/docker_rack
166
+ - lib/docker_rack.rb
167
+ - lib/docker_rack/cli/base.rb
168
+ - lib/docker_rack/version.rb
169
+ homepage: https://github.com/igorshare/docker_rack
170
+ licenses:
171
+ - MIT
172
+ metadata: {}
173
+ post_install_message:
174
+ rdoc_options: []
175
+ require_paths:
176
+ - lib
177
+ required_ruby_version: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ required_rubygems_version: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ requirements: []
188
+ rubyforge_project:
189
+ rubygems_version: 2.4.5.1
190
+ signing_key:
191
+ specification_version: 4
192
+ summary: This gem will orchestrate local Docker containers
193
+ test_files: []
194
+ has_rdoc: