rvmify 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,50 @@
1
+ h1. rvmify
2
+
3
+ Give each of your projects it's own RVM gemset and use Bundler to install the required gems.
4
+
5
+ Based on this implementation by Wayne E. Seguin
6
+ http://gist.github.com/439102
7
+
8
+ h2. Installation
9
+
10
+ gem install rvmify
11
+
12
+ h2. Usage
13
+
14
+ <pre><code>
15
+ cd my_project
16
+ rvmify .
17
+ </code></pre>
18
+
19
+ Or do it with ruby:
20
+
21
+ <pre><code>
22
+ Dir.glob("*").each do |dir|
23
+ Rvmify.generate(dir)
24
+ end
25
+ </code></pre>
26
+
27
+ Make sure you have the following line in the .rvmrc file in your home directory:
28
+
29
+ <pre><code>
30
+ export rvm_gemset_create_on_use_flag=1
31
+ </code></pre>
32
+
33
+ h2. Todo
34
+
35
+ * Use Thor for generators
36
+ * figure out how to handle bundler updates
37
+
38
+ h2. Note on Patches/Pull Requests
39
+
40
+ * Fork the project.
41
+ * Make your feature addition or bug fix.
42
+ * Add tests for it. This is important so I don't break it in a
43
+ future version unintentionally.
44
+ * Commit, do not mess with rakefile, version, or history.
45
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
46
+ * Send me a pull request. Bonus points for topic branches.
47
+
48
+ h2. Copyright
49
+
50
+ Copyright (c) 2010 Steve Agalloco. See LICENSE for details.
data/bin/rvmify CHANGED
@@ -1,9 +1,17 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'rvmify'
3
3
 
4
+ def usage
5
+ puts "To use rvmify, you must specify a directory."
6
+ puts
7
+ puts "Examples: rvmify ."
8
+ puts " rmvify /path/to/myproject"
9
+ abort
10
+ end
11
+
4
12
  dir = ARGV.shift
5
13
 
6
- abort("No directory found") if dir.nil?
14
+ usage if dir.nil?
7
15
 
8
16
  begin
9
17
  Rvmify.generate(File.expand_path(dir))
@@ -1,5 +1,5 @@
1
1
  module Rvmify
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
 
4
4
  class << self
5
5
 
@@ -17,7 +17,7 @@ module Rvmify
17
17
  ruby_path = `which ruby`.strip
18
18
  ruby_version = File.basename(ruby_path.gsub(/\/bin\/ruby/,''))
19
19
 
20
- gem_home = `echo $GEM_HOME` # /Users/steve/.rvm/gems/ree-1.8.7-2010.02
20
+ gem_home = `echo $GEM_HOME`
21
21
  environment_path = gem_home.gsub('/gems/', '/environments/').strip
22
22
 
23
23
  # Project specific .rvmrc file
@@ -28,7 +28,7 @@ else
28
28
  rvm --create use "#{ruby_version}"
29
29
  fi
30
30
 
31
- [[ -s "#{project_name}.gems" ]] && rvm gemset import #{project_name}.gems
31
+ [[ -s "#{project_name}.gems" ]] && rvm gemset use #{project_name}
32
32
 
33
33
  bundle install
34
34
  END
@@ -5,24 +5,24 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvmify}
8
- s.version = "0.1.0"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Steve Agalloco"]
12
- s.date = %q{2010-06-24}
12
+ s.date = %q{2010-07-02}
13
13
  s.default_executable = %q{rvmify}
14
14
  s.description = %q{get up and running quickly with rvm, gemsets and bundler}
15
15
  s.email = %q{steve.agalloco@gmail.com}
16
16
  s.executables = ["rvmify"]
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE",
19
- "README.rdoc"
19
+ "README.textile"
20
20
  ]
21
21
  s.files = [
22
22
  ".document",
23
23
  ".gitignore",
24
24
  "LICENSE",
25
- "README.rdoc",
25
+ "README.textile",
26
26
  "Rakefile",
27
27
  "bin/rvmify",
28
28
  "lib/rvmify.rb",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rvmify
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 0.1.0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Steve Agalloco
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-24 00:00:00 -04:00
18
+ date: 2010-07-02 00:00:00 -04:00
19
19
  default_executable: rvmify
20
20
  dependencies: []
21
21
 
@@ -27,12 +27,12 @@ extensions: []
27
27
 
28
28
  extra_rdoc_files:
29
29
  - LICENSE
30
- - README.rdoc
30
+ - README.textile
31
31
  files:
32
32
  - .document
33
33
  - .gitignore
34
34
  - LICENSE
35
- - README.rdoc
35
+ - README.textile
36
36
  - Rakefile
37
37
  - bin/rvmify
38
38
  - lib/rvmify.rb
@@ -1,21 +0,0 @@
1
- = rvmify
2
-
3
- Description goes here.
4
-
5
- Dir.glob("*").each do |dir|
6
- Rvmify.generate(dir)
7
- end
8
-
9
- == Note on Patches/Pull Requests
10
-
11
- * Fork the project.
12
- * Make your feature addition or bug fix.
13
- * Add tests for it. This is important so I don't break it in a
14
- future version unintentionally.
15
- * Commit, do not mess with rakefile, version, or history.
16
- (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
17
- * Send me a pull request. Bonus points for topic branches.
18
-
19
- == Copyright
20
-
21
- Copyright (c) 2010 Steve Agalloco. See LICENSE for details.