fig-newton 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fig-newton/commands/clean.rb +1 -1
- data/lib/fig-newton/commands/clone.rb +1 -1
- data/lib/fig-newton/commands/down.rb +1 -1
- data/lib/fig-newton/commands/init.rb +1 -1
- data/lib/fig-newton/commands/pull.rb +1 -1
- data/lib/fig-newton/commands/up.rb +1 -1
- data/lib/fig-newton/config.rb +14 -4
- data/lib/fig-newton/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: 43aa9927899ad0d71697d27fbf8d74b34d3bc88d
|
4
|
+
data.tar.gz: e95a85f9238a2bc73ed7f34fe77c9395021a3089
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3513c28c205dc059f02698f996d40f56129b1178d47e87d05814defd99b8c85801b9d07bc60fde088c76632a9d04ab395c2c1ff589661bbba082d08be98ee608
|
7
|
+
data.tar.gz: 9dbd6774c7d035d1b78b723a2be3d4488478ca85847ee23dc6fbf3f0c65a20c9c48691074c2e5885aa6426c07a7ba3285e66fea97e9848edd31bc08c9a3f90a0
|
@@ -6,7 +6,7 @@ module FigNewton
|
|
6
6
|
def initialize(stack_name, app, config_dir)
|
7
7
|
@stack_name = stack_name
|
8
8
|
@app = app
|
9
|
-
@config = FigNewton::Config.from_file(
|
9
|
+
@config = FigNewton::Config.from_file(config_dir, @stack_name)
|
10
10
|
end
|
11
11
|
|
12
12
|
def run(parent_directory)
|
@@ -5,7 +5,7 @@ module FigNewton
|
|
5
5
|
class Clone
|
6
6
|
def initialize(stack_name, config_dir)
|
7
7
|
@stack_name = stack_name
|
8
|
-
@config = FigNewton::Config.from_file(
|
8
|
+
@config = FigNewton::Config.from_file(config_dir, @stack_name)
|
9
9
|
end
|
10
10
|
|
11
11
|
def run(parent_directory)
|
@@ -5,7 +5,7 @@ module FigNewton
|
|
5
5
|
class Down
|
6
6
|
def initialize(stack_name, config_dir)
|
7
7
|
@stack_name = stack_name
|
8
|
-
@config = FigNewton::Config.from_file(
|
8
|
+
@config = FigNewton::Config.from_file(config_dir, @stack_name)
|
9
9
|
end
|
10
10
|
|
11
11
|
def run(parent_directory)
|
@@ -6,7 +6,7 @@ module FigNewton
|
|
6
6
|
def initialize(stack_name, app, config_dir)
|
7
7
|
@stack_name = stack_name
|
8
8
|
@app = app
|
9
|
-
@config = FigNewton::Config.from_file(
|
9
|
+
@config = FigNewton::Config.from_file(config_dir, @stack_name)
|
10
10
|
end
|
11
11
|
|
12
12
|
def run(parent_directory)
|
@@ -5,7 +5,7 @@ module FigNewton
|
|
5
5
|
class Up
|
6
6
|
def initialize(stack_name, config_dir)
|
7
7
|
@stack_name = stack_name
|
8
|
-
@config = FigNewton::Config.from_file(
|
8
|
+
@config = FigNewton::Config.from_file(config_dir, @stack_name)
|
9
9
|
end
|
10
10
|
|
11
11
|
def run(parent_directory)
|
data/lib/fig-newton/config.rb
CHANGED
@@ -3,12 +3,12 @@ require "fig-newton/app"
|
|
3
3
|
|
4
4
|
module FigNewton
|
5
5
|
class Config
|
6
|
-
def self.filepath_from_stack(stack_name)
|
7
|
-
File.join(
|
6
|
+
def self.filepath_from_stack(config_dir, stack_name)
|
7
|
+
File.join(config_dir, "#{stack_name}.yml")
|
8
8
|
end
|
9
9
|
|
10
|
-
def self.from_file(stack_name)
|
11
|
-
filename =
|
10
|
+
def self.from_file(config_dir, stack_name)
|
11
|
+
filename = absolute_path(config_dir, stack_name)
|
12
12
|
data = YAML::load_file(filename)
|
13
13
|
|
14
14
|
new(data, filename)
|
@@ -34,5 +34,15 @@ module FigNewton
|
|
34
34
|
private
|
35
35
|
|
36
36
|
attr_accessor :data, :filename
|
37
|
+
|
38
|
+
def self.absolute_path(config_path, stack_name)
|
39
|
+
dir = if config_path[0] =~ /\//
|
40
|
+
config_path
|
41
|
+
else
|
42
|
+
File.absolute_path(File.join(".", config_path))
|
43
|
+
end
|
44
|
+
|
45
|
+
filepath_from_stack(dir, stack_name)
|
46
|
+
end
|
37
47
|
end
|
38
48
|
end
|
data/lib/fig-newton/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fig-newton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Dunn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|