forger 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +6 -6
- data/README.md +2 -2
- data/lib/forger/base.rb +2 -2
- data/lib/forger/core.rb +4 -0
- data/lib/forger/create/info.rb +1 -1
- data/lib/forger/profile.rb +2 -1
- data/lib/forger/template/helper/core_helper.rb +1 -1
- data/lib/forger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87afc9047bd6ddfd919e409829ff4a41eb4e4278a9b49f8e4ed2d4203392aa20
|
4
|
+
data.tar.gz: 1f57d952114627db436d8c66847fcfd297138b8741090388a4a96dd5cb7f77c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6eea81c540ba1eaf35aa6ce7cc5e6308019ca4eb6927664380c1029a2458122577c26c8357c02838625781b428b52bd859000bafd043376cc4ac4cf6f273edc0
|
7
|
+
data.tar.gz: a1d92f74984329a186d0e7bee07f9ad60adb3277737f81e9b2c80c67e51723a63fa9a78671abdae3ca85d13ac3a5f0f02325fd8fcfbd4d4619cf782635c8b265
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [2.0.4]
|
7
|
+
- Merge pull request #15 from tongueroo/tmp-write-area: move write operations to /tmp area
|
8
|
+
|
6
9
|
## [2.0.3]
|
7
10
|
- fix noop option for s3 upload
|
8
11
|
- remove -eux bash flags to quiet scripts
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
forger (2.0.
|
4
|
+
forger (2.0.4)
|
5
5
|
activesupport
|
6
6
|
aws-sdk-ec2
|
7
7
|
aws-sdk-s3
|
@@ -22,7 +22,7 @@ GEM
|
|
22
22
|
minitest (~> 5.1)
|
23
23
|
tzinfo (~> 1.1)
|
24
24
|
aws-eventstream (1.0.1)
|
25
|
-
aws-partitions (1.
|
25
|
+
aws-partitions (1.125.0)
|
26
26
|
aws-sdk-core (3.44.0)
|
27
27
|
aws-eventstream (~> 1.0)
|
28
28
|
aws-partitions (~> 1.0)
|
@@ -42,7 +42,7 @@ GEM
|
|
42
42
|
byebug (10.0.2)
|
43
43
|
coderay (1.1.2)
|
44
44
|
colorize (0.8.1)
|
45
|
-
concurrent-ruby (1.1.
|
45
|
+
concurrent-ruby (1.1.4)
|
46
46
|
diff-lcs (1.3)
|
47
47
|
dotenv (2.5.0)
|
48
48
|
ffi (1.9.25)
|
@@ -87,8 +87,8 @@ GEM
|
|
87
87
|
method_source (~> 0.9.0)
|
88
88
|
rake (12.3.2)
|
89
89
|
rb-fsevent (0.10.3)
|
90
|
-
rb-inotify (0.
|
91
|
-
ffi (
|
90
|
+
rb-inotify (0.10.0)
|
91
|
+
ffi (~> 1.0)
|
92
92
|
render_me_pretty (0.8.1)
|
93
93
|
activesupport
|
94
94
|
colorize
|
@@ -127,4 +127,4 @@ DEPENDENCIES
|
|
127
127
|
rake
|
128
128
|
|
129
129
|
BUNDLED WITH
|
130
|
-
1.17.
|
130
|
+
1.17.2
|
data/README.md
CHANGED
@@ -38,7 +38,7 @@ Notably, using the `--s3-folder` option generates a project that make use of the
|
|
38
38
|
You can do a test run with the `--noop` flag. This will print out what settings will be used to launch the instance. This is one good way to inspect the generated user-data script.
|
39
39
|
|
40
40
|
forger create myserver --profile myserver --noop
|
41
|
-
cat tmp/user-data.txt # to view generated user-data script
|
41
|
+
cat /tmp/forger/ec2/user-data.txt # to view generated user-data script
|
42
42
|
|
43
43
|
## Conventional Profile Name
|
44
44
|
|
@@ -94,7 +94,7 @@ You can provide a user-data script to customize the server upon launch. The use
|
|
94
94
|
The user-data script is generated on the machine that is running the forger command. If this is your local macosx machine, then the context of your local macosx machine is available. To see the generated user-data script, you can run the create command in `--noop` mode and then inspect the generated script. Example:
|
95
95
|
|
96
96
|
forger create myserver --noop
|
97
|
-
cat tmp/user-data.txt
|
97
|
+
cat /tmp/forger/ec2/user-data.txt
|
98
98
|
|
99
99
|
Another way to view the generated user-data scripts is the `forger compile` command. It generates the files in the `tmp` folder. Example:
|
100
100
|
|
data/lib/forger/base.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module Forger
|
2
2
|
class Base
|
3
3
|
# constants really only used by script classes
|
4
|
-
|
5
|
-
|
4
|
+
BUILD_ROOT = "/tmp/forger/#{File.basename(Dir.pwd)}"
|
5
|
+
SCRIPTS_INFO_PATH = "#{BUILD_ROOT}/data/scripts_info.txt"
|
6
6
|
|
7
7
|
def initialize(options={})
|
8
8
|
@options = options.clone
|
data/lib/forger/core.rb
CHANGED
@@ -40,6 +40,10 @@ module Forger
|
|
40
40
|
@@env = env
|
41
41
|
end
|
42
42
|
|
43
|
+
def build_root
|
44
|
+
Base::BUILD_ROOT
|
45
|
+
end
|
46
|
+
|
43
47
|
private
|
44
48
|
# Do not use the Setting class to load the profile because it can cause an
|
45
49
|
# infinite loop then if we decide to use Forger.env from within settings class.
|
data/lib/forger/create/info.rb
CHANGED
@@ -122,7 +122,7 @@ class Forger::Create
|
|
122
122
|
data = data.deep_stringify_keys
|
123
123
|
|
124
124
|
if data["user_data"]
|
125
|
-
message = "base64-encoded: cat
|
125
|
+
message = "base64-encoded: cat #{Forger.build_root}/user-data.txt to view"
|
126
126
|
data["user_data"] = message
|
127
127
|
end
|
128
128
|
|
data/lib/forger/profile.rb
CHANGED
@@ -28,7 +28,8 @@ module Forger
|
|
28
28
|
begin
|
29
29
|
data = YAML.load(text)
|
30
30
|
rescue Psych::SyntaxError => e
|
31
|
-
tmp_file = file.sub("profiles",
|
31
|
+
tmp_file = file.sub("profiles", Forger.build_root)
|
32
|
+
FileUtils.mkdir_p(File.dirname(tmp_file))
|
32
33
|
IO.write(tmp_file, text)
|
33
34
|
puts "There was an error evaluating in your yaml file #{file}".colorize(:red)
|
34
35
|
puts "The evaludated yaml file has been saved at #{tmp_file} for debugging."
|
@@ -24,7 +24,7 @@ module Forger::Template::Helper::CoreHelper
|
|
24
24
|
result = scripts.join(divider)
|
25
25
|
|
26
26
|
# save the unencoded user-data script for easy debugging
|
27
|
-
temp_path = "#{Forger.
|
27
|
+
temp_path = "#{Forger.build_root}/user-data.txt"
|
28
28
|
FileUtils.mkdir_p(File.dirname(temp_path))
|
29
29
|
IO.write(temp_path, result)
|
30
30
|
|
data/lib/forger/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|