gem_collector 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f62c3065898613d6ad21af8ceee702138929a5016a1f36baa3f8944491eca5ab
|
4
|
+
data.tar.gz: 414aef8ebb73504c71ef93ab3091d8b9ae1ebbc6c113fb548358483fa3f543bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64a6c803cd6a95402b0adf9724d6c48d33b3a3d33b66e2f2fd6625597c95a6e41ca2b777381d43ad1619115a93869f82b6207fbeebc5ecd08560f2392278bc91
|
7
|
+
data.tar.gz: 1a1b404f03b8a5c592eb2d7bc02076b69e34d437ae8e158d31244a7da74e425600fbd0a38f4bb56b8f1557bcfb6e2b01e3c1d375e9973e918394737c60fc5c87
|
@@ -61,7 +61,7 @@ class GemCollector::RepositoriesController < GemCollector::ApplicationController
|
|
61
61
|
|
62
62
|
# https://developer.github.com/webhooks/securing/
|
63
63
|
def has_valid_signature?(site)
|
64
|
-
secret = Rails.application.config.octokit.fetch(site)[
|
64
|
+
secret = Rails.application.config.octokit.fetch(site.to_sym)[:webhook_secret]
|
65
65
|
if secret
|
66
66
|
request.body.rewind
|
67
67
|
payload_body = request.body.read
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module GemCollector::OctokitProvider
|
2
2
|
def self.get(site)
|
3
|
-
conf = Rails.application.config.octokit.fetch(site)
|
3
|
+
conf = Rails.application.config.octokit.fetch(site.to_sym)
|
4
4
|
Octokit::Client.new(
|
5
|
-
api_endpoint: conf[
|
6
|
-
web_endpoint: conf[
|
7
|
-
access_token: conf[
|
5
|
+
api_endpoint: conf[:api_endpoint],
|
6
|
+
web_endpoint: conf[:web_endpoint],
|
7
|
+
access_token: conf[:access_token],
|
8
8
|
)
|
9
9
|
end
|
10
10
|
end
|
@@ -55,7 +55,15 @@ class GemCollector::UpdateGemfile
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def update_gemfile_lock(repository, dir, path)
|
58
|
-
|
58
|
+
content = path.read
|
59
|
+
lockfile_parser =
|
60
|
+
begin
|
61
|
+
Bundler::LockfileParser.new(content)
|
62
|
+
rescue Bundler::LockfileError
|
63
|
+
# Try to parse (possibly) incompatible lockfile
|
64
|
+
content.sub!(/(^BUNDLED WITH\n\s*)[0-9.]+$/) { "#{$1}#{Bundler::VERSION}" }
|
65
|
+
Bundler::LockfileParser.new(content)
|
66
|
+
end
|
59
67
|
lock_path = path.relative_path_from(dir).to_s
|
60
68
|
records = lockfile_parser.specs.map do |spec|
|
61
69
|
repository.repository_gems.build(path: lock_path, name: spec.name, version: spec.version.to_s)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem_collector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei Suzuki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord-import
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 6.0.1
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 6.0.1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rspec-rails
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|