Sha256: ada8172393cff5dc9637cbbadfe4a5f87b167d2cacde95503f3f958d08f2261c
Contents?: true
Size: 1.16 KB
Versions: 3
Compression:
Stored size: 1.16 KB
Contents
require 'arigato/version' require 'arigato/cli' require 'arigato/view' module Arigato class << self def themes_dir Pathname.new(File.join(File.dirname(__FILE__), 'arigato', 'themes')) end def specs(file) path = Pathname.new(file) lockfile = path.sub_ext('.lock') dsl = Bundler::Dsl.new dsl.eval_gemfile(file) specs = dsl.to_definition(lockfile, {}).specs.to_a specs.unshift(self.spec('Ruby', 'http://www.ruby-lang.org/', 'Yukihiro Matsumoto')) specs.reject { |spec| spec.name == 'arigato' } end def specs_array(file, labeld = true) specs(file).map do |spec| { name: spec.name, homepage: spec.homepage, author: spec.author } end end def specs_hash(file) hash = {} specs(file).each do |spec| hash[spec.name] = { homepage: spec.homepage, author: spec.author } end hash end def spec(name, homepage, author) Gem::Specification.new do |gem| gem.name = name gem.authors = [author] gem.homepage = homepage end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
arigato-0.1.5 | lib/arigato.rb |
arigato-0.1.4 | lib/arigato.rb |
arigato-0.1.3 | lib/arigato.rb |