-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This makes Lamprey configurable, beginning with a simple repository type configuration option. Adds command line arguments with `OptionParser`.
- Loading branch information
Tom Johnson
committed
Jan 31, 2017
1 parent
a1065ec
commit e20252a
Showing
4 changed files
with
197 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
#!/usr/bin/env ruby | ||
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..', 'app'))) | ||
require 'lamprey' | ||
require 'optparse' | ||
|
||
options = {} | ||
|
||
OptionParser.new do |opts| | ||
opts.banner = 'Usage: lamprey [options]' | ||
|
||
opts.on("-rREPO", "--repository=REPO", 'Set the repository') do |repo| | ||
options[:repository] = repo.to_sym | ||
end | ||
end.parse! | ||
|
||
RDF::Lamprey::Config.configure!(**options) | ||
|
||
RDF::Lamprey.run! |
Oops, something went wrong.