hetzner-bootstrap 1.1.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +2 -0
- data/.rubocop.yml +21 -0
- data/.ruby-version +1 -0
- data/Gemfile +3 -1
- data/LICENSE +1 -1
- data/README.md +116 -10
- data/Rakefile +2 -0
- data/example.rb +95 -96
- data/hetzner-bootstrap.gemspec +23 -15
- data/lib/hetzner-bootstrap.rb +22 -25
- data/lib/hetzner/bootstrap/target.rb +73 -82
- data/lib/hetzner/bootstrap/template.rb +7 -4
- data/lib/hetzner/bootstrap/version.rb +3 -1
- data/spec/hetzner_bootstrap_spec.rb +26 -31
- data/spec/spec_helper.rb +99 -0
- metadata +132 -45
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
4
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
5
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
6
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
7
|
+
# files.
|
8
|
+
#
|
9
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
10
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
11
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
12
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
13
|
+
# a separate helper file that requires the additional dependencies and performs
|
14
|
+
# the additional setup, and require it from the spec files that actually need
|
15
|
+
# it.
|
16
|
+
#
|
17
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
18
|
+
# users commonly want.
|
19
|
+
#
|
20
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
21
|
+
RSpec.configure do |config|
|
22
|
+
# rspec-expectations config goes here. You can use an alternate
|
23
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
24
|
+
# assertions if you prefer.
|
25
|
+
config.expect_with :rspec do |expectations|
|
26
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
27
|
+
# and `failure_message` of custom matchers include text for helper methods
|
28
|
+
# defined using `chain`, e.g.:
|
29
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
30
|
+
# # => "be bigger than 2 and smaller than 4"
|
31
|
+
# ...rather than:
|
32
|
+
# # => "be bigger than 2"
|
33
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
34
|
+
end
|
35
|
+
|
36
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
37
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
38
|
+
config.mock_with :rspec do |mocks|
|
39
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
40
|
+
# a real object. This is generally recommended, and will default to
|
41
|
+
# `true` in RSpec 4.
|
42
|
+
mocks.verify_partial_doubles = true
|
43
|
+
end
|
44
|
+
|
45
|
+
# The settings below are suggested to provide a good initial experience
|
46
|
+
# with RSpec, but feel free to customize to your heart's content.
|
47
|
+
# # These two settings work together to allow you to limit a spec run
|
48
|
+
# # to individual examples or groups you care about by tagging them with
|
49
|
+
# # `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
50
|
+
# # get run.
|
51
|
+
# config.filter_run :focus
|
52
|
+
# config.run_all_when_everything_filtered = true
|
53
|
+
#
|
54
|
+
# # Allows RSpec to persist some state between runs in order to support
|
55
|
+
# # the `--only-failures` and `--next-failure` CLI options. We recommend
|
56
|
+
# # you configure your source control system to ignore this file.
|
57
|
+
# config.example_status_persistence_file_path = "spec/examples.txt"
|
58
|
+
#
|
59
|
+
# # Limits the available syntax to the non-monkey patched syntax that is
|
60
|
+
# # recommended. For more details, see:
|
61
|
+
# # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
62
|
+
# # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
63
|
+
# # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
64
|
+
# config.disable_monkey_patching!
|
65
|
+
#
|
66
|
+
# # This setting enables warnings. It's recommended, but in some cases may
|
67
|
+
# # be too noisy due to issues in dependencies.
|
68
|
+
# config.warnings = true
|
69
|
+
#
|
70
|
+
# # Many RSpec users commonly either run the entire suite or an individual
|
71
|
+
# # file, and it's useful to allow more verbose output when running an
|
72
|
+
# # individual spec file.
|
73
|
+
# if config.files_to_run.one?
|
74
|
+
# # Use the documentation formatter for detailed output,
|
75
|
+
# # unless a formatter has already been configured
|
76
|
+
# # (e.g. via a command-line flag).
|
77
|
+
# config.default_formatter = 'doc'
|
78
|
+
# end
|
79
|
+
#
|
80
|
+
# # Print the 10 slowest examples and example groups at the
|
81
|
+
# # end of the spec run, to help surface which specs are running
|
82
|
+
# # particularly slow.
|
83
|
+
# config.profile_examples = 10
|
84
|
+
#
|
85
|
+
# # Run specs in random order to surface order dependencies. If you find an
|
86
|
+
# # order dependency and want to debug it, you can fix the order by providing
|
87
|
+
# # the seed, which is printed after each run.
|
88
|
+
# # --seed 1234
|
89
|
+
# config.order = :random
|
90
|
+
#
|
91
|
+
# # Seed global randomization in this process using the `--seed` CLI option.
|
92
|
+
# # Setting this allows you to use `--seed` to deterministically reproduce
|
93
|
+
# # test failures related to randomization by passing the same `--seed` value
|
94
|
+
# # as the one that triggered the failure.
|
95
|
+
# Kernel.srand config.seed
|
96
|
+
end
|
97
|
+
|
98
|
+
API_USERNAME = 'api-login'
|
99
|
+
API_PASSWORD = 'password'
|
metadata
CHANGED
@@ -1,94 +1,179 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hetzner-bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 2.0.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Roland Moriz
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2021-02-19 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bcrypt_pbkdf
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.0'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: ed25519
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.2'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '2.0'
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.2'
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '2.0'
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: erubis
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: 2.7.0
|
60
|
+
type: :runtime
|
61
|
+
prerelease: false
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 2.7.0
|
14
67
|
- !ruby/object:Gem::Dependency
|
15
68
|
name: hetzner-api
|
16
69
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
70
|
requirements:
|
19
|
-
- -
|
71
|
+
- - ">="
|
20
72
|
- !ruby/object:Gem::Version
|
21
73
|
version: 1.1.0
|
22
74
|
type: :runtime
|
23
75
|
prerelease: false
|
24
76
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
77
|
requirements:
|
27
|
-
- -
|
78
|
+
- - ">="
|
28
79
|
- !ruby/object:Gem::Version
|
29
80
|
version: 1.1.0
|
30
81
|
- !ruby/object:Gem::Dependency
|
31
82
|
name: net-ssh
|
32
83
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
84
|
requirements:
|
35
|
-
- -
|
85
|
+
- - "~>"
|
36
86
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
87
|
+
version: '6.1'
|
38
88
|
type: :runtime
|
39
89
|
prerelease: false
|
40
90
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
91
|
requirements:
|
43
|
-
- -
|
92
|
+
- - "~>"
|
44
93
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
94
|
+
version: '6.1'
|
46
95
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
96
|
+
name: rexml
|
48
97
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
98
|
requirements:
|
51
|
-
- -
|
99
|
+
- - ">="
|
52
100
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
101
|
+
version: '0'
|
54
102
|
type: :runtime
|
55
103
|
prerelease: false
|
56
104
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
105
|
requirements:
|
59
|
-
- -
|
106
|
+
- - ">="
|
60
107
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
108
|
+
version: '0'
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: rake
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
116
|
+
type: :development
|
117
|
+
prerelease: false
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
62
123
|
- !ruby/object:Gem::Dependency
|
63
124
|
name: rspec
|
64
125
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
126
|
requirements:
|
67
|
-
- -
|
127
|
+
- - "~>"
|
68
128
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
129
|
+
version: 3.4.0
|
70
130
|
type: :development
|
71
131
|
prerelease: false
|
72
132
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
133
|
requirements:
|
75
|
-
- -
|
134
|
+
- - "~>"
|
76
135
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
136
|
+
version: 3.4.0
|
78
137
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
138
|
+
name: rubocop
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - "~>"
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '1.10'
|
144
|
+
type: :development
|
145
|
+
prerelease: false
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - "~>"
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '1.10'
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: rubocop-rake
|
153
|
+
requirement: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
type: :development
|
159
|
+
prerelease: false
|
160
|
+
version_requirements: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
165
|
+
- !ruby/object:Gem::Dependency
|
166
|
+
name: rubocop-rspec
|
80
167
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
168
|
requirements:
|
83
|
-
- -
|
169
|
+
- - ">="
|
84
170
|
- !ruby/object:Gem::Version
|
85
171
|
version: '0'
|
86
172
|
type: :development
|
87
173
|
prerelease: false
|
88
174
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
175
|
requirements:
|
91
|
-
- -
|
176
|
+
- - ">="
|
92
177
|
- !ruby/object:Gem::Version
|
93
178
|
version: '0'
|
94
179
|
description: Easy bootstrapping of hetzner.de rootservers using hetzner-api
|
@@ -98,7 +183,10 @@ executables: []
|
|
98
183
|
extensions: []
|
99
184
|
extra_rdoc_files: []
|
100
185
|
files:
|
101
|
-
- .gitignore
|
186
|
+
- ".gitignore"
|
187
|
+
- ".rspec"
|
188
|
+
- ".rubocop.yml"
|
189
|
+
- ".ruby-version"
|
102
190
|
- Gemfile
|
103
191
|
- LICENSE
|
104
192
|
- README.md
|
@@ -110,30 +198,29 @@ files:
|
|
110
198
|
- lib/hetzner/bootstrap/template.rb
|
111
199
|
- lib/hetzner/bootstrap/version.rb
|
112
200
|
- spec/hetzner_bootstrap_spec.rb
|
113
|
-
|
201
|
+
- spec/spec_helper.rb
|
202
|
+
homepage: https://github.com/rmoriz/hetzner-bootstrap
|
114
203
|
licenses: []
|
115
|
-
|
204
|
+
metadata: {}
|
205
|
+
post_install_message:
|
116
206
|
rdoc_options: []
|
117
207
|
require_paths:
|
118
208
|
- lib
|
119
209
|
required_ruby_version: !ruby/object:Gem::Requirement
|
120
|
-
none: false
|
121
210
|
requirements:
|
122
|
-
- -
|
211
|
+
- - "~>"
|
123
212
|
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
213
|
+
version: '3.0'
|
125
214
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
|
-
none: false
|
127
215
|
requirements:
|
128
|
-
- -
|
216
|
+
- - ">="
|
129
217
|
- !ruby/object:Gem::Version
|
130
218
|
version: '0'
|
131
219
|
requirements: []
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
specification_version: 3
|
220
|
+
rubygems_version: 3.1.6
|
221
|
+
signing_key:
|
222
|
+
specification_version: 4
|
136
223
|
summary: Easy bootstrapping of hetzner.de rootservers using hetzner-api
|
137
224
|
test_files:
|
138
225
|
- spec/hetzner_bootstrap_spec.rb
|
139
|
-
|
226
|
+
- spec/spec_helper.rb
|