bin/lamprey in rdf-ldp-0.9.2 vs bin/lamprey in rdf-ldp-0.9.3
- old
+ new
@@ -1,5 +1,19 @@
#!/usr/bin/env ruby
-$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..', 'app')))
+$LOAD_PATH
+ .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!