Module: Thanks
- Defined in:
- lib/thanks.rb,
lib/thanks/version.rb,
lib/thanks/registry.rb
Constant Summary collapse
- VERSION =
"0.2.0"- REGISTRY =
{ "bundler" => "https://rubytogether.org", "gemstash" => "https://rubytogether.org", }
Class Method Summary collapse
Class Method Details
.print_list ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/thanks.rb', line 5 def self.print_list matches = REGISTRY.select do |name, url| system_gems.include?(name) end if matches.any? puts "Sweet! You are using gems with donation pages!\n\n" matches.each { |name, url| puts " - #{name}\t#{url}" } end end |
.system_gems ⇒ Object
17 18 19 |
# File 'lib/thanks.rb', line 17 def self.system_gems @_system_gems ||= `gem list`.split("\n").map(&:split).map(&:first) end |