fig 1.27.0 → 1.27.3

This diff has not been reviewed by any users.
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6850a9d916fefe3869777ea4cc831dd34373118b
4
- data.tar.gz: f4a92c66db7c1f9b80864c4ee9268dac0d2f4a90
3
+ metadata.gz: c2340ed4733d60d36f09564178f935b9055a2bd4
4
+ data.tar.gz: 026e1aa63920ab41ea4a88875ce5650b28c81569
5
5
  SHA512:
6
- metadata.gz: 5507c846515a94d7df31c9bc019f5703590c5ff7d3a4b45bd9ff934b6a5dbff42fa67cf74b5df7b26ae346e447ccbf474fd79e1226fa30e73a7080b33bbb458c
7
- data.tar.gz: f84d782ae7811886620065266a275d2e0ed95eb79a346e62ba5e5d1afb70052bab25b47f9e4e0002589f3c6077dd8013f5365a27c9e3e7c7215d8295781464cb
6
+ metadata.gz: 3eacf1f335d744178e6a9ca9ef36c02d291a5f1d53392c5d56340c857c4c61513e6ef6c1807022f17fc216ff0aae5e6283ff8982f6feb62138fafe3f56f94d19
7
+ data.tar.gz: 1268b9a35c94ca0d337ef019a6f07d670587e12db4f1a95c03c94fff68588a537bc7ee28864632df817d8f77b0314db6036db08507e34bd73d1c01f9a8c02b97
data/BUGS.md CHANGED
@@ -5,4 +5,5 @@
5
5
  value of `FIG_REMOTE_URL` into account, meaning that, if you switch
6
6
  `FIG_REMOTE_URL` without also switching `FIG_HOME`, "fun" things can happen.
7
7
  - URLs with query parameters or involve redirects are untested.
8
+ - NetRC is looked for as ".netrc" and not "\_netrc".
8
9
  - Repository locking doesn't happen on Windows.
data/Changes CHANGED
@@ -1,3 +1,37 @@
1
+ v1.27.3 - 2018/5/16
2
+
3
+ Bug fixes:
4
+
5
+ - Fix crash when attempting to use --source-package without also specifying
6
+ --update or --update-if-missing. Thanks to Matt Godbolt for the report.
7
+ - Fix for publishing from Windows; _stat() chokes on directories when the
8
+ path contains a trailing slash. Patch by Andrey Zdanovich.
9
+ - Fix for warning message emitted when a retrieve path gets changed. Patch
10
+ by Gabriel Burca.
11
+
12
+ Miscellaneous:
13
+
14
+ - Line number is included in error messages when parsing local metadata.
15
+ - Home of all things Fig moved to https://github.com/fig-package-manager/fig.
16
+
17
+ v1.27.2 - 2016/10/20
18
+
19
+ Miscellaneous:
20
+
21
+ - Log when a retrieval is removing a symlink or overwriting a file.
22
+ - Include publishing operating system in package metadata.
23
+
24
+ v1.27.1 - 2016/7/19
25
+
26
+ Bug fixes:
27
+
28
+ - Fixed comparison of packages due to changes in Ruby v2.3.x.
29
+
30
+ Miscellaneous:
31
+
32
+ - JSON and RDoc version requirements bumped to values compatible with Ruby
33
+ v2.3.1.
34
+
1
35
  v1.27.0 - 2015/7/9
2
36
 
3
37
  Bug fixes:
@@ -110,8 +144,9 @@ v1.23.0 - 2015/1/2
110
144
  - Upgraded dependencies.
111
145
  - A rudimentary Vim plugin has been added to the repository with syntax
112
146
  highlighting of comments and keywords. See
113
- https://github.com/mfoemmel/fig/blob/master/support/vim/README.md for more.
114
- Those with better VimL knowledge encouraged to submit improvements.
147
+ https://github.com/fig-package-manager/fig/blob/master/support/vim/README.md
148
+ for more. Those with better VimL knowledge encouraged to submit
149
+ improvements.
115
150
 
116
151
  v1.22.1.beta.1 - 2014/12/17
117
152
 
@@ -764,9 +799,9 @@ v0.2.1 - 2012/11/5
764
799
  Grammar v1 is required because the set statement (--set option) contains a comment ("#") character.
765
800
 
766
801
  Documentation for the new grammar is available at
767
- https://github.com/mfoemmel/fig/wiki/v1-grammar. It may be helpful to have
768
- a look at the old one, as well:
769
- https://github.com/mfoemmel/fig/wiki/v0-grammar
802
+ https://github.com/fig-package-manager/fig/wiki/v1-grammar. It may be
803
+ helpful to have a look at the old one, as well:
804
+ https://github.com/fig-package-manager/fig/wiki/v0-grammar
770
805
 
771
806
  Miscellaneous:
772
807
 
@@ -1270,7 +1305,8 @@ v0.1.64 - 2012/5/21
1270
1305
  messages and fewer stack traces.
1271
1306
 
1272
1307
  - README.md has had most of its content ripped out. Documentation has been
1273
- greatly expanded and is available at https://github.com/mfoemmel/fig/wiki.
1308
+ greatly expanded and is available at
1309
+ https://github.com/fig-package-manager/fig/wiki.
1274
1310
 
1275
1311
  - Includes the Fig version in the comments in published .fig files.
1276
1312
 
data/README.md CHANGED
@@ -1,10 +1,9 @@
1
- Description
2
- ===========
1
+ # Description
3
2
 
4
3
  Fig is a utility for configuring environments and managing dependencies across
5
4
  a team of developers.
6
5
 
7
- An "environment" in fig is a set of environment variables. A "package" is a
6
+ An "environment" in Fig is a set of environment variables. A "package" is a
8
7
  collection of files, along with some metadata describing which environment
9
8
  variables should be modified when the package is included. For instance, each
10
9
  dependency may prepend its corresponding jar to CLASSPATH. The metadata may
@@ -27,25 +26,21 @@ install them in the fig-home as needed. Fig does not contact the remote
27
26
  repository unless it needs to. The default fig-home is `$HOME/.fighome`, but
28
27
  may be changed by setting the `$FIG_HOME` environment variable.
29
28
 
30
- Full documentation
31
- ==================
29
+ # Full documentation
32
30
 
33
- https://github.com/mfoemmel/fig/wiki
31
+ https://github.com/fig-package-manager/fig/wiki
34
32
 
35
- Community
36
- =========
33
+ # Community
37
34
 
38
35
  \#fig on irc.freenode.net
39
36
 
40
37
  [Fig Mailing List](http://groups.google.com/group/fig-user)
41
38
 
42
- Extensions for other tools
43
- ==========================
39
+ # Extensions for other tools
44
40
 
45
41
  These live in the `support` directory within the repository. For example,
46
42
  there's a Vim plugin in `support/vim`.
47
43
 
48
- Copyright
49
- =========
44
+ # Copyright
50
45
 
51
- Copyright (c) 2009-2015 Matthew Foemmel. See LICENSE for details.
46
+ Copyright ©2009-2018 Matthew Foemmel. See LICENSE for details.
data/lib/fig.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
 
3
3
  module Fig
4
- VERSION = '1.27.0'
4
+ VERSION = '1.27.3'
5
5
  end
@@ -49,14 +49,28 @@ class Fig::Command::Action::SourcePackage
49
49
  return EXIT_FAILURE
50
50
  end
51
51
  if File.directory? @file
52
- $stderr.puts %Q<"#{@file}" is a directory. Fig does not keep track of directories.>
52
+ $stderr.puts(
53
+ %Q<"#{@file}" is a directory. Fig does not keep track of directories.>
54
+ )
55
+
53
56
  return EXIT_FAILURE
54
57
  end
55
58
 
56
59
  maintainer = @execution_context.working_directory_maintainer
60
+ if not maintainer
61
+ $stderr.puts(
62
+ %Q<Cannot answer what source packages are because retrieves are not active. Try again, but additionally specify --update or --update-if-missing.>
63
+ )
64
+
65
+ return EXIT_FAILURE
66
+ end
67
+
57
68
  package_version = maintainer.find_package_version_for_file @file
58
69
  if ! package_version
59
- $stderr.puts %Q<Don't know anything about "#{@file}".>
70
+ $stderr.puts(
71
+ %Q<Don't know anything about "#{@file}". It is not in the list of files that resulted from a "retrieve".>
72
+ )
73
+
60
74
  return EXIT_FAILURE
61
75
  end
62
76
 
@@ -279,7 +279,7 @@ class Fig::OperatingSystem
279
279
  def add_path_to_archive(path, archive_writer)
280
280
  children = []
281
281
  archive_writer.new_entry do |entry|
282
- entry.copy_lstat(path)
282
+ entry.copy_lstat(path.chomp '/') # chomp required on Windows
283
283
  entry.pathname = path
284
284
  if entry.symbolic_link?
285
285
  linked = File.readlink(path)
@@ -101,6 +101,8 @@ class Fig::Package
101
101
  end
102
102
 
103
103
  def <=>(other)
104
+ return if not other
105
+
104
106
  compared = compare_components(name, other.name)
105
107
  return compared if compared != 0
106
108
 
@@ -152,6 +152,7 @@ class Fig::RepositoryPackagePublisher
152
152
 
153
153
  @text_assembler.add_header %Q<# User: #{@publish_login}>
154
154
  @text_assembler.add_header %Q<# Host: #{@publish_host}>
155
+ @text_assembler.add_header %Q<# O/S: #{derive_platform_description}>
155
156
 
156
157
  sanitized_argv = ARGV.map {|arg| arg.gsub "\n", '\\n'}
157
158
  @text_assembler.add_header %Q<# Args: "#{sanitized_argv.join %q[", "]}">
@@ -203,6 +204,24 @@ class Fig::RepositoryPackagePublisher
203
204
  return
204
205
  end
205
206
 
207
+ def derive_platform_description
208
+ host_os = RbConfig::CONFIG['host_os']
209
+
210
+ return host_os if host_os !~ /linux|darwin/i
211
+
212
+ if host_os =~ /darwin/i
213
+ product_name = %x/sw_vers -productName/
214
+ product_version = %x/sw_vers -productVersion/
215
+ return product_name.strip + ' ' + product_version.strip
216
+ end
217
+
218
+ linux_distribution = %x/lsb_release --description --short/
219
+ linux_distribution.chomp!
220
+ linux_distribution.gsub!(/\A " (.*) " \z/x, '\1')
221
+
222
+ return linux_distribution
223
+ end
224
+
206
225
  def add_environment_variables_to_package_metadata()
207
226
  variables = @application_configuration[
208
227
  'environment variables to include in comments in published packages'
@@ -58,7 +58,7 @@ class Fig::RuntimeEnvironment
58
58
  name = retrieve_statement.variable
59
59
  if @retrieves.has_key?(name)
60
60
  Fig::Logging.warn \
61
- %q<About to overwrite "#{name}" retrieve path of "#{@retrieves[name].path}" with "#{retrieve_statement.path}".>
61
+ %Q<About to overwrite "#{name}" retrieve path of "#{@retrieves[name].path}" with "#{retrieve_statement.path}".>
62
62
  end
63
63
 
64
64
  @retrieves[name] = retrieve_statement
@@ -107,25 +107,36 @@ class Fig::WorkingDirectoryMaintainer
107
107
  private
108
108
 
109
109
  def load_metadata()
110
- File.open(@metadata_file).each_line do |line|
111
- line.strip!()
112
- if line =~ /^(.+)=(.+)\/(.+)$/
113
- target = $1
114
- package_name = $2
115
- package_version = $3
116
-
117
- package_meta = @package_metadata_by_name[package_name]
118
- if package_meta
119
- if package_meta.current_version != package_version
120
- raise "Version mismatch for #{package_meta.package_name} in #{@metadata_file}."
110
+ file = nil
111
+
112
+ begin
113
+ file = File.open(@metadata_file)
114
+ file.each_line do
115
+ |line|
116
+
117
+ line.strip!()
118
+ if line =~ /^(.+)=(.+)\/(.+)$/
119
+ target = $1
120
+ package_name = $2
121
+ package_version = $3
122
+
123
+ package_meta = @package_metadata_by_name[package_name]
124
+ if package_meta
125
+ if package_meta.current_version != package_version
126
+ raise "Version mismatch for #{package_meta.package_name} in #{@metadata_file}."
127
+ end
128
+ else
129
+ package_meta =
130
+ reset_package_metadata_with_version(package_name, package_version)
121
131
  end
132
+ package_meta.add_file(target)
122
133
  else
123
- package_meta =
124
- reset_package_metadata_with_version(package_name, package_version)
134
+ raise "parse error in #{@metadata_file}:#{file.lineno}: #{line}"
125
135
  end
126
- package_meta.add_file(target)
127
- else
128
- raise "parse error in #{@metadata_file}: #{line}"
136
+ end
137
+ ensure
138
+ if not file.nil?
139
+ file.close
129
140
  end
130
141
  end
131
142
 
@@ -210,6 +221,10 @@ class Fig::WorkingDirectoryMaintainer
210
221
  # preserve.
211
222
  preserve = File.exist?(source) && ! File.symlink?(source)
212
223
 
224
+ if File.exist?(target)
225
+ Fig::Logging.info("Overwriting #{target}.")
226
+ end
227
+
213
228
  FileUtils.copy_entry(
214
229
  source, target, preserve, false, :remove_destination
215
230
  )
@@ -229,7 +244,9 @@ class Fig::WorkingDirectoryMaintainer
229
244
  return false
230
245
  end
231
246
 
247
+ Fig::Logging.info("Removing symbolic link #{target}.")
232
248
  FileUtils.rm(target)
249
+
233
250
  return true
234
251
  end
235
252
 
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.27.0
4
+ version: 1.27.3
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-07-09 00:00:00.000000000 Z
11
+ date: 2018-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -390,7 +390,7 @@ files:
390
390
  - lib/fig/user_input_error.rb
391
391
  - lib/fig/working_directory_maintainer.rb
392
392
  - lib/fig/working_directory_metadata.rb
393
- homepage: http://github.com/mfoemmel/fig
393
+ homepage: http://github.com/fig-package-manager/fig
394
394
  licenses:
395
395
  - BSD
396
396
  metadata: {}
@@ -410,7 +410,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
410
410
  version: '0'
411
411
  requirements: []
412
412
  rubyforge_project:
413
- rubygems_version: 2.2.2
413
+ rubygems_version: 2.5.1
414
414
  signing_key:
415
415
  specification_version: 4
416
416
  summary: Fig is a utility for configuring environments and managing dependencies across