Class: ECSBundler::ProjectSpecification

Inherits:
Object
  • Object
show all
Defined in:
lib/ecs_bundler/project_specification.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



11
# File 'lib/ecs_bundler/project_specification.rb', line 11

def description; end

#homepageObject



15
# File 'lib/ecs_bundler/project_specification.rb', line 15

def homepage; end

#licenseObject



13
# File 'lib/ecs_bundler/project_specification.rb', line 13

def license; end

#nameObject



6
7
8
9
# File 'lib/ecs_bundler/project_specification.rb', line 6

def name
  return Rails.application.class.parent.name if defined?(Rails)
  ECSBundler.config[:project].gsub(/[^a-zA-Z]+/, '-')
end

#runtime_dependenciesObject



25
26
27
# File 'lib/ecs_bundler/project_specification.rb', line 25

def runtime_dependencies
  Bundler.load.current_dependencies
end

#versionObject



17
18
19
20
21
22
23
# File 'lib/ecs_bundler/project_specification.rb', line 17

def version
  path = [
    (Rails.root.join('VERSION') if defined?(Rails)),
    "#{Dir.pwd}/VERSION"
  ].compact.find { |path| File.exist?(path) }
  path ? File.read(path) : nil
end