fig 0.1.75 → 0.1.76

Sign up to get free protection for your applications and to get access to all the features.
data/Changes CHANGED
@@ -1,3 +1,11 @@
1
+ v0.1.76
2
+
3
+ New features:
4
+
5
+ - New --version-plain option for getting the fig version without any nice
6
+ formatting (and no trailing newline in the output). Useful for programatic
7
+ access to the fig version.
8
+
1
9
  v0.1.75
2
10
 
3
11
  Backwards incompatibilities:
data/lib/fig.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fig
2
- VERSION = '0.1.75'
2
+ VERSION = '0.1.76'
3
3
  end
@@ -0,0 +1,31 @@
1
+ require 'fig'
2
+ require 'fig/command'
3
+ require 'fig/command/action'
4
+ require 'fig/command/action/role/has_no_sub_action'
5
+
6
+ module Fig; end
7
+ class Fig::Command; end
8
+ module Fig::Command::Action; end
9
+
10
+ class Fig::Command::Action::VersionPlain
11
+ include Fig::Command::Action
12
+ include Fig::Command::Action::Role::HasNoSubAction
13
+
14
+ def options()
15
+ return %w<--version-plain>
16
+ end
17
+
18
+ def execute_immediately_after_command_line_parse?
19
+ return true
20
+ end
21
+
22
+ def configure(options)
23
+ @version_plain = options.version_plain
24
+ end
25
+
26
+ def execute()
27
+ print @version_plain || Fig::VERSION
28
+
29
+ return EXIT_SUCCESS
30
+ end
31
+ end
@@ -25,6 +25,7 @@ require 'fig/command/action/run_command_statement'
25
25
  require 'fig/command/action/update'
26
26
  require 'fig/command/action/update_if_missing'
27
27
  require 'fig/command/action/version'
28
+ require 'fig/command/action/version_plain'
28
29
  require 'fig/command/option_error'
29
30
  require 'fig/command/options/parser'
30
31
  require 'fig/package_descriptor'
@@ -55,6 +56,7 @@ class Fig::Command::Options
55
56
  attr_reader :update_lock_response
56
57
  attr_reader :variable_to_get
57
58
  attr_accessor :version_message
59
+ attr_accessor :version_plain
58
60
 
59
61
  def initialize()
60
62
  @home = ENV['FIG_HOME'] || File.expand_path('~/.fighome')
@@ -209,6 +211,11 @@ class Fig::Command::Options
209
211
  @parser.on_tail('-v', '--version', 'print Fig version') do
210
212
  set_base_action(Fig::Command::Action::Version)
211
213
  end
214
+ @parser.on_tail(
215
+ '--version-plain', 'print Fig version without embellishment (no newline)'
216
+ ) do
217
+ set_base_action(Fig::Command::Action::VersionPlain)
218
+ end
212
219
 
213
220
  @parser.on(
214
221
  '-g',
@@ -92,7 +92,7 @@ Information:
92
92
  fig --help
93
93
  fig --help-long
94
94
  fig --options
95
- fig {-v | --version}
95
+ fig {-v | --version | --version-plain}
96
96
 
97
97
 
98
98
  A DESCRIPTOR looks like <package name>[/<version>][:<config>] e.g. "foo",
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.75
4
+ version: 0.1.76
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-01 00:00:00.000000000 Z
12
+ date: 2012-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize
16
- requirement: &20106180 !ruby/object:Gem::Requirement
16
+ requirement: &18129660 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.5.8
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *20106180
24
+ version_requirements: *18129660
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: highline
27
- requirement: &20105640 !ruby/object:Gem::Requirement
27
+ requirement: &18129120 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.6.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *20105640
35
+ version_requirements: *18129120
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: json
38
- requirement: &20105100 !ruby/object:Gem::Requirement
38
+ requirement: &18128560 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.6.5
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *20105100
46
+ version_requirements: *18128560
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: libarchive-static
49
- requirement: &20104500 !ruby/object:Gem::Requirement
49
+ requirement: &18128000 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.0.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *20104500
57
+ version_requirements: *18128000
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: log4r
60
- requirement: &20103920 !ruby/object:Gem::Requirement
60
+ requirement: &18127400 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.1.5
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *20103920
68
+ version_requirements: *18127400
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: net-netrc
71
- requirement: &20103100 !ruby/object:Gem::Requirement
71
+ requirement: &18126620 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.2.2
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *20103100
79
+ version_requirements: *18126620
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: net-sftp
82
- requirement: &20102240 !ruby/object:Gem::Requirement
82
+ requirement: &18125720 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 2.0.4
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *20102240
90
+ version_requirements: *18125720
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: net-ssh
93
- requirement: &20101740 !ruby/object:Gem::Requirement
93
+ requirement: &18040400 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 2.0.15
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *20101740
101
+ version_requirements: *18040400
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: rdoc
104
- requirement: &20016900 !ruby/object:Gem::Requirement
104
+ requirement: &18039900 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '3.12'
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *20016900
112
+ version_requirements: *18039900
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: sys-admin
115
- requirement: &20016420 !ruby/object:Gem::Requirement
115
+ requirement: &18039420 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 1.5.6
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *20016420
123
+ version_requirements: *18039420
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: treetop
126
- requirement: &20015640 !ruby/object:Gem::Requirement
126
+ requirement: &18038680 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: 1.4.2
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *20015640
134
+ version_requirements: *18038680
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: open4
137
- requirement: &20014840 !ruby/object:Gem::Requirement
137
+ requirement: &18038020 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: 1.0.1
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *20014840
145
+ version_requirements: *18038020
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: bundler
148
- requirement: &20013800 !ruby/object:Gem::Requirement
148
+ requirement: &18036920 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: 1.0.15
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *20013800
156
+ version_requirements: *18036920
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: rake
159
- requirement: &20013120 !ruby/object:Gem::Requirement
159
+ requirement: &18036100 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: 0.8.7
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *20013120
167
+ version_requirements: *18036100
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: rspec
170
- requirement: &20012540 !ruby/object:Gem::Requirement
170
+ requirement: &18035560 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ~>
@@ -175,10 +175,10 @@ dependencies:
175
175
  version: '2'
176
176
  type: :development
177
177
  prerelease: false
178
- version_requirements: *20012540
178
+ version_requirements: *18035560
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: rspec-core
181
- requirement: &20012080 !ruby/object:Gem::Requirement
181
+ requirement: &18035080 !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements:
184
184
  - - ! '>='
@@ -186,10 +186,10 @@ dependencies:
186
186
  version: 2.7.1
187
187
  type: :development
188
188
  prerelease: false
189
- version_requirements: *20012080
189
+ version_requirements: *18035080
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: rspec-expectations
192
- requirement: &20011600 !ruby/object:Gem::Requirement
192
+ requirement: &18034600 !ruby/object:Gem::Requirement
193
193
  none: false
194
194
  requirements:
195
195
  - - ! '>='
@@ -197,10 +197,10 @@ dependencies:
197
197
  version: 2.7.0
198
198
  type: :development
199
199
  prerelease: false
200
- version_requirements: *20011600
200
+ version_requirements: *18034600
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: rspec-mocks
203
- requirement: &20011100 !ruby/object:Gem::Requirement
203
+ requirement: &18034100 !ruby/object:Gem::Requirement
204
204
  none: false
205
205
  requirements:
206
206
  - - ! '>='
@@ -208,10 +208,10 @@ dependencies:
208
208
  version: 2.7.0
209
209
  type: :development
210
210
  prerelease: false
211
- version_requirements: *20011100
211
+ version_requirements: *18034100
212
212
  - !ruby/object:Gem::Dependency
213
213
  name: simplecov
214
- requirement: &20010600 !ruby/object:Gem::Requirement
214
+ requirement: &18033600 !ruby/object:Gem::Requirement
215
215
  none: false
216
216
  requirements:
217
217
  - - ! '>='
@@ -219,10 +219,10 @@ dependencies:
219
219
  version: 0.6.2
220
220
  type: :development
221
221
  prerelease: false
222
- version_requirements: *20010600
222
+ version_requirements: *18033600
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: simplecov-html
225
- requirement: &20010100 !ruby/object:Gem::Requirement
225
+ requirement: &18033140 !ruby/object:Gem::Requirement
226
226
  none: false
227
227
  requirements:
228
228
  - - ! '>='
@@ -230,7 +230,7 @@ dependencies:
230
230
  version: 0.5.3
231
231
  type: :development
232
232
  prerelease: false
233
- version_requirements: *20010100
233
+ version_requirements: *18033140
234
234
  description: Fig is a utility for configuring environments and managing dependencies
235
235
  across a team of developers. Given a list of packages and a command to run, Fig
236
236
  builds environment variables named in those packages (e.g., CLASSPATH), then executes
@@ -270,11 +270,16 @@ files:
270
270
  - lib/fig/package_descriptor.rb
271
271
  - lib/fig/not_found_error.rb
272
272
  - lib/fig/application_configuration.rb
273
+ - lib/fig/grammar/version.rb
273
274
  - lib/fig/grammar/base.treetop
274
275
  - lib/fig/grammar/version.treetop
275
276
  - lib/fig/grammar/v0.treetop
276
277
  - lib/fig/grammar/version_identification.treetop
278
+ - lib/fig/grammar/v1.rb
279
+ - lib/fig/grammar/base.rb
280
+ - lib/fig/grammar/v0.rb
277
281
  - lib/fig/grammar/v1.treetop
282
+ - lib/fig/grammar/version_identification.rb
278
283
  - lib/fig/statement/path.rb
279
284
  - lib/fig/statement/set.rb
280
285
  - lib/fig/statement/grammar_version.rb
@@ -329,6 +334,7 @@ files:
329
334
  - lib/fig/command/action/dump_package_definition_parsed.rb
330
335
  - lib/fig/command/action/clean.rb
331
336
  - lib/fig/command/action/list_variables.rb
337
+ - lib/fig/command/action/version_plain.rb
332
338
  - lib/fig/command/action/get.rb
333
339
  - lib/fig/command/option_error.rb
334
340
  - lib/fig/command/options.rb
@@ -349,11 +355,6 @@ files:
349
355
  - lib/fig/statement.rb
350
356
  - LICENSE
351
357
  - README.md
352
- - lib/fig/grammar/base.rb
353
- - lib/fig/grammar/version.rb
354
- - lib/fig/grammar/v0.rb
355
- - lib/fig/grammar/version_identification.rb
356
- - lib/fig/grammar/v1.rb
357
358
  homepage: http://github.com/mfoemmel/fig
358
359
  licenses: []
359
360
  post_install_message: