syncwrap 2.8.3 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/History.rdoc +37 -0
  3. data/Manifest.txt +1 -0
  4. data/README.rdoc +1 -1
  5. data/Rakefile +7 -0
  6. data/bin/syncwrap +1 -1
  7. data/lib/syncwrap.rb +1 -1
  8. data/lib/syncwrap/amazon_ec2.rb +1 -1
  9. data/lib/syncwrap/amazon_ws.rb +1 -1
  10. data/lib/syncwrap/base.rb +2 -2
  11. data/lib/syncwrap/change_key_listener.rb +1 -1
  12. data/lib/syncwrap/cli.rb +1 -1
  13. data/lib/syncwrap/component.rb +1 -1
  14. data/lib/syncwrap/components/amazon_linux.rb +1 -1
  15. data/lib/syncwrap/components/arch.rb +4 -4
  16. data/lib/syncwrap/components/bundle.rb +1 -1
  17. data/lib/syncwrap/components/bundled_iyyov_daemon.rb +1 -1
  18. data/lib/syncwrap/components/bundler_gem.rb +1 -1
  19. data/lib/syncwrap/components/centos.rb +1 -1
  20. data/lib/syncwrap/components/change_guard.rb +1 -1
  21. data/lib/syncwrap/components/commercial_jdk.rb +1 -1
  22. data/lib/syncwrap/components/cruby_vm.rb +12 -7
  23. data/lib/syncwrap/components/debian.rb +33 -9
  24. data/lib/syncwrap/components/etc_hosts.rb +1 -1
  25. data/lib/syncwrap/components/geminabox.rb +1 -1
  26. data/lib/syncwrap/components/hashdot.rb +1 -1
  27. data/lib/syncwrap/components/iyyov.rb +1 -1
  28. data/lib/syncwrap/components/iyyov_daemon.rb +1 -1
  29. data/lib/syncwrap/components/jruby_vm.rb +19 -8
  30. data/lib/syncwrap/components/lvm_cache.rb +9 -4
  31. data/lib/syncwrap/components/mdraid.rb +1 -1
  32. data/lib/syncwrap/components/network.rb +18 -1
  33. data/lib/syncwrap/components/open_jdk.rb +20 -7
  34. data/lib/syncwrap/components/postgresql.rb +18 -9
  35. data/lib/syncwrap/components/puma.rb +1 -1
  36. data/lib/syncwrap/components/qpid.rb +1 -1
  37. data/lib/syncwrap/components/rake_gem.rb +1 -1
  38. data/lib/syncwrap/components/rhel.rb +2 -2
  39. data/lib/syncwrap/components/run_user.rb +1 -1
  40. data/lib/syncwrap/components/source_tree.rb +1 -1
  41. data/lib/syncwrap/components/tarpit_gem.rb +1 -1
  42. data/lib/syncwrap/components/ubuntu.rb +1 -1
  43. data/lib/syncwrap/components/users.rb +4 -14
  44. data/lib/syncwrap/context.rb +1 -1
  45. data/lib/syncwrap/distro.rb +1 -1
  46. data/lib/syncwrap/formatter.rb +1 -1
  47. data/lib/syncwrap/git_help.rb +1 -1
  48. data/lib/syncwrap/hash_support.rb +1 -1
  49. data/lib/syncwrap/host.rb +1 -1
  50. data/lib/syncwrap/main.rb +1 -1
  51. data/lib/syncwrap/path_util.rb +1 -1
  52. data/lib/syncwrap/rsync.rb +1 -1
  53. data/lib/syncwrap/ruby_support.rb +1 -1
  54. data/lib/syncwrap/shell.rb +1 -1
  55. data/lib/syncwrap/sudoers.rb +67 -0
  56. data/lib/syncwrap/systemd.rb +29 -6
  57. data/lib/syncwrap/systemd_service.rb +2 -2
  58. data/lib/syncwrap/user_data.rb +6 -9
  59. data/lib/syncwrap/version_support.rb +1 -1
  60. data/lib/syncwrap/zone_balancer.rb +1 -1
  61. data/sync/postgresql/postgresql.conf.erb +3 -3
  62. data/sync/src/hashdot/profiles/jruby.hdp.erb +4 -0
  63. data/test/setup.rb +1 -4
  64. data/test/test_components.rb +2 -1
  65. data/test/test_context.rb +1 -1
  66. data/test/test_context_rput.rb +1 -1
  67. data/test/test_rsync.rb +1 -1
  68. data/test/test_shell.rb +1 -1
  69. data/test/test_space.rb +1 -1
  70. data/test/test_space_main.rb +1 -1
  71. data/test/test_version_support.rb +1 -1
  72. data/test/test_zone_balancer.rb +1 -1
  73. metadata +8 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ed971e0ccb00e1a14a83411621845701296afd9
4
- data.tar.gz: 3bfa895a4c14e13f30f5273b1b9dfe34daf7faab
3
+ metadata.gz: ae35d27dcde1232833010cd8c54f0ee90cebc534
4
+ data.tar.gz: 82ab6099f4a345f2f0e44636015450d2ba0a3521
5
5
  SHA512:
6
- metadata.gz: 4eabaf3a0132cf585d7befcd15e32dac9534abe36a83d82a484e1bcfc396cbfca034ae8a3e5e142dd2577a15283c389229cf3866d68a170611988f524ae84cb6
7
- data.tar.gz: b293d28a87021f26a6a3210039b08947ec151da28db233314633a8f3c7b18c9696e0db38a293d4fba4dbcd445fe0781cadb860a6bc74e994dd5eda532eaf6baa
6
+ metadata.gz: 6a2b7367f7d7cde4bad82143a1e0979e240f80cf9d8ae72e13f180da9cda6005e5c8eec13f56c15713cea70c43ade473252d0f870009aef7011c278e290ff403
7
+ data.tar.gz: 12feeb0d898f1349077b74272db9f106679ba2fc765a8e04705bf31b42a49b03bb6d114aaa59d2cd5292790a50c9cc72c884f1e6646e90436dcc671575834f30
data/History.rdoc CHANGED
@@ -1,3 +1,40 @@
1
+ === 2.9.0 (2017-7-18)
2
+ * SyncWrap::Debian
3
+ * Fix Debian#dist_if_installed? grep pattern. Was previously giving
4
+ some (so far harmless) false positives for known but not-installed
5
+ packages.
6
+ * Make the dist_if_installed? and dist_if_not_installed? methods
7
+ more friendly for external use, with default arguments.
8
+ * Expose a dist_update for external/explicit use, including
9
+ :update_required option with dist_install.
10
+ * SyncWrap::Arch, SyncWrap::RHEL; dist_if_* default arguments parity
11
+ * SyncWrap::Network; Add name to /etc/hosts if necessary on Debian
12
+ * SyncWrap::CRubyVM
13
+ * Add hashes for 2.2.7 and 2.3.4
14
+ * Update default version to 2.2.7
15
+ * Preemptively add 2.4 to distro rubies to uninstall
16
+ * SyncWrap::JRubyVM
17
+ * Add hash for 1.7.27
18
+ * Add hash and support for 9.1.12.0
19
+ * SyncWrap::LVMCache
20
+ * Add --yes flag to final lvconvert call, required by later
21
+ versions, compatible with earlier
22
+ * Add thin-provisioning-tools as dependency on Debian, as the included
23
+ cached_check command is needed for reboot.
24
+ * SyncWrap::Sudoers
25
+ * Collect all sudoers config details here. This was previously
26
+ spread between SyncWrap::Users and SyncWrap::UserData.
27
+ * Add always_set_home option (was only default on RHEL)
28
+ * Use common ordering of secure_path
29
+ * SyncWrap::PostgreSQL
30
+ * Make the stop after Debian package install conditional
31
+ * Make Debian move of pg_data_dir conditional
32
+ * Use the more obvious pg_data_dir with etc config on Debian
33
+ * SyncWrap::OpenJDK support for Ubuntu 16.04 package openjdk-8-jdk-headless
34
+ * Add SyncWrap::SystemD#systemctl_status with filtering of end-of-line
35
+ whitespace in output, as has been oberved when calling `systemctl
36
+ status` remotely over SSH.
37
+
1
38
  === 2.8.3 (2017-1-31)
2
39
  * Upgrade SyncWrap::CRubyVM default version to 2.2.6 (+ hash for 2.3.3)
3
40
  * Upgrade SyncWrap::JRubyVM default version to 1.7.26
data/Manifest.txt CHANGED
@@ -32,6 +32,7 @@ lib/syncwrap/path_util.rb
32
32
  lib/syncwrap/rsync.rb
33
33
  lib/syncwrap/ruby_support.rb
34
34
  lib/syncwrap/shell.rb
35
+ lib/syncwrap/sudoers.rb
35
36
  lib/syncwrap/systemd.rb
36
37
  lib/syncwrap/systemd_service.rb
37
38
  lib/syncwrap/user_data.rb
data/README.rdoc CHANGED
@@ -141,7 +141,7 @@ yourself.
141
141
 
142
142
  == License
143
143
 
144
- Copyright (c) 2011-2016 David Kellum
144
+ Copyright (c) 2011-2017 David Kellum
145
145
 
146
146
  Licensed under the Apache License, Version 2.0 (the "License"); you
147
147
  may not use this file except in compliance with the License. You
data/Rakefile CHANGED
@@ -13,3 +13,10 @@ task :publish_rdoc => [ :clean, :rerdoc ] do
13
13
  aws s3 sync --acl public-read doc/ s3://rdoc.gravitext.com/syncwrap/
14
14
  SH
15
15
  end
16
+
17
+ task :rdoc do
18
+ sh <<-SH
19
+ rm -rf doc/fonts
20
+ cp rdoc_css/*.css doc/css/
21
+ SH
22
+ end
data/bin/syncwrap CHANGED
@@ -2,7 +2,7 @@
2
2
  # -*- ruby -*-
3
3
 
4
4
  #--
5
- # Copyright (c) 2011-2016 David Kellum
5
+ # Copyright (c) 2011-2017 David Kellum
6
6
  #
7
7
  # Licensed under the Apache License, Version 2.0 (the "License"); you
8
8
  # may not use this file except in compliance with the License. You
data/lib/syncwrap.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
data/lib/syncwrap/base.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -15,7 +15,7 @@
15
15
  #++
16
16
 
17
17
  module SyncWrap
18
- VERSION='2.8.3'
18
+ VERSION='2.9.0'
19
19
 
20
20
  GEM_ROOT = File.dirname(File.dirname(File.dirname(__FILE__))) # :nodoc:
21
21
  end
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
data/lib/syncwrap/cli.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -64,7 +64,7 @@ module SyncWrap
64
64
  # If chk is true, then wrap block in a sudo bash conditional
65
65
  # testing if any specified pkgs are not installed. Otherwise just
66
66
  # yield to block.
67
- def dist_if_not_installed?( pkgs, chk, opts, &block )
67
+ def dist_if_not_installed?( pkgs, chk = true, opts = {}, &block )
68
68
  if chk
69
69
  c = "if ! pacman -Q #{pkgs.join ' '} >/dev/null 2>&1; then"
70
70
  sudo( c, opts.merge( close: 'fi' ), &block )
@@ -74,8 +74,8 @@ module SyncWrap
74
74
  end
75
75
 
76
76
  # Wrap block in a sudo bash conditional testing if the single
77
- # specified pkg is installed. Otherwise just yield to block.
78
- def dist_if_installed?( pkg, opts, &block )
77
+ # specified pkg is installed.
78
+ def dist_if_installed?( pkg, opts = {}, &block )
79
79
  c = "if pacman -Q #{pkg} >/dev/null 2>&1; then"
80
80
  sudo( c, opts.merge( close: 'fi' ), &block )
81
81
  end
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -47,7 +47,7 @@ module SyncWrap
47
47
  include HashSupport
48
48
 
49
49
  # Default #ruby_version to install
50
- DEFAULT_VERSION = '2.2.6'
50
+ DEFAULT_VERSION = '2.2.7'
51
51
 
52
52
  # A set of known (sha256) cryptographic hashes, keyed by version
53
53
  # string, for the source ruby-(version).tar.gz package.
@@ -62,15 +62,19 @@ module SyncWrap
62
62
  '30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c03ca335e3',
63
63
  '2.2.6' =>
64
64
  'de8e192791cb157d610c48a9a9ff6e7f19d67ce86052feae62b82e3682cc675f',
65
+ '2.2.7' =>
66
+ '374184c6c5bbc88fb7bad422368d4053a236fb6587f0eff76146dcba57f93da5',
65
67
  '2.3.3' =>
66
- '241408c8c555b258846368830a06146e4849a1d58dcaf6b14a3b6a73058115b7' }
68
+ '241408c8c555b258846368830a06146e4849a1d58dcaf6b14a3b6a73058115b7',
69
+ '2.3.4' =>
70
+ '98e18f17c933318d0e32fed3aea67e304f174d03170a38fd920c4fbe49fec0c3' }
67
71
 
68
72
  # The ruby version to install, as it appears in source packages
69
73
  # from ruby-lang.org. Note that starting with 2.1.0, the patch
70
74
  # release (p#) no longer appears in package names.
71
75
  # (Default: DEFAULT_VERSION)
72
76
  #
73
- # Example values: '2.0.0-p481', '2.2.6', '2.3.3'
77
+ # Example values: '2.0.0-p481', '2.2.7', '2.3.3'
74
78
  attr_accessor :ruby_version
75
79
 
76
80
  # If true, attempt to uninstall any pre-existing distro packaged
@@ -123,10 +127,11 @@ module SyncWrap
123
127
 
124
128
  def uninstall_distro_ruby
125
129
  if distro.is_a?( RHEL )
126
- dist_uninstall( %w[ ruby ruby18 ruby19 ruby20 ruby21 ruby22 ruby23 ] )
130
+ dist_uninstall( %w[ ruby ruby18 ruby19
131
+ ruby20 ruby21 ruby22 ruby23 ruby24] )
127
132
  else
128
- dist_uninstall( %w[ ruby ruby1.8 ruby1.9 ruby1.9.1
129
- ruby1.9.3 ruby2.0 ruby2.1 ruby2.2 ruby2.3 ] )
133
+ dist_uninstall( %w[ ruby ruby1.8 ruby1.9 ruby1.9.1 ruby1.9.3
134
+ ruby2.0 ruby2.1 ruby2.2 ruby2.3 ruby2.4] )
130
135
  end
131
136
  end
132
137
 
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -52,9 +52,9 @@ module SyncWrap
52
52
  @systemd
53
53
  end
54
54
 
55
- # Install the specified package names. The first time this is
56
- # applied to any given host, an "apt-get update" is issued as
57
- # well. A trailing hash is interpreted as options, see below.
55
+ # Install the specified package names. Also calls #dist_update
56
+ # before any package is actually installed. A trailing hash is
57
+ # interpreted as options, see below.
58
58
  #
59
59
  # ==== Options
60
60
  #
@@ -62,7 +62,10 @@ module SyncWrap
62
62
  # installed. Thus no upgrades will be
63
63
  # performed. (Default: true)
64
64
  #
65
- # :minimal:: Eqv to --no-install-recommends
65
+ # :minimal:: If true, pass --no-install-recommends flag to
66
+ # apt-get.
67
+ #
68
+ # :update_required:: Passed to #dist_update
66
69
  #
67
70
  # Options are also passed to the sudo calls.
68
71
  def dist_install( *args )
@@ -73,11 +76,30 @@ module SyncWrap
73
76
  chk = opts[ :check_install ]
74
77
  chk = check_install? if chk.nil?
75
78
  dist_if_not_installed?( args, chk != false, opts ) do
76
- sudo( "apt-get -yqq update", opts ) if first_apt?
79
+ dist_update( opts )
77
80
  sudo( "apt-get -yq install #{(flags + args).join ' '}", opts )
78
81
  end
79
82
  end
80
83
 
84
+ # Conditionally run "apt-get update" to resynchronize the package
85
+ # index files from their sources. Normally this is handled
86
+ # automatically by #dist_install, but it can also be called
87
+ # directly, for example when a new source is added.
88
+ #
89
+ # ==== Options
90
+ #
91
+ # :update_required:: If true, always perform update. If specified
92
+ # as false, do nothing. If unspecified, run on
93
+ # the first call per Context only.
94
+ #
95
+ # Options are also passed to the sudo calls.
96
+ def dist_update( opts = {} )
97
+ req = opts[ :update_required ]
98
+ if ( req != false ) && ( first_apt? || req )
99
+ sudo( "apt-get -yqq update", opts )
100
+ end
101
+ end
102
+
81
103
  # Uninstall the specified package names. A trailing hash is
82
104
  # interpreted as options and passed to the sudo calls.
83
105
  def dist_uninstall( *pkgs )
@@ -93,7 +115,7 @@ module SyncWrap
93
115
  # If chk is true, then wrap block in a sudo bash conditional
94
116
  # testing if any specified pkgs are not installed. Otherwise just
95
117
  # yield to block.
96
- def dist_if_not_installed?( pkgs, chk, opts, &block )
118
+ def dist_if_not_installed?( pkgs, chk = true, opts = {}, &block )
97
119
  if chk
98
120
  qry = "dpkg-query -W -f '${db:Status-Status}\\n' #{pkgs.join ' '}"
99
121
  cnt = qry + " | grep -c -E '^installed$'"
@@ -104,9 +126,11 @@ module SyncWrap
104
126
  end
105
127
  end
106
128
 
107
- def dist_if_installed?( pkg, opts, &block )
129
+ # Wrap block in a sudo bash conditional testing if the single
130
+ # specified pkg is installed.
131
+ def dist_if_installed?( pkg, opts = {}, &block )
108
132
  qry = "dpkg-query -W -f '${db:Status-Status}\\n' #{pkg}"
109
- tst = qry + " | grep -q 'installed'"
133
+ tst = qry + " | grep -q -E '^installed$'"
110
134
  cond = "if #{tst}; then"
111
135
  sudo( cond, opts.merge( close: 'fi' ), &block )
112
136
  end
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2016 David Kellum
2
+ # Copyright (c) 2011-2017 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -35,15 +35,22 @@ module SyncWrap
35
35
  DEFAULT_VERSION = '1.7.26'
36
36
 
37
37
  # A set of known cryptographic hashes, keyed by version
38
- # string. Note, we prefer sha256 but sha1 is what is currently
39
- # published.
40
- KNOWN_HASHES = { '1.7.22' => '6b9e310a04ad8173d0d6dbe299da04c0ef85fc15',
41
- '1.7.23' => '2b5e796feeed2bcfab02f8bf2ff3d77ca318e310',
42
- '1.7.24' => '0c321d2192768dfec419bee6b44c7190f4db32e1',
43
- '1.7.25' => 'cd15aef419f97cff274491e53fcfb8b88ec36785',
44
- '1.7.26' => 'cca25a1ffb8b75a8d4a4d4667e7f6b20341c2b74' }
38
+ # string. We prefer sha256 but sha1 is what is published for
39
+ # 1.7.x.
40
+ KNOWN_HASHES = {
41
+ '1.7.22' => '6b9e310a04ad8173d0d6dbe299da04c0ef85fc15',
42
+ '1.7.23' => '2b5e796feeed2bcfab02f8bf2ff3d77ca318e310',
43
+ '1.7.24' => '0c321d2192768dfec419bee6b44c7190f4db32e1',
44
+ '1.7.25' => 'cd15aef419f97cff274491e53fcfb8b88ec36785',
45
+ '1.7.26' => 'cca25a1ffb8b75a8d4a4d4667e7f6b20341c2b74',
46
+ '1.7.27' => '4a24fe103d3735b23cc58668dec711857125a6f3',
47
+ '9.1.12.0' =>
48
+ 'ddb23c95f4b3cc3fc1cc57b81cb4ceee776496ede402b9a6eb0622cf15e1a597',
49
+ }
45
50
 
46
51
  # JRuby version to install (default: DEFAULT_VERSION)
52
+ #
53
+ # Example values: '1.7.26', '9.1.12.0'
47
54
  attr_accessor :jruby_version
48
55
 
49
56
  # A cryptographic hash value (hexadecimal, some standard length)
@@ -144,6 +151,10 @@ module SyncWrap
144
151
 
145
152
  alias :jruby_gem_install :gem_install
146
153
 
154
+ def jruby_gem_home_prop?
155
+ version_lt?( jruby_version, [9] )
156
+ end
157
+
147
158
  protected
148
159
 
149
160
  def min_deps_supported?