Sha256: edd2d94e790e9094b619bb5afd2e884396442cd3180cd06be42087514cae6eb5

Contents?: true

Size: 802 Bytes

Versions: 5

Compression:

Stored size: 802 Bytes

Contents

task :@project do
  begin
    @project_options_file = 'inochi.opts'
    @project_options = YAML.load_file(@project_options_file).to_hash

    # load the project module
    library_file = Dir['lib/*/inochi.rb'].first
    package_name = File.basename(File.dirname(library_file))
    library_name = File.read(library_file)[/\b(module|class)\b\s+(\w+)/, 2]

    $LOAD_PATH.unshift 'lib'
    require "#{package_name}/inochi"

    @project_module = Object.const_get(library_name)
    @project_package_name = package_name
    @project_library_name = library_name
    @project_gem_file = "#{@project_package_name}-#{@project_module::VERSION}.gem"
  rescue
    puts
    puts 'The current directory is not an Inochi project.'
    puts 'Run the `inochi init` command to make it one.'
    puts
    raise
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
inochi-4.0.1 lib/inochi/tasks/0-project.rake
inochi-4.0.0 lib/inochi/tasks/0-project.rake
inochi-3.0.0 lib/inochi/tasks/0-project.rake
inochi-2.0.1 lib/inochi/tasks/0-project.rake
inochi-2.0.0 lib/inochi/tasks/project.rake