bundler-alive 0.1.0 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-alive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katsuhiko YOSHIDA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-08 00:00:00.000000000 Z
11
+ date: 2022-05-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: bundler-alive reports gems are archived or not.
14
14
  email:
@@ -16,38 +16,40 @@ email:
16
16
  executables:
17
17
  - bundle-alive
18
18
  - bundler-alive
19
- - setup
20
19
  extensions: []
21
20
  extra_rdoc_files: []
22
21
  files:
23
22
  - ".rspec"
24
23
  - ".rubocop.yml"
25
24
  - Gemfile
26
- - Gemfile.lock
27
25
  - LICENSE
28
26
  - README.md
29
27
  - Rakefile
30
28
  - bin/bundle-alive
31
29
  - bin/bundler-alive
32
- - bin/setup
33
30
  - bundler-alive.gemspec
34
31
  - lib/bundler/alive.rb
32
+ - lib/bundler/alive/announcer.rb
35
33
  - lib/bundler/alive/cli.rb
36
- - lib/bundler/alive/client/gems_api.rb
34
+ - lib/bundler/alive/client/gems_api_client.rb
35
+ - lib/bundler/alive/client/gems_api_response.rb
37
36
  - lib/bundler/alive/client/git_hub_api.rb
38
37
  - lib/bundler/alive/client/source_code_client.rb
39
38
  - lib/bundler/alive/doctor.rb
40
- - lib/bundler/alive/gem_status.rb
41
- - lib/bundler/alive/gem_status_collection.rb
39
+ - lib/bundler/alive/report.rb
40
+ - lib/bundler/alive/reportable.rb
42
41
  - lib/bundler/alive/source_code_repository.rb
43
42
  - lib/bundler/alive/source_code_repository_url.rb
43
+ - lib/bundler/alive/status.rb
44
+ - lib/bundler/alive/status_collection.rb
45
+ - lib/bundler/alive/status_result.rb
44
46
  - lib/bundler/alive/version.rb
45
- homepage: https://github.com/kyoshidajp/bundler-audit
47
+ homepage: https://github.com/kyoshidajp/bundler-alive
46
48
  licenses: []
47
49
  metadata:
48
- homepage_uri: https://github.com/kyoshidajp/bundler-audit
49
- source_code_uri: https://github.com/kyoshidajp/bundler-audit
50
- changelog_uri: https://github.com/kyoshidajp/bundler-audit
50
+ homepage_uri: https://github.com/kyoshidajp/bundler-alive
51
+ source_code_uri: https://github.com/kyoshidajp/bundler-alive
52
+ changelog_uri: https://github.com/kyoshidajp/bundler-alive
51
53
  rubygems_mfa_required: 'true'
52
54
  post_install_message:
53
55
  rdoc_options: []
data/Gemfile.lock DELETED
@@ -1,119 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- bundler-alive (0.1.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- addressable (2.8.0)
10
- public_suffix (>= 2.0.2, < 5.0)
11
- ast (2.4.2)
12
- citrus (3.0.2)
13
- crack (0.4.5)
14
- rexml
15
- diff-lcs (1.5.0)
16
- docile (1.4.0)
17
- faraday (1.10.0)
18
- faraday-em_http (~> 1.0)
19
- faraday-em_synchrony (~> 1.0)
20
- faraday-excon (~> 1.1)
21
- faraday-httpclient (~> 1.0)
22
- faraday-multipart (~> 1.0)
23
- faraday-net_http (~> 1.0)
24
- faraday-net_http_persistent (~> 1.0)
25
- faraday-patron (~> 1.0)
26
- faraday-rack (~> 1.0)
27
- faraday-retry (~> 1.0)
28
- ruby2_keywords (>= 0.0.4)
29
- faraday-em_http (1.0.0)
30
- faraday-em_synchrony (1.0.0)
31
- faraday-excon (1.1.0)
32
- faraday-httpclient (1.0.1)
33
- faraday-multipart (1.0.3)
34
- multipart-post (>= 1.2, < 3)
35
- faraday-net_http (1.0.1)
36
- faraday-net_http_persistent (1.2.0)
37
- faraday-patron (1.0.0)
38
- faraday-rack (1.0.0)
39
- faraday-retry (1.0.3)
40
- hashdiff (1.0.1)
41
- multipart-post (2.1.1)
42
- octokit (4.22.0)
43
- faraday (>= 0.9)
44
- sawyer (~> 0.8.0, >= 0.5.3)
45
- parallel (1.22.1)
46
- parser (3.1.2.0)
47
- ast (~> 2.4.1)
48
- public_suffix (4.0.7)
49
- rainbow (3.1.1)
50
- rake (13.0.6)
51
- regexp_parser (2.3.1)
52
- rexml (3.2.5)
53
- rspec (3.11.0)
54
- rspec-core (~> 3.11.0)
55
- rspec-expectations (~> 3.11.0)
56
- rspec-mocks (~> 3.11.0)
57
- rspec-core (3.11.0)
58
- rspec-support (~> 3.11.0)
59
- rspec-expectations (3.11.0)
60
- diff-lcs (>= 1.2.0, < 2.0)
61
- rspec-support (~> 3.11.0)
62
- rspec-mocks (3.11.1)
63
- diff-lcs (>= 1.2.0, < 2.0)
64
- rspec-support (~> 3.11.0)
65
- rspec-support (3.11.0)
66
- rubocop (1.29.0)
67
- parallel (~> 1.10)
68
- parser (>= 3.1.0.0)
69
- rainbow (>= 2.2.2, < 4.0)
70
- regexp_parser (>= 1.8, < 3.0)
71
- rexml (>= 3.2.5, < 4.0)
72
- rubocop-ast (>= 1.17.0, < 2.0)
73
- ruby-progressbar (~> 1.7)
74
- unicode-display_width (>= 1.4.0, < 3.0)
75
- rubocop-ast (1.17.0)
76
- parser (>= 3.1.1.0)
77
- ruby-progressbar (1.11.0)
78
- ruby2_keywords (0.0.5)
79
- sawyer (0.8.2)
80
- addressable (>= 2.3.5)
81
- faraday (> 0.8, < 2.0)
82
- simplecov (0.21.2)
83
- docile (~> 1.1)
84
- simplecov-html (~> 0.11)
85
- simplecov_json_formatter (~> 0.1)
86
- simplecov-html (0.12.3)
87
- simplecov_json_formatter (0.1.4)
88
- thor (1.2.1)
89
- toml-rb (2.1.2)
90
- citrus (~> 3.0, > 3.0)
91
- unicode-display_width (2.1.0)
92
- vcr (6.1.0)
93
- webmock (3.14.0)
94
- addressable (>= 2.8.0)
95
- crack (>= 0.3.2)
96
- hashdiff (>= 0.4.0, < 2.0.0)
97
- yard (0.9.20)
98
-
99
- PLATFORMS
100
- arm64-darwin-20
101
- ruby
102
- x86_64-darwin-20
103
-
104
- DEPENDENCIES
105
- bundler-alive!
106
- faraday
107
- octokit
108
- rake (~> 13.0)
109
- rspec (~> 3.0)
110
- rubocop (~> 1.21)
111
- simplecov
112
- thor
113
- toml-rb
114
- vcr
115
- webmock
116
- yard
117
-
118
- BUNDLED WITH
119
- 2.3.13
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,55 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "faraday"
4
- require "json"
5
-
6
- module Bundler
7
- module Alive
8
- module Client
9
- #
10
- # API Client for RubyGems.org API
11
- #
12
- # @see https://guides.rubygems.org/rubygems-org-api/
13
- #
14
- class GemsApi
15
- #
16
- # Not found in rubygems.org error
17
- #
18
- class NotFound < StandardError
19
- end
20
-
21
- #
22
- # Returns repository url
23
- #
24
- # @param [String] gem_name
25
- #
26
- # @return [SourceCodeRepositoryUrl]
27
- #
28
- def get_repository_url(gem_name)
29
- url = api_url(gem_name)
30
- response = connection.get(url)
31
-
32
- raise NotFound, "#{gem_name} is not found in gems.org." if response.status == 404
33
-
34
- body = JSON.parse(response.body)
35
- raw_url = body["source_code_uri"] || body["homepage_uri"]
36
- SourceCodeRepositoryUrl.new(raw_url)
37
- end
38
-
39
- private
40
-
41
- def api_url(gem_name)
42
- "https://rubygems.org/api/v1/gems/#{gem_name}.json"
43
- end
44
-
45
- def connection
46
- return @connection if instance_variable_defined?(:@connection)
47
-
48
- @connection = Faraday.new do |connection|
49
- connection.adapter :net_http
50
- end
51
- end
52
- end
53
- end
54
- end
55
- end
@@ -1,49 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "forwardable"
4
-
5
- module Bundler
6
- module Alive
7
- # Collection of GemStatus
8
- class GemStatusCollection
9
- extend Forwardable
10
- delegate each: :gems
11
-
12
- def initialize(gems = {})
13
- @gems = gems
14
- freeze
15
- end
16
-
17
- def add(name, gem_status)
18
- gems[name] = gem_status
19
-
20
- self.class.new(gems)
21
- end
22
-
23
- def get_unchecked(name)
24
- return nil unless gems.key?(name)
25
-
26
- gem_status = gems[name]
27
- return nil if gem_status.unknown?
28
-
29
- gem_status
30
- end
31
-
32
- def to_h
33
- hash = {}
34
- gems.each do |k, v|
35
- hash[k] = v.to_h
36
- end
37
- hash
38
- end
39
-
40
- def need_to_report_gems
41
- gems.find_all { |_name, gem| !!!gem.alive }
42
- end
43
-
44
- private
45
-
46
- attr_reader :gems
47
- end
48
- end
49
- end