Enable alternative configuration file.
This commit is contained in:
		
							parent
							
								
									988e9324ea
								
							
						
					
					
						commit
						f218ac685f
					
				
					 1 changed files with 6 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -85,16 +85,18 @@ class Baguette::Configuration
 | 
			
		|||
		OptionParser.parse do |parser|
 | 
			
		||||
			parser.banner = "usage: #{PROGRAM_NAME} [-ns][--project project-name]"
 | 
			
		||||
 | 
			
		||||
			parser.on "-s", "--simulation",
 | 
			
		||||
				"Print configuration then quit." do
 | 
			
		||||
			parser.on "-s", "--simulation", "Print configuration then quit." do
 | 
			
		||||
				simulation = true
 | 
			
		||||
			end
 | 
			
		||||
 | 
			
		||||
			parser.on "-n", "--no-configuration",
 | 
			
		||||
				"No configuration file should be read." do
 | 
			
		||||
			parser.on "-n", "--no-configuration", "No configuration file should be read." do
 | 
			
		||||
				no_configuration = true
 | 
			
		||||
			end
 | 
			
		||||
 | 
			
		||||
			parser.on "--configuration file", "Configuration file to use." do |f|
 | 
			
		||||
				configuration_file = f
 | 
			
		||||
			end
 | 
			
		||||
 | 
			
		||||
			parser.on "-v verbosity", "--verbosity level",
 | 
			
		||||
				"Verbosity level. From 0 to 4. Default: 4" do |v|
 | 
			
		||||
				Baguette::Context.verbosity = v.to_i
 | 
			
		||||
| 
						 | 
				
			
			@ -110,7 +112,6 @@ class Baguette::Configuration
 | 
			
		|||
			end
 | 
			
		||||
 | 
			
		||||
			parser.on "-h", "--help", "Show this help" do
 | 
			
		||||
				Baguette::Log.warning "for the first option parsing!"
 | 
			
		||||
				puts parser
 | 
			
		||||
				help = true
 | 
			
		||||
			end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue