fig 0.1.51 → 0.1.52

Sign up to get free protection for your applications and to get access to all the features.
data/Changes CHANGED
@@ -1,7 +1,100 @@
1
+ v0.1.52
2
+
3
+ Notice:
4
+
5
+ A lot of internal changes have been made to make future changes easier and
6
+ test coverage is significantly better than it was before. We believe that we
7
+ haven't broken anything (other than the purposeful changes below), but due to
8
+ the scope of the changes, we may have done so. Please report any problems
9
+ you run into.
10
+
11
+ Backwards incompatibilities:
12
+
13
+ - Now requires at least ruby v1.8.7.
14
+
15
+ - You can no longer run a command without using "--". Through an accident of
16
+ implementation, you previously could do
17
+
18
+ fig echo foo
19
+
20
+ You are now required to run this as
21
+
22
+ fig -- echo foo
23
+
24
+ - You can no longer specify multiple --clean or --list-configs options.
25
+
26
+ - There was partial support for overridding the local location of a package
27
+ via a "fig.properties" file in the current directory. A full
28
+ implementation of this type of thing may come in the future, but for the
29
+ time being, in the efforts of making the code clean, this is gone.
30
+
31
+ - Development now requires at least rspec 2.8.
32
+
33
+ New features:
34
+
35
+ - "--list-dependencies" option. This will list all dependencies a given
36
+ package has, recursively.
37
+
38
+ For example, if you have package A which depends upon packages B and C
39
+ which both depend upon package D, running
40
+
41
+ fig --list-dependencies A/1.2.3
42
+
43
+ will give you
44
+
45
+ B/2.3.4
46
+ C/3.4.5
47
+ D/4.5.6
48
+
49
+ If you additionally specify "--list-tree", you'll get a nested dependency
50
+ tree:
51
+
52
+ fig --list-dependencies --list-tree A/1.2.3
53
+
54
+ A/1.2.3
55
+ B/2.3.4
56
+ D/4.5.6
57
+ C/3.4.5
58
+ D/4.5.6
59
+
60
+ If you don't specify a package descriptor, but you've got a package.fig
61
+ file in the current directory with the same dependencies as package A
62
+ above, you'll get
63
+
64
+ fig --list-dependencies --list-tree
65
+
66
+ <unpublished>
67
+ B/2.3.4
68
+ D/4.5.6
69
+ C/3.4.5
70
+ D/4.5.6
71
+
72
+ If there are no dependencies, you don't specify "--list-tree", and stdout
73
+ is connected to a terminal:
74
+
75
+ fig --list-dependencies package-with-no-dependencies/1.2.3
76
+
77
+ <no dependencies>
78
+
79
+ However, if stdout is not connected to a terminal:
80
+
81
+ fig --list-dependencies package-with-no-dependencies/1.2.3 | cat
82
+
83
+ [no output]
84
+
85
+ Additionally, you can specify "--list-all-configs"; this will follow all
86
+ the configurations in the base package. Note that this will show multiple
87
+ versions of the same package if different configurations depend upon
88
+ different versions.
89
+
1
90
  v0.1.51
2
91
 
3
92
  - You can now set an environment variable to the empty string with "set".
4
93
 
94
+ - Fix bug with same env variable in both APPEND and RETRIEVE statements,
95
+ causing Fig to attempt to retrieve libs intended for publish. (The bug
96
+ was introduced in 0.1.49, in commit aa3f3ab6c7, while fixing another bug).
97
+
5
98
  v0.1.50
6
99
 
7
100
  - Trying to get releases via rake to work properly for multiple platforms.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009-2011, Matthew Foemmel
1
+ Copyright (c) 2009-2012, Matthew Foemmel
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
data/README.md CHANGED
@@ -1,23 +1,24 @@
1
1
  Description
2
2
  ===========
3
3
 
4
- Fig is a utility for configuring environments and managing dependencies across a team of developers.
4
+ Fig is a utility for configuring environments and managing dependencies across
5
+ a team of developers.
5
6
 
6
7
  An "environment" in fig is a set of environment variables. A "package" is a
7
- collection of files, along with some metadata describing which environment variables
8
- should be modified when the package is included. For instance, each dependency
9
- may prepend its corresponding jar to CLASSPATH. The metadata may also list
10
- that package's lower-level Fig package dependencies.
8
+ collection of files, along with some metadata describing which environment
9
+ variables should be modified when the package is included. For instance, each
10
+ dependency may prepend its corresponding jar to CLASSPATH. The metadata may
11
+ also list that package's lower-level Fig package dependencies.
11
12
 
12
13
  Fig recursively builds an environment consisting of package dependencies
13
14
  (typically specified via command-line options or a package.fig file), each of
14
15
  which as noted above may have its own dependencies, and optionally executes a
15
16
  shell command in that environment. The caller's environment is not affected.
16
17
 
17
- Developers can use package.fig files to specify the list of dependencies to use for
18
- different tasks. This file will typically be versioned along with the rest of
19
- the source files, ensuring that all developers on a team are using the same
20
- environemnts.
18
+ Developers can use package.fig files to specify the list of dependencies to use
19
+ for different tasks. This file will typically be versioned along with the rest
20
+ of the source files, ensuring that all developers on a team are using the same
21
+ environments.
21
22
 
22
23
  Packages exist in two places: a "local" repository cache in the user's home
23
24
  directory--also called the fig-home--and a "remote" repository on a shared
@@ -33,84 +34,85 @@ language agnostic (Java doesn't get preferential treatment), and work with
33
34
  executables as well as libraries. And unlike APT, fig is cross platform and
34
35
  project-oriented.
35
36
 
36
- Installation
37
- ============
38
-
39
- $ gem install fig
40
-
41
- Or, if running Ruby 1.8.x...
42
-
43
- $ gem install fig18
44
-
45
37
  Usage
46
38
  =====
47
39
 
48
40
  Fig recognizes the following options:
49
41
 
50
- ### Flags ###
42
+ ## Flags ##
51
43
 
52
44
  -?, -h, --help display this help text
53
45
  -v, --version Print fig version
54
- -p, --append VAR=VAL append (actually, prepend) VAL to environment var VAR, delimited by separator
55
- --archive FULLPATH include FULLPATH archive in package (when using --publish)
56
- --clean PKG remove package from $FIG_HOME
57
- -c, --config CFG apply configuration CFG, default is 'default'
58
- -d, --debug print debug info
59
- --file FILE read fig file FILE. Use '-' for stdin. See also --no-file
60
- --force force-overwrite existing version of a package to the remote repo
61
- -g, --get VAR print value of environment variable VAR
62
- -i, --include PKG include PKG (with any variable prepends) in environment
63
- --list list packages in $FIG_HOME
64
- --list-configs PKG list configurations in package
46
+ -g, --get VARIABLE print value of environment variable VARIABLE
47
+ --list-local, --list list packages in $FIG_HOME
48
+ --list-configs list configurations
49
+ --list-dependencies list package dependencies, recursively
50
+ --list-variables list all variables defined/used by package and its dependencies
65
51
  --list-remote list packages in remote repo
66
- -l, --login login to remote repo as a non-anonymous user
52
+ --list-tree for listings, output a tree instead of a list
53
+ --list-all-configs for listings, follow all configurations of the base package
54
+ --clean remove package from $FIG_HOME
55
+ --publish install package in $FIG_HOME and in remote repo
56
+ --publish-local install package only in $FIG_HOME
57
+ -c, --config CONFIG apply configuration CONFIG, default is "default"
58
+ --file FILE read fig file FILE. Use '-' for stdin. See also --no-file
67
59
  --no-file ignore package.fig file in current directory
68
- --publish PKG install PKG in $FIG_HOME and in remote repo
69
- --publish-local PKG install package only in $FIG_HOME
70
- --resource FULLPATH include FULLPATH resource in package (when using --publish)
71
- -s, --set VAR=VAL set environment variable VAR to VAL
60
+ -p, --append VARIABLE=VALUE append (actually, prepend) VALUE to environment variable VARIABLE, delimited by separator
61
+ -i, --include DESCRIPTOR include package/version:config specified in DESCRIPTOR (with any variable prepends) in environment
62
+ -s, --set VARIABLE=VALUE set environment variable VARIABLE to VALUE
63
+ --archive PATH include PATH archive in package (when using --publish)
64
+ --resource PATH include PATH resource in package (when using --publish)
72
65
  -u, --update check remote repo for updates and download to $FIG_HOME as necessary
73
66
  -m, --update-if-missing check remote repo for updates only if package missing from $FIG_HOME
74
- --figrc PATH use PATH file as .rc file for Fig
67
+ -l, --login login to remote repo as a non-anonymous user
68
+ --force force-overwrite existing version of a package to the remote repo
69
+ --figrc PATH add PATH to configuration used for Fig
75
70
  --no-figrc ignore ~/.figrc
76
71
  --log-config PATH use PATH file as configuration for Log4r
77
72
  --log-level LEVEL set logging level to LEVEL
78
73
  (off, fatal, error, warn, info, debug, all)
74
+ -- end of fig options; anything after this is used as a command to run
75
+
76
+ Some of these options may also be expressed as statements in a package.fig
77
+ file. For instance, `--append`, `--archive`, `--resource`, `include`.
78
+
79
+ One point of frequent confusion revolves around which statements are concerned
80
+ with publishing packages, and which are for downloading packages and otherwise
81
+ modifying the Fig environment. The same Fig file can contain both publish
82
+ (e.g., `append`, `resource`) and download (e.g., `include`) statements, but you
83
+ may not want to use the same dependency file for both publishing a package and
84
+ specifying that same package's dependencies, since for example its "build-time"
85
+ dependencies may differ from its "include-time" dependencies. Multiple config
86
+ sections may be helpful in organizing these concerns.
87
+
88
+ ## Environment Variables Influencing Fig's Behavior ##
89
+
90
+ FIG_FTP_THREADS Optional - Size of FTP session pool. Defaults to 16.
91
+ FIG_HOME Optional - Location of local repo cache. Defaults to $HOME/.fighome.
92
+ FIG_REMOTE_LOGIN Required for --login, unless $HOME/.netrc is configured.
93
+ FIG_REMOTE_URL Require for operations involving the remote repository.
94
+ FIG_REMOTE_USER Required for --login, unless $HOME/.netrc is configured.
79
95
 
80
- -- end of fig options; everything following is a command to run in the fig environment.
81
-
82
- Some of these options may also be expressed as statements in a package.fig file. For instance,
83
- `--append`, `--archive`, `--resource`, `include`.
84
-
85
- One point of frequent confusion revolves around which statements are concerned with publishing packages, and
86
- which are for downloading packages and otherwise modifying the Fig environment. The same Fig file
87
- can contain both publish (e.g., `append`, `resource`) and download (e.g., `include`) statements,
88
- but you may not want to use the same
89
- dependency file for both publishing a package and specifying that same package's dependencies,
90
- since for example its "build-time" dependencies may differ from its "include-time" dependencies.
91
- Multiple config sections may be helpful in organizing these concerns.
92
-
93
- ### Environment Variables Influencing Fig's Behavior ###
94
-
95
- `FIG_FTP_THREADS` Optional - Size of FTP session pool. Defaults to 16.
96
- `FIG_HOME` Optional - Location of local repo cache. Defaults to $HOME/.fighome.
97
- `FIG_REMOTE_LOGIN` Required for --login, unless $HOME/.netrc is configured.
98
- `FIG_REMOTE_URL` Require for operations involving the remote repository.
99
- `FIG_REMOTE_USER` Required for --login, unless $HOME/.netrc is configured.
100
-
101
- [--list-remote] When using the `--list-remote` command against an FTP server, fig uses a pool of FTP sessions to improve
102
- performance. By default it opens 16 connections, but that number can be overridden by setting the
103
- `FIG_FTP_THREADS` environment variable.
104
-
105
- [--login] If the `--login` option is supplied, fig will look for credentials. If
106
- environment variables `FIG_REMOTE_USER` and/or `FIG_REMOTE_PASSWORD` are
107
- defined, fig will use them instead of prompting the user. If ~/.netrc exists,
108
- with an entry corresponding to the host parsed from `FIG_REMOTE_URL`, that
109
- entry will take precedence over `FIG_REMOTE_USER` and `FIG_REMOTE_PASSWORD`.
110
- If sufficient credentials are still not found, fig will prompt for whatever is
111
- still missing, and use the accumulated credentials to authenticate against the
112
- remote server. Even if both environment variables are defined, fig will only
113
- use them if `--login` is given.
96
+ ## Commands affected by environment variables
97
+
98
+ #### `--list-remote` ####
99
+
100
+ When using the `--list-remote` command against an FTP server, fig uses a pool
101
+ of FTP sessions to improve performance. By default it opens 16 connections, but
102
+ that number can be overridden by setting the `FIG_FTP_THREADS` environment
103
+ variable.
104
+
105
+ #### `--login` ####
106
+
107
+ If the `--login` option is supplied, fig will look for credentials. If
108
+ environment variables `FIG_REMOTE_USER` and/or `FIG_REMOTE_PASSWORD` are
109
+ defined, fig will use them instead of prompting the user. If ~/.netrc exists,
110
+ with an entry corresponding to the host parsed from `FIG_REMOTE_URL`, that
111
+ entry will take precedence over `FIG_REMOTE_USER` and `FIG_REMOTE_PASSWORD`.
112
+ If sufficient credentials are still not found, fig will prompt for whatever is
113
+ still missing, and use the accumulated credentials to authenticate against the
114
+ remote server. Even if both environment variables are defined, fig will only
115
+ use them if `--login` is given.
114
116
 
115
117
  Examples
116
118
  ========
@@ -121,7 +123,7 @@ Fig lets you configure environments three different ways:
121
123
  * From a "package.fig" file in the current directory
122
124
  * From packages included indirectly via one of the previous two methods
123
125
 
124
- ### Command Line ###
126
+ ## Command Line ##
125
127
 
126
128
  To get started, let's define an environment variable via the command line and
127
129
  execute a command in the new environment. We'll set the "GREETING" variable to
@@ -135,7 +137,11 @@ Also note that when running fig, the original environment isn't affected:
135
137
  $ echo $GREETING
136
138
  <nothing>
137
139
 
138
- Fig also lets you append environment variables using the system-specified path separator (e.g. colon on unix, semicolon on windows). This is useful for adding directories to the PATH, LD_LIBRARY_PATH, CLASSPATH, etc. For example, let's create a "bin" directory, add a shell script to it, then include it in the PATH:
140
+ Fig also lets you append environment variables using the system-specified path
141
+ separator (e.g. colon on Unix, semicolon on windows). This is useful for adding
142
+ directories to the PATH, LD_LIBRARY_PATH, CLASSPATH, etc. For example, let's
143
+ create a "bin" directory, add a shell script to it, then include it in the
144
+ PATH:
139
145
 
140
146
  $ mkdir bin
141
147
  $ echo 'echo $GREETING, World' > bin/hello
@@ -143,9 +149,11 @@ Fig also lets you append environment variables using the system-specified path s
143
149
  $ fig -s GREETING=Hello -p PATH=bin -- hello
144
150
  Hello, World
145
151
 
146
- ### Fig Files ###
152
+ ## Fig Files ##
153
+
154
+ You can also specify environment modifiers in files. Fig looks for a file
155
+ called "package.fig" in the current directory and automatically processes it.
147
156
 
148
- You can also specify environment modifiers in files. Fig looks for a file called "package.fig" in the current directory and automatically processes it.
149
157
  This "package.fig" file implements the previous example:
150
158
 
151
159
  config default
@@ -158,12 +166,12 @@ Then we can just run:
158
166
  $ fig -- hello
159
167
  Hello, World
160
168
 
161
- NOTE: The '@' symbol in a given package.fig file (or in a published dependency's .fig
162
- file) represents the full path to that file's directory. The
163
- above example would
164
- still work if we just used "bin", but later on when we publish our project to
165
- the shared repository we'll definitely need the '@', since the project directories will
166
- live in the fig-home rather than under our current directory).
169
+ NOTE: The '@' symbol in a given package.fig file (or in a published
170
+ dependency's .fig file) represents the full path to that file's directory. The
171
+ above example would still work if we just used "bin", but later on when we
172
+ publish our project to the shared repository we'll definitely need the '@',
173
+ since the project directories will live in the fig-home rather than under our
174
+ current directory).
167
175
 
168
176
  A single fig file may have multiple configurations:
169
177
 
@@ -177,14 +185,15 @@ A single fig file may have multiple configurations:
177
185
  append PATH=@/bin
178
186
  end
179
187
 
180
- ### Config Sections ###
188
+ ## Config Sections ##
181
189
 
182
190
  Configurations other than "default" can be specified using the "-c" option:
183
191
 
184
192
  $ fig -c french -- hello
185
193
  Bonjour, World
186
194
 
187
- A config section can be included in another config section:
195
+ The statements from one config section can be incorporated into another config
196
+ section via an `include` statement:
188
197
 
189
198
  config default
190
199
  include :spanish
@@ -195,7 +204,15 @@ A config section can be included in another config section:
195
204
  append PATH=@/bin
196
205
  end
197
206
 
198
- ### Packages ###
207
+ Note that config statements cannot be nested within a fig file. I.e. the
208
+ following is _invalid_:
209
+
210
+ config foo
211
+ config bar
212
+ end
213
+ end
214
+
215
+ ## Packages ##
199
216
 
200
217
  Let's share our little script with the rest of the team by bundling it into a
201
218
  package and publishing it. First, point the `FIG_REMOTE_URL` environment
@@ -204,17 +221,20 @@ you can have it point to a local directory:
204
221
 
205
222
  $ export FIG_REMOTE_URL=file://$(pwd)/remote
206
223
 
207
- Before we publish our package, we'll need to tell fig which files we want to include. We do this by using the "resource" statement in our "package.fig" file:
224
+ Before we publish our package, we'll need to tell fig which files we want to
225
+ include. We do this by using the "resource" statement in our "package.fig"
226
+ file:
208
227
 
209
228
  resource bin/hello
210
229
 
211
230
  config default...
212
231
 
213
- Now we can share the package with the rest of the team by using the `--publish` option:
232
+ Now we can share the package with the rest of the team by using the `--publish`
233
+ option:
214
234
 
215
235
  $ fig --publish hello/1.0.0
216
236
 
217
- Once the package has been published, we can include it in other environments
237
+ Once the package has been published, we can include it in other environments
218
238
  with the `-i` or `--include` option. (For the purpose of this example, let's
219
239
  first move the "package.fig" file out of the way, so that it doesn't confuse
220
240
  fig or us.) The "hello/1.0.0" string represents the name of the package and the
@@ -225,24 +245,29 @@ version number.
225
245
  ...downloading files...
226
246
  Hello, World
227
247
 
228
- The `-u` (or `--update`) option tells fig to check the remote repository for packages if they aren't already installed locally (fig will never make any network connections unless this option is specified). Once the packages are downloaded, we can run the same command without the `-u` option:
248
+ The `-u` (or `--update`) option tells fig to check the remote repository for
249
+ packages if they aren't already installed locally (fig will never make any
250
+ network connections unless this option is specified). Once the packages are
251
+ downloaded, we can run the same command without the `-u` option:
229
252
 
230
253
  $ fig -i hello/1.0.0 -- hello
231
254
  Hello, World
232
255
 
233
- When including a package, you can specify a particular configuration by appending it to the package name using a colon:
256
+ When including a package, you can specify a particular configuration by
257
+ appending it to the package name using a colon:
234
258
 
235
259
  $ fig -i hello/1.0.0:french -- hello
236
260
  Bonjour, World
237
261
 
238
- ### Retrieves ###
262
+ ## Retrieves ##
239
263
 
240
264
  By default, the resources associated with a package live in the fig home
241
- directory, which defaults to "$HOME/.fighome". This doesn't always play nicely with
242
- IDE's however, so fig provides a "retrieve" statement to copy resources from the repository to
243
- the current directory.
265
+ directory, which defaults to "$HOME/.fighome". This doesn't always play nicely
266
+ with IDE's however, so fig provides a "retrieve" statement to copy resources
267
+ from the repository to the current directory.
244
268
 
245
- For example, let's create a package that contains a library for the "foo" programming language. Define a "package.fig" file:
269
+ For example, let's create a package that contains a library for the "foo"
270
+ programming language. Define a "package.fig" file:
246
271
 
247
272
  config default
248
273
  append FOOPATH=@/lib/hello.foo
@@ -254,15 +279,17 @@ Then:
254
279
  $ echo "print 'hello'" > lib/hello.foo
255
280
  $ fig --publish hello-lib/3.2.1
256
281
 
257
- Create a new "package.fig" file (first moving to a different directory or deleting the "package.fig" we just used for publishing):
282
+ Create a new "package.fig" file (first moving to a different directory or
283
+ deleting the "package.fig" we just used for publishing):
258
284
 
259
285
  retrieve FOOPATH->lib/[package]
260
286
  config default
261
287
  include hello-lib/3.2.1
262
288
  end
263
289
 
264
- Upon a `fig --update`, each resource in FOOPATH will be copied into lib/[package], where [package] resolves to the resource's
265
- package name (minus the version).
290
+ Upon a `fig --update`, each resource in FOOPATH will be copied into
291
+ lib/[package], where [package] resolves to the resource's package name (minus
292
+ the version).
266
293
 
267
294
  $ fig -u
268
295
  ...downloading...
@@ -270,8 +297,212 @@ package name (minus the version).
270
297
  $ cat lib/hello-lib/hello.foo
271
298
  print 'hello'
272
299
 
273
- ### Building the gem ###
274
- Use `rake figbuild` instead of `rake build`, due to a glitch with "gem build's" naming of i386 gems as 'x86', which causes problems with a subsequent `gem install fig18` command; it picks the wrong Fig gem to install.
300
+ Package Statement Descriptions
301
+ ==============================
302
+
303
+ ## `add` ##
304
+
305
+ Specifies a value to be appended to a `PATH`-like environment variable, e.g.
306
+ `CLASSPATH` for Java. Does not include the delimiter within the variable, just
307
+ the component value.
308
+
309
+ ## `append` ##
310
+
311
+ Synonym for `add`.
312
+
313
+ ## `archive` ##
314
+
315
+ Specifies an archive file (either a local path or a URL) that is supposed to be
316
+ incorporated into the package. This is different from a `resource` in that the
317
+ contents will be extracted as part of installation.
318
+
319
+ ## `command` ##
320
+
321
+ Specifies a default command to be run for a given `config` when no command is
322
+ given on the command-line.
323
+
324
+ config default
325
+ command echo Hello there.
326
+ end
327
+
328
+ Cannot be specified outside of a `config` statement. There may not be multiple
329
+ commands within a given `config`.
330
+
331
+ ## `config` ##
332
+
333
+ A grouping of statements that specifies what is to be done. There must either
334
+ be a configuration named "default" or you will always have to specify a
335
+ configuration on the command-line.
336
+
337
+ May not be nested. If you wish to incorporate the effects of one configuration
338
+ into another, use an `include` statement.
339
+
340
+ ## `include` ##
341
+
342
+ Can be used in two ways: to affect configurations and to declare package
343
+ dependencies.
344
+
345
+ ### Pull one configuration into another ###
346
+
347
+ You can get the effects of one configuration in another by using the name of
348
+ the other configuration preceded by a colon:
349
+
350
+ config a
351
+ include :b
352
+ end
353
+
354
+ config b
355
+ ...
356
+ end
357
+
358
+ ### Declare a package dependency ###
359
+
360
+ States that one package should be installed prior to the current one; can
361
+ specify a version.
362
+
363
+ config default
364
+ include somepackage/1.2.3
365
+ end
366
+
367
+ Dependency version conflicts can be resolved by using `override` clauses.
368
+
369
+ Say you've got a "base-dependency" package. Then, in the `package.fig` for
370
+ "middle-dependency-a" you have
371
+
372
+ config default
373
+ include base-dependency/1.2.3
374
+ end
375
+
376
+ And in the `package.fig` for "middle-dependency-b" you have
377
+
378
+ config default
379
+ include base-dependency/3.2.1
380
+ end
381
+
382
+ Finally, in the `package.fig` for the package you're working on you've got
383
+
384
+ config default
385
+ include middle-dependency-a
386
+ include middle-dependency-b
387
+ end
388
+
389
+ This will produce a conflicting requirement on "base-dependency". Resolve this
390
+ by either matching the version of one dependency to another:
391
+
392
+ config default
393
+ include middle-dependency-a override base-dependency/3.2.1
394
+ include middle-dependency-b
395
+ end
396
+
397
+ Or specify the same version to both:
398
+
399
+ config default
400
+ include middle-dependency-a override base-dependency/2.2.2
401
+ include middle-dependency-b override base-dependency/2.2.2
402
+ end
403
+
404
+ Multiple `override` clauses can be specified in a single `include` statement.
405
+
406
+ ## `path` ##
407
+
408
+ Synonym for `add`.
409
+
410
+ ## `resource` ##
411
+
412
+ Specifies a file (either a local path or a URL) that is supposed to be
413
+ incorporated into the package. This is different from an `archive` in that the
414
+ contents will not be extracted as part of installation.
415
+
416
+ ## `retrieve` ##
417
+
418
+ Gives the installation location for a dependency.
419
+
420
+ ## `set` ##
421
+
422
+ Gives the value of an environment variable. Unlike `add`/`append`/`path`, this
423
+ is the complete, final value.
424
+
425
+ Querying Fig Net Effects
426
+ ========================
427
+
428
+ If you've got a long chain of dependencies of packages, it can be challenging
429
+ to figure out the full effects of it. There are a number of commands for just
430
+ figuring out what things are coming from.
431
+
432
+ ## `--list-dependencies` ##
433
+
434
+ By itself, this will give you the total set of packages you're pulling in.
435
+
436
+ For example, if you have package A which depends upon packages B and C
437
+ which both depend upon package D, running
438
+
439
+ fig --list-dependencies A/1.2.3
440
+
441
+ will give you
442
+
443
+ B/2.3.4
444
+ C/3.4.5
445
+ D/4.5.6
446
+
447
+ If there are no dependencies and stdout is connected to a terminal you'll get:
448
+
449
+ fig --list-dependencies package-with-no-dependencies/1.2.3
450
+
451
+ <no dependencies>
452
+
453
+ However, if stdout is not connected to a terminal:
454
+
455
+ fig --list-dependencies package-with-no-dependencies/1.2.3 | cat
456
+
457
+ [no output]
458
+
459
+ ### `--list-tree` ###
460
+
461
+ If you additionally specify `--list-tree`, you'll get a nested dependency
462
+ tree:
463
+
464
+ fig --list-dependencies --list-tree A/1.2.3
465
+
466
+ A/1.2.3
467
+ B/2.3.4
468
+ D/4.5.6
469
+ C/3.4.5
470
+ D/4.5.6
471
+
472
+ If you don't specify a package descriptor, but you've got a package.fig
473
+ file in the current directory with the same dependencies as package A
474
+ above, you'll get
475
+
476
+ fig --list-dependencies --list-tree
477
+
478
+ <unpublished>
479
+ B/2.3.4
480
+ D/4.5.6
481
+ C/3.4.5
482
+ D/4.5.6
483
+
484
+ ### `--list-all-configs` ###
485
+
486
+ This will follow all of the dependencies using all the configurations in the
487
+ package descriptor or the package.fig file. This will not follow all
488
+ configurations in all depended upon packages, only the ones reachable by one of
489
+ the configurations in the starting package.
490
+
491
+ Installation and Development
492
+ ============================
493
+
494
+ ## Installation ##
495
+
496
+ gem install fig
497
+
498
+ *NOTE*: When installing Fig on Windows you must first have installed the
499
+ Development Kit available from http://rubyinstaller.org/downloads. Instructions
500
+ for installation of the Development Kit are available at
501
+ https://github.com/oneclick/rubyinstaller/wiki/Development-Kit.
502
+
503
+ ## Building the gem ##
504
+
505
+ rake build
275
506
 
276
507
  Community
277
508
  =========
@@ -283,4 +514,4 @@ Community
283
514
  Copyright
284
515
  =========
285
516
 
286
- Copyright (c) 2009-2011 Matthew Foemmel. See LICENSE for details.
517
+ Copyright (c) 2009-2012 Matthew Foemmel. See LICENSE for details.