Module: Ritual

Defined in:
lib/ritual.rb,
lib/ritual/lib.rb,
lib/ritual/version.rb,
lib/ritual/changelog.rb,
lib/ritual/extension.rb,
lib/ritual/version_file.rb,
lib/ritual/extension/base.rb,
lib/ritual/extension/jruby.rb,
lib/ritual/extension/standard.rb

Defined Under Namespace

Modules: Extension Classes: Changelog, VersionFile

Constant Summary collapse

Error =
Class.new(RuntimeError)
VERSION =
[0, 5, 1]

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.componentObject

Returns the value of attribute component.



129
130
131
# File 'lib/ritual.rb', line 129

def component
  @component
end

Class Method Details

.changelogObject



150
151
152
# File 'lib/ritual.rb', line 150

def changelog
  @changelog ||= Changelog.new('CHANGELOG')
end

.default_library_nameObject



135
136
137
138
139
140
141
142
143
144
# File 'lib/ritual.rb', line 135

def default_library_name
  gemspecs = Dir['*.gemspec']
  names = gemspecs.map{|path| File.basename(path, '.gemspec')}
  if names.size.zero?
    abort "cannot find any gemspecs"
  elsif names.size > 1
    abort "choose a gemspec: LIB=#{names.join('|')}"
  end
  names.first
end

.library_nameObject



131
132
133
# File 'lib/ritual.rb', line 131

def library_name
  ENV['LIB'] || default_library_name
end

.version_fileObject



146
147
148
# File 'lib/ritual.rb', line 146

def version_file
  @version ||= VersionFile.new("lib/#{library_name}/version.rb", library_name)
end