Class: Jekyll::RemoteTheme::MockGemspec

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/jekyll-remote-theme/mock_gemspec.rb

Overview

Jekyll::Theme expects the theme’s gemspec to tell it things like the path to the theme and runtime dependencies. MockGemspec serves as a stand in, since remote themes don’t need Gemspecs

Constant Summary collapse

DEPENDENCY_PREFIX =
%r!^\s*[a-z]+\.add_(?:runtime_)?dependency!.freeze
DEPENDENCY_REGEX =
%r!#{DEPENDENCY_PREFIX}\(?\s*["']([a-z_-]+)["']!.freeze

Instance Method Summary collapse

Constructor Details

#initialize(theme) ⇒ MockGemspec

Returns a new instance of MockGemspec.



15
16
17
# File 'lib/jekyll-remote-theme/mock_gemspec.rb', line 15

def initialize(theme)
  @theme = theme
end

Instance Method Details

#runtime_dependenciesObject



19
20
21
22
23
# File 'lib/jekyll-remote-theme/mock_gemspec.rb', line 19

def runtime_dependencies
  @runtime_dependencies ||= dependency_names.map do |name|
    Gem::Dependency.new(name)
  end
end