-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
93 lines (69 loc) · 3.03 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
require "rubygems"
task :default => ["test"]
task :test do exec "bash -l -c \"./test/suite\"" ; end
namespace :gem do
task :refresh do
exec "gem uninstall rvm ; rm -f pkg/*.gem ./rvm.gemspec && rake gemspec && rake build && gem install pkg/*.gem --no-rdoc --no-ri"
end
desc "Build the rvm gem."
task :build do
puts <<-LOCAL_INSTALL_WARNING
$(tput setaf 3)INSTALLING FROM SOURCE$(tput sgr0)
If you are using rvm from source, DO NOT build the gem.
Instead, run the following from the rvm source's root dir.
$(tput setaf 2)For installing/updating: ./install$(tput sgr0)
LOCAL_INSTALL_WARNING
puts "$(gem build rvm.gemspec)"
end
desc "Install the rvm gem (NO sudo)."
task :install do
%x{gem install rvm*.gem --no-rdoc --no-ri -l}
end
end
begin
require "jeweler"
require "lib/rvm/version"
Jeweler::Tasks.new do |gemspec|
gemspec.name = "rvm"
gemspec.version = RVM::Version::STRING
gemspec.summary = "Ruby Version Manager (rvm)"
gemspec.require_paths = ["lib"]
gemspec.date = Time.now.strftime("%Y-%m-%d")
gemspec.description = "Manages Ruby interpreter environments and switching between them."
gemspec.platform = Gem::Platform::RUBY
gemspec.files = [
"README", "sha1", "LICENCE", "rvm.gemspec", Dir::glob("lib/**/**"),
Dir::glob("releases/rvm-#{RVM::Version::STRING}.tar.gz*")
].flatten
gemspec.executables = Dir::glob("bin/rvm*").map{ |script| File::basename script }
gemspec.require_path = "lib"
gemspec.has_rdoc = File::exist?("doc")
gemspec.rdoc_options = ["--inline-source", "--charset=UTF-8"]
gemspec.authors = ["Wayne E. Seguin"]
gemspec.email = "[email protected]"
gemspec.homepage = "http://github.com/wayneeseguin/rvm"
gemspec.extensions << "extconf.rb" if File::exists?("extconf.rb")
gemspec.rubyforge_project = "rvm"
gemspec.post_install_message = <<-POST_INSTALL_MESSAGE
#{"*" * 80}
This gem contains only the Ruby libraries for the RVM Ruby API.
In order to install RVM please use one of the methods listed in the documentation
http://rvm.beginrescueend.com/rvm/install/
such as,
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-latest )
followed by placing the sourcing line in your ~/.bash_profile or wherever may
be appropriate for your setup (example, .zshenv, /etc/profile, ...):
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
After completing setup please open a new shell to use RVM and be sure to run
'rvm notes' to gain a list of dependencies to install before installing the
first Ruby. You can read more details about this process on the above
mentioned install page as well as the basics page:
http://rvm.beginrescueend.com/rvm/basics/
Enjoy!
~Wayne
#{"*" * 80}
POST_INSTALL_MESSAGE
end
rescue LoadError
puts "Jeweler not available. Install it with: gem install jeweler"
end