sparkle-pack-shell-helpers 0.1.0
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
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 289a035d321b4d64b0e7485afec3b1d85305fe1d
|
4
|
+
data.tar.gz: bc1c6c4ac3560cc05979e69eea0f9d4977609483
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b6b31b2eaf624233d36e35d3327223b3185f8eb8755d8eff5e884fb863f887cfa90d0b9b7643dba60e4a3641906d16cfa3adc14ad959d835041037a61f1ea42c
|
7
|
+
data.tar.gz: 750d84c2b8e801f8cb6e09820cebb940978592f2e785f2d02799945a4236a42d0b7dcb6e48466abb620ea8d8d36dcdf6d7370e59fa49cddcafb9546d52c5d3c4
|
@@ -0,0 +1 @@
|
|
1
|
+
SparkleFormation::SparklePack.register!
|
@@ -0,0 +1,23 @@
|
|
1
|
+
SfnRegistry.register(:shell_helper) do |args|
|
2
|
+
case args[:part]
|
3
|
+
when :shebang
|
4
|
+
"#!/bin/sh -ex\n\n"
|
5
|
+
|
6
|
+
## Put the following at the top of your userdata after shebang
|
7
|
+
# 'CFN_STACK="', stack_name!, "\"\n",
|
8
|
+
# 'CFN_RESOURCE="', "App#{n}Ec2Instance", "\"\n",
|
9
|
+
# 'CFN_REGION="', region!, "\"\n",
|
10
|
+
#
|
11
|
+
# Make sure you have cfn-init installed
|
12
|
+
|
13
|
+
when :cfn_init
|
14
|
+
<<-EOF
|
15
|
+
/opt/aws/bin/cfn-init --verbose \\
|
16
|
+
--stack "${CFN_STACK}" \\
|
17
|
+
--resource "${CFN_RESOURCE}" \\
|
18
|
+
--region "${CFN_REGION}"\n
|
19
|
+
EOF
|
20
|
+
else
|
21
|
+
raise!("Unknown part #{args[:part].inspect} passed to registry userdata")
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Usage:
|
2
|
+
#
|
3
|
+
# user_data base64!( join!( *registry!(:shell_var, name: "foo", value: "bar" )))
|
4
|
+
#
|
5
|
+
#(notice the asterisk!)
|
6
|
+
#
|
7
|
+
# After values are joined by CFN the following well-formed shell will be produced:
|
8
|
+
# foo="bar"
|
9
|
+
#
|
10
|
+
# Use Ref-s and Fn-s as a value
|
11
|
+
#
|
12
|
+
SfnRegistry.register(:shell_var) do |args|
|
13
|
+
raise!("Parameters 'name' and 'value' must be passed. You've passed #{args.inspect}") \
|
14
|
+
unless args[:name] && args[:value]
|
15
|
+
|
16
|
+
["#{args[:name]}=\"", args[:value], "\"\n"]
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'sparkle-pack-shell-helpers'
|
3
|
+
s.version = '0.1.0'
|
4
|
+
s.licenses = ['MIT']
|
5
|
+
s.summary = 'SparklePack with various shell helpers to be used in UserData'
|
6
|
+
s.description = 'Shell helpers to be used in UserData templates for easier generation of shell scripts'
|
7
|
+
s.authors = ['Timur Batyrshin']
|
8
|
+
s.email = 'erthad@gmail.com'
|
9
|
+
s.homepage = 'https://github.com/timurb/sparkle-pack-shell-helpers'
|
10
|
+
s.files = Dir[ 'lib/sparkleformation/registry/*' ] + %w(sparkle-pack-shell-helpers.gemspec lib/sparkle-pack-shell-helpers.rb)
|
11
|
+
end
|
metadata
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sparkle-pack-shell-helpers
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Timur Batyrshin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-06-08 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Shell helpers to be used in UserData templates for easier generation
|
14
|
+
of shell scripts
|
15
|
+
email: erthad@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/sparkleformation/registry/shell_helper.rb
|
21
|
+
- lib/sparkleformation/registry/shell_var.rb
|
22
|
+
- sparkle-pack-shell-helpers.gemspec
|
23
|
+
- lib/sparkle-pack-shell-helpers.rb
|
24
|
+
homepage: https://github.com/timurb/sparkle-pack-shell-helpers
|
25
|
+
licenses:
|
26
|
+
- MIT
|
27
|
+
metadata: {}
|
28
|
+
post_install_message:
|
29
|
+
rdoc_options: []
|
30
|
+
require_paths:
|
31
|
+
- lib
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - '>='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
37
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
requirements: []
|
43
|
+
rubyforge_project:
|
44
|
+
rubygems_version: 2.0.14.1
|
45
|
+
signing_key:
|
46
|
+
specification_version: 4
|
47
|
+
summary: SparklePack with various shell helpers to be used in UserData
|
48
|
+
test_files: []
|