heroku_header 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,7 +19,7 @@ module HerokuHeader
19
19
  end
20
20
 
21
21
  def each(&block)
22
- return @response.each(&block) if !html_response? || !heroku_subdomain?
22
+ @response.each(&block) and return if !html_response? || !heroku_subdomain?
23
23
 
24
24
  @response.each do |resp|
25
25
  yield resp.gsub(%r{<body[^<]*>}, '\\0' + heroku_header.to_s)
@@ -32,7 +32,7 @@ module HerokuHeader
32
32
  end
33
33
 
34
34
  def heroku_subdomain?
35
- @env['HTTP_HOST'] && (!!@env['HTTP_HOST'].match(/#{@subdomain}\..+/))
35
+ @env['HTTP_HOST'] && @env['HTTP_HOST'].match(/#{@subdomain}\..+/)
36
36
  end
37
37
 
38
38
  def heroku_header
@@ -1,3 +1,3 @@
1
1
  module HerokuHeader
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -69,6 +69,8 @@ describe HerokuHeader::MiddleWare do
69
69
  end
70
70
 
71
71
  it "should not insert anything if we are not on a heroku subdomain" do
72
+ HerokuHeader::MiddleWare.any_instance.should_not_receive(:heroku_header)
73
+
72
74
  get 'http://intercom.io/'
73
75
  last_response.body.should == TestApp::DEFAULT_BODY
74
76
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_header
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -108,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  segments:
110
110
  - 0
111
- hash: 1013909249883803082
111
+ hash: 1351836858524438971
112
112
  required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  none: false
114
114
  requirements:
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  segments:
119
119
  - 0
120
- hash: 1013909249883803082
120
+ hash: 1351836858524438971
121
121
  requirements: []
122
122
  rubyforge_project:
123
123
  rubygems_version: 1.8.23