runcoderun-gem_sync 1.1.6 → 1.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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.6
1
+ 1.2.0
@@ -38,6 +38,14 @@ ZenTest (3.10.0, 3.9.2, 3.9.1, 3.8.0, 3.6.0)]
38
38
  gems = Rcr::GemParser.convert_gem_list(list)
39
39
  gems.first.version.should == '<= 0.9.8'
40
40
  end
41
+
42
+ it "parses gem list" do
43
+ list = %[wirble (0.1.2) +ruby_186 # here is a gem]
44
+ gem = Rcr::GemParser.convert_gem_list(list).first
45
+ gem.name.should == "wirble"
46
+ gem.version.should == "0.1.2"
47
+ gem.platforms.should == ["ruby_186"]
48
+ end
41
49
  end
42
50
 
43
51
  describe "parsing platforms" do
@@ -5,6 +5,14 @@ describe Rcr::GemSync do
5
5
  def fake_gem(name, version)
6
6
  OpenStruct.new(:name => name, :version => version)
7
7
  end
8
+
9
+ describe "init" do
10
+ before { Rcr::GemSync.any_instance.stubs(:system) }
11
+ it "inits with options from opt parser" do
12
+ gem_sync = Rcr::GemSync.new(["--verbose"])
13
+ gem_sync.should be_verbose
14
+ end
15
+ end
8
16
 
9
17
  describe "sync" do
10
18
  it "should read gem list, install each gem, ..." do
@@ -88,7 +96,7 @@ EOL
88
96
  it "should attempt to install if there are dashes in the name" do
89
97
  gem = fake_gem("user-gem", '1.0.0')
90
98
  gem_sync = Rcr::GemSync.new
91
- gem_sync.expects(:run).never
99
+ gem_sync.expects(:run).with(includes("user-gem")).once
92
100
  gem_sync.install_from_github(gem)
93
101
  end
94
102
  end
@@ -19,4 +19,16 @@ describe Rcr::OptionParsing do
19
19
  end
20
20
  end
21
21
 
22
+ describe "verbose" do
23
+ it "can be extra verbose" do
24
+ opts = Rcr::OptionParsing.parse(["--verbose-gem"])
25
+ opts[:verbose_gem].should be_true
26
+ end
27
+
28
+ it "can be verbose" do
29
+ opts = Rcr::OptionParsing.parse(["-v"])
30
+ opts[:verbose].should be_true
31
+ end
32
+ end
33
+
22
34
  end
data/gem_sync.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gem_sync}
8
- s.version = "1.1.6"
8
+ s.version = "1.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 = ["Rob Sanheim"]
12
- s.date = %q{2009-09-06}
12
+ s.date = %q{2009-09-09}
13
13
  s.default_executable = %q{gem_sync}
14
14
  s.description = %q{Tool to install rubygems for RunCodeRun, though it could be used to bootstrap your own machines as well.}
15
15
  s.email = %q{rob@runcoderun.com}
data/lib/rcr/gem_sync.rb CHANGED
@@ -9,12 +9,12 @@ module Rcr
9
9
  RCR_GITHUB_GEM_LIST = "http://github.com/runcoderun/gem_sync/raw/master/lib/runcoderun_gems.txt"
10
10
  RCR_GITHUB_GEM_BLACKLIST = "http://github.com/runcoderun/gem_sync/raw/master/lib/gem_blacklist.txt"
11
11
 
12
+ attr_reader :platform, :gem_list
13
+
12
14
  def initialize(args = ["--github"])
13
- options = Rcr::OptionParsing.parse(args)
14
- @platform = options[:platform]
15
- @verbose = options[:verbose]
16
- @dry_run = options[:dry_run]
17
- @gem_list = options[:gem_list]
15
+ @options = Rcr::OptionParsing.parse(args)
16
+ @platform = @options[:platform]
17
+ @gem_list = @options[:gem_list]
18
18
  system("gem env") if verbose?
19
19
  end
20
20
 
@@ -25,11 +25,15 @@ module Rcr
25
25
  end
26
26
 
27
27
  def verbose?
28
- @verbose
28
+ @options[:verbose]
29
+ end
30
+
31
+ def verbose_gem?
32
+ @options[:verbose_gem]
29
33
  end
30
34
 
31
35
  def dry_run?
32
- @dry_run
36
+ @options[:dry_run]
33
37
  end
34
38
 
35
39
  def read_gem_list
@@ -37,15 +41,15 @@ module Rcr
37
41
  end
38
42
 
39
43
  def platform_matches?(gem)
40
- if gem.platforms && @platform
41
- gem.platforms.include?(@platform)
44
+ if gem.platforms && platform
45
+ gem.platforms.include?(platform)
42
46
  else
43
47
  true
44
48
  end
45
49
  end
46
50
 
47
51
  def parse_gems
48
- @gems = Rcr::GemParser.convert_gem_list(@gem_list)
52
+ @gems = Rcr::GemParser.convert_gem_list(gem_list)
49
53
  end
50
54
 
51
55
  def install_gems
@@ -78,6 +82,7 @@ module Rcr
78
82
  def install_from_rubyforge(rubygem)
79
83
  cmd = "gem install #{rubygem.name} --no-ri --no-rdoc"
80
84
  cmd << " --version #{rubygem.version}" if rubygem.version
85
+ cmd << " --verbose" if verbose_gem?
81
86
  run(cmd)
82
87
  end
83
88
 
@@ -85,6 +90,7 @@ module Rcr
85
90
  return unless rubygem.name.include?("-")
86
91
  cmd = "gem install #{rubygem.name} --no-ri --no-rdoc"
87
92
  cmd << " --version #{rubygem.version}" if rubygem.version
93
+ cmd << " --verbose" if verbose_gem?
88
94
  cmd << " --source #{GITHUB}"
89
95
  run(cmd)
90
96
  end
@@ -22,6 +22,10 @@ module Rcr
22
22
  options[:verbose] = o
23
23
  end
24
24
 
25
+ opts.on('--verbose-gem', "Be verbose when calling gem commands") do |o|
26
+ options[:verbose_gem] = o
27
+ end
28
+
25
29
  opts.on('-n', '--dry-run', 'Do a dry run without executing actions') do |o|
26
30
  options[:dry_run] = o
27
31
  end
@@ -23,10 +23,12 @@ aws-s3
23
23
  bacon
24
24
  bcrypt-ruby (2.0.5, 2.0.3) +ruby_186
25
25
  beanstalk-client
26
+ bmabey-fakefs
27
+ BRIMIL01-meetup_api
28
+ binarylogic-authlogic
26
29
  bj
27
30
  bmabey-email_spec
28
31
  builder (2.1.2)
29
- cache_money
30
32
  camping (1.5)
31
33
  capistrano
32
34
  capistrano-ext
@@ -34,7 +36,6 @@ cgi_multipart_eof_fix (2.5.0)
34
36
  chrisk-fakeweb
35
37
  chronic
36
38
  coderay
37
- colors
38
39
  configatron (2.2.2, 2.1.5)
39
40
  configuration
40
41
  context
@@ -59,7 +60,7 @@ dm-tags (0.9.11)
59
60
  dm-validations (0.9.11)
60
61
  dnsruby (1.26, 1.24, 1.2)
61
62
  do_mysql +ruby_186 +ruby_191
62
- echoe (3.1.1, 3.0.2, 3)
63
+ echoe
63
64
  editalign
64
65
  erubis
65
66
  eventmachine
@@ -72,11 +73,11 @@ facon
72
73
  faker
73
74
  fakeweb
74
75
  fastercsv (1.4.0, 1.2.3)
75
- fastthread (1.0.7, 1.0.1)
76
+ fastthread (1.0.7, 1.0.1) +ruby_186
76
77
  fattr
77
78
  feed-normalizer
78
79
  feedvalidator
79
- ferret
80
+ ferret +ruby_186
80
81
  fireeagle
81
82
  flay (1.3.0, 1.2.1)
82
83
  flexmock
@@ -98,7 +99,7 @@ hashtostruct
98
99
  heckle (1.4.2, 1.4.1)
99
100
  highline (1.5.0, 1.4.0)
100
101
  hoe (1.12.2, 1.8.3, 1.8.2, 1.7.0)
101
- hpricot (0.8.1, 0.6.164, 0.6) +ruby_186 +ruby_191
102
+ hpricot +ruby_186 +ruby_191
102
103
  htmlentities (4.0.0)
103
104
  httparty
104
105
  httpauth
@@ -148,10 +149,8 @@ merb-mailer (0.9.9)
148
149
  merb-manage (0.4)
149
150
  merb-more (0.9.9)
150
151
  metaid (1.0)
151
- metric_fu
152
152
  mhennemeyer-output_catcher
153
153
  mime-types (1.16, 1.15)
154
- minitar
155
154
  mislav-hanna
156
155
  mislav-will_paginate (2.3.11, 2.3.4)
157
156
  mixlib-cli
@@ -166,7 +165,7 @@ mongrel
166
165
  mosquito (0.1.4, 0.1.3)
167
166
  mwmitchell-rsolr
168
167
  mwmitchell-material_girl
169
- mysql (2.7) +ruby_186 +ruby_191
168
+ mysql +ruby_186 +ruby_191
170
169
  nagoro
171
170
  net-ssh (2.0.11, 2.0.4)
172
171
  newgem
@@ -174,7 +173,7 @@ nokogiri (1.3.2)
174
173
  oauth
175
174
  obsidian
176
175
  ohai
177
- oniguruma (1.1.0) +ruby_186
176
+ oniguruma +ruby_186
178
177
  open4
179
178
  opscode-ohai
180
179
  opscode-mixlib-cli (1.0.4)
@@ -202,12 +201,12 @@ rake (0.8.7, 0.8.4, 0.8.3)
202
201
  railroad
203
202
  rc-rest
204
203
  rdiscount
205
- RedCloth (4.1.9, 4.1.1, 4.0.3, 4.0.1, 3.0.4, 3.0.3)
204
+ RedCloth (4.1.9, 4.1.1) +ruby_186
205
+ RedCloth # latest version _should_ work on 191 and 186
206
206
  redgreen
207
207
  reek (1.1.3)
208
208
  relevance-cap_gun
209
209
  relevance-castronaut (0.3.6)
210
- relevance-github_hook
211
210
  relevance-grit
212
211
  relevance-log_buddy
213
212
  relevance-multi_rails
@@ -218,7 +217,6 @@ relevance-test-spec
218
217
  remarkable
219
218
  remarkable_activerecord
220
219
  remarkable_rails
221
- remarkably
222
220
  rest-client (0.9.2, 0.7)
223
221
  right_aws
224
222
  rio
@@ -231,8 +229,8 @@ rspec (1.2.7, 1.2.4, 1.1.8, 1.1.4)
231
229
  rspec-rails (1.2.7.1, 1.2.4, 1.2.2, 1.2.0, 1.1.12, 1.1.11)
232
230
  rspec_hpricot_matchers
233
231
  rubigen
234
- ruby-aaws
235
- ruby-debug (0.10.2)
232
+ ruby-aaws +ruby_191 # ruby 187 and above only
233
+ ruby-debug
236
234
  ruby-hmac (0.3.2)
237
235
  ruby-json
238
236
  ruby-net-ldap
@@ -243,13 +241,12 @@ rubygems-update
243
241
  RubyInline (3.8.1, 3.7.0)
244
242
  rubyzip
245
243
  ruby_parser (2.0.3, 2.0.2)
246
- ruby-xslt
244
+ ruby-xslt +ruby_186
247
245
  rubyist-aasm
248
246
  runcoderun-configatron
249
247
  runcoderun-gem_sync
250
248
  ruport
251
- schacon-git (1.0.7)
252
- selenium
249
+ schacon-git
253
250
  selenium-client
254
251
  session
255
252
  sexp_processor (3.0.1)
@@ -258,7 +255,6 @@ sinatra
258
255
  spicycode-micronaut
259
256
  spicycode-micronaut-rails
260
257
  spork
261
- sql-parser
262
258
  sqlite3-ruby (1.2.4, 1.2.3, 1.2.1) +ruby_186 +ruby_191
263
259
  starling
264
260
  starling-starling
@@ -269,14 +265,12 @@ systemu (1.2.0)
269
265
  system_timer +ruby_186 +ruby_191
270
266
  taf2-curb
271
267
  tagz
272
- technicalpickles-echoe
273
268
  technicalpickles-jeweler
274
269
  term-ansicolor
275
- termios
270
+ termios +ruby_186 # 0.9.4 gem does not build against 1.9.1 -- looks like it needs to be built from source
276
271
  test-spec
277
272
  test-unit (1.2.3) +ruby_191
278
273
  thin
279
- thinking_sphinx
280
274
  thoughtbot-clearance
281
275
  thoughtbot-factory_girl (1.2.1, 1.1.3)
282
276
  thoughtbot-paperclip (2.3.0, 2.3.1)
@@ -300,6 +294,5 @@ xmlelements
300
294
  xml-simple
301
295
  yajl-ruby
302
296
  yard
303
- vizier
304
297
  ym4r
305
298
  ZenTest (4.0.0, 3.11.1, 3.10.0)
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: 1.1.6
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Sanheim
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-06 00:00:00 -07:00
12
+ date: 2009-09-09 00:00:00 -07:00
13
13
  default_executable: gem_sync
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -52,7 +52,6 @@ files:
52
52
  - lib/runcoderun_gems.txt
53
53
  has_rdoc: false
54
54
  homepage: http://github.com/runcoderun/gem_sync
55
- licenses:
56
55
  post_install_message:
57
56
  rdoc_options:
58
57
  - --charset=UTF-8
@@ -73,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
72
  requirements: []
74
73
 
75
74
  rubyforge_project:
76
- rubygems_version: 1.3.5
75
+ rubygems_version: 1.2.0
77
76
  signing_key:
78
77
  specification_version: 3
79
78
  summary: gem_sync