right_scraper 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -73,6 +73,7 @@ module RightScale
73
73
  # 'Invalid repository type':: If repository type is not known
74
74
  def scrape(repo, &callback)
75
75
  repo = RightScale::Repository.from_hash(repo) if repo.is_a?(Hash)
76
+ repo.repo_type = repo.repo_type.to_s # In case it's a symbol
76
77
  raise "Invalid repository type" unless SCRAPERS.include?(repo.repo_type)
77
78
  @scraper = @scrapers[repo.repo_type] ||= SCRAPERS[repo.repo_type].new(@scrape_dir, @max_bytes, @max_seconds)
78
79
  @scraper.scrape(repo, &callback)
@@ -90,15 +90,15 @@ module RightScale
90
90
  if is_tag && is_branch
91
91
  @errors << 'Repository tag ambiguous: could be git tag or git branch'
92
92
  elsif is_branch
93
- res += `git branch #{@repo.tag} origin/#{@repo.tag} 2>&1`
94
- @errors << res if $? != 0
93
+ output = `git branch #{@repo.tag} origin/#{@repo.tag} 2>&1`
94
+ @errors << output if $? != 0
95
95
  elsif !is_tag # Not a branch nor a tag, SHA ref? fetch everything so we have all SHAs
96
- res += `#{ssh_cmd} git fetch origin master --depth #{2**31 - 1} 2>&1`
97
- @errors << res if $? != 0
96
+ output = `#{ssh_cmd} git fetch origin master --depth #{2**31 - 1} 2>&1`
97
+ @errors << output if $? != 0
98
98
  end
99
99
  if succeeded?
100
- res += `git checkout #{@repo.tag} 2>&1`
101
- @errors << res if $? != 0
100
+ output = `git checkout #{@repo.tag} 2>&1`
101
+ @errors << output if $? != 0
102
102
  end
103
103
  end
104
104
  end
@@ -23,7 +23,7 @@ require 'rubygems'
23
23
 
24
24
  spec = Gem::Specification.new do |spec|
25
25
  spec.name = 'right_scraper'
26
- spec.version = '1.0.7'
26
+ spec.version = '1.0.8'
27
27
  spec.authors = ['Raphael Simon']
28
28
  spec.email = 'raphael@rightscale.com'
29
29
  spec.homepage = 'https://github.com/rightscale/right_scraper'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_scraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raphael Simon
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-09 00:00:00 -08:00
12
+ date: 2010-02-12 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15