gem-src-srv 0.1.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/gem-src-srv.gemspec +5 -1
- data/lib/gem/src/srv/fetcher.rb +2 -1
- data/lib/gem/src/srv/irregular_repositories.rb +2 -0
- data/lib/gem/src/srv/server.rb +2 -2
- data/lib/gem/src/srv/version.rb +1 -1
- data/lib/rubygems_plugin.rb +3 -0
- metadata +31 -12
- data/Gemfile.lock +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 534a4bc5a3b060cb9e876222ac0245fb87961eccfc293f6edaba73552cfd95c7
|
4
|
+
data.tar.gz: 9b9572cd03cc92863feaa44043ae7cbdf6da670fc92cc64019a94b6dded77101
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc69366d4c630019b17ea90a539d535067dec6292ed4e1da1983502637fe7ee9856bac2ae41e12d4141f368d0df63fb4b614d62efa137280e5585bea9c7e1282
|
7
|
+
data.tar.gz: 343e887bc64246f92ea43fe5a7cf47d407a392510e0f28fafe5aeb2e5ac1bf22a74d3649beaebf7f9b07e3e5f54f8165a2cfe7135c532933761eccf6c4a1280c
|
data/.gitignore
CHANGED
data/gem-src-srv.gemspec
CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.summary = %q{Run `git clone` after `gem install` concurrently.}
|
12
12
|
spec.description = %q{Run `git clone` after `gem install` concurrently.}
|
13
13
|
spec.homepage = "https://github.com/pocke/gem-src-srv"
|
14
|
+
spec.license = 'MIT'
|
14
15
|
|
15
16
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
16
17
|
f.match(%r{^(test|spec|features)/})
|
@@ -19,8 +20,11 @@ Gem::Specification.new do |spec|
|
|
19
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
21
|
spec.require_paths = ["lib"]
|
21
22
|
|
22
|
-
spec.
|
23
|
+
spec.required_ruby_version = '>= 2.3.0'
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", ">= 1.16", "< 3"
|
23
26
|
spec.add_development_dependency "rake", "~> 10.0"
|
24
27
|
|
25
28
|
spec.add_runtime_dependency "retryable", "~> 3.0"
|
29
|
+
spec.add_runtime_dependency "webrick"
|
26
30
|
end
|
data/lib/gem/src/srv/fetcher.rb
CHANGED
@@ -17,7 +17,8 @@ module Gem::Src::Srv
|
|
17
17
|
return git_clone IRREGULAR_REPOSITORIES[spec.name]
|
18
18
|
end
|
19
19
|
|
20
|
-
git_clone(spec.
|
20
|
+
git_clone(spec.metadata['source_code_uri']) ||
|
21
|
+
git_clone(spec.homepage) ||
|
21
22
|
git_clone(github_url(spec.homepage)) ||
|
22
23
|
git_clone(source_code_uri) ||
|
23
24
|
git_clone(homepage_uri) ||
|
@@ -10,6 +10,7 @@ module Gem::Src::Srv
|
|
10
10
|
'activejob' => nil,
|
11
11
|
'actionmailer' => nil,
|
12
12
|
'actioncable' => nil,
|
13
|
+
'activestorage' => nil,
|
13
14
|
'railties' => nil,
|
14
15
|
'activeresource' => 'https://github.com/rails/activeresource.git',
|
15
16
|
'autoparse' => 'https://github.com/google/autoparse.git',
|
@@ -27,6 +28,7 @@ module Gem::Src::Srv
|
|
27
28
|
'erubis' => 'https://github.com/kwatch/erubis.git',
|
28
29
|
'geocoder' => 'https://github.com/alexreisner/geocoder',
|
29
30
|
'hirb' => 'https://github.com/cldwalker/hirb',
|
31
|
+
'houston' => 'https://github.com/nomad/houston',
|
30
32
|
'html2haml' => 'https://github.com/haml/html2haml',
|
31
33
|
'io-console' => nil,
|
32
34
|
'kaminari-actionview' => nil,
|
data/lib/gem/src/srv/server.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Gem::Src::Srv
|
2
|
-
Spec = Struct.new(:name, :homepage)
|
2
|
+
Spec = Struct.new(:name, :homepage, :metadata)
|
3
3
|
|
4
4
|
class Server
|
5
5
|
def self.start(queue)
|
@@ -22,7 +22,7 @@ module Gem::Src::Srv
|
|
22
22
|
end
|
23
23
|
|
24
24
|
body = JSON.parse(req.body)
|
25
|
-
@queue << Spec.new(body['name'], body['homepage'])
|
25
|
+
@queue << Spec.new(body['name'], body['homepage'], body['metadata'])
|
26
26
|
end
|
27
27
|
trap('INT') { srv.shutdown }
|
28
28
|
srv.start
|
data/lib/gem/src/srv/version.rb
CHANGED
data/lib/rubygems_plugin.rb
CHANGED
@@ -2,6 +2,7 @@ require 'net/http'
|
|
2
2
|
require 'uri'
|
3
3
|
require 'retryable'
|
4
4
|
require 'json'
|
5
|
+
require 'etc'
|
5
6
|
|
6
7
|
require 'gem/src/srv/configuration'
|
7
8
|
|
@@ -15,9 +16,11 @@ Gem.post_install do |installer|
|
|
15
16
|
port = Gem::Src::Srv::Configuration::PORT
|
16
17
|
uri = URI.parse("http://localhost:#{port}/gem_install")
|
17
18
|
req = Net::HTTP::Post.new(uri)
|
19
|
+
|
18
20
|
req.body = JSON.generate({
|
19
21
|
name: installer.spec.name,
|
20
22
|
homepage: installer.spec.homepage,
|
23
|
+
metadata: installer.spec.metadata,
|
21
24
|
})
|
22
25
|
req.content_type = 'Application/json'
|
23
26
|
Net::HTTP.new(uri.host, uri.port).start {|http| http.request(req) }
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-src-srv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masataka Pocke Kuwabara
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.16'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3'
|
20
23
|
type: :development
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '1.16'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rake
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +58,20 @@ dependencies:
|
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: '3.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: webrick
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
55
75
|
description: Run `git clone` after `gem install` concurrently.
|
56
76
|
email:
|
57
77
|
- kuwabara@pocke.me
|
@@ -62,7 +82,6 @@ extra_rdoc_files: []
|
|
62
82
|
files:
|
63
83
|
- ".gitignore"
|
64
84
|
- Gemfile
|
65
|
-
- Gemfile.lock
|
66
85
|
- LICENSE
|
67
86
|
- README.md
|
68
87
|
- Rakefile
|
@@ -79,9 +98,10 @@ files:
|
|
79
98
|
- lib/gem/src/srv/worker.rb
|
80
99
|
- lib/rubygems_plugin.rb
|
81
100
|
homepage: https://github.com/pocke/gem-src-srv
|
82
|
-
licenses:
|
101
|
+
licenses:
|
102
|
+
- MIT
|
83
103
|
metadata: {}
|
84
|
-
post_install_message:
|
104
|
+
post_install_message:
|
85
105
|
rdoc_options: []
|
86
106
|
require_paths:
|
87
107
|
- lib
|
@@ -89,16 +109,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
109
|
requirements:
|
90
110
|
- - ">="
|
91
111
|
- !ruby/object:Gem::Version
|
92
|
-
version:
|
112
|
+
version: 2.3.0
|
93
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
114
|
requirements:
|
95
115
|
- - ">="
|
96
116
|
- !ruby/object:Gem::Version
|
97
117
|
version: '0'
|
98
118
|
requirements: []
|
99
|
-
|
100
|
-
|
101
|
-
signing_key:
|
119
|
+
rubygems_version: 3.3.0.dev
|
120
|
+
signing_key:
|
102
121
|
specification_version: 4
|
103
122
|
summary: Run `git clone` after `gem install` concurrently.
|
104
123
|
test_files: []
|
data/Gemfile.lock
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
gem-src-srv (0.1.1)
|
5
|
-
retryable (~> 3.0)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
rake (10.5.0)
|
11
|
-
retryable (3.0.0)
|
12
|
-
|
13
|
-
PLATFORMS
|
14
|
-
ruby
|
15
|
-
|
16
|
-
DEPENDENCIES
|
17
|
-
bundler (~> 1.16)
|
18
|
-
gem-src-srv!
|
19
|
-
rake (~> 10.0)
|
20
|
-
|
21
|
-
BUNDLED WITH
|
22
|
-
1.16.1
|