Conversation
|
Well, in general I like it (the only thing is that I don't really like half-abstract classes that are partially implemented), but what's important it seems to be a breaking change 😞 . Yes, kwargs of
^ and that's only what I've found by pulling reverse dependencies from rubygems.org (there can be more in non-gem github repos and I have no idea how to check them). I guess we have to keep interface of the constructor. Is it possible to keep it as is and still use a separate class? Also, is this PR only about refactoring? script to pull reverse depsrequire 'open-uri'
require 'json'
require 'fileutils'
ROOT = File.expand_path('', __dir__)
REPOS_ROOT = File.join(ROOT, 'repos')
FileUtils.mkdir_p(REPOS_ROOT)
def get_json(url)
JSON.parse(URI.open(url).read)
rescue
{}
end
def download_gem(gem_name:, gem_uri:)
if File.exists?("repos/#{gem_name}.gem")
puts "Skipping wget repos/#{gem_name}.gem"
else
`wget #{gem_uri} -O repos/#{gem_name}.gem`
end
end
def unpack_gem(gem_name)
if File.directory?("repos/#{gem_name}")
puts "Skipping gem unpack repos/#{gem_name}.gem"
else
`gem unpack repos/#{gem_name}.gem --target repos`
end
end
deps = get_json('https://rubygems.org/api/v1/gems/parser/reverse_dependencies.json')
p deps
deps.sort.each do |gem_name|
gem_info = get_json("https://rubygems.org/api/v1/gems/#{gem_name}.json")
gem_uri = gem_info['gem_uri']
download_gem(gem_name: gem_name, gem_uri: gem_uri)
unpack_gem(gem_name)
end |
|
I should have been less lazy and document the whole thing; actually, kwargs of Another way to see it is that I could definitely make the base Given these, do you feel this is a worthwhile route? |
|
Oh, right, I missed that there's still
Yes,
I wasn't referring to |
This PR isolates conflict handling in an
Enforcerclass. A basic implementation with policty of:accept,:warnor:raiseand aDiagnosticsEngineinsures compatibility.@iliabylich I didn't update the documentation much, I wanted to know if you thought this was a more worthwhile approach or than #15, or if it overcomplicates things.