fnando-renv 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -32,9 +32,25 @@ Here's the supported commands
32
32
  renv install "twitter4r xmpp4r"
33
33
  #=> install multiple gems
34
34
 
35
+ renv install fnando-recurrence -s http://gems.github.com
36
+ #=> install a gem from github
37
+
38
+ renv install fnando-recurrence -s github
39
+ #=> install a gem from github using the shortcut
40
+
35
41
  renv uninstall json
36
42
  #=> uninstall json
37
43
 
44
+ renv uninstall "twitter4r xmpp4r"
45
+ #=> uninstall multiple gems
46
+
47
+ renv update json
48
+ #=> update an installed gem
49
+
50
+ renv update fnando-recurrence -s http://gems.github.com
51
+ renv update fnando-recurrence -s github
52
+ #=> update an installed gem using source
53
+
38
54
  renv env
39
55
  #=> display current environment
40
56
 
data/bin/renv CHANGED
@@ -131,6 +131,32 @@ Main {
131
131
  run { Renv::Env.delete(name) }
132
132
  }
133
133
 
134
+ mode(:update) {
135
+ description <<-TXT
136
+ Update an installed RubyGem.
137
+ TXT
138
+
139
+ examples <<-TXT
140
+ * renv update json
141
+ TXT
142
+
143
+ argument(:name) {
144
+ attr
145
+ }
146
+
147
+ option(:source, :s) {
148
+ optional
149
+ argument :required
150
+ desc "Gem source"
151
+ attr
152
+ }
153
+
154
+ run {
155
+ Renv.puts_current_environment
156
+ Renv::Gem.update(:name => name, :source => source)
157
+ }
158
+ }
159
+
134
160
  mode(:install) {
135
161
  description <<-TXT
136
162
  Install a new RubyGem.
@@ -141,6 +167,7 @@ Main {
141
167
  * renv install json --version=1.1.3
142
168
  * renv install fnando-recurrence --source=http://gems.github.com
143
169
  * renv install fnando-recurrence --source=github
170
+ * renv install "json twitter4r xmpp4r"
144
171
  TXT
145
172
 
146
173
  argument(:name) {
@@ -175,6 +202,7 @@ Main {
175
202
  examples <<-TXT
176
203
  * renv uninstall json
177
204
  * renv uninstall json --version=1.1.3
205
+ * renv uninstall "json twitter4r xmpp4r"
178
206
  TXT
179
207
 
180
208
  argument(:name) {
data/lib/renv.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Renv
2
2
  extend self
3
3
 
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.3"
5
5
 
6
6
  def dir
7
7
  ENV["RENVDIR"] || File.expand_path("~/.renv")
data/lib/renv/gem.rb CHANGED
@@ -17,6 +17,16 @@ module Renv
17
17
  system cmd
18
18
  end
19
19
 
20
+ def update(options)
21
+ cmd = "gem update #{options[:name]}"
22
+ cmd << " --no-rdoc --no-ri"
23
+ cmd << " -i #{File.join(Renv.dir, Renv.env)}/lib"
24
+ cmd << " -n #{File.join(Renv.dir, Renv.env)}/bin"
25
+ cmd << " --source=#{SOURCES[options[:source]] || options[:source]}" if options[:source]
26
+
27
+ system cmd
28
+ end
29
+
20
30
  def uninstall(options)
21
31
  cmd = "gem uninstall #{options[:name]}"
22
32
  cmd << " -i #{File.join(Renv.dir, Renv.env)}/lib"
data/renv.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.executables = ["renv"]
12
12
  s.summary = "Renv is a simple and dumb environment manager for RubyGems."
13
13
  s.add_dependency "main", ">= 0"
14
- s.version = "0.0.2"
14
+ s.version = "0.0.3"
15
15
  s.require_paths = ["lib"]
16
16
  s.files = ["Rakefile",
17
17
  "renv.gemspec",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fnando-renv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira