module Arigato

Constants

VERSION

arigato version

Public Class Methods

spec(name, homepage, author) click to toggle source
# File lib/arigato.rb, line 44
def spec(name, homepage, author)
  Gem::Specification.new do |gem|
    gem.name          = name
    gem.authors       = [author]
    gem.homepage      = homepage
  end
end
specs(file) click to toggle source
# File lib/arigato.rb, line 11
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
specs_array(file, labeld = true) click to toggle source
# File lib/arigato.rb, line 23
def specs_array(file, labeld = true)
  specs(file).map do |spec|
    {
      name: spec.name,
      homepage: spec.homepage,
      author: spec.author
    }
  end
end
specs_hash(file) click to toggle source
# File lib/arigato.rb, line 33
def specs_hash(file)
  hash = {}
  specs(file).each do |spec|
    hash[spec.name] = {
      homepage: spec.homepage,
      author: spec.author
    }
  end
  hash
end
themes_dir() click to toggle source
# File lib/arigato.rb, line 7
def themes_dir
  Pathname.new(File.join(File.dirname(__FILE__), 'arigato', 'themes'))
end