Module: JekyllPush
- Defined in:
- lib/jekyll_push.rb,
lib/jekyll_push/site.rb,
lib/jekyll_push/error.rb,
lib/jekyll_push/local.rb,
lib/jekyll_push/utils.rb,
lib/jekyll_push/branch.rb,
lib/jekyll_push/travis.rb,
lib/jekyll_push/command.rb
Defined Under Namespace
Modules: Error, Local, Travis, Utils
Classes: Branch, Command, Site
Class Method Summary
collapse
Class Method Details
.config_from_file(path = config_path) ⇒ Hash
39
40
41
42
43
|
# File 'lib/jekyll_push.rb', line 39
def self.config_from_file(path = config_path)
YAML.load_file path
rescue StandardError => e
raise JekyllPush::Error::InvalidConfig, "Could not load config file from path '#{path}'\n#{e}"
end
|
.config_path ⇒ String
33
34
35
|
# File 'lib/jekyll_push.rb', line 33
def self.config_path
"#{`pwd`.strip}/_config.yml"
end
|
.run_command(arg, opts) ⇒ Nil
21
22
23
24
25
26
27
28
29
|
# File 'lib/jekyll_push.rb', line 21
def self.run_command(arg, opts)
site = JekyllPush::Site.new
branch = JekyllPush::Branch.new arg, opts
site.rebuild branch.target
branch.push site.dir
puts Rainbow("\nDone ✓").green
end
|