mgem 0.0.3 → 0.0.4
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.
- data/lib/mgem.rb +2 -3
- metadata +1 -1
data/lib/mgem.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'yaml'
|
|
2
2
|
require 'fileutils'
|
|
3
3
|
|
|
4
|
-
MGEM_VERSION = '0.0.
|
|
4
|
+
MGEM_VERSION = '0.0.4'
|
|
5
5
|
|
|
6
6
|
MGEM_DIR = '.mgem'
|
|
7
7
|
GEMS_ACTIVE = 'GEMS_ACTIVE.lst'
|
|
@@ -92,7 +92,6 @@ class MrbgemList
|
|
|
92
92
|
def activate(gem_name)
|
|
93
93
|
if check_gem(gem_name)
|
|
94
94
|
gems = active + @gems.select {|g| g.name == gem_name}
|
|
95
|
-
gems.uniq!
|
|
96
95
|
save_active_gems(gems)
|
|
97
96
|
puts "'#{gem_name}' activated!"
|
|
98
97
|
else
|
|
@@ -131,7 +130,7 @@ class MrbgemList
|
|
|
131
130
|
|
|
132
131
|
def save_active_gems(active_gem_list)
|
|
133
132
|
File.open(@config[:mgem_active], 'w+') do |f|
|
|
134
|
-
active_gem_list.
|
|
133
|
+
active_gem_list.uniq.each do |mrbgem|
|
|
135
134
|
f.puts mrbgem.name
|
|
136
135
|
end
|
|
137
136
|
end
|