gem-src-srv 0.2.1 → 0.3.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: 8f070b9fba103c11fd4f7eab90cebbb07388dbb23c2858978ba062fc4b35da0e
4
- data.tar.gz: f44c152c6ecce5038f5ecf9da06997034df3c8f34988a50440bd4aaad667c004
3
+ metadata.gz: a4c0441bd1acc2bad30db47229d3da754e13a71c640234cf544b1935e7494f14
4
+ data.tar.gz: 1716a4296cc8a790bcc218e3d17cbc966d3475c100f4d016e2d3f22debf23c6d
5
5
  SHA512:
6
- metadata.gz: d6b797aa5be9a262b3987cc95dfa786e16dff7de8eaf0b30db4fc540ef71024f82d70c654e5cf8d26476aac882fdcd1446cf667aa255657061c200c19062a712
7
- data.tar.gz: 531f6e779a5fc0b321c25b94122b6a67910f9e64cf8745cfdd9440d18fbb9b19983acf5716af4f755dc2a1eaba6822dc45d5f3f9f8b79f1c12091729f83db6b8
6
+ metadata.gz: 3fbbe98d47f739a6e709530bb7febda887a9a532da698d2aeb81879644fe5e3f3b7bf44fb3f068a4115f9ef885f6783190b32897e9f0724e9289b75e4903422a
7
+ data.tar.gz: 746c0c175695cf1a27145ad535fb7448db9f66e6ffd73df660ce88a1b00f44a057f6791e1f89dc40114f9b80e83017c463025aaa1538d1a58a4dc1f656e84fc2
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.required_ruby_version = '>= 2.3.0'
23
23
 
24
- spec.add_development_dependency "bundler", "~> 1.16"
24
+ spec.add_development_dependency "bundler", ">= 1.16", "< 3"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
26
26
 
27
27
  spec.add_runtime_dependency "retryable", "~> 3.0"
@@ -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.homepage) ||
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) ||
@@ -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
@@ -1,7 +1,7 @@
1
1
  module Gem
2
2
  module Src
3
3
  module Srv
4
- VERSION = "0.2.1"
4
+ VERSION = "0.3.0"
5
5
  end
6
6
  end
7
7
  end
@@ -15,9 +15,11 @@ Gem.post_install do |installer|
15
15
  port = Gem::Src::Srv::Configuration::PORT
16
16
  uri = URI.parse("http://localhost:#{port}/gem_install")
17
17
  req = Net::HTTP::Post.new(uri)
18
+
18
19
  req.body = JSON.generate({
19
20
  name: installer.spec.name,
20
21
  homepage: installer.spec.homepage,
22
+ metadata: installer.spec.metadata,
21
23
  })
22
24
  req.content_type = 'Application/json'
23
25
  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.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masataka Pocke Kuwabara
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-26 00:00:00.000000000 Z
11
+ date: 2019-01-09 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
@@ -95,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
101
  - !ruby/object:Gem::Version
96
102
  version: '0'
97
103
  requirements: []
98
- rubygems_version: 3.0.1
104
+ rubygems_version: 3.0.2
99
105
  signing_key:
100
106
  specification_version: 4
101
107
  summary: Run `git clone` after `gem install` concurrently.