fig 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -3
- data/lib/fig/repository.rb +1 -1
- data/spec/fig_spec.rb +27 -0
- metadata +2 -2
data/README.md
CHANGED
@@ -5,7 +5,7 @@ Fig is a utility for configuring environments and managing dependencies across a
|
|
5
5
|
|
6
6
|
An "environment" in fig is just a set of environment variables. A "package" is a collection of files, plus some metadata describing what environment variables should be modified when the package is included.
|
7
7
|
|
8
|
-
Developers can
|
8
|
+
Developers can use package files to specify the list of dependencies to use for different tasks. This file will typically be versioned along with the rest of the source files. This ensures that all developers on a team are using the same environemnts.
|
9
9
|
|
10
10
|
Packages exist in two places: a "local" repository in the user's home directory, and a "remote" repository on a server somewhere that is shared by a team. Fig will automatically download packages from the remote repository and install them in the local repository, when needed.
|
11
11
|
|
@@ -104,7 +104,7 @@ Fig also lets you append environment variables, using the system-specified path
|
|
104
104
|
$ mkdir bin
|
105
105
|
$ echo "echo \$GREETING, World" > bin/hello
|
106
106
|
$ chmod +x bin/hello
|
107
|
-
$ fig -s GREETING=Hello -p bin -- hello
|
107
|
+
$ fig -s GREETING=Hello -p PATH=bin -- hello
|
108
108
|
Hello, World
|
109
109
|
|
110
110
|
### Fig Files ###
|
@@ -169,7 +169,7 @@ The "-u" (or "--update") option tells fig to check the remote repository for pac
|
|
169
169
|
Also, when including a package, you can specify a particular configuration by appending it to the package name using a colon:
|
170
170
|
|
171
171
|
$ fig -i hello/1.0.0:french -- hello
|
172
|
-
|
172
|
+
Bonjour, World
|
173
173
|
|
174
174
|
### Retrieves ###
|
175
175
|
|
data/lib/fig/repository.rb
CHANGED
data/spec/fig_spec.rb
CHANGED
@@ -157,4 +157,31 @@ describe "Fig" do
|
|
157
157
|
fig('-m', input)
|
158
158
|
File.read("tmp/lib2/foo/hello").should == "some library"
|
159
159
|
end
|
160
|
+
|
161
|
+
it "package multiple resources" do
|
162
|
+
FileUtils.rm_rf(FIG_HOME)
|
163
|
+
FileUtils.rm_rf(FIG_REMOTE_DIR)
|
164
|
+
FileUtils.rm_rf("tmp")
|
165
|
+
FileUtils.mkdir_p("tmp/lib")
|
166
|
+
File.open("tmp/lib/hello", "w") { |f| f << "some library" }
|
167
|
+
File.open("tmp/lib/hello2", "w") { |f| f << "some other library" }
|
168
|
+
input = <<-END
|
169
|
+
resource tmp/lib/hello
|
170
|
+
resource tmp/lib/hello2
|
171
|
+
config default
|
172
|
+
append FOOPATH=@/tmp/lib/hello
|
173
|
+
append FOOPATH=@/tmp/lib/hello2
|
174
|
+
end
|
175
|
+
END
|
176
|
+
puts fig('--publish foo/1.2.3', input)
|
177
|
+
input = <<-END
|
178
|
+
retrieve FOOPATH->tmp/lib2/[package]
|
179
|
+
config default
|
180
|
+
include foo/1.2.3
|
181
|
+
end
|
182
|
+
END
|
183
|
+
fig('-m', input)
|
184
|
+
File.read("tmp/lib2/foo/hello").should == "some library"
|
185
|
+
File.read("tmp/lib2/foo/hello2").should == "some other library"
|
186
|
+
end
|
160
187
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Foemmel
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-03-04 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|