ood_core 0.0.5 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -1
- data/lib/ood_core/batch_connect/template.rb +12 -1
- data/lib/ood_core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa0b9b86a34c8968e6903b35e81a835c9fd6c595
|
4
|
+
data.tar.gz: 6f6cb53b9d3e4afe6e027b29bf52a77e5b8f146b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 133a7548725f986cab0eb69cd36bee91b28d38ff7bda87511d3c88bff582e6f595db3bbe8f1179530cefd9bd71a5385e41120963055bc6dc048a1b9c078e1290
|
7
|
+
data.tar.gz: e1d76582d175f7f72f442d0d1c6bbe4df7dedb969415970331f726da88d6dceeea6141af7aec922cc27985f2790f082049db8e52194b078ccce413dd8261e7c0
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.1.0] - 2017-07-17
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
|
14
|
+
- Setting the host in a batch_connect batch script can now be directly
|
15
|
+
manipulated through the `set_host` initialization parameter.
|
16
|
+
[#42](https://github.com/OSC/ood_core/issues/42)
|
17
|
+
|
10
18
|
## [0.0.5] - 2017-07-05
|
11
19
|
|
12
20
|
### Added
|
@@ -69,7 +77,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
69
77
|
|
70
78
|
- Initial release!
|
71
79
|
|
72
|
-
[Unreleased]: https://github.com/OSC/ood_core/compare/v0.0
|
80
|
+
[Unreleased]: https://github.com/OSC/ood_core/compare/v0.1.0...HEAD
|
81
|
+
[0.1.0]: https://github.com/OSC/ood_core/compare/v0.0.5...v0.1.0
|
73
82
|
[0.0.5]: https://github.com/OSC/ood_core/compare/v0.0.4...v0.0.5
|
74
83
|
[0.0.4]: https://github.com/OSC/ood_core/compare/v0.0.3...v0.0.4
|
75
84
|
[0.0.3]: https://github.com/OSC/ood_core/compare/v0.0.2...v0.0.3
|
@@ -29,6 +29,9 @@ module OodCore
|
|
29
29
|
# @option context [#to_s] :script_wrapper ("%s") Bash code that wraps
|
30
30
|
# around the body of the template script (use `%s` to interpolate the
|
31
31
|
# body)
|
32
|
+
# @option context [#to_s] :set_host ("host=$(hostname)") Bash code used
|
33
|
+
# to set the `host` environment variable used for connection
|
34
|
+
# information
|
32
35
|
# @option context [#to_s] :before_script ("...") Bash code run before the
|
33
36
|
# main script is forked off
|
34
37
|
# @option context [#to_s] :before_file ("before.sh") Path to script that
|
@@ -78,6 +81,11 @@ module OodCore
|
|
78
81
|
(conn_params + [:host, :port, :password]).uniq
|
79
82
|
end
|
80
83
|
|
84
|
+
# Bash script used to define the `host` environment variable
|
85
|
+
def set_host
|
86
|
+
context.fetch(:set_host, "host=$(hostname)").to_s
|
87
|
+
end
|
88
|
+
|
81
89
|
# Helper methods used in the bash scripts
|
82
90
|
def bash_helpers
|
83
91
|
context.fetch(:bash_helpers) do
|
@@ -126,7 +134,7 @@ module OodCore
|
|
126
134
|
context.fetch(:before_script) do
|
127
135
|
before_file = context.fetch(:before_file, "before.sh").to_s
|
128
136
|
|
129
|
-
"
|
137
|
+
"[[ -e \"#{before_file}\" ]] && source \"#{before_file}\""
|
130
138
|
end.to_s
|
131
139
|
end
|
132
140
|
|
@@ -184,6 +192,9 @@ module OodCore
|
|
184
192
|
|
185
193
|
#{bash_helpers}
|
186
194
|
|
195
|
+
# Set host of current machine
|
196
|
+
#{set_host}
|
197
|
+
|
187
198
|
#{before_script}
|
188
199
|
|
189
200
|
echo "Script starting..."
|
data/lib/ood_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ood_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Nicklas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ood_support
|