class Develry::Site
Encapsulates a specific {Project} develry is used for
Attributes
project[R]
root[R]
Public Class Methods
new(project)
click to toggle source
# File lib/develry/site.rb, line 12 def initialize(project) @project = project @root = project.root end
Public Instance Methods
init()
click to toggle source
Initialize develry using default config
@return [undefined]
@api private
# File lib/develry/site.rb, line 34 def init Initializer.call(self) puts 'Run bundle install to complete the develry installation' self end
init_spec_helper()
click to toggle source
Initialize project and load shared specs
Expects to be called from $application_root/spec/spec_helper.rb
@return [self]
@api private
# File lib/develry/site.rb, line 24 def init_spec_helper Project::Initializer::Rspec.call(project) self end
sync()
click to toggle source
Sync gemfiles
@return [undefined]
@api private
# File lib/develry/site.rb, line 45 def sync target = root.join(GEMFILE_NAME) FileUtils.cp(SHARED_GEMFILE_PATH, target) puts "Successfully synced #{target}" self end
update()
click to toggle source
Sync gemfiles and run bundle update
@return [undefined]
@api private
# File lib/develry/site.rb, line 57 def update sync system(BUNDLE_UPDATE) self end