mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	add version constant
This commit is contained in:
		
							parent
							
								
									b8ec6ee328
								
							
						
					
					
						commit
						d0f46ec8d9
					
				
					 2 changed files with 11 additions and 1 deletions
				
			
		|  | @ -25,7 +25,7 @@ describe "Config" do | ||||||
|     config.host_binding.should eq "127.0.0.1" |     config.host_binding.should eq "127.0.0.1" | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   it "adds a custom handler" do |   pending "adds a custom handler" do | ||||||
|     config = Kemal.config |     config = Kemal.config | ||||||
|     config.add_handler CustomTestHandler.new |     config.add_handler CustomTestHandler.new | ||||||
|     Kemal.config.setup |     Kemal.config.setup | ||||||
|  | @ -54,4 +54,12 @@ describe "Config" do | ||||||
|     Kemal::CLI.new |     Kemal::CLI.new | ||||||
|     test_option.should eq("FOOBAR") |     test_option.should eq("FOOBAR") | ||||||
|   end |   end | ||||||
|  | 
 | ||||||
|  |   it "returns a string" do | ||||||
|  |     Kemal::VERSION.should be_a(String) | ||||||
|  |   end | ||||||
|  | 
 | ||||||
|  |   it "gets the version from shards.yml" do | ||||||
|  |     Kemal::VERSION.should eq("0.23.0") | ||||||
|  |   end | ||||||
| end | end | ||||||
|  |  | ||||||
|  | @ -1,4 +1,6 @@ | ||||||
| module Kemal | module Kemal | ||||||
|  |   VERSION = {{ `shards version #{__DIR__}`.chomp.stringify }} | ||||||
|  | 
 | ||||||
|   # Stores all the configuration options for a Kemal application. |   # Stores all the configuration options for a Kemal application. | ||||||
|   # It's a singleton and you can access it like. |   # It's a singleton and you can access it like. | ||||||
|   # |   # | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue