Sha256: 78a39c8fbd8b370b466592cc428636ce41939f59832d13829037f74d775dc837

Contents?: true

Size: 462 Bytes

Versions: 123

Compression:

Stored size: 462 Bytes

Contents

require 'uri'
require 'set'

class OutboundHosts
  def self.list    
    uris = Set.new

    Dir['lib/**/*.rb'].each do |file|
      content = File.read(file)

      content.each_line do |line|
        next if line =~ /homepage_url/
    
        if line =~ /("|')(https:\/\/.*)("|')/
          uri = URI.parse($2)
          uris << [uri.host, uri.port]
        end
      end
    end

    uris.each do |uri|
      puts "#{uri.first} #{uri.last}"
    end
  end
end

Version data entries

123 entries across 123 versions & 20 rubygems

Version Path
tanga_activemerchant-1.38.0.5 lib/support/outbound_hosts.rb
tanga_activemerchant-1.38.0.4 lib/support/outbound_hosts.rb
tanga_activemerchant-1.38.0.3 lib/support/outbound_hosts.rb
tanga_activemerchant-1.38.0.2 lib/support/outbound_hosts.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/activemerchant-1.44.1/lib/support/outbound_hosts.rb
tanga_activemerchant-1.38.0.1 lib/support/outbound_hosts.rb
tanga_activemerchant-1.38.0 lib/support/outbound_hosts.rb
tanga_activemerchant-1.37.0 lib/support/outbound_hosts.rb
activemerchant-1.47.0 lib/support/outbound_hosts.rb
activemerchant-1.46.0 lib/support/outbound_hosts.rb
activemerchant-1.45.0 lib/support/outbound_hosts.rb
aktivemerchant-2.0.0 lib/support/outbound_hosts.rb
activemerchant-1.44.1 lib/support/outbound_hosts.rb
activemerchant-1.44.0 lib/support/outbound_hosts.rb
activemerchant-1.43.3 lib/support/outbound_hosts.rb
activemerchant-1.43.1 lib/support/outbound_hosts.rb
activemerchant-1.43.0 lib/support/outbound_hosts.rb
activemerchant-1.42.9 lib/support/outbound_hosts.rb
activemerchant-1.42.8 lib/support/outbound_hosts.rb
activemerchant-1.42.7 lib/support/outbound_hosts.rb