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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6551f0c2a373f261855464a53423a8857597d5defde345906c85d6bad2bb9a25
4
- data.tar.gz: b9e2d641ffd5ecb2c2c738f344457f5206a0b135b4651db524cbfccaf42ae594
3
+ metadata.gz: 87afc9047bd6ddfd919e409829ff4a41eb4e4278a9b49f8e4ed2d4203392aa20
4
+ data.tar.gz: 1f57d952114627db436d8c66847fcfd297138b8741090388a4a96dd5cb7f77c4
5
5
  SHA512:
6
- metadata.gz: 1285b67f2407a48b432f8da375e32ec78bdad5b376ae3ddd5895d54700102df5a2f41a8fbe33cc989c32fb0e0af498ef4d0fe85f3b29209af75e2190d3bbb01f
7
- data.tar.gz: 900c2a261d3db83789abdac6587b09b9ce57bb2cff977cebf48acf9e082934861d8844a9911893da5a498080c9b7dc09b5198fcc66e299d39c369ed1da742993
6
+ metadata.gz: 6eea81c540ba1eaf35aa6ce7cc5e6308019ca4eb6927664380c1029a2458122577c26c8357c02838625781b428b52bd859000bafd043376cc4ac4cf6f273edc0
7
+ data.tar.gz: a1d92f74984329a186d0e7bee07f9ad60adb3277737f81e9b2c80c67e51723a63fa9a78671abdae3ca85d13ac3a5f0f02325fd8fcfbd4d4619cf782635c8b265
@@ -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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- forger (2.0.3)
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.123.0)
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.3)
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.9.10)
91
- ffi (>= 0.5.0, < 2)
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.1
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
 
@@ -1,8 +1,8 @@
1
1
  module Forger
2
2
  class Base
3
3
  # constants really only used by script classes
4
- SCRIPTS_INFO_PATH = "tmp/data/scripts_info.txt"
5
- BUILD_ROOT = "tmp"
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
@@ -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.
@@ -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 tmp/user-data.txt to view"
125
+ message = "base64-encoded: cat #{Forger.build_root}/user-data.txt to view"
126
126
  data["user_data"] = message
127
127
  end
128
128
 
@@ -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", "tmp")
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.root}/tmp/user-data.txt"
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
 
@@ -1,3 +1,3 @@
1
1
  module Forger
2
- VERSION = "2.0.3"
2
+ VERSION = "2.0.4"
3
3
  end
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.3
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-12 00:00:00.000000000 Z
11
+ date: 2018-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport