fig 1.25.0 → 1.25.1.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/BUGS.md +3 -0
- data/Changes +33 -15
- data/lib/fig.rb +1 -1
- data/lib/fig/command/action.rb +24 -8
- data/lib/fig/command/initialization.rb +2 -2
- data/lib/fig/deparser.rb +21 -7
- data/lib/fig/figrc.rb +8 -1
- data/lib/fig/protocol/ftp.rb +6 -1
- data/lib/fig/protocol/sftp.rb +5 -1
- data/lib/fig/statement.rb +12 -4
- data/lib/fig/working_directory_maintainer.rb +11 -0
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f5483f7ec213c7f847e240606b4b1657938e2e3a
|
|
4
|
+
data.tar.gz: be24f8d3c1de10e8211fd221bed6f79f55b2a5a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 94ce2975c84cfbd2b25f4bc08c479fa39c019477a146e97fd06e13808fa307b1faf495ec8b6e04de59a44d8137949e7c87963827f50f9a3094ea15681c96feab
|
|
7
|
+
data.tar.gz: df3673063a6b056b81ccb072b8519ad2a382be6c3a333a5516496f1fa6b5d31479da59b18fab3bc385443e1d0c5d8497a52e6067ae0386524f7e0247701d5721
|
data/BUGS.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
- `sftp:` URLs are subject to https://github.com/net-ssh/net-sftp/issues/27.
|
|
2
2
|
- Packages containing symlinks fail to install on Windows. libarchive doesn't corectly report them as symlinks.
|
|
3
3
|
- Bad values in `FIG_HOME` and `FIG_REMOTE_URL` produce nasty errors.
|
|
4
|
+
- The internal storage for home directory layouts in v2 format don't take the
|
|
5
|
+
value of `FIG_REMOTE_URL` into account, meaning that, if you switch
|
|
6
|
+
`FIG_REMOTE_URL` without also switching `FIG_HOME`, "fun" things can happen.
|
|
4
7
|
- URLs with query parameters or involve redirects are untested.
|
|
5
8
|
- Repository locking doesn't happen on Windows.
|
data/Changes
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
|
-
v1.25.
|
|
1
|
+
v1.25.1.beta.1 - 2015/6/3
|
|
2
|
+
|
|
3
|
+
Bug fixes:
|
|
4
|
+
|
|
5
|
+
- Better checking of whether files are up-to-date in FTP and SFTP downloads
|
|
6
|
+
and better error message emitted when corrupt local copy of remote figrc is
|
|
7
|
+
found.
|
|
8
|
+
|
|
9
|
+
Miscellaneous:
|
|
10
|
+
|
|
11
|
+
- As previously announced, Fig now requires Ruby v2.0.0. You should probably
|
|
12
|
+
use something later than v2.0, though; the test suite on MRI v2.0.0 takes
|
|
13
|
+
almost twice as long to run as it does on MRI v2.2.0.
|
|
14
|
+
|
|
15
|
+
- Now looks for ./.fig on startup and complains if it exists and it isn't a
|
|
16
|
+
directory in order to prevent problems with naughty users running from
|
|
17
|
+
within a repository.
|
|
18
|
+
|
|
19
|
+
v1.25.0 - 2015/5/11
|
|
2
20
|
|
|
3
21
|
Announcement:
|
|
4
22
|
|
|
5
|
-
- This is the final version that will support Ruby
|
|
6
|
-
will require Ruby
|
|
23
|
+
- This is the final version that will support Ruby v1.9.x. The next version
|
|
24
|
+
will require Ruby v2.0.0.
|
|
7
25
|
|
|
8
26
|
Bug fixes:
|
|
9
27
|
|
|
@@ -39,13 +57,13 @@ v1.25.0 - 2015/05/11
|
|
|
39
57
|
- A blank line is added after grammar statements in published packages in
|
|
40
58
|
order to seperate them from other statements.
|
|
41
59
|
|
|
42
|
-
v1.24.1.beta.3 - 2015/
|
|
43
|
-
v1.24.1.beta.2 - 2015/
|
|
44
|
-
v1.24.1.beta.1 - 2015/
|
|
60
|
+
v1.24.1.beta.3 - 2015/4/27
|
|
61
|
+
v1.24.1.beta.2 - 2015/4/24
|
|
62
|
+
v1.24.1.beta.1 - 2015/4/23
|
|
45
63
|
|
|
46
64
|
- Test releases.
|
|
47
65
|
|
|
48
|
-
v1.24.0 - 2015/
|
|
66
|
+
v1.24.0 - 2015/1/13
|
|
49
67
|
|
|
50
68
|
New feature:
|
|
51
69
|
|
|
@@ -59,11 +77,11 @@ v1.24.0 - 2015/01/13
|
|
|
59
77
|
- All I/O now done using UTF-8 as the encoding.
|
|
60
78
|
- No longer uses the open4 gem.
|
|
61
79
|
|
|
62
|
-
v1.23.1.beta.1 - 2015/
|
|
80
|
+
v1.23.1.beta.1 - 2015/1/9
|
|
63
81
|
|
|
64
82
|
- Test release.
|
|
65
83
|
|
|
66
|
-
v1.23.0 - 2015/
|
|
84
|
+
v1.23.0 - 2015/1/2
|
|
67
85
|
|
|
68
86
|
Bug fixes:
|
|
69
87
|
|
|
@@ -232,17 +250,17 @@ v1.12.0 - 2013/10/14
|
|
|
232
250
|
but just for pulling down dependencies.
|
|
233
251
|
|
|
234
252
|
v1.11.1.beta.2 - 2013/10/11
|
|
235
|
-
v1.11.1.beta.1 - 2013/10/
|
|
253
|
+
v1.11.1.beta.1 - 2013/10/9
|
|
236
254
|
|
|
237
255
|
- Test releases.
|
|
238
256
|
|
|
239
|
-
v1.11.0 - 2013/
|
|
257
|
+
v1.11.0 - 2013/9/25
|
|
240
258
|
|
|
241
259
|
Bug fixes:
|
|
242
260
|
|
|
243
261
|
- Fix crash with quoted command-lines.
|
|
244
262
|
|
|
245
|
-
v1.10.0 - 2013/
|
|
263
|
+
v1.10.0 - 2013/9/25
|
|
246
264
|
|
|
247
265
|
Bug fixes:
|
|
248
266
|
|
|
@@ -254,12 +272,12 @@ v1.10.0 - 2013/09/25
|
|
|
254
272
|
- Resource statements that refer to directories will now pull in the full
|
|
255
273
|
directory contents instead of just the directory itself.
|
|
256
274
|
|
|
257
|
-
v1.9.1.beta.2 - 2013/
|
|
258
|
-
v1.9.1.beta.1 - 2013/
|
|
275
|
+
v1.9.1.beta.2 - 2013/9/20
|
|
276
|
+
v1.9.1.beta.1 - 2013/9/19
|
|
259
277
|
|
|
260
278
|
- Test releases.
|
|
261
279
|
|
|
262
|
-
v1.9.0 - 2013/
|
|
280
|
+
v1.9.0 - 2013/9/19
|
|
263
281
|
|
|
264
282
|
Bug fixes:
|
|
265
283
|
|
data/lib/fig.rb
CHANGED
data/lib/fig/command/action.rb
CHANGED
|
@@ -21,7 +21,9 @@ module Fig::Command::Action
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def options()
|
|
24
|
-
raise NotImplementedError
|
|
24
|
+
raise NotImplementedError.new(
|
|
25
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
26
|
+
)
|
|
25
27
|
end
|
|
26
28
|
|
|
27
29
|
# Is this a special Action that should just be run on its own without looking
|
|
@@ -32,7 +34,9 @@ module Fig::Command::Action
|
|
|
32
34
|
end
|
|
33
35
|
|
|
34
36
|
def descriptor_requirement()
|
|
35
|
-
raise NotImplementedError
|
|
37
|
+
raise NotImplementedError.new(
|
|
38
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
39
|
+
)
|
|
36
40
|
end
|
|
37
41
|
|
|
38
42
|
def allow_both_descriptor_and_file?()
|
|
@@ -46,7 +50,9 @@ module Fig::Command::Action
|
|
|
46
50
|
end
|
|
47
51
|
|
|
48
52
|
def modifies_repository?()
|
|
49
|
-
raise NotImplementedError
|
|
53
|
+
raise NotImplementedError.new(
|
|
54
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
55
|
+
)
|
|
50
56
|
end
|
|
51
57
|
|
|
52
58
|
def prepare_repository(repository)
|
|
@@ -54,7 +60,9 @@ module Fig::Command::Action
|
|
|
54
60
|
end
|
|
55
61
|
|
|
56
62
|
def load_base_package?()
|
|
57
|
-
raise NotImplementedError
|
|
63
|
+
raise NotImplementedError.new(
|
|
64
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
65
|
+
)
|
|
58
66
|
end
|
|
59
67
|
|
|
60
68
|
def base_package_can_come_from_descriptor?()
|
|
@@ -63,17 +71,23 @@ module Fig::Command::Action
|
|
|
63
71
|
|
|
64
72
|
# true, false, or nil if don't care.
|
|
65
73
|
def register_base_package?()
|
|
66
|
-
raise NotImplementedError
|
|
74
|
+
raise NotImplementedError.new(
|
|
75
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
76
|
+
)
|
|
67
77
|
end
|
|
68
78
|
|
|
69
79
|
# true, false, or nil if don't care.
|
|
70
80
|
def apply_config?()
|
|
71
|
-
raise NotImplementedError
|
|
81
|
+
raise NotImplementedError.new(
|
|
82
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
83
|
+
)
|
|
72
84
|
end
|
|
73
85
|
|
|
74
86
|
# true, false, or nil if don't care.
|
|
75
87
|
def apply_base_config?()
|
|
76
|
-
raise NotImplementedError
|
|
88
|
+
raise NotImplementedError.new(
|
|
89
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
90
|
+
)
|
|
77
91
|
end
|
|
78
92
|
|
|
79
93
|
def remote_operation_necessary?()
|
|
@@ -116,6 +130,8 @@ module Fig::Command::Action
|
|
|
116
130
|
end
|
|
117
131
|
|
|
118
132
|
def execute()
|
|
119
|
-
raise NotImplementedError
|
|
133
|
+
raise NotImplementedError.new(
|
|
134
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
135
|
+
)
|
|
120
136
|
end
|
|
121
137
|
end
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
# This is not a normal module/class. It contains code to be run by bin/fig and
|
|
4
4
|
# bin/fig-debug just after process startup.
|
|
5
5
|
|
|
6
|
-
( [
|
|
7
|
-
abort "Ruby
|
|
6
|
+
( [2, 0, 0] <=> ( RUBY_VERSION.split(".").collect {|x| x.to_i} ) ) <= 0 or
|
|
7
|
+
abort "Ruby v2.0.0 is required; this is v#{RUBY_VERSION}."
|
|
8
8
|
|
|
9
9
|
if ENV['FIG_COVERAGE']
|
|
10
10
|
require File.expand_path(
|
data/lib/fig/deparser.rb
CHANGED
|
@@ -118,7 +118,9 @@ module Fig::Deparser
|
|
|
118
118
|
end
|
|
119
119
|
|
|
120
120
|
def command(statement)
|
|
121
|
-
raise NotImplementedError.new
|
|
121
|
+
raise NotImplementedError.new(
|
|
122
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
123
|
+
)
|
|
122
124
|
end
|
|
123
125
|
|
|
124
126
|
def configuration(configuration_statement)
|
|
@@ -149,7 +151,9 @@ module Fig::Deparser
|
|
|
149
151
|
end
|
|
150
152
|
|
|
151
153
|
def grammar_version(statement)
|
|
152
|
-
raise NotImplementedError.new
|
|
154
|
+
raise NotImplementedError.new(
|
|
155
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
156
|
+
)
|
|
153
157
|
end
|
|
154
158
|
|
|
155
159
|
def include(statement)
|
|
@@ -165,7 +169,9 @@ module Fig::Deparser
|
|
|
165
169
|
end
|
|
166
170
|
|
|
167
171
|
def include_file(statement)
|
|
168
|
-
raise NotImplementedError.new
|
|
172
|
+
raise NotImplementedError.new(
|
|
173
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
174
|
+
)
|
|
169
175
|
end
|
|
170
176
|
|
|
171
177
|
def override(statement)
|
|
@@ -193,7 +199,9 @@ module Fig::Deparser
|
|
|
193
199
|
end
|
|
194
200
|
|
|
195
201
|
def retrieve(statement)
|
|
196
|
-
raise NotImplementedError.new
|
|
202
|
+
raise NotImplementedError.new(
|
|
203
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
204
|
+
)
|
|
197
205
|
end
|
|
198
206
|
|
|
199
207
|
def set(statement)
|
|
@@ -209,13 +217,17 @@ module Fig::Deparser
|
|
|
209
217
|
end
|
|
210
218
|
|
|
211
219
|
def grammar_description
|
|
212
|
-
raise NotImplementedError.new
|
|
220
|
+
raise NotImplementedError.new(
|
|
221
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
222
|
+
)
|
|
213
223
|
end
|
|
214
224
|
|
|
215
225
|
private
|
|
216
226
|
|
|
217
227
|
def asset(keyword, statement)
|
|
218
|
-
raise NotImplementedError.new
|
|
228
|
+
raise NotImplementedError.new(
|
|
229
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
230
|
+
)
|
|
219
231
|
end
|
|
220
232
|
|
|
221
233
|
def asset_path(statement)
|
|
@@ -227,7 +239,9 @@ module Fig::Deparser
|
|
|
227
239
|
end
|
|
228
240
|
|
|
229
241
|
def environment_variable(statement, keyword)
|
|
230
|
-
raise NotImplementedError.new
|
|
242
|
+
raise NotImplementedError.new(
|
|
243
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
244
|
+
)
|
|
231
245
|
end
|
|
232
246
|
|
|
233
247
|
def add_indent(indent_level = @indent_level)
|
data/lib/fig/figrc.rb
CHANGED
|
@@ -106,9 +106,16 @@ class Fig::FigRC
|
|
|
106
106
|
|
|
107
107
|
begin
|
|
108
108
|
configuration_text = File.open(repo_figrc_path).read
|
|
109
|
+
if configuration_text.empty?
|
|
110
|
+
raise Fig::ConfigFileError.new(
|
|
111
|
+
"Local copy (#{repo_figrc_path}) of #{figrc_url} is empty!",
|
|
112
|
+
figrc_url,
|
|
113
|
+
)
|
|
114
|
+
end
|
|
115
|
+
|
|
109
116
|
configuration.push_dataset JSON.parse(configuration_text)
|
|
110
117
|
rescue JSON::ParserError => exception
|
|
111
|
-
translate_parse_error(exception,
|
|
118
|
+
translate_parse_error(exception, repo_figrc_path)
|
|
112
119
|
end
|
|
113
120
|
|
|
114
121
|
return
|
data/lib/fig/protocol/ftp.rb
CHANGED
|
@@ -64,8 +64,13 @@ class Fig::Protocol::FTP
|
|
|
64
64
|
ftp = Net::FTP.new(uri.host)
|
|
65
65
|
ftp_login(ftp, uri.host, prompt_for_login)
|
|
66
66
|
|
|
67
|
-
if
|
|
67
|
+
if (
|
|
68
|
+
::File.exist?(path) \
|
|
69
|
+
&& ftp.mtime(uri.path) <= ::File.mtime(path) \
|
|
70
|
+
&& ftp.size(uri.path) == ::File.size(path)
|
|
71
|
+
)
|
|
68
72
|
Fig::Logging.debug "#{path} is up to date."
|
|
73
|
+
|
|
69
74
|
return false
|
|
70
75
|
else
|
|
71
76
|
log_download(uri, path)
|
data/lib/fig/protocol/sftp.rb
CHANGED
|
@@ -84,7 +84,11 @@ class Fig::Protocol::SFTP
|
|
|
84
84
|
# when the remote path does not exist.
|
|
85
85
|
stat = connection.stat!(uri.path)
|
|
86
86
|
|
|
87
|
-
if
|
|
87
|
+
if (
|
|
88
|
+
::File.exist?(path) \
|
|
89
|
+
&& stat.mtime.to_f <= ::File.mtime(path).to_f \
|
|
90
|
+
&& stat.size != ::File.size(path)
|
|
91
|
+
)
|
|
88
92
|
Fig::Logging.debug "#{path} is up to date."
|
|
89
93
|
return false
|
|
90
94
|
end
|
data/lib/fig/statement.rb
CHANGED
|
@@ -39,7 +39,9 @@ class Fig::Statement
|
|
|
39
39
|
# A name for this kind of Statement, usually a keyword for this statement as
|
|
40
40
|
# it appears in package definition files.
|
|
41
41
|
def statement_type()
|
|
42
|
-
raise NotImplementedError.new
|
|
42
|
+
raise NotImplementedError.new(
|
|
43
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
44
|
+
)
|
|
43
45
|
end
|
|
44
46
|
|
|
45
47
|
# Block will receive a Statement.
|
|
@@ -48,19 +50,25 @@ class Fig::Statement
|
|
|
48
50
|
end
|
|
49
51
|
|
|
50
52
|
def deparse_as_version(deparser)
|
|
51
|
-
raise NotImplementedError.new
|
|
53
|
+
raise NotImplementedError.new(
|
|
54
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
55
|
+
)
|
|
52
56
|
end
|
|
53
57
|
|
|
54
58
|
# Returns a two element array containing the version and an explanation of
|
|
55
59
|
# why the version is necessary if the version is greater than 0.
|
|
56
60
|
def minimum_grammar_for_emitting_input()
|
|
57
|
-
raise NotImplementedError.new
|
|
61
|
+
raise NotImplementedError.new(
|
|
62
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
63
|
+
)
|
|
58
64
|
end
|
|
59
65
|
|
|
60
66
|
# Returns a two element array containing the version and an explanation of
|
|
61
67
|
# why the version is necessary if the version is greater than 0.
|
|
62
68
|
def minimum_grammar_for_publishing()
|
|
63
|
-
raise NotImplementedError.new
|
|
69
|
+
raise NotImplementedError.new(
|
|
70
|
+
"#{__callee__}() not implemented on #{self.class}."
|
|
71
|
+
)
|
|
64
72
|
end
|
|
65
73
|
|
|
66
74
|
def urls()
|
|
@@ -7,6 +7,7 @@ require 'fig/logging/colorizable'
|
|
|
7
7
|
require 'fig/package_descriptor'
|
|
8
8
|
require 'fig/repository_error'
|
|
9
9
|
require 'fig/working_directory_metadata'
|
|
10
|
+
require 'fig/user_input_error'
|
|
10
11
|
|
|
11
12
|
module Fig; end
|
|
12
13
|
|
|
@@ -20,6 +21,16 @@ class Fig::WorkingDirectoryMaintainer
|
|
|
20
21
|
@base_dir = base_dir
|
|
21
22
|
@package_metadata_by_name = {}
|
|
22
23
|
@local_fig_data_directory = File.join(@base_dir, '.fig')
|
|
24
|
+
|
|
25
|
+
if (
|
|
26
|
+
File.exist?(@local_fig_data_directory) \
|
|
27
|
+
&& ! File.directory?(@local_fig_data_directory)
|
|
28
|
+
)
|
|
29
|
+
raise Fig::UserInputError.new(
|
|
30
|
+
%Q<"#{@local_fig_data_directory}" exists and it isn't a directory. Are you running inside a repository?>
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
23
34
|
@metadata_file = File.join(@local_fig_data_directory, 'retrieve')
|
|
24
35
|
|
|
25
36
|
if File.exist?(@metadata_file)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fig
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.25.
|
|
4
|
+
version: 1.25.1.beta.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matthew Foemmel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-06-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: colorize
|
|
@@ -402,12 +402,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
402
402
|
requirements:
|
|
403
403
|
- - ">="
|
|
404
404
|
- !ruby/object:Gem::Version
|
|
405
|
-
version:
|
|
405
|
+
version: 2.0.0
|
|
406
406
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
407
407
|
requirements:
|
|
408
|
-
- - "
|
|
408
|
+
- - ">"
|
|
409
409
|
- !ruby/object:Gem::Version
|
|
410
|
-
version:
|
|
410
|
+
version: 1.3.1
|
|
411
411
|
requirements: []
|
|
412
412
|
rubyforge_project:
|
|
413
413
|
rubygems_version: 2.2.2
|