rubygems-update 2.2.5 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rubygems-update might be problematic. Click here for more details.

Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/.autotest +4 -1
  5. data/CONTRIBUTING +20 -0
  6. data/History.txt +117 -14
  7. data/Manifest.txt +11 -2
  8. data/README.rdoc +1 -1
  9. data/Rakefile +0 -3
  10. data/lib/rubygems.rb +31 -11
  11. data/lib/rubygems/available_set.rb +1 -1
  12. data/lib/rubygems/basic_specification.rb +20 -10
  13. data/lib/rubygems/command.rb +4 -1
  14. data/lib/rubygems/commands/cert_command.rb +11 -13
  15. data/lib/rubygems/commands/cleanup_command.rb +2 -2
  16. data/lib/rubygems/commands/dependency_command.rb +2 -2
  17. data/lib/rubygems/commands/environment_command.rb +5 -2
  18. data/lib/rubygems/commands/help_command.rb +199 -20
  19. data/lib/rubygems/commands/install_command.rb +40 -10
  20. data/lib/rubygems/commands/list_command.rb +2 -2
  21. data/lib/rubygems/commands/open_command.rb +81 -0
  22. data/lib/rubygems/commands/search_command.rb +5 -5
  23. data/lib/rubygems/commands/setup_command.rb +1 -1
  24. data/lib/rubygems/commands/update_command.rb +8 -5
  25. data/lib/rubygems/commands/yank_command.rb +8 -13
  26. data/lib/rubygems/config_file.rb +13 -2
  27. data/lib/rubygems/dependency.rb +29 -16
  28. data/lib/rubygems/dependency_installer.rb +44 -10
  29. data/lib/rubygems/doctor.rb +1 -1
  30. data/lib/rubygems/errors.rb +30 -0
  31. data/lib/rubygems/exceptions.rb +20 -0
  32. data/lib/rubygems/ext/builder.rb +1 -1
  33. data/lib/rubygems/gemcutter_utilities.rb +1 -1
  34. data/lib/rubygems/installer.rb +4 -4
  35. data/lib/rubygems/name_tuple.rb +3 -1
  36. data/lib/rubygems/package.rb +27 -14
  37. data/lib/rubygems/package/file_source.rb +33 -0
  38. data/lib/rubygems/package/io_source.rb +45 -0
  39. data/lib/rubygems/package/old.rb +5 -5
  40. data/lib/rubygems/package/source.rb +3 -0
  41. data/lib/rubygems/platform.rb +2 -1
  42. data/lib/rubygems/rdoc.rb +1 -1
  43. data/lib/rubygems/remote_fetcher.rb +59 -18
  44. data/lib/rubygems/request.rb +71 -101
  45. data/lib/rubygems/request/connection_pools.rb +77 -0
  46. data/lib/rubygems/request/http_pool.rb +38 -0
  47. data/lib/rubygems/request/https_pool.rb +10 -0
  48. data/lib/rubygems/request_set.rb +65 -20
  49. data/lib/rubygems/request_set/gem_dependency_api.rb +234 -14
  50. data/lib/rubygems/request_set/lockfile.rb +65 -22
  51. data/lib/rubygems/requirement.rb +3 -0
  52. data/lib/rubygems/resolver.rb +33 -16
  53. data/lib/rubygems/resolver/activation_request.rb +7 -0
  54. data/lib/rubygems/resolver/api_set.rb +12 -2
  55. data/lib/rubygems/resolver/api_specification.rb +6 -0
  56. data/lib/rubygems/resolver/composed_set.rb +4 -0
  57. data/lib/rubygems/resolver/dependency_request.rb +20 -1
  58. data/lib/rubygems/resolver/git_set.rb +1 -1
  59. data/lib/rubygems/resolver/git_specification.rb +1 -1
  60. data/lib/rubygems/resolver/index_set.rb +3 -1
  61. data/lib/rubygems/resolver/installed_specification.rb +19 -1
  62. data/lib/rubygems/resolver/installer_set.rb +84 -4
  63. data/lib/rubygems/resolver/local_specification.rb +25 -0
  64. data/lib/rubygems/resolver/lock_set.rb +13 -9
  65. data/lib/rubygems/resolver/lock_specification.rb +1 -1
  66. data/lib/rubygems/resolver/set.rb +6 -0
  67. data/lib/rubygems/resolver/spec_specification.rb +0 -2
  68. data/lib/rubygems/resolver/specification.rb +23 -2
  69. data/lib/rubygems/resolver/vendor_set.rb +1 -1
  70. data/lib/rubygems/resolver/vendor_specification.rb +1 -1
  71. data/lib/rubygems/security/policy.rb +1 -0
  72. data/lib/rubygems/server.rb +36 -1
  73. data/lib/rubygems/source.rb +6 -2
  74. data/lib/rubygems/source/git.rb +1 -1
  75. data/lib/rubygems/source/installed.rb +4 -0
  76. data/lib/rubygems/source/specific_file.rb +6 -1
  77. data/lib/rubygems/spec_fetcher.rb +6 -13
  78. data/lib/rubygems/specification.rb +91 -63
  79. data/lib/rubygems/stub_specification.rb +9 -0
  80. data/lib/rubygems/test_case.rb +4 -2
  81. data/lib/rubygems/text.rb +15 -5
  82. data/lib/rubygems/uninstaller.rb +4 -1
  83. data/lib/rubygems/user_interaction.rb +8 -0
  84. data/lib/rubygems/version.rb +5 -1
  85. data/test/rubygems/test_gem.rb +88 -2
  86. data/test/rubygems/test_gem_available_set.rb +11 -8
  87. data/test/rubygems/test_gem_command.rb +55 -0
  88. data/test/rubygems/test_gem_commands_cert_command.rb +1 -0
  89. data/test/rubygems/test_gem_commands_environment_command.rb +1 -0
  90. data/test/rubygems/test_gem_commands_help_command.rb +7 -0
  91. data/test/rubygems/test_gem_commands_install_command.rb +71 -4
  92. data/test/rubygems/test_gem_commands_open_command.rb +46 -0
  93. data/test/rubygems/test_gem_commands_setup_command.rb +9 -0
  94. data/test/rubygems/test_gem_commands_update_command.rb +48 -0
  95. data/test/rubygems/test_gem_commands_yank_command.rb +2 -2
  96. data/test/rubygems/test_gem_config_file.rb +19 -7
  97. data/test/rubygems/test_gem_dependency.rb +86 -2
  98. data/test/rubygems/test_gem_dependency_installer.rb +36 -164
  99. data/test/rubygems/test_gem_gemcutter_utilities.rb +9 -0
  100. data/test/rubygems/test_gem_installer.rb +6 -1
  101. data/test/rubygems/test_gem_name_tuple.rb +7 -0
  102. data/test/rubygems/test_gem_package.rb +17 -0
  103. data/test/rubygems/test_gem_remote_fetcher.rb +65 -46
  104. data/test/rubygems/test_gem_request.rb +75 -61
  105. data/test/rubygems/test_gem_request_connection_pools.rb +83 -0
  106. data/test/rubygems/test_gem_request_set.rb +156 -1
  107. data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +72 -27
  108. data/test/rubygems/test_gem_request_set_lockfile.rb +335 -0
  109. data/test/rubygems/test_gem_requirement.rb +5 -0
  110. data/test/rubygems/test_gem_resolver.rb +91 -2
  111. data/test/rubygems/test_gem_resolver_activation_request.rb +10 -0
  112. data/test/rubygems/test_gem_resolver_api_set.rb +2 -2
  113. data/test/rubygems/test_gem_resolver_api_specification.rb +40 -0
  114. data/test/rubygems/test_gem_resolver_composed_set.rb +14 -0
  115. data/test/rubygems/test_gem_resolver_dependency_request.rb +55 -0
  116. data/test/rubygems/test_gem_resolver_git_set.rb +26 -0
  117. data/test/rubygems/test_gem_resolver_index_set.rb +28 -2
  118. data/test/rubygems/test_gem_resolver_installer_set.rb +143 -0
  119. data/test/rubygems/test_gem_resolver_lock_set.rb +12 -6
  120. data/test/rubygems/test_gem_resolver_lock_specification.rb +1 -1
  121. data/test/rubygems/test_gem_resolver_specification.rb +32 -0
  122. data/test/rubygems/test_gem_resolver_vendor_set.rb +14 -0
  123. data/test/rubygems/test_gem_security_policy.rb +2 -2
  124. data/test/rubygems/test_gem_server.rb +69 -4
  125. data/test/rubygems/test_gem_source.rb +4 -1
  126. data/test/rubygems/test_gem_source_git.rb +15 -0
  127. data/test/rubygems/test_gem_source_specific_file.rb +4 -0
  128. data/test/rubygems/test_gem_specification.rb +82 -27
  129. data/test/rubygems/test_gem_stub_specification.rb +61 -23
  130. data/test/rubygems/test_gem_uninstaller.rb +23 -0
  131. data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +32 -0
  132. metadata +187 -33
  133. metadata.gz.sig +0 -0
  134. data/lib/rubygems/ssl_certs/AddTrustExternalCARoot-2048.pem +0 -25
  135. data/lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem +0 -32
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b784798b365f2224360537c17ff3673155af0ab
4
- data.tar.gz: 483ecdaddafc5ee9890a213e17f7847f31dbcb10
3
+ metadata.gz: c8accd7d64c97aa50aa3253effdfbf4e1e924420
4
+ data.tar.gz: 5ca2df4735051087a01115efd57dc61559d95b83
5
5
  SHA512:
6
- metadata.gz: 910de3dfc30de9c054bd26eeba5eebffaf58fe568b8ef6421614804e771a48f4509dc6fd60f1d900d0c928c3fb8e38e44c16b474fa5ef889dffcbb3b2f5d703a
7
- data.tar.gz: 71e6e54a9caf792fe86bfec7536fd00e70aa164318c933737441ab660e5614bd00e003479e41b2fb96c55e7db86bdba932335ee6b61171e6ce880304b6247db2
6
+ metadata.gz: 3c0a14022146e9a2cc3fc93f7ae88d02d1637015ee8f55d50a8729b388b27945a7589e96a958f45f9a1dc343b339038dea611e38fa2bcb03753248f454261f0f
7
+ data.tar.gz: 131314e79378e98650097f46024c2da655abf63dbffccc6ab6d932dce1e6e49ab690f2021e6f2cd53ba87276ca0ba17234881fe6fa6f1f27158036f4d656620b
Binary file
Binary file
data/.autotest CHANGED
@@ -12,6 +12,9 @@ end
12
12
  Autotest.add_hook :initialize do |at|
13
13
  at.testlib = ''
14
14
 
15
+ at.failed_results_re = /^\s+\d+\) (?:Failure|Error):\n(.*?):/
16
+ at.completed_re = /\d+ tests, \d+ assertions, \d+ failures, \d+ errors/
17
+
15
18
  at.add_exception %r%/\.git/%
16
19
  at.add_exception %r%\.rbc$%
17
20
  at.add_exception %r%test/rubygems/rubygems%
@@ -33,7 +36,7 @@ Autotest.add_hook :initialize do |at|
33
36
  def at.handle_results results
34
37
  results = results.gsub(/\e\[\d+m/, '') # strip ascii color
35
38
  failed = results.scan(self.failed_results_re).map { |m, k|
36
- m, k = $1, $2 if m =~ /(\w+)\((\w+)\)/ # minitest 4 output
39
+ /(?<k>\w+)#(?<m>\w+)/ =~ m
37
40
  [m, k]
38
41
  }
39
42
 
@@ -0,0 +1,20 @@
1
+ = How to contribute
2
+
3
+ Community involvement is essential to RubyGems. We want to keep it easy as
4
+ possible to contribute changes. There are a few guidelines that we need
5
+ contributors to follow to reduce the time it takes to get changes merged in.
6
+
7
+ == Guidelines
8
+
9
+ 1. New features should be coupled with tests.
10
+
11
+ 2. Ensure that your code blends well with ours (eg, no trailing whitespace,
12
+ match indentation and coding style).
13
+
14
+ 3. Don't modify the history file or version number.
15
+
16
+ 4. If you have any questions, just ask on IRC in #rubygems on Freenode or file
17
+ an issue here: http://github.com/rubygems/rubygems/issues
18
+
19
+ For more information and ideas on how to contribute to RubyGems ecosystem, see
20
+ here: http://guides.rubygems.org/contributing/
@@ -1,24 +1,127 @@
1
1
  # coding: UTF-8
2
2
 
3
- === 2.2.5 / 2015-06-08
3
+ === 2.3.0 / 2014-06-10
4
4
 
5
- Bug fixes:
6
-
7
- * Tightened API endpoint checks for CVE-2015-3900
8
-
9
- === 2.2.4 / 2015-05-14
10
-
11
- Bug fixes:
12
-
13
- * Backport: Limit API endpoint to original security domain for CVE-2015-3900.
14
- Fix by claudijd
5
+ Minor enhancements:
15
6
 
16
- === 2.2.3 / 2014-12-21
7
+ * Added the `open` command which allows you to inspect the source of a gem
8
+ using your editor.
9
+ Issue #789 by Mike Perham. Pull request #804 by Vitali F.
10
+ * The `update` command shows a summary of which gems were and were not
11
+ updated. Issue #544 by Mark D. Blackwell.
12
+ Pull request #777 by Tejas Bubane.
13
+ * Improved "could not find 'gem'" error reporting. Pull request #913 by
14
+ Richard Schneeman.
15
+ * Gem.use_gemdeps now accepts an argument specifying the path of the gem
16
+ dependencies file. When the file is not found an ArgumentError is raised.
17
+ * Writing a .lock file for a gem dependencies file is now controlled by the
18
+ --[no-]lock option. Pull reuqest #774 by Jeremy Evans.
19
+ * Suggestion of alternate names and spelling corrections during install can be
20
+ suppressed with the --no-suggestions option. Issue #867 by Jimmy Cuadra.
21
+ * Added mswin64 support. Pull request #881 by U. Nakamura.
22
+ * A gem is installable from an IO again (as in RubyGems 1.8.x and older).
23
+ Pull request #716 by Xavier Shay.
24
+ * RubyGems no longer attempts to build extensions during activation. Instead
25
+ a warning is issued instructing you to run `gem pristine` which will build
26
+ the extensions for the current platform. Issue #796 by dunric.
27
+ * Added Gem::UserInteraction#verbose which prints when the --verbose option is
28
+ given. Pull request #811 by Aaron Patterson.
29
+ * RubyGems can now fetch gems from private repositories using S3. Pull
30
+ request #856 by Brian Palmer.
31
+ * Added Gem::ConflictError subclass of Gem::LoadError so you can distinguish
32
+ conflicts from other problems. Pull request #841 by Aaron Patterson.
33
+ * Cleaned up unneeded load_yaml bootstrapping in Rakefile. Pull request #815
34
+ by Zachary Scott.
35
+ * Improved performance of conflict resolution. Pull request #842 by Aaron
36
+ Patterson.
37
+ * Add documentation of "~> 0" to Gem::Version. Issue #896 by Aaron Suggs.
38
+ * Added CONTRIBUTING file. Pull request #849 by Mark Turner.
39
+ * Allow use of bindir in windows_stub_script in .bat
40
+ Pull request #818 by @unak and @nobu
41
+ * Use native File::PATH_SEPARATOR and remove $ before gem env on
42
+ Gem::Dependency#to_specs. Pull request #915 by @parkr
43
+ * RubyGems recommends SPDX IDs for licenses now. Pull request #917 by
44
+ Benjamin Fleischer.
17
45
 
18
46
  Bug fixes:
19
47
 
20
- * Backport: Add alternate Root CA for upcoming certificate change.
21
- Fixes #1050 by Protosac
48
+ * RubyGems now only fetches the latest specs to find misspellings which speeds
49
+ up gem suggestions. Pull request #808 by Aaron Patterson.
50
+ * The given .gem is installed again when multiple versions of the same gem
51
+ exist in the current directory. Bug #875 by Prem Sichanugrist.
52
+ * Local gems are preferred by name over remote gems again. Bug #834 by
53
+ jonforums.
54
+ * RubyGems can install local prerelease gems again. Pull request #866 by
55
+ Aaron Patterson. Issue #813 by André Arko.
56
+ * RubyGems installs development dependencies correctly again. Issue #893 by
57
+ Jens Wille.
58
+ * RubyGems only installs prerelease versions when they are requested again.
59
+ Issue #853 by Seth Vargo, special thanks to Zachary Scott and Ben Moss.
60
+ Issue #884 by Nathaniel Bibler.
61
+ * Fixed RubyGems list and search command help. Pull request #905 and #928 by
62
+ Gabriel Gilder.
63
+ * The list of gems to uninstall is always sorted now. Bug #918 by postmodern.
64
+ * The update command only updates exactly matching gem names now. Bug #919 by
65
+ postmodern.
66
+ * Gem::Server now supports prerelease versions. Bug #857 by Marcelo Alvim.
67
+ * RubyGems no longer raises an exception immediately when gems are missing
68
+ with RUBYGEMS_GEMDEPS. A warning is printed instead. Issue #886 by Michael
69
+ Kaiser-Nyman.
70
+ * Commands using the rubygems.org API no longer try to sign-in when a
71
+ non-rubygems API key has been chosen. Bug #826 by Ben Sedat.
72
+ * Updated documentation of Gem::Specification#executables to indicate that
73
+ only ruby scripts are allowed. Bug #830 by Geoff Nixon.
74
+ * Gem dependency API supports multiple platforms for #platform and #platforms
75
+ now. Bug #821 by johnny5-.
76
+ * Gem dependency API supports lockfiles without explicit sources. Bug #820 by
77
+ johnny5-.
78
+ * Gem dependency API supports lockfiles with multiple sources. Bug #822 by
79
+ johnny5-, bug #851 by sumit shah.
80
+ * Gem dependency API supports lockfiles with git sources using branch, tag and
81
+ ref. Bug #822 by johnny5-, #931 by Christoph Blank.
82
+ * Gem dependency API no longer raises an exception when a gem does not exist
83
+ in one of the configured sources. Bug #897 by Michael Kaiser-Nyman.
84
+ * Gem dependency API no longer lists development dependencies in the lockfile.
85
+ Bug #768 by Diego Viola, #916 by Santiago Pastorino.
86
+ * SSL configuration entries in ~/.gemrc are properly round-tripped. Bug #837
87
+ by Noah Luck Easterly.
88
+ * The environment command now shows the system configuration directory where
89
+ the all-users gemrc lives. Bug #827 by Ben Langfeld.
90
+ * Improved speed of conflict checking when activating gems. Pull request #843
91
+ by Aaron Patterson.
92
+ * Improved speed of levenshtein distance for gem suggestion misspellings.
93
+ Pull requests #809, #812 by Aaron Patterson.
94
+ * Restored persistent connections. Pull request #869 by Aaron Patterson.
95
+ * Reduced requests when fetching gems with the bundler API. Pull request #773
96
+ by Charlie Somerville.
97
+ * Reduced dependency prefetching to improve install speed. Pull requests
98
+ #871, #872 by Matthew Draper.
99
+ * RubyGems now avoids net/http auto-proxy detection. Issue #824 by HINOHARA
100
+ Hiroshi.
101
+ * Removed conversion of Gem::List (used for debugging installs) to unless
102
+ necessary. Pull request #870 by Aaron Patterson.
103
+ * RubyGems now prints release notes from the current release. Bug #814 by
104
+ André Arko.
105
+ * RubyGems allows installation of unsigned gems again with -P MediumSecurity
106
+ and lower. Bug #859 by Justin S. Collins.
107
+ * Fixed typo in Jim Weirich's name. Ruby pull request #577 by Mo Khan.
108
+ * Fixed typo in Gem.datadir documentation. Pull request #868 by Patrick
109
+ Jones.
110
+ * Fixed File.exists? warnings. Pull request #829 by SHIBATA Hiroshi.
111
+ * Fixed show_release_notes test for LANG=C. Issue #862 by Luis Lavena.
112
+ * Fixed Gem::Package from IO tests on windows. Patch from issue #861 by Luis
113
+ Lavena.
114
+ * Check for nil extensions as BasicSpecification does not initialize them.
115
+ Pull request #882 by André Arko.
116
+ * Fixed Gem::BasicSpecification#require_paths receives a String for
117
+ @require_paths. Pull requrest #904 by @danielpclark
118
+ * Fixed circular require warnings. Bug #908 by Zachary Scott.
119
+ * Gem::Specification#require_paths can no longer accidentally be an Array.
120
+ Pull requests #904, #909 by Daniel P. Clark.
121
+ * Don't build extensions if `build_dir/extensions` isn't writable.
122
+ Pull request #912 by @dunric
123
+ * Gem::BasicSpecification#require_paths respects default_ext_dir_for now. Bug
124
+ #852 by Vít Ondruch.
22
125
 
23
126
  === 2.2.2 / 2014-02-05
24
127
 
@@ -1,5 +1,6 @@
1
1
  .autotest
2
2
  .document
3
+ CONTRIBUTING
3
4
  CVE-2013-4287.txt
4
5
  CVE-2013-4363.txt
5
6
  History.txt
@@ -32,6 +33,7 @@ lib/rubygems/commands/install_command.rb
32
33
  lib/rubygems/commands/list_command.rb
33
34
  lib/rubygems/commands/lock_command.rb
34
35
  lib/rubygems/commands/mirror_command.rb
36
+ lib/rubygems/commands/open_command.rb
35
37
  lib/rubygems/commands/outdated_command.rb
36
38
  lib/rubygems/commands/owner_command.rb
37
39
  lib/rubygems/commands/pristine_command.rb
@@ -81,7 +83,10 @@ lib/rubygems/mock_gem_ui.rb
81
83
  lib/rubygems/name_tuple.rb
82
84
  lib/rubygems/package.rb
83
85
  lib/rubygems/package/digest_io.rb
86
+ lib/rubygems/package/file_source.rb
87
+ lib/rubygems/package/io_source.rb
84
88
  lib/rubygems/package/old.rb
89
+ lib/rubygems/package/source.rb
85
90
  lib/rubygems/package/tar_header.rb
86
91
  lib/rubygems/package/tar_reader.rb
87
92
  lib/rubygems/package/tar_reader/entry.rb
@@ -95,6 +100,9 @@ lib/rubygems/psych_tree.rb
95
100
  lib/rubygems/rdoc.rb
96
101
  lib/rubygems/remote_fetcher.rb
97
102
  lib/rubygems/request.rb
103
+ lib/rubygems/request/connection_pools.rb
104
+ lib/rubygems/request/http_pool.rb
105
+ lib/rubygems/request/https_pool.rb
98
106
  lib/rubygems/request_set.rb
99
107
  lib/rubygems/request_set/gem_dependency_api.rb
100
108
  lib/rubygems/request_set/lockfile.rb
@@ -143,8 +151,6 @@ lib/rubygems/source_specific_file.rb
143
151
  lib/rubygems/spec_fetcher.rb
144
152
  lib/rubygems/specification.rb
145
153
  lib/rubygems/ssl_certs/.document
146
- lib/rubygems/ssl_certs/AddTrustExternalCARoot-2048.pem
147
- lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem
148
154
  lib/rubygems/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem
149
155
  lib/rubygems/ssl_certs/DigiCertHighAssuranceEVRootCA.pem
150
156
  lib/rubygems/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem
@@ -234,6 +240,7 @@ test/rubygems/test_gem_commands_install_command.rb
234
240
  test/rubygems/test_gem_commands_list_command.rb
235
241
  test/rubygems/test_gem_commands_lock_command.rb
236
242
  test/rubygems/test_gem_commands_mirror.rb
243
+ test/rubygems/test_gem_commands_open_command.rb
237
244
  test/rubygems/test_gem_commands_outdated_command.rb
238
245
  test/rubygems/test_gem_commands_owner_command.rb
239
246
  test/rubygems/test_gem_commands_pristine_command.rb
@@ -281,6 +288,7 @@ test/rubygems/test_gem_platform.rb
281
288
  test/rubygems/test_gem_rdoc.rb
282
289
  test/rubygems/test_gem_remote_fetcher.rb
283
290
  test/rubygems/test_gem_request.rb
291
+ test/rubygems/test_gem_request_connection_pools.rb
284
292
  test/rubygems/test_gem_request_set.rb
285
293
  test/rubygems/test_gem_request_set_gem_dependency_api.rb
286
294
  test/rubygems/test_gem_request_set_lockfile.rb
@@ -327,6 +335,7 @@ test/rubygems/test_gem_stream_ui.rb
327
335
  test/rubygems/test_gem_stub_specification.rb
328
336
  test/rubygems/test_gem_text.rb
329
337
  test/rubygems/test_gem_uninstaller.rb
338
+ test/rubygems/test_gem_unsatisfiable_dependency_error.rb
330
339
  test/rubygems/test_gem_uri_formatter.rb
331
340
  test/rubygems/test_gem_util.rb
332
341
  test/rubygems/test_gem_validator.rb
@@ -51,4 +51,4 @@ for letting the RubyGems team know about bugs or problems you're having is
51
51
 
52
52
  === Bundler Compatibility
53
53
 
54
- See http://gembundler.com/compatibility for known issues.
54
+ See http://bundler.io/compatibility for known issues.
data/Rakefile CHANGED
@@ -3,9 +3,6 @@
3
3
  require 'rubygems'
4
4
  require 'rubygems/package_task'
5
5
 
6
- # HACK bootstrap load_yaml, remove after 1.5 release
7
- def Gem.load_yaml; end unless Gem.respond_to? :load_yaml
8
-
9
6
  if ENV['YAML'] == "syck"
10
7
  ENV['TEST_SYCK'] = "1"
11
8
  end
@@ -8,7 +8,7 @@
8
8
  require 'rbconfig'
9
9
 
10
10
  module Gem
11
- VERSION = '2.2.5'
11
+ VERSION = '2.3.0'
12
12
  end
13
13
 
14
14
  # Must be first since it unloads the prelude from 1.9.2
@@ -56,8 +56,8 @@ require 'rubygems/errors'
56
56
  # RubyGems defaults are stored in rubygems/defaults.rb. If you're packaging
57
57
  # RubyGems or implementing Ruby you can change RubyGems' defaults.
58
58
  #
59
- # For RubyGems packagers, provide lib/rubygems/operating_system.rb and
60
- # override any defaults from lib/rubygems/defaults.rb.
59
+ # For RubyGems packagers, provide lib/rubygems/defaults/operating_system.rb
60
+ # and override any defaults from lib/rubygems/defaults.rb.
61
61
  #
62
62
  # For Ruby implementers, provide lib/rubygems/defaults/#{RUBY_ENGINE}.rb and
63
63
  # override any defaults from lib/rubygems/defaults.rb.
@@ -83,7 +83,7 @@ require 'rubygems/errors'
83
83
  # * Chad Fowler -- chad(at)chadfowler.com
84
84
  # * David Black -- dblack(at)wobblini.net
85
85
  # * Paul Brannan -- paul(at)atdesk.com
86
- # * Jim Weirch -- jim(at)weirichhouse.org
86
+ # * Jim Weirich -- jim(at)weirichhouse.org
87
87
  #
88
88
  # Contributors:
89
89
  #
@@ -298,7 +298,7 @@ module Gem
298
298
  end
299
299
 
300
300
  ##
301
- # The path the the data directory specified by the gem name. If the
301
+ # The path to the data directory specified by the gem name. If the
302
302
  # package is not available as a gem, return nil.
303
303
 
304
304
  def self.datadir(gem_name)
@@ -995,19 +995,31 @@ module Gem
995
995
  end
996
996
 
997
997
  ##
998
- # Looks for gem dependency files (gem.deps.rb, Gemfile, Isolate) from the
999
- # current directory up and activates the gems in the first file found.
998
+ # Looks for a gem dependency file at +path+ and activates the gems in the
999
+ # file if found. If the file is not found an ArgumentError is raised.
1000
+ #
1001
+ # If +path+ is not given the RUBYGEMS_GEMDEPS environment variable is used,
1002
+ # but if no file is found no exception is raised.
1003
+ #
1004
+ # If '-' is given for +path+ RubyGems searches up from the current working
1005
+ # directory for gem dependency files (gem.deps.rb, Gemfile, Isolate) and
1006
+ # activates the gems in the first one found.
1000
1007
  #
1001
1008
  # You can run this automatically when rubygems starts. To enable, set
1002
1009
  # the <code>RUBYGEMS_GEMDEPS</code> environment variable to either the path
1003
- # of your Gemfile or "-" to auto-discover in parent directories.
1010
+ # of your gem dependencies file or "-" to auto-discover in parent
1011
+ # directories.
1004
1012
  #
1005
1013
  # NOTE: Enabling automatic discovery on multiuser systems can lead to
1006
1014
  # execution of arbitrary code when used from directories outside your
1007
1015
  # control.
1008
1016
 
1009
- def self.use_gemdeps
1010
- return unless path = ENV['RUBYGEMS_GEMDEPS']
1017
+ def self.use_gemdeps path = nil
1018
+ raise_exception = path
1019
+
1020
+ path ||= ENV['RUBYGEMS_GEMDEPS']
1021
+ return unless path
1022
+
1011
1023
  path = path.dup
1012
1024
 
1013
1025
  if path == "-" then
@@ -1025,7 +1037,11 @@ module Gem
1025
1037
 
1026
1038
  path.untaint
1027
1039
 
1028
- return unless File.file? path
1040
+ unless File.file? path then
1041
+ return unless raise_exception
1042
+
1043
+ raise ArgumentError, "Unable to find gem dependencies file at #{path}"
1044
+ end
1029
1045
 
1030
1046
  rs = Gem::RequestSet.new
1031
1047
  rs.load_gemdeps path
@@ -1035,6 +1051,10 @@ module Gem
1035
1051
  sp.activate
1036
1052
  sp
1037
1053
  end
1054
+ rescue Gem::LoadError, Gem::UnsatisfiableDependencyError => e
1055
+ warn e.message
1056
+ warn "You may need to `gem install -g` to install missing gems"
1057
+ warn ""
1038
1058
  end
1039
1059
 
1040
1060
  class << self
@@ -126,7 +126,7 @@ class Gem::AvailableSet
126
126
  dep = req.dependency
127
127
 
128
128
  match = @set.find_all do |t|
129
- dep.matches_spec? t.spec
129
+ dep.match? t.spec
130
130
  end
131
131
 
132
132
  match.map do |t|
@@ -14,6 +14,11 @@ class Gem::BasicSpecification
14
14
 
15
15
  attr_writer :extension_dir # :nodoc:
16
16
 
17
+ ##
18
+ # Is this specification ignored for activation purposes?
19
+
20
+ attr_writer :ignored # :nodoc:
21
+
17
22
  ##
18
23
  # The path this gemspec was loaded from. This attribute is not persisted.
19
24
 
@@ -53,7 +58,16 @@ class Gem::BasicSpecification
53
58
  # Return true if this spec can require +file+.
54
59
 
55
60
  def contains_requirable_file? file
56
- build_extensions
61
+ if instance_variable_defined?(:@ignored) or
62
+ instance_variable_defined?('@ignored') then
63
+ return false
64
+ elsif missing_extensions? then
65
+ @ignored = true
66
+
67
+ warn "Ignoring #{full_name} because its extensions are not built. " +
68
+ "Try: gem pristine #{full_name}"
69
+ return false
70
+ end
57
71
 
58
72
  suffixes = Gem.suffixes
59
73
 
@@ -120,11 +134,11 @@ class Gem::BasicSpecification
120
134
  # activated.
121
135
 
122
136
  def full_require_paths
123
- full_paths = @require_paths.map do |path|
137
+ full_paths = raw_require_paths.map do |path|
124
138
  File.join full_gem_path, path
125
139
  end
126
140
 
127
- full_paths.unshift extension_dir unless @extensions.empty?
141
+ full_paths.unshift extension_dir unless @extensions.nil? || @extensions.empty?
128
142
 
129
143
  full_paths
130
144
  end
@@ -176,7 +190,7 @@ class Gem::BasicSpecification
176
190
  end
177
191
 
178
192
  def raw_require_paths # :nodoc:
179
- @require_paths
193
+ Array(@require_paths)
180
194
  end
181
195
 
182
196
  ##
@@ -197,13 +211,9 @@ class Gem::BasicSpecification
197
211
  # spec.require_path = '.'
198
212
 
199
213
  def require_paths
200
- return @require_paths if @extensions.empty?
201
-
202
- relative_extension_dir =
203
- File.join '..', '..', 'extensions', Gem::Platform.local.to_s,
204
- Gem.extension_api_version, full_name
214
+ return raw_require_paths if @extensions.nil? || @extensions.empty?
205
215
 
206
- [relative_extension_dir].concat @require_paths
216
+ [extension_dir].concat raw_require_paths
207
217
  end
208
218
 
209
219
  ##