right_scraper 5.2.4 → 5.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/right_scraper-retrieve +1 -0
- data/lib/right_scraper/main.rb +13 -2
- data/lib/right_scraper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1154c162499f75a8304bcbb3ce686e071750be25
|
4
|
+
data.tar.gz: 817e562768facce3d8d56f82fd2cc152a99d3c33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c9b09ecb6077caddb0d14e6c7f707c51e6610cb594789f4fe42ef5837eb8281762ae17699fe35ca2c01a44c747d5e7cf1d2148c8e92418da714c60b7dd0d750
|
7
|
+
data.tar.gz: e8bbe7fcd4f632cab82457ff09daf93c8ab8f65731e3be4ce1b741a07b25154a031f194f9021b46cac4d8f9404384c19dc5a36ed2746677b86066db9c9d545b8
|
data/bin/right_scraper-retrieve
CHANGED
@@ -58,6 +58,7 @@ begin
|
|
58
58
|
# remove any credentials from repository after retrieval; not needed in
|
59
59
|
# order to run scanners subsequently.
|
60
60
|
%w(first_credential second_credential).each { |k| repository.delete(k) }
|
61
|
+
repository['tag'] = retrieved[:repository].revision # send back commit SHA, if any, for comparison
|
61
62
|
retrieved[:repository] = repository
|
62
63
|
retrieved[:warnings] = main.warnings unless main.warnings.empty?
|
63
64
|
$stdout.puts(::JSON.generate(retrieved))
|
data/lib/right_scraper/main.rb
CHANGED
@@ -131,8 +131,14 @@ module RightScraper
|
|
131
131
|
def retrieve(repo)
|
132
132
|
errorlen = errors.size
|
133
133
|
unless repo.kind_of?(::RightScraper::Repositories::Base)
|
134
|
-
repo =
|
134
|
+
repo = ::RightSupport::Data::Mash.new(repo)
|
135
|
+
repository_hash = repo.delete(:repository_hash) # optional
|
136
|
+
repo = RightScraper::Repositories::Base.from_hash(repo)
|
137
|
+
if repository_hash && repository_hash != repo.repository_hash
|
138
|
+
raise RightScraper::Error, "Repository hash mismatch: #{repository_hash} != #{repo.repository_hash}"
|
139
|
+
end
|
135
140
|
end
|
141
|
+
|
136
142
|
retriever = nil
|
137
143
|
|
138
144
|
# 1. Retrieve the files
|
@@ -170,7 +176,12 @@ module RightScraper
|
|
170
176
|
options = ::RightSupport::Data::Mash.new(@options).merge(retrieved)
|
171
177
|
repo = options[:repository]
|
172
178
|
unless repo.kind_of?(::RightScraper::Repositories::Base)
|
173
|
-
repo =
|
179
|
+
repo = ::RightSupport::Data::Mash.new(repo)
|
180
|
+
repository_hash = repo.delete(:repository_hash) # optional
|
181
|
+
repo = RightScraper::Repositories::Base.from_hash(repo)
|
182
|
+
if repository_hash && repository_hash != repo.repository_hash
|
183
|
+
raise RightScraper::Error, "Repository hash mismatch: #{repository_hash} != #{repo.repository_hash}"
|
184
|
+
end
|
174
185
|
options[:repository] = repo
|
175
186
|
end
|
176
187
|
@logger.operation(:scraping, options[:repo_dir]) do
|
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: 5.2.
|
4
|
+
version: 5.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raphael Simon
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-03-
|
13
|
+
date: 2016-03-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: right_aws
|