runcoderun-gem_sync 0.4.1 → 0.4.2
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/bin/gem_sync +1 -0
- data/gem_sync.gemspec +2 -2
- data/lib/rcr/gem_sync.rb +13 -8
- data/lib/runcoderun_gems.txt +6 -2
- data/spec/gem_sync_spec.rb +20 -1
- metadata +2 -2
data/bin/gem_sync
CHANGED
data/gem_sync.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{gem_sync}
|
3
|
-
s.version = "0.4.
|
3
|
+
s.version = "0.4.2"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new("= 1.2") if s.respond_to? :required_rubygems_version=
|
6
6
|
s.authors = ["Rob Sanheim @ Relevance"]
|
7
|
-
s.date = %q{2008-10-
|
7
|
+
s.date = %q{2008-10-14}
|
8
8
|
s.default_executable = %q{gem_sync}
|
9
9
|
s.description = %q{Tool to install dependencies for RunCodeRun, though it could be used to bootstrap your own machines as well.}
|
10
10
|
s.email = %q{rob@runcoderun.com}
|
data/lib/rcr/gem_sync.rb
CHANGED
@@ -2,13 +2,14 @@ require 'ostruct'
|
|
2
2
|
|
3
3
|
module Rcr
|
4
4
|
class GemSync
|
5
|
-
VERSION = '0.4.
|
5
|
+
VERSION = '0.4.2'
|
6
6
|
GITHUB = "http://gems.github.com"
|
7
|
-
|
8
|
-
|
9
|
-
def self.install_gems
|
7
|
+
RCR_DEFAULT_GEM_LIST = File.expand_path(File.join(File.dirname(__FILE__), *%w[.. runcoderun_gems.txt]))
|
8
|
+
|
9
|
+
def self.install_gems(gem_list = RCR_DEFAULT_GEM_LIST)
|
10
10
|
update_self
|
11
|
-
|
11
|
+
read_gem_list(gem_list)
|
12
|
+
install_gems_from_list
|
12
13
|
update_gems
|
13
14
|
end
|
14
15
|
|
@@ -16,14 +17,18 @@ module Rcr
|
|
16
17
|
puts `gem update runcoderun-gem_sync --source #{GITHUB}`
|
17
18
|
end
|
18
19
|
|
20
|
+
def self.read_gem_list(gem_list)
|
21
|
+
puts "Running gem_sync with list: #{gem_list}."
|
22
|
+
@@gem_list = File.read(gem_list)
|
23
|
+
end
|
24
|
+
|
19
25
|
def self.update_gems
|
20
26
|
puts "Updating all gems to latest..."
|
21
27
|
puts `gem update`
|
22
28
|
end
|
23
29
|
|
24
|
-
def self.
|
25
|
-
gem_list
|
26
|
-
convert_gem_list(gem_list).each do |gem|
|
30
|
+
def self.install_gems_from_list
|
31
|
+
convert_gem_list(@@gem_list).each do |gem|
|
27
32
|
if gem_installed?(gem.name, gem.version)
|
28
33
|
puts "skipping #{gem.name} #{gem.version} - already installed..."
|
29
34
|
next
|
data/lib/runcoderun_gems.txt
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
activesupport (2.1.1, 2.1.0, 2.0.2, 2.0.1, 1.4.4)
|
2
2
|
acts_as_reportable (1.1.1)
|
3
|
+
addressable (1.0.4)
|
3
4
|
allison (2.0.3)
|
4
5
|
archive-tar-minitar (0.5.2)
|
5
6
|
arrayfields (4.6.0)
|
@@ -15,11 +16,14 @@ dancroak-clearance-admin (0.0.1)
|
|
15
16
|
dancroak-ruby-summize (0.4)
|
16
17
|
dancroak-twitter-search (0.5)
|
17
18
|
dancroak-validates_email_format_of (1.2.1)
|
19
|
+
data_objects (0.9.6)
|
18
20
|
daemons (1.0.10)
|
19
21
|
diff-lcs (1.1.2)
|
20
22
|
dnsruby (1.2)
|
23
|
+
do_sqlite3 (0.9.5)
|
21
24
|
echoe (3)
|
22
25
|
expectations (1.2.0)
|
26
|
+
extlib (0.9.5)
|
23
27
|
facets (2.4.4, 2.4.1, 2.3.0, 2.2.1, 2.2.0, 2.1.3, 2.0.5)
|
24
28
|
factory_girl
|
25
29
|
fastercsv (1.2.3)
|
@@ -72,8 +76,8 @@ relevance-multi_rails (0.0.7)
|
|
72
76
|
relevance-rubycas-server (0.6.99)
|
73
77
|
relevance-tarantula (0.0.5)
|
74
78
|
relevance-github_hook (0.5.8)
|
75
|
-
right_aws
|
76
|
-
ruby-hmac
|
79
|
+
right_aws (1.8.1)
|
80
|
+
ruby-hmac (0.3.2)
|
77
81
|
rmagick (2.5.2)
|
78
82
|
rspec (1.1.4)
|
79
83
|
ruby-debug (0.10.2)
|
data/spec/gem_sync_spec.rb
CHANGED
@@ -1,8 +1,27 @@
|
|
1
1
|
require 'test/spec'
|
2
|
-
|
2
|
+
require 'mocha'
|
3
3
|
require File.join(File.dirname(__FILE__), *%w[.. lib rcr gem_sync])
|
4
4
|
|
5
5
|
describe 'GemSync' do
|
6
|
+
|
7
|
+
describe "reading file" do
|
8
|
+
before do
|
9
|
+
Rcr::GemSync.stubs :update_self
|
10
|
+
Rcr::GemSync.stubs :install_gems_from_list
|
11
|
+
Rcr::GemSync.stubs :update_gems
|
12
|
+
end
|
13
|
+
|
14
|
+
it "allows overriding gem list file" do
|
15
|
+
File.expects(:read).with("/my/gems.txt")
|
16
|
+
Rcr::GemSync.install_gems "/my/gems.txt"
|
17
|
+
end
|
18
|
+
|
19
|
+
it "reads file for gem list" do
|
20
|
+
File.expects(:read).with("/my/gems.txt")
|
21
|
+
Rcr::GemSync.read_gem_list "/my/gems.txt"
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
6
25
|
|
7
26
|
describe "parsing a gem list" do
|
8
27
|
it "parses gem list" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runcoderun-gem_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Sanheim @ Relevance
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-10-
|
12
|
+
date: 2008-10-14 00:00:00 -07:00
|
13
13
|
default_executable: gem_sync
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|