mixlibrary-core 0.0.7 → 0.0.12
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e161abbbcca04d006e06559fbed443a5602d0d37
|
4
|
+
data.tar.gz: 1fe374424d663b81675a8114795e34e4ad8fdfbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c6f17e72e968658327bc3a5b8b5aa7cfdf14c00e51cda94c3efa45da40af18f2657153e0bde40e09594f13aa738f8e11de8d68b28423f7478e755c7f615bd8e
|
7
|
+
data.tar.gz: f2eb2b2779480bb4af88503dec0451bf2c2eba67908141e26be1ad7d09b8a988df433a2c7097d954a03bee782e92cea2271c1a27ba63538d3aad6bae3c01eba2
|
data/README.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Mixlibrary-Core
|
2
|
-
[](https://github.com/ebsco/mixlibrary-core)
|
3
|
+
[](http://www.rubydoc.info/gems/mixlibrary-core/frames)
|
4
|
+
|
5
|
+
[](https://github.com/ebsco/mixlibrary-core/releases)
|
6
|
+
[](https://travis-ci.org/ebsco/mixlibrary-core)
|
7
|
+
[](https://github.com/ebsco/mixlibrary-core/blob/master/LICENSE.txt)
|
3
8
|
|
4
9
|
Wraps some provider functionality from chef into easily consumable ruby classes that do not have the extra baggage of being dependent on Chef data objects. Node object, Environment etc.
|
5
10
|
|
@@ -17,6 +22,9 @@ Or install it yourself as:
|
|
17
22
|
|
18
23
|
$ gem install mixlibrary-core
|
19
24
|
|
25
|
+
## How to Install via Chef Recipe
|
26
|
+
* [Recipe Install Sample](https://github.com/ebsco/mixlibrary-core/blob/master/Samples/SampleRecipeDeployment.rb)
|
27
|
+
|
20
28
|
## Documentation
|
21
29
|
* Uses yard to document classes and methods. Generate docs or automatic documentation: http://www.rubydoc.info
|
22
30
|
* rake doc
|
@@ -40,10 +40,18 @@ module Mixlibrary
|
|
40
40
|
|
41
41
|
private
|
42
42
|
|
43
|
+
EXIT_STATUS_EXITCONVERSION = <<-EOF
|
44
|
+
\#This function changes the exit code as desired back to ruby code.
|
45
|
+
function exit-mixlibpowershell([int] $exitcode){
|
46
|
+
[Environment]::Exit($exitcode)
|
47
|
+
}
|
48
|
+
EOF
|
49
|
+
|
43
50
|
EXIT_STATUS_EXCEPTION_HANDLER= <<-EOF
|
44
51
|
trap [Exception]{
|
52
|
+
write-error "Trapped in Trap Exception block" -erroraction continue;
|
45
53
|
write-error -exception ($_.Exception.Message) -erroraction continue;
|
46
|
-
exit 1
|
54
|
+
exit-mixlibpowershell 1
|
47
55
|
}
|
48
56
|
EOF
|
49
57
|
|
@@ -56,17 +64,19 @@ module Mixlibrary
|
|
56
64
|
#Generally speaking this is the best way to handle this situation. We will need to determine if there are many dependent scripts
|
57
65
|
#that depend on being able to set this setting.
|
58
66
|
EXIT_STATUS_INTIALIZATION= <<-EOF
|
67
|
+
|
59
68
|
Set-Variable -Name ERRORACTIONPREFERENCE -Value "STOP" -Scope Script -Option "ReadOnly" -force
|
60
69
|
\#$ErrorActionPreference="STOP"
|
61
70
|
try{
|
62
71
|
EOF
|
63
72
|
|
64
73
|
EXIT_STATUS_POST= <<-EOF
|
65
|
-
exit $LASTEXITCODE
|
74
|
+
exit-mixlibpowershell $LASTEXITCODE
|
66
75
|
}
|
67
76
|
catch{
|
77
|
+
write-error "Trapped in Catch block" -erroraction continue;
|
68
78
|
write-error -exception ($_.Exception) -erroraction continue;
|
69
|
-
exit 1
|
79
|
+
exit-mixlibpowershell 1
|
70
80
|
}
|
71
81
|
EOF
|
72
82
|
|
@@ -85,6 +95,7 @@ module Mixlibrary
|
|
85
95
|
|
86
96
|
def finalscript
|
87
97
|
changed_script =
|
98
|
+
EXIT_STATUS_EXITCONVERSION +
|
88
99
|
EXIT_STATUS_EXCEPTION_HANDLER +
|
89
100
|
EXIT_STATUS_RESET_SCRIPT +
|
90
101
|
EXIT_STATUS_INTIALIZATION +
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mixlibrary-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Carpenter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -70,44 +70,36 @@ dependencies:
|
|
70
70
|
name: minitest-reporters
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
75
|
+
version: '1.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
82
|
+
version: '1.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: chef
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '11.16'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ~>
|
87
|
+
- - '>='
|
95
88
|
- !ruby/object:Gem::Version
|
96
89
|
version: '11.16'
|
97
|
-
-
|
98
|
-
name: win32-api
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - '>='
|
90
|
+
- - <
|
102
91
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
92
|
+
version: '13'
|
104
93
|
type: :runtime
|
105
94
|
prerelease: false
|
106
95
|
version_requirements: !ruby/object:Gem::Requirement
|
107
96
|
requirements:
|
108
97
|
- - '>='
|
109
98
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
99
|
+
version: '11.16'
|
100
|
+
- - <
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '13'
|
111
103
|
description: 'MixLib for creating Core libraries in ruby for automating machines. This
|
112
104
|
is an abstraction away from using Chef Providers directly to give us access to the
|
113
105
|
lower layers of Chef implementation to meet additional use cases. '
|
@@ -132,7 +124,7 @@ files:
|
|
132
124
|
- lib/mixlibrary/core/utilities/windows_architecture_helper.rb
|
133
125
|
- lib/mixlibrary/core/version.rb
|
134
126
|
- lib/mixlibrary/core/windows/features.rb
|
135
|
-
homepage:
|
127
|
+
homepage: https://www.ebsco.com/
|
136
128
|
licenses:
|
137
129
|
- Apache2
|
138
130
|
metadata: {}
|
@@ -149,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
141
|
requirements:
|
150
142
|
- - '>='
|
151
143
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
144
|
+
version: '2.4'
|
153
145
|
requirements: []
|
154
146
|
rubyforge_project:
|
155
147
|
rubygems_version: 2.4.1
|
@@ -157,4 +149,3 @@ signing_key:
|
|
157
149
|
specification_version: 4
|
158
150
|
summary: MixLib for creating Core libraries in ruby for automating machines.
|
159
151
|
test_files: []
|
160
|
-
has_rdoc:
|