corn 0.5.7 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7adcac6cd343ea4ceb786ec24182d90eeb416384
4
- data.tar.gz: f94f2cd9f9c2eb685de12fce3473fe93ab1aaebb
3
+ metadata.gz: b5d92ee0a0f18b9aa77fdd26158cb0b71838c29d
4
+ data.tar.gz: 50e879185147300932322f7629e78ba30b761e10
5
5
  SHA512:
6
- metadata.gz: 9c4a2a716cce0a5db01e713129e60023ac5627b1b4c592e1f47e896e9705c38434d7f8100bf8a5b216e073279c93f32e956438158e3a54bb8150c987f481b2ac
7
- data.tar.gz: 90ab740aee78df5ffd2068b542bf303d09b1cbe2154f6285ad6e0d3fd0f3e680b1d2d11fd0e6d96acbdff6496fcdcc87886817866728b4c155eec42c1d8b06f4
6
+ metadata.gz: 29bdfde32e0f98fae6084fa3f5c1ff0c4e4c93f0d753c8c3cf9bac23462b7bef57b63745488132e92a30fcb7f05faa4b85bef3be57a75d994460987416158ef5
7
+ data.tar.gz: 85a69c7c7662acca5a9357dff1f9f563f0526728f6f3ccec5d51a99baca7472e9679a90a84559bddbcdba6529d672bfcc8c0afdde0c45baf26dab897a41dd0ef
@@ -24,8 +24,8 @@ module Corn
24
24
  #
25
25
  config({
26
26
  :logger => Logger.new(STDOUT),
27
- :client_id => ENV['CORN_CLIENT_ID'],
28
- :host => ENV['CORN_HOST'],
27
+ :client_id => lambda { ENV['CORN_CLIENT_ID'] },
28
+ :host => lambda { ENV['CORN_HOST'] },
29
29
  :ssl_verify_peer => false,
30
30
  :ssl_ca_file => nil,
31
31
  :ssl_ca_path => nil,
@@ -40,6 +40,12 @@ module Corn
40
40
 
41
41
  module_function
42
42
  def configured?
43
+ if host.nil? || host.empty?
44
+ Corn.logger.info("Corn host not found")
45
+ end
46
+ if client_id.nil? || client_id.empty?
47
+ Corn.logger.info("Corn client id not found")
48
+ end
43
49
  !!(host && client_id)
44
50
  end
45
51
 
@@ -41,7 +41,12 @@ module Corn
41
41
  end
42
42
 
43
43
  def initialize(app)
44
- @app = Corn.configured? ? ProfilingApp.new(app) : app
44
+ @app = if Corn.configured?
45
+ Corn.logger.info("Corn configuration found, initializing Corn rack middleware")
46
+ ProfilingApp.new(app)
47
+ else
48
+ app
49
+ end
45
50
  end
46
51
 
47
52
  def call(env)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xiao Li
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-26 00:00:00.000000000 Z
11
+ date: 2014-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sampling_prof