right_scraper 1.0.19 → 1.0.20

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,9 +28,9 @@ module RightScale
28
28
  # Windows specific watcher implementation
29
29
  class ProcessMonitor
30
30
 
31
- include Windows::Process
32
- include Windows::Synchronize
33
- include Windows::Handle
31
+ include ::Windows::Process
32
+ include ::Windows::Synchronize
33
+ include ::Windows::Handle
34
34
 
35
35
  # Spawn given process and callback given block with output and exit code
36
36
  #
@@ -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.19'
26
+ spec.version = '1.0.20'
27
27
  spec.authors = ['Raphael Simon']
28
28
  spec.email = 'raphael@rightscale.com'
29
29
  spec.homepage = 'https://github.com/rightscale/right_scraper'
@@ -40,7 +40,7 @@ describe RightScale::DownloadScraper do
40
40
  def setup_download_repo
41
41
  @download_repo_path = File.expand_path(File.join(File.dirname(__FILE__), '__download_repo'))
42
42
  @repo_path = File.join(File.dirname(__FILE__), '__repo')
43
- @repo_content = [ 'file1', { 'folder1' => [ 'file2', 'file3' ] }, { 'folder2' => [ { 'folder3' => [ 'file4' ] } ] } ]
43
+ @repo_content = [ { 'folder1' => [ 'file2', 'file3' ] }, { 'folder2' => [ { 'folder3' => [ 'file4' ] } ] }, 'file1' ]
44
44
  FileUtils.rm_rf(@download_repo_path)
45
45
  create_file_layout(@download_repo_path, @repo_content)
46
46
  @download_file = File.expand_path(File.join(File.dirname(__FILE__), '__download_file.tar'))
@@ -37,7 +37,7 @@ describe RightScale::GitScraper do
37
37
  def setup_git_repo
38
38
  @origin_path = File.expand_path(File.join(File.dirname(__FILE__), '__origin'))
39
39
  @repo_path = File.join(File.dirname(__FILE__), '__repo')
40
- @repo_content = [ 'file1', { 'folder1' => [ 'file2', 'file3' ] }, { 'folder2' => [ { 'folder3' => [ 'file4' ] } ] } ]
40
+ @repo_content = [ { 'folder1' => [ 'file2', 'file3' ] }, { 'folder2' => [ { 'folder3' => [ 'file4' ] } ] }, 'file1' ]
41
41
  FileUtils.rm_rf(@origin_path)
42
42
  FileUtils.mkdir_p(@origin_path)
43
43
  Dir.chdir(@origin_path) do
data/spec/spec_helper.rb CHANGED
@@ -91,18 +91,19 @@ module RightScale
91
91
  # layout(Array):: Corresponding layout as used by 'create_file_layout'
92
92
  def extract_file_layout(path, ignore=[])
93
93
  return [] unless File.directory?(path)
94
- layout = []
94
+ dirs = []
95
+ files = []
95
96
  ignore += [ '.', '..' ]
96
97
  Dir.foreach(path) do |f|
97
98
  next if ignore.include?(f)
98
99
  full_path = File.join(path, f)
99
100
  if File.directory?(full_path)
100
- layout << { f => extract_file_layout(full_path, ignore) }
101
+ dirs << { f => extract_file_layout(full_path, ignore) }
101
102
  else
102
- layout << f
103
+ files << f
103
104
  end
104
105
  end
105
- layout
106
+ dirs + files.sort
106
107
  end
107
108
 
108
109
 
@@ -37,9 +37,10 @@ describe RightScale::SvnScraper do
37
37
  def setup_svn_repo
38
38
  @svn_repo_path = File.expand_path(File.join(File.dirname(__FILE__), '__svn_repo'))
39
39
  @repo_path = File.join(File.dirname(__FILE__), '__repo')
40
- @repo_content = [ 'file1', { 'folder1' => [ 'file2', 'file3' ] },
41
- { 'folder2' => [ { 'folder3' => [ 'file4' ] },
42
- { 'folder5' => [ 'file6' ] } ] } ]
40
+ @repo_content = [ { 'folder1' => [ 'file2', 'file3' ] },
41
+ { 'folder2' => [ { 'folder3' => [ 'file4' ] },
42
+ { 'folder5' => [ 'file6' ] } ] },
43
+ 'file1' ]
43
44
  FileUtils.rm_rf(@svn_repo_path)
44
45
  res, status = exec("svnadmin create \"#{@svn_repo_path}\"")
45
46
  raise "Failed to initialize SVN repository: #{res}" unless status.success?
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.19
4
+ version: 1.0.20
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-06-18 00:00:00 -07:00
12
+ date: 2010-06-22 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15