Sha256: 8b38d3dbfa711be86b9829141866653e824e3a6674a4134e6f90d6c488e4f317

Contents?: true

Size: 508 Bytes

Versions: 16

Compression:

Stored size: 508 Bytes

Contents

module RubySlippers
  module Engine
    class Repo < Hash
      include Template

      README = "https://github.com/%s/%s/raw/master/README.%s"

      def initialize name, config
        self[:name], @config = name, config
      end

      def readme
        markdown open(README %
          [@config[:github][:user], self[:name], @config[:github][:ext]]).read
      rescue Timeout::Error, OpenURI::HTTPError => e
        "This page isn't available."
      end
      alias :content readme
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
ruby_slippers-0.2.15 lib/ruby_slippers/repo.rb
ruby_slippers-0.2.8 lib/ruby_slippers/repo.rb
ruby_slippers-0.2.4 lib/ruby_slippers/repo.rb
ruby_slippers-0.2.3 lib/ruby_slippers/repo.rb
ruby_slippers-0.2.0 lib/ruby_slippers/repo.rb
ruby-slippers-0.1.43 lib/ruby_slippers/repo.rb
ruby-slippers-0.1.40 lib/ruby_slippers/repo.rb
ruby-slippers-0.1.11 lib/ruby_slippers/repo.rb
ruby-slippers-0.1.7 lib/ruby_slippers/repo.rb
ruby-slippers-0.1.2 lib/ruby_slippers/repo.rb
ruby-slippers-0.1.1 lib/ruby_slippers/repo.rb
ruby-slippers-0.0.26 lib/ruby_slippers/repo.rb
ruby-slippers-0.0.25 lib/ruby_slippers/repo.rb
ruby-slippers-0.0.13 lib/ruby_slippers/repo.rb
ruby-slippers-0.0.5 lib/ruby_slippers/repo.rb
ruby-slippers-0.0.1 lib/ruby_slippers/repo.rb