rake 10.4.2 → 13.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. checksums.yaml +5 -5
  2. data/CONTRIBUTING.rdoc +16 -7
  3. data/Gemfile +10 -0
  4. data/History.rdoc +2022 -287
  5. data/README.rdoc +40 -25
  6. data/Rakefile +25 -65
  7. data/bin/bundle +105 -0
  8. data/bin/console +7 -0
  9. data/bin/rake +20 -24
  10. data/bin/rdoc +29 -0
  11. data/bin/rubocop +29 -0
  12. data/bin/setup +6 -0
  13. data/doc/glossary.rdoc +10 -11
  14. data/doc/jamis.rb +1 -0
  15. data/doc/rake.1 +139 -124
  16. data/doc/rakefile.rdoc +2 -33
  17. data/exe/rake +27 -0
  18. data/lib/rake.rb +35 -43
  19. data/lib/rake/application.rb +125 -91
  20. data/lib/rake/backtrace.rb +3 -2
  21. data/lib/rake/clean.rb +8 -6
  22. data/lib/rake/cloneable.rb +1 -0
  23. data/lib/rake/cpu_counter.rb +10 -28
  24. data/lib/rake/default_loader.rb +1 -0
  25. data/lib/rake/dsl_definition.rb +6 -12
  26. data/lib/rake/early_time.rb +1 -0
  27. data/lib/rake/ext/core.rb +1 -0
  28. data/lib/rake/ext/string.rb +24 -21
  29. data/lib/rake/file_creation_task.rb +4 -3
  30. data/lib/rake/file_list.rb +35 -28
  31. data/lib/rake/file_task.rb +12 -4
  32. data/lib/rake/file_utils.rb +38 -32
  33. data/lib/rake/file_utils_ext.rb +8 -18
  34. data/lib/rake/invocation_chain.rb +1 -0
  35. data/lib/rake/invocation_exception_mixin.rb +1 -0
  36. data/lib/rake/late_time.rb +2 -1
  37. data/lib/rake/linked_list.rb +24 -15
  38. data/lib/rake/loaders/makefile.rb +23 -9
  39. data/lib/rake/multi_task.rb +2 -1
  40. data/lib/rake/name_space.rb +1 -1
  41. data/lib/rake/packagetask.rb +40 -17
  42. data/lib/rake/phony.rb +2 -1
  43. data/lib/rake/private_reader.rb +1 -0
  44. data/lib/rake/promise.rb +13 -12
  45. data/lib/rake/pseudo_status.rb +1 -0
  46. data/lib/rake/rake_module.rb +30 -1
  47. data/lib/rake/rake_test_loader.rb +18 -13
  48. data/lib/rake/rule_recursion_overflow_error.rb +2 -2
  49. data/lib/rake/scope.rb +3 -2
  50. data/lib/rake/task.rb +82 -31
  51. data/lib/rake/task_argument_error.rb +1 -0
  52. data/lib/rake/task_arguments.rb +15 -4
  53. data/lib/rake/task_manager.rb +54 -33
  54. data/lib/rake/tasklib.rb +2 -14
  55. data/lib/rake/testtask.rb +40 -63
  56. data/lib/rake/thread_history_display.rb +4 -3
  57. data/lib/rake/thread_pool.rb +16 -17
  58. data/lib/rake/trace_output.rb +2 -1
  59. data/lib/rake/version.rb +4 -1
  60. data/lib/rake/win32.rb +10 -15
  61. data/rake.gemspec +43 -0
  62. metadata +33 -270
  63. data/.autotest +0 -7
  64. data/.gemtest +0 -0
  65. data/.rubocop.yml +0 -27
  66. data/.togglerc +0 -7
  67. data/Manifest.txt +0 -166
  68. data/doc/release_notes/rake-0.4.14.rdoc +0 -23
  69. data/doc/release_notes/rake-0.4.15.rdoc +0 -35
  70. data/doc/release_notes/rake-0.5.0.rdoc +0 -53
  71. data/doc/release_notes/rake-0.5.3.rdoc +0 -78
  72. data/doc/release_notes/rake-0.5.4.rdoc +0 -46
  73. data/doc/release_notes/rake-0.6.0.rdoc +0 -141
  74. data/doc/release_notes/rake-0.7.0.rdoc +0 -119
  75. data/doc/release_notes/rake-0.7.1.rdoc +0 -59
  76. data/doc/release_notes/rake-0.7.2.rdoc +0 -121
  77. data/doc/release_notes/rake-0.7.3.rdoc +0 -47
  78. data/doc/release_notes/rake-0.8.0.rdoc +0 -114
  79. data/doc/release_notes/rake-0.8.2.rdoc +0 -165
  80. data/doc/release_notes/rake-0.8.3.rdoc +0 -112
  81. data/doc/release_notes/rake-0.8.4.rdoc +0 -147
  82. data/doc/release_notes/rake-0.8.5.rdoc +0 -53
  83. data/doc/release_notes/rake-0.8.6.rdoc +0 -37
  84. data/doc/release_notes/rake-0.8.7.rdoc +0 -55
  85. data/doc/release_notes/rake-0.9.0.rdoc +0 -112
  86. data/doc/release_notes/rake-0.9.1.rdoc +0 -52
  87. data/doc/release_notes/rake-0.9.2.2.rdoc +0 -55
  88. data/doc/release_notes/rake-0.9.2.rdoc +0 -49
  89. data/doc/release_notes/rake-0.9.3.rdoc +0 -102
  90. data/doc/release_notes/rake-0.9.4.rdoc +0 -60
  91. data/doc/release_notes/rake-0.9.5.rdoc +0 -55
  92. data/doc/release_notes/rake-0.9.6.rdoc +0 -64
  93. data/doc/release_notes/rake-10.0.0.rdoc +0 -178
  94. data/doc/release_notes/rake-10.0.1.rdoc +0 -58
  95. data/doc/release_notes/rake-10.0.2.rdoc +0 -53
  96. data/doc/release_notes/rake-10.0.3.rdoc +0 -191
  97. data/doc/release_notes/rake-10.1.0.rdoc +0 -61
  98. data/lib/rake/alt_system.rb +0 -110
  99. data/lib/rake/contrib/.document +0 -1
  100. data/lib/rake/contrib/compositepublisher.rb +0 -21
  101. data/lib/rake/contrib/ftptools.rb +0 -137
  102. data/lib/rake/contrib/publisher.rb +0 -81
  103. data/lib/rake/contrib/rubyforgepublisher.rb +0 -18
  104. data/lib/rake/contrib/sshpublisher.rb +0 -61
  105. data/lib/rake/contrib/sys.rb +0 -4
  106. data/lib/rake/ext/module.rb +0 -2
  107. data/lib/rake/ext/pathname.rb +0 -25
  108. data/lib/rake/ext/time.rb +0 -16
  109. data/lib/rake/gempackagetask.rb +0 -4
  110. data/lib/rake/pathmap.rb +0 -3
  111. data/lib/rake/rdoctask.rb +0 -4
  112. data/lib/rake/ruby182_test_unit_fix.rb +0 -29
  113. data/lib/rake/runtest.rb +0 -27
  114. data/rakelib/publish.rake +0 -20
  115. data/rakelib/test_times.rake +0 -25
  116. data/test/file_creation.rb +0 -34
  117. data/test/helper.rb +0 -130
  118. data/test/support/rakefile_definitions.rb +0 -478
  119. data/test/support/ruby_runner.rb +0 -34
  120. data/test/test_private_reader.rb +0 -42
  121. data/test/test_rake.rb +0 -40
  122. data/test/test_rake_application.rb +0 -643
  123. data/test/test_rake_application_options.rb +0 -466
  124. data/test/test_rake_backtrace.rb +0 -119
  125. data/test/test_rake_clean.rb +0 -61
  126. data/test/test_rake_cpu_counter.rb +0 -68
  127. data/test/test_rake_definitions.rb +0 -84
  128. data/test/test_rake_directory_task.rb +0 -76
  129. data/test/test_rake_dsl.rb +0 -40
  130. data/test/test_rake_early_time.rb +0 -31
  131. data/test/test_rake_extension.rb +0 -59
  132. data/test/test_rake_file_creation_task.rb +0 -56
  133. data/test/test_rake_file_list.rb +0 -655
  134. data/test/test_rake_file_list_path_map.rb +0 -8
  135. data/test/test_rake_file_task.rb +0 -197
  136. data/test/test_rake_file_utils.rb +0 -309
  137. data/test/test_rake_ftp_file.rb +0 -74
  138. data/test/test_rake_functional.rb +0 -482
  139. data/test/test_rake_invocation_chain.rb +0 -64
  140. data/test/test_rake_late_time.rb +0 -18
  141. data/test/test_rake_linked_list.rb +0 -84
  142. data/test/test_rake_makefile_loader.rb +0 -46
  143. data/test/test_rake_multi_task.rb +0 -64
  144. data/test/test_rake_name_space.rb +0 -57
  145. data/test/test_rake_package_task.rb +0 -79
  146. data/test/test_rake_path_map.rb +0 -168
  147. data/test/test_rake_path_map_explode.rb +0 -34
  148. data/test/test_rake_path_map_partial.rb +0 -18
  149. data/test/test_rake_pathname_extensions.rb +0 -15
  150. data/test/test_rake_pseudo_status.rb +0 -21
  151. data/test/test_rake_rake_test_loader.rb +0 -20
  152. data/test/test_rake_reduce_compat.rb +0 -26
  153. data/test/test_rake_require.rb +0 -40
  154. data/test/test_rake_rules.rb +0 -388
  155. data/test/test_rake_scope.rb +0 -44
  156. data/test/test_rake_task.rb +0 -393
  157. data/test/test_rake_task_argument_parsing.rb +0 -119
  158. data/test/test_rake_task_arguments.rb +0 -127
  159. data/test/test_rake_task_lib.rb +0 -9
  160. data/test/test_rake_task_manager.rb +0 -178
  161. data/test/test_rake_task_manager_argument_resolution.rb +0 -19
  162. data/test/test_rake_task_with_arguments.rb +0 -172
  163. data/test/test_rake_test_task.rb +0 -146
  164. data/test/test_rake_thread_pool.rb +0 -145
  165. data/test/test_rake_top_level_functions.rb +0 -71
  166. data/test/test_rake_win32.rb +0 -72
  167. data/test/test_thread_history_display.rb +0 -101
  168. data/test/test_trace_output.rb +0 -52
data/README.rdoc CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  home :: https://github.com/ruby/rake
4
4
  bugs :: https://github.com/ruby/rake/issues
5
- docs :: http://docs.seattlerb.org/rake
5
+ docs :: https://ruby.github.io/rake
6
6
 
7
7
  == Description
8
8
 
@@ -23,9 +23,9 @@ Rake has the following features:
23
23
  file names and paths.
24
24
 
25
25
  * A library of prepackaged tasks to make building rakefiles easier. For example,
26
- tasks for building tarballs and publishing to FTP or SSH sites. (Formerly
27
- tasks for building RDoc and Gems were included in rake but they're now
28
- available in RDoc and RubyGems respectively.)
26
+ tasks for building tarballs. (Formerly
27
+ tasks for building RDoc, Gems, and publishing to FTP were included in rake but they're now
28
+ available in RDoc, RubyGems, and rake-contrib respectively.)
29
29
 
30
30
  * Supports parallel execution of tasks.
31
31
 
@@ -74,48 +74,50 @@ Type "rake --help" for all available options.
74
74
 
75
75
  === Rake Information
76
76
 
77
- * {Rake command-line}[rdoc-ref:doc/command_line_usage.rdoc]
78
- * {Writing Rakefiles}[rdoc-ref:doc/rakefile.rdoc]
79
- * The original {Rake announcement}[rdoc-ref:doc/rational.rdoc]
80
- * Rake {glossary}[rdoc-ref:doc/glossary.rdoc]
77
+ * {Rake command-line}[link:doc/command_line_usage.rdoc]
78
+ * {Writing Rakefiles}[link:doc/rakefile.rdoc]
79
+ * The original {Rake announcement}[link:doc/rational.rdoc]
80
+ * Rake {glossary}[link:doc/glossary.rdoc]
81
81
 
82
82
  === Presentations and Articles about Rake
83
83
 
84
84
  * Avdi Grimm's rake series:
85
- 1. {Rake Basics}[http://devblog.avdi.org/2014/04/21/rake-part-1-basics/]
86
- 2. {Rake File Lists}[http://devblog.avdi.org/2014/04/22/rake-part-2-file-lists/]
87
- 3. {Rake Rules}[http://devblog.avdi.org/2014/04/23/rake-part-3-rules/]
88
- 4. {Rake Pathmap}[http://devblog.avdi.org/2014/04/24/rake-part-4-pathmap/]
89
- 5. {File Operations}[http://devblog.avdi.org/2014/04/25/rake-part-5-file-operations/]
90
- 6. {Clean and Clobber}[http://devblog.avdi.org/2014/04/28/rake-part-6-clean-and-clobber/]
91
- 7. {MultiTask}[http://devblog.avdi.org/2014/04/29/rake-part-7-multitask/]
92
- * Jim Weirich's 2003 RubyConf presentation:
93
- http://onestepback.org/articles/buildingwithrake/
94
- * Martin Fowler's article on Rake: http://martinfowler.com/articles/rake.html
85
+ 1. {Rake Basics}[https://avdi.codes/rake-part-1-basics/]
86
+ 2. {Rake File Lists}[https://avdi.codes/rake-part-2-file-lists-2/]
87
+ 3. {Rake Rules}[https://avdi.codes/rake-part-3-rules/]
88
+ 4. {Rake Pathmap}[https://avdi.codes/rake-part-4-pathmap/]
89
+ 5. {File Operations}[https://avdi.codes/rake-part-5-file-operations/]
90
+ 6. {Clean and Clobber}[https://avdi.codes/rake-part-6-clean-and-clobber/]
91
+ 7. {MultiTask}[https://avdi.codes/rake-part-7-multitask/]
92
+ * {Jim Weirich's 2003 RubyConf presentation}[https://web.archive.org/web/20140221123354/http://onestepback.org/articles/buildingwithrake/]
93
+ * Martin Fowler's article on Rake: https://martinfowler.com/articles/rake.html
95
94
 
96
95
  == Other Make Re-envisionings ...
97
96
 
98
97
  Rake is a late entry in the make replacement field. Here are links to
99
98
  other projects with similar (and not so similar) goals.
100
99
 
101
- * http://directory.fsf.org/bras.html -- Bras, one of earliest
100
+ * https://directory.fsf.org/wiki/Bras -- Bras, one of earliest
102
101
  implementations of "make in a scripting language".
103
102
  * http://www.a-a-p.org -- Make in Python
104
- * http://www.aromatic.com/tools/jam.txt -- JAM, Java Automated Make
105
- * http://ant.apache.org -- The Ant project
106
- * http://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System
107
- * http://rubydoc.info/gems/rant/0.5.7/frames -- Rant, another Ruby make tool.
103
+ * https://ant.apache.org -- The Ant project
104
+ * https://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System
105
+ * https://www.rubydoc.info/gems/rant/0.5.7/frames -- Rant, another Ruby make tool.
108
106
 
109
107
  == Credits
110
108
 
109
+ [<b>Jim Weirich</b>] Who originally created Rake.
110
+
111
111
  [<b>Ryan Dlugosz</b>] For the initial conversation that sparked Rake.
112
112
 
113
- [<b>nobu.nokada@softhome.net</b>] For the initial patch for rule support.
113
+ [<b>Nobuyoshi Nakada <nobu@ruby-lang.org></b>] For the initial patch for rule support.
114
114
 
115
115
  [<b>Tilman Sauerbeck <tilman@code-monkey.de></b>] For the recursive rule patch.
116
116
 
117
117
  [<b>Eric Hodel</b>] For aid in maintaining rake.
118
118
 
119
+ [<b>Hiroshi SHIBATA</b>] Maintainer of Rake 10.X and Rake 11.X
120
+
119
121
  == License
120
122
 
121
123
  Rake is available under an MIT-style license.
@@ -127,7 +129,7 @@ Rake is available under an MIT-style license.
127
129
  = Other stuff
128
130
 
129
131
  Author:: Jim Weirich <jim.weirich@gmail.com>
130
- Requires:: Ruby 1.8.7 or later
132
+ Requires:: Ruby 2.0.0 or later
131
133
  License:: Copyright Jim Weirich.
132
134
  Released under an MIT-style license. See the MIT-LICENSE
133
135
  file included in the distribution.
@@ -138,3 +140,16 @@ This software is provided "as is" and without any express or implied
138
140
  warranties, including, without limitation, the implied warranties of
139
141
  merchantability and fitness for a particular purpose.
140
142
 
143
+ == Historical
144
+
145
+ Rake was originally created by Jim Weirich, who unfortunately passed away in
146
+ February 2014. This repository was originally hosted at
147
+ {github.com/jimweirich/rake}[https://github.com/jimweirich/rake/], however
148
+ with his passing, has been moved to {ruby/rake}[https://github.com/ruby/rake].
149
+
150
+ You can view Jim's last commit here:
151
+ https://github.com/jimweirich/rake/tree/336559f28f55bce418e2ebcc0a57548dcbac4025
152
+
153
+ You can {read more about Jim}[https://en.wikipedia.org/wiki/Jim_Weirich] at Wikipedia.
154
+
155
+ Thank you for this great tool, Jim. We'll remember you.
data/Rakefile CHANGED
@@ -6,76 +6,36 @@
6
6
  # This file may be distributed under an MIT style license. See
7
7
  # MIT-LICENSE for details.
8
8
 
9
- require 'rbconfig'
9
+ lib = File.expand_path("../lib", __FILE__)
10
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
10
11
 
11
- system_rake = File.join RbConfig::CONFIG['rubylibdir'], 'rake.rb'
12
-
13
- # Use our rake, not the installed rake from system
14
- if $".include? system_rake or $".grep(/rake\/name_space\.rb$/).empty? then
15
- exec Gem.ruby, '-Ilib', 'bin/rake', *ARGV
12
+ begin
13
+ require "bundler/gem_tasks"
14
+ rescue LoadError
16
15
  end
17
16
 
18
- require 'hoe'
19
-
20
- Hoe.plugin :git
21
- Hoe.plugin :minitest
22
- Hoe.plugin :travis
23
-
24
- hoe = Hoe.spec 'rake' do
25
- developer 'Eric Hodel', 'drbrain@segment7.net'
26
- developer 'Jim Weirich', ''
27
-
28
- require_ruby_version '>= 1.8.7'
29
- require_rubygems_version '>= 1.3.2'
30
-
31
- dependency 'minitest', '~> 5.0', :developer
32
-
33
- license "MIT"
34
-
35
- self.readme_file = 'README.rdoc'
36
- self.history_file = 'History.rdoc'
37
-
38
- self.extra_rdoc_files.concat FileList[
39
- 'MIT-LICENSE',
40
- 'doc/**/*.rdoc',
41
- '*.rdoc',
42
- ]
43
-
44
- self.local_rdoc_dir = 'html'
45
- self.rsync_args = '-avz --delete'
46
- rdoc_locations << 'docs.seattlerb.org:/data/www/docs.seattlerb.org/rake/'
47
-
48
- self.clean_globs += [
49
- '**/*.o',
50
- '**/*.rbc',
51
- '*.dot',
52
- 'TAGS',
53
- 'doc/example/main',
54
- ]
17
+ require "rake/testtask"
18
+ Rake::TestTask.new(:test) do |t|
19
+ t.libs << "test"
20
+ t.verbose = true
21
+ t.test_files = FileList["test/**/test_*.rb"]
55
22
  end
56
23
 
57
- hoe.test_prelude = 'gem "minitest", "~> 5.0"'
58
-
59
- # Use custom rdoc task due to existence of doc directory
60
-
61
- Rake::Task['docs'].clear
62
- Rake::Task['clobber_docs'].clear
63
-
64
- begin
65
- require 'rdoc/task'
66
-
67
- RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc|
68
- doc.main = hoe.readme_file
69
- doc.title = 'Rake -- Ruby Make'
70
-
71
- rdoc_files = Rake::FileList.new %w[lib History.rdoc MIT-LICENSE doc]
72
- rdoc_files.add hoe.extra_rdoc_files
73
-
74
- doc.rdoc_files = rdoc_files
24
+ require "rdoc/task"
25
+ RDoc::Task.new do |doc|
26
+ doc.main = "README.rdoc"
27
+ doc.title = "Rake -- Ruby Make"
28
+ doc.rdoc_files = FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc]
29
+ doc.rdoc_dir = "html"
30
+ end
75
31
 
76
- doc.rdoc_dir = 'html'
77
- end
78
- rescue LoadError
79
- warn 'run `rake newb` to install rdoc'
32
+ task ghpages: :rdoc do
33
+ %x[git checkout gh-pages]
34
+ require "fileutils"
35
+ FileUtils.rm_rf "/tmp/html"
36
+ FileUtils.mv "html", "/tmp"
37
+ FileUtils.rm_rf "*"
38
+ FileUtils.cp_r Dir.glob("/tmp/html/*"), "."
80
39
  end
81
40
 
41
+ task default: :test
data/bin/bundle ADDED
@@ -0,0 +1,105 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'bundle' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "rubygems"
12
+
13
+ m = Module.new do
14
+ module_function
15
+
16
+ def invoked_as_script?
17
+ File.expand_path($0) == File.expand_path(__FILE__)
18
+ end
19
+
20
+ def env_var_version
21
+ ENV["BUNDLER_VERSION"]
22
+ end
23
+
24
+ def cli_arg_version
25
+ return unless invoked_as_script? # don't want to hijack other binstubs
26
+ return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27
+ bundler_version = nil
28
+ update_index = nil
29
+ ARGV.each_with_index do |a, i|
30
+ if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31
+ bundler_version = a
32
+ end
33
+ next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
+ bundler_version = $1 || ">= 0.a"
35
+ update_index = i
36
+ end
37
+ bundler_version
38
+ end
39
+
40
+ def gemfile
41
+ gemfile = ENV["BUNDLE_GEMFILE"]
42
+ return gemfile if gemfile && !gemfile.empty?
43
+
44
+ File.expand_path("../../Gemfile", __FILE__)
45
+ end
46
+
47
+ def lockfile
48
+ lockfile =
49
+ case File.basename(gemfile)
50
+ when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
51
+ else "#{gemfile}.lock"
52
+ end
53
+ File.expand_path(lockfile)
54
+ end
55
+
56
+ def lockfile_version
57
+ return unless File.file?(lockfile)
58
+ lockfile_contents = File.read(lockfile)
59
+ return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60
+ Regexp.last_match(1)
61
+ end
62
+
63
+ def bundler_version
64
+ @bundler_version ||= begin
65
+ env_var_version || cli_arg_version ||
66
+ lockfile_version || "#{Gem::Requirement.default}.a"
67
+ end
68
+ end
69
+
70
+ def load_bundler!
71
+ ENV["BUNDLE_GEMFILE"] ||= gemfile
72
+
73
+ # must dup string for RG < 1.8 compatibility
74
+ activate_bundler(bundler_version.dup)
75
+ end
76
+
77
+ def activate_bundler(bundler_version)
78
+ if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
79
+ bundler_version = "< 2"
80
+ end
81
+ gem_error = activation_error_handling do
82
+ gem "bundler", bundler_version
83
+ end
84
+ return if gem_error.nil?
85
+ require_error = activation_error_handling do
86
+ require "bundler/version"
87
+ end
88
+ return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION))
89
+ warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`"
90
+ exit 42
91
+ end
92
+
93
+ def activation_error_handling
94
+ yield
95
+ nil
96
+ rescue StandardError, LoadError => e
97
+ e
98
+ end
99
+ end
100
+
101
+ m.load_bundler!
102
+
103
+ if m.invoked_as_script?
104
+ load Gem.bin_path("bundler", "bundle")
105
+ end
data/bin/console ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "rake"
5
+
6
+ require "irb"
7
+ IRB.start
data/bin/rake CHANGED
@@ -1,33 +1,29 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- #--
4
- # Copyright (c) 2003, 2004, 2005, 2006, 2007 Jim Weirich
5
4
  #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to
8
- # deal in the Software without restriction, including without limitation the
9
- # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
- # sell copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
5
+ # This file was generated by Bundler.
12
6
  #
13
- # The above copyright notice and this permission notice shall be included in
14
- # all copies or substantial portions of the Software.
7
+ # The application 'rake' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
15
9
  #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
- # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22
- # IN THE SOFTWARE.
23
- #++
24
10
 
25
- begin
26
- require 'rubygems'
27
- gem 'rake'
28
- rescue LoadError
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
29
24
  end
30
25
 
31
- require 'rake'
26
+ require "rubygems"
27
+ require "bundler/setup"
32
28
 
33
- Rake.application.run
29
+ load Gem.bin_path("rake", "rake")
data/bin/rdoc ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rdoc' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rdoc", "rdoc")
data/bin/rubocop ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rubocop' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rubocop", "rubocop")