gemtronics 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/gemtronics/manager.rb +4 -0
  2. metadata +1 -1
@@ -9,9 +9,11 @@ module Gemtronics
9
9
 
10
10
  # A Hash of all the groups that have been defined.
11
11
  attr_accessor :groups
12
+ attr_accessor :installed_gems # :nodoc:
12
13
 
13
14
  def initialize # :nodoc:
14
15
  reset!
16
+ self.installed_gems = []
15
17
  end
16
18
 
17
19
  # Creates, or reopens a new group of gems. It takes the name of the
@@ -143,6 +145,7 @@ module Gemtronics
143
145
  end
144
146
  puts cmd
145
147
  system cmd
148
+ self.installed_gems << "#{g[:name]}-#{g[:version]}"
146
149
  end
147
150
  end
148
151
  end
@@ -160,6 +163,7 @@ module Gemtronics
160
163
  private
161
164
  def gem_installed?(name, version) # :nodoc:
162
165
  begin
166
+ return true if self.installed_gems.include?("#{name}-#{version}")
163
167
  gem(name, version)
164
168
  return true
165
169
  rescue Gem::LoadError => e
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemtronics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates