nya_pr 0.4.0 → 0.6.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29ee2a7a39ef6c0643bf8fd4c29e75ace604a36112958a08d5a2ad21f7dd6d51
4
- data.tar.gz: 8390d9f7533c7c1d9abd9f2588548152d520d9e624c62ec841a9e57181b2a88c
3
+ metadata.gz: 90e3eebf9061c21b3c4579fbd29a454c4f8984c30dd39fbd1633bc263a717075
4
+ data.tar.gz: c19a7c957ecd8177c10075455699e41812dd1e5c43d07965d1af642fac84b342
5
5
  SHA512:
6
- metadata.gz: 3b290bc4f56e97ab8770f044aed6dc7c90a2ac8125f7899e43b53e31a481fc58b6fcbe60308ffb8087c07746456412fc6d5add5bbffbb2fd1ff5a04660d8c05b
7
- data.tar.gz: a99c47b8e324b2f5b005b93fe1f7a657e07ce6e88bc1e1bd9566aa15e33009131129a375c52f7c22358f609b3029be6f4c1c2a9fa2c1c4913809b4657470dd36
6
+ metadata.gz: a0734d5b31fd4e72bf9a8058a90e3215edb6449e45f222d5083b09066b836a2fe9b2a77e100a5ecc0f80f3557c480044b0f0aa0ca28e2a91ba27e547faee8a06
7
+ data.tar.gz: b08e6e60dc6174f204cd018bc8d0b1fa16be47b27566b9889db7af5a484d8ff289e3fcbbfedba9a9a9c297f92f301e48ebde02d6671ab6058df2c0642ef9584c
data/README.md CHANGED
@@ -304,6 +304,7 @@ Logs are written to `stderr`, while actual pull request output goes to `stdout`.
304
304
  --skip-drafts Ignore draft pull requests
305
305
  --[no-]progress Show or hide progress bars
306
306
  --exclude-repos Repositories to exclude, in owner/name format
307
+ --save-pull-requests Save pull requests to CSV
307
308
  --log-level LEVEL Logging level
308
309
  -w, --workers Number of repository scan workers
309
310
  -v, --version Show NyaPr version
data/exe/nya-pr CHANGED
@@ -5,7 +5,7 @@ require 'nya_pr'
5
5
 
6
6
  begin
7
7
  NyaPr.run
8
- rescue OptionParser::ParseError, NyaPr::Error => e
8
+ rescue NyaPr::Error => e
9
9
  warn "nya-pr: #{e.message}"
10
10
  exit 1
11
11
  rescue Interrupt
@@ -49,12 +49,16 @@ module NyaPr
49
49
  type: :array,
50
50
  desc: 'Repositories to exclude, in owner/name format'
51
51
 
52
+ option :save_pull_requests,
53
+ type: :boolean,
54
+ desc: 'Save pull requests to CSV'
55
+
52
56
  option :progress,
53
57
  type: :boolean,
54
58
  desc: 'Show progress bars'
55
59
 
56
60
  option :log_level,
57
- values: Config::Global::LOG_LEVELS.keys,
61
+ values: Config::Builder::LOG_LEVELS.keys,
58
62
  desc: 'Log level'
59
63
 
60
64
  option :workers,
@@ -74,12 +78,14 @@ module NyaPr
74
78
 
75
79
  file_options = Config::Loader.load(config)
76
80
 
77
- Runner.new(
78
- Config::Global.from_options(
79
- options,
80
- file_options: file_options
81
- )
82
- ).run
81
+ app_config = Config::Builder.build(
82
+ options,
83
+ file_options: file_options
84
+ )
85
+
86
+ NyaPr.logger.level = app_config.log_level
87
+
88
+ RunnerFactory.build(app_config).run
83
89
  end
84
90
  end
85
91
  end
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NyaPr
4
+ module Config
5
+ class Builder
6
+ LOG_LEVELS = {
7
+ 'debug' => Logger::DEBUG,
8
+ 'info' => Logger::INFO,
9
+ 'warn' => Logger::WARN,
10
+ 'error' => Logger::ERROR,
11
+ 'fatal' => Logger::FATAL
12
+ }.freeze
13
+
14
+ def self.build(options, file_options: {})
15
+ new(options, file_options).build
16
+ end
17
+
18
+ def initialize(options, file_options)
19
+ @options = options
20
+ @file_options = file_options
21
+ end
22
+
23
+ def build
24
+ result = Schema.call(
25
+ normalize(
26
+ Defaults::OPTIONS.
27
+ merge(file_options).
28
+ merge(options.compact)
29
+ )
30
+ )
31
+
32
+ raise_config_error!(result) unless result.success?
33
+
34
+ Global.new(
35
+ **result.to_h, log_level: LOG_LEVELS.fetch(result[:log_level])
36
+ )
37
+ end
38
+
39
+ private
40
+
41
+ attr_reader :options, :file_options
42
+
43
+ def normalize(attributes)
44
+ attributes.merge(
45
+ username: normalize_username(attributes[:username]),
46
+ owners: normalize_list(attributes[:owners]),
47
+ exclude_repositories: normalize_repositories(
48
+ attributes[:exclude_repositories]
49
+ )
50
+ )
51
+ end
52
+
53
+ def normalize_username(value)
54
+ value&.to_s&.strip
55
+ end
56
+
57
+ def normalize_list(values)
58
+ Array(values).
59
+ flat_map { |value| value.to_s.split(',') }.
60
+ map(&:strip).
61
+ reject(&:empty?)
62
+ end
63
+
64
+ def normalize_repositories(values)
65
+ normalize_list(values).
66
+ map(&:downcase).
67
+ uniq
68
+ end
69
+
70
+ def raise_config_error!(result)
71
+ message = result.errors.to_h.
72
+ flat_map do |key, messages|
73
+ Array(messages).map do |error|
74
+ "#{key} #{error}"
75
+ end
76
+ end.
77
+ join(', ')
78
+
79
+ raise NyaPr::Error, message
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NyaPr
4
+ module Config
5
+ module Defaults
6
+ OPTIONS = {
7
+ owners: [],
8
+ token: nil,
9
+ repositories_csv: nil,
10
+ pull_requests_dir: nil,
11
+ limit: 100,
12
+ refresh: false,
13
+ skip_archived: false,
14
+ skip_drafts: false,
15
+ exclude_repositories: [],
16
+ save_pull_requests: true,
17
+ progress: true,
18
+ log_level: 'info',
19
+ workers: 30
20
+ }.freeze
21
+ end
22
+ end
23
+ end
@@ -2,148 +2,8 @@
2
2
 
3
3
  module NyaPr
4
4
  module Config
5
- class Global < Data.define(
6
- :username,
7
- :owners,
8
- :token,
9
- :repositories_csv,
10
- :pull_requests_dir,
11
- :limit,
12
- :refresh,
13
- :skip_archived,
14
- :skip_drafts,
15
- :exclude_repositories,
16
- :progress,
17
- :log_level,
18
- :workers
5
+ Global = Data.define(
6
+ *Schema.key_map.dump
19
7
  )
20
- LOG_LEVELS = {
21
- 'debug' => Logger::DEBUG,
22
- 'info' => Logger::INFO,
23
- 'warn' => Logger::WARN,
24
- 'error' => Logger::ERROR,
25
- 'fatal' => Logger::FATAL
26
- }.freeze
27
-
28
- DEFAULTS = {
29
- owners: [],
30
- token: nil,
31
- repositories_csv: nil,
32
- pull_requests_dir: nil,
33
- limit: PullRequest::Config::DEFAULT_LIMIT,
34
- refresh: false,
35
- skip_archived: false,
36
- skip_drafts: false,
37
- progress: true,
38
- log_level: 'info',
39
- workers: Repository::Config::DEFAULT_WORKERS,
40
- exclude_repositories: []
41
- }.freeze
42
-
43
- BOOLEAN_KEYS = %i[
44
- refresh
45
- skip_archived
46
- skip_drafts
47
- progress
48
- ].freeze
49
-
50
- class << self
51
- def from_options(options, file_options: {})
52
- validate_keys!(file_options)
53
-
54
- attributes = DEFAULTS.
55
- merge(file_options).
56
- merge(options.compact)
57
-
58
- build(attributes)
59
- end
60
-
61
- private
62
-
63
- def build(attributes)
64
- normalized = attributes.merge(
65
- username: normalize_username(attributes[:username]),
66
- owners: normalize_owners(attributes[:owners]),
67
- limit: normalize_positive_integer(attributes[:limit], :limit),
68
- workers: normalize_positive_integer(attributes[:workers], :workers),
69
- log_level: normalize_log_level(attributes[:log_level]),
70
- exclude_repositories: normalize_repositories(
71
- attributes[:exclude_repositories]
72
- ),
73
- **normalize_booleans(attributes)
74
- )
75
-
76
- new(**normalized)
77
- end
78
-
79
- def normalize_username(value)
80
- username = value.to_s.strip
81
-
82
- validate_username!(username)
83
-
84
- username
85
- end
86
-
87
- def normalize_repositories(repositories)
88
- Array(repositories).
89
- flat_map { |repository| repository.to_s.split(',') }.
90
- map(&:strip).
91
- reject(&:empty?).
92
- map(&:downcase).
93
- uniq
94
- end
95
-
96
- def normalize_booleans(attributes)
97
- BOOLEAN_KEYS.to_h do |key|
98
- [key, normalize_boolean(attributes[key], key)]
99
- end
100
- end
101
-
102
- def validate_keys!(options)
103
- unknown = options.keys - members
104
-
105
- return if unknown.empty?
106
-
107
- raise NyaPr::Error,
108
- "Unknown config option(s): #{unknown.join(', ')}"
109
- end
110
-
111
- def normalize_owners(owners)
112
- Array(owners).
113
- flat_map { |owner| owner.to_s.split(',') }.
114
- map(&:strip).
115
- reject(&:empty?)
116
- end
117
-
118
- def normalize_positive_integer(value, name)
119
- number = Integer(value)
120
-
121
- return number if number.positive?
122
-
123
- raise NyaPr::Error, "#{name} must be greater than 0"
124
- rescue ArgumentError, TypeError
125
- raise NyaPr::Error, "#{name} must be a positive integer"
126
- end
127
-
128
- def normalize_boolean(value, name)
129
- return value if [true, false].include?(value)
130
-
131
- raise NyaPr::Error, "#{name} must be true or false"
132
- end
133
-
134
- def normalize_log_level(value)
135
- LOG_LEVELS.fetch(value.to_s) do
136
- raise NyaPr::Error,
137
- "Invalid log level: #{value}"
138
- end
139
- end
140
-
141
- def validate_username!(username)
142
- return unless username.empty?
143
-
144
- raise NyaPr::Error, 'GitHub username is required'
145
- end
146
- end
147
- end
148
8
  end
149
9
  end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'dry/schema'
4
+
5
+ module NyaPr
6
+ module Config
7
+ STRICT_BOOL = Dry::Types['strict.bool']
8
+
9
+ private_constant :STRICT_BOOL
10
+
11
+ Schema = Dry::Schema.Params do
12
+ config.validate_keys = true
13
+
14
+ required(:username).filled(:string)
15
+
16
+ required(:owners).array(:string)
17
+
18
+ required(:token).maybe(:string)
19
+ required(:repositories_csv).maybe(:string)
20
+ required(:pull_requests_dir).maybe(:string)
21
+
22
+ required(:limit).filled(
23
+ :integer,
24
+ gt?: 0
25
+ )
26
+
27
+ required(:workers).filled(
28
+ :integer,
29
+ gt?: 0
30
+ )
31
+
32
+ required(:refresh).value(STRICT_BOOL)
33
+ required(:skip_archived).value(STRICT_BOOL)
34
+ required(:skip_drafts).value(STRICT_BOOL)
35
+ required(:save_pull_requests).value(STRICT_BOOL)
36
+ required(:progress).value(STRICT_BOOL)
37
+
38
+ required(:exclude_repositories).array(:string)
39
+
40
+ required(:log_level).filled(
41
+ :string,
42
+ included_in?: %w[
43
+ debug
44
+ info
45
+ warn
46
+ error
47
+ fatal
48
+ ]
49
+ )
50
+ end
51
+ end
52
+ end
@@ -2,20 +2,20 @@
2
2
 
3
3
  module NyaPr
4
4
  module PullRequest
5
- class Config < Data.define(
5
+ Config = Data.define(
6
6
  :limit,
7
7
  :skip_drafts,
8
8
  :progress_enabled,
9
- :pull_requests_dir
10
- )
11
- DEFAULT_LIMIT = 100
12
-
9
+ :pull_requests_dir,
10
+ :workers
11
+ ) do
13
12
  def self.from_app(config)
14
13
  new(
15
14
  limit: config.limit,
16
15
  skip_drafts: config.skip_drafts,
17
16
  progress_enabled: config.progress,
18
- pull_requests_dir: config.pull_requests_dir
17
+ pull_requests_dir: config.pull_requests_dir,
18
+ workers: config.workers
19
19
  )
20
20
  end
21
21
  end
@@ -8,25 +8,27 @@ module NyaPr
8
8
  MAX_PER_PAGE = 100
9
9
 
10
10
  attr_reader :client,
11
- :repositories,
12
11
  :config,
13
12
  :filter
14
13
 
15
- def initialize(client, repositories, config, filter: nil)
14
+ def initialize(client, config, filter: nil)
16
15
  @client = client
17
- @repositories = repositories
18
16
  @config = config
19
17
  @filter = filter || Filter.new(config)
20
18
  end
21
19
 
22
- def find
20
+ def find(repositories)
23
21
  NyaPr.logger.info(
24
22
  "Searching for up to #{config.limit} open pull requests " \
25
23
  "in #{repositories.size} repositories"
26
24
  )
27
25
 
28
- progress_bar = build_progress
29
- pull_requests = collect_pull_requests(progress_bar)
26
+ progress_bar = build_progress(repositories.size)
27
+
28
+ pull_requests = collect_pull_requests(
29
+ repositories,
30
+ progress_bar
31
+ )
30
32
 
31
33
  progress_bar.finish
32
34
 
@@ -39,30 +41,59 @@ module NyaPr
39
41
 
40
42
  private
41
43
 
42
- def collect_pull_requests(progress_bar)
44
+ def collect_pull_requests(repositories, progress_bar)
43
45
  pull_requests = []
44
46
 
45
- repositories.each do |repository|
46
- break if pull_requests.size >= config.limit
47
+ repositories.each_slice(config.workers) do |repositories_batch|
48
+ remaining = config.limit - pull_requests.size
49
+ break unless remaining.positive?
47
50
 
48
- process_repository(
49
- repository,
50
- pull_requests,
51
+ results = process_batch(
52
+ repositories_batch,
53
+ remaining,
51
54
  progress_bar
52
55
  )
56
+
57
+ append_results(
58
+ pull_requests,
59
+ results
60
+ )
53
61
  end
54
62
 
55
63
  pull_requests
56
64
  end
57
65
 
58
- def process_repository(repository, pull_requests, progress_bar)
59
- return unless pull_requests_enabled?(repository)
66
+ def process_batch(repositories, limit, progress_bar)
67
+ threads = repositories.map do |repository|
68
+ Thread.new do
69
+ Thread.current.report_on_exception = false
70
+
71
+ process_repository(
72
+ repository,
73
+ limit,
74
+ progress_bar
75
+ )
76
+ end
77
+ end
60
78
 
61
- remaining = config.limit - pull_requests.size
79
+ threads.map(&:value)
80
+ end
62
81
 
63
- pull_requests.concat(
64
- pull_requests_for(repository, remaining)
65
- )
82
+ def append_results(pull_requests, results)
83
+ results.each do |repository_pull_requests|
84
+ remaining = config.limit - pull_requests.size
85
+ break unless remaining.positive?
86
+
87
+ pull_requests.concat(
88
+ repository_pull_requests.first(remaining)
89
+ )
90
+ end
91
+ end
92
+
93
+ def process_repository(repository, limit, progress_bar)
94
+ return [] unless pull_requests_enabled?(repository)
95
+
96
+ pull_requests_for(repository, limit)
66
97
  ensure
67
98
  progress_bar.advance
68
99
  end
@@ -134,10 +165,10 @@ module NyaPr
134
165
  )
135
166
  end
136
167
 
137
- def build_progress
168
+ def build_progress(total)
138
169
  Progress.new(
139
170
  '🐾 Checking pull requests',
140
- total: repositories.size,
171
+ total: total,
141
172
  enabled: config.progress_enabled && $stderr.tty?
142
173
  )
143
174
  end
@@ -49,7 +49,7 @@ module NyaPr
49
49
  store.write(repositories)
50
50
 
51
51
  NyaPr.logger.info(
52
- "Saved #{repositories.size} repositories to #{store.path}"
52
+ "Selected #{repositories.size} repositories for pull request scanning"
53
53
  )
54
54
 
55
55
  repositories
@@ -2,7 +2,7 @@
2
2
 
3
3
  module NyaPr
4
4
  module Repository
5
- class Config < Data.define(
5
+ Config = Data.define(
6
6
  :username,
7
7
  :owners,
8
8
  :refresh,
@@ -11,9 +11,7 @@ module NyaPr
11
11
  :workers,
12
12
  :repositories_csv,
13
13
  :exclude_repositories
14
- )
15
- DEFAULT_WORKERS = 10
16
-
14
+ ) do
17
15
  def self.from_app(config)
18
16
  new(
19
17
  username: config.username,
@@ -40,7 +40,7 @@ module NyaPr
40
40
 
41
41
  def log_start(repositories)
42
42
  NyaPr.logger.info(
43
- "Checking contributions in #{repositories.size} repositories " \
43
+ "Checking contributions in #{repositories.size} external repositories " \
44
44
  "using #{workers} workers"
45
45
  )
46
46
  end
@@ -75,7 +75,7 @@ module NyaPr
75
75
 
76
76
  def log_result(result)
77
77
  NyaPr.logger.info(
78
- "Finished contribution check: #{result.size} repositories matched"
78
+ "Finished contribution check: contributions found in #{result.size} repositories"
79
79
  )
80
80
  end
81
81
 
data/lib/nya_pr/runner.rb CHANGED
@@ -1,20 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dotenv'
4
-
5
3
  module NyaPr
6
4
  class Runner
7
- attr_reader :config
8
-
9
- def initialize(config)
10
- @config = config
5
+ attr_reader :repository_collector,
6
+ :pull_request_finder,
7
+ :pull_request_printer,
8
+ :pull_request_store
9
+
10
+ def initialize(
11
+ repository_collector:,
12
+ pull_request_finder:,
13
+ pull_request_printer:,
14
+ pull_request_store:
15
+ )
16
+ @repository_collector = repository_collector
17
+ @pull_request_finder = pull_request_finder
18
+ @pull_request_printer = pull_request_printer
19
+ @pull_request_store = pull_request_store
11
20
  end
12
21
 
13
22
  def run
14
- Dotenv.load
15
- configure_logger
16
-
17
- pull_requests = find_pull_requests
23
+ repositories = repository_collector.collect
24
+ pull_requests = pull_request_finder.find(repositories)
18
25
 
19
26
  pull_request_printer.print(pull_requests)
20
27
  save_pull_requests(pull_requests)
@@ -22,85 +29,14 @@ module NyaPr
22
29
 
23
30
  private
24
31
 
25
- def configure_logger
26
- NyaPr.logger.level = config.log_level
27
- end
28
-
29
- def target_repositories
30
- repository_collector.collect
31
- end
32
-
33
- def repository_config
34
- @repository_config ||= Repository::Config.from_app(config)
35
- end
36
-
37
- def pull_request_config
38
- @pull_request_config ||= PullRequest::Config.from_app(config)
39
- end
40
-
41
- def repository_paths
42
- @repository_paths ||= Repository::Paths.new(
43
- repository_config
44
- )
45
- end
46
-
47
- def pull_request_paths
48
- @pull_request_paths ||= PullRequest::Paths.new(
49
- pull_request_config
50
- )
51
- end
52
-
53
- def repository_store
54
- @repository_store ||= Repository::CsvStore.new(
55
- repository_paths.csv
56
- )
57
- end
58
-
59
- def pull_request_store
60
- @pull_request_store ||= PullRequest::CsvStore.new(
61
- pull_request_paths.csv
62
- )
63
- end
64
-
65
- def repository_collector
66
- @repository_collector ||= Repository::Collector.new(
67
- client,
68
- repository_store,
69
- repository_config
70
- )
71
- end
72
-
73
- def find_pull_requests
74
- PullRequest::Finder.
75
- new(
76
- client,
77
- target_repositories,
78
- pull_request_config
79
- ).
80
- find
81
- end
82
-
83
32
  def save_pull_requests(pull_requests)
33
+ return unless pull_request_store
34
+
84
35
  pull_request_store.write(pull_requests)
85
36
 
86
37
  NyaPr.logger.info(
87
38
  "Saved #{pull_requests.size} pull requests to #{pull_request_store.path}"
88
39
  )
89
40
  end
90
-
91
- def pull_request_printer
92
- @pull_request_printer ||= PullRequest::Printer.new
93
- end
94
-
95
- def client
96
- @client ||= Github::Client.new(token)
97
- end
98
-
99
- def token
100
- config.token || ENV.fetch('GITHUB_TOKEN') do
101
- raise NyaPr::Error,
102
- 'GitHub token is required (--token or GITHUB_TOKEN)'
103
- end
104
- end
105
41
  end
106
42
  end
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NyaPr
4
+ class RunnerFactory
5
+ def self.build(config)
6
+ new(config).build
7
+ end
8
+
9
+ def initialize(config)
10
+ @config = config
11
+ end
12
+
13
+ def build
14
+ Runner.new(
15
+ repository_collector: repository_collector,
16
+ pull_request_finder: pull_request_finder,
17
+ pull_request_printer: PullRequest::Printer.new,
18
+ pull_request_store: pull_request_store
19
+ )
20
+ end
21
+
22
+ private
23
+
24
+ attr_reader :config
25
+
26
+ def repository_config
27
+ @repository_config ||= Repository::Config.from_app(config)
28
+ end
29
+
30
+ def pull_request_config
31
+ @pull_request_config ||= PullRequest::Config.from_app(config)
32
+ end
33
+
34
+ def repository_store
35
+ @repository_store ||= Repository::CsvStore.new(
36
+ Repository::Paths.new(repository_config).csv
37
+ )
38
+ end
39
+
40
+ def repository_collector
41
+ @repository_collector ||= Repository::Collector.new(
42
+ client,
43
+ repository_store,
44
+ repository_config
45
+ )
46
+ end
47
+
48
+ def pull_request_finder
49
+ @pull_request_finder ||= PullRequest::Finder.new(
50
+ client,
51
+ pull_request_config
52
+ )
53
+ end
54
+
55
+ def pull_request_store
56
+ return unless config.save_pull_requests
57
+
58
+ @pull_request_store ||= PullRequest::CsvStore.new(
59
+ PullRequest::Paths.new(pull_request_config).csv
60
+ )
61
+ end
62
+
63
+ def client
64
+ @client ||= Github::Client.new(token)
65
+ end
66
+
67
+ def token
68
+ config.token || ENV.fetch('GITHUB_TOKEN') do
69
+ raise NyaPr::Error,
70
+ 'GitHub token is required (--token or GITHUB_TOKEN)'
71
+ end
72
+ end
73
+ end
74
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NyaPr
4
- VERSION = '0.4.0'
4
+ VERSION = '0.6.0'
5
5
  end
data/lib/nya_pr.rb CHANGED
@@ -4,6 +4,7 @@ require 'zeitwerk'
4
4
  require 'logger'
5
5
  require 'csv'
6
6
  require 'dry/cli'
7
+ require 'dotenv'
7
8
 
8
9
  loader = Zeitwerk::Loader.for_gem
9
10
  loader.setup
@@ -11,6 +12,8 @@ loader.setup
11
12
  module NyaPr
12
13
  class << self
13
14
  def run(argv = ARGV)
15
+ Dotenv.load
16
+
14
17
  Dry::CLI.new(Cli::Command).call(arguments: argv)
15
18
  end
16
19
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nya_pr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elijah S. Krukowski
@@ -51,6 +51,20 @@ dependencies:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '1.4'
54
+ - !ruby/object:Gem::Dependency
55
+ name: dry-schema
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '1.16'
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1.16'
54
68
  - !ruby/object:Gem::Dependency
55
69
  name: faraday
56
70
  requirement: !ruby/object:Gem::Requirement
@@ -122,8 +136,11 @@ files:
122
136
  - exe/nya-pr
123
137
  - lib/nya_pr.rb
124
138
  - lib/nya_pr/cli/command.rb
139
+ - lib/nya_pr/config/builder.rb
140
+ - lib/nya_pr/config/defaults.rb
125
141
  - lib/nya_pr/config/global.rb
126
142
  - lib/nya_pr/config/loader.rb
143
+ - lib/nya_pr/config/schema.rb
127
144
  - lib/nya_pr/error.rb
128
145
  - lib/nya_pr/github/client.rb
129
146
  - lib/nya_pr/github/connection.rb
@@ -142,6 +159,7 @@ files:
142
159
  - lib/nya_pr/repository/finder.rb
143
160
  - lib/nya_pr/repository/paths.rb
144
161
  - lib/nya_pr/runner.rb
162
+ - lib/nya_pr/runner_factory.rb
145
163
  - lib/nya_pr/version.rb
146
164
  homepage: https://github.com/bodrovis/nya_pr
147
165
  licenses: