rack-dev-mark 0.7.4 → 0.7.5

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: a173b3197798c1b4bed2595c70a02d19a2cdfc6c
4
- data.tar.gz: dbb27824100c85d43e182b4db0013276f640a5fb
3
+ metadata.gz: ca44111688527d8330ecdc41fa0c4e95f576d8cf
4
+ data.tar.gz: 6b010b7f9be269688d553b1c33e7afac38a3a3b3
5
5
  SHA512:
6
- metadata.gz: 64944f433a68c065feb9618dc55172391bd1c5d761845ef8cf4a1d9086ba4657d71a3614cdb3fa4a01978d964755d756120c9b288a0fa6465154a52dddaa83a1
7
- data.tar.gz: 602fa4ab9b0bfd1e04bea2d8ef8dafb107e98705ecd3c389ee1809467635bb93a5102ad6b6d27f4dfcd0138d81b5778deb86d4f0d88bf430e13800e915a72861
6
+ metadata.gz: 94427004cb1a63f329b4b4ae0cbd4f8deba84d49064a3d76f0ea8b6f9f4b402176b72624839b6135f9ade29d9b8d459d206acf2f6d4f6954cdeb8fba413c6f16
7
+ data.tar.gz: 2b0417fd89b0889c93bfe1357ef8bd9efc97064ac329f8b713ec8d8f11a82252ea0e6974841661ab89219753293c01401224d2e6011ab33cfd19fea79a0c2f21
@@ -1,11 +1,14 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 1.9.3
5
4
  - 2.0.0
6
5
  - 2.1
7
6
  - 2.2
8
7
 
8
+ install:
9
+ - "gem install bundler"
10
+ - "bundle install --jobs=3 --retry=3"
11
+
9
12
  env:
10
13
  -
11
14
  - RACK_VERSION=1.1.0
data/README.md CHANGED
@@ -232,12 +232,12 @@ Copyright (c) 2014 Daisuke Taniwaki. See [LICENSE](LICENSE) for details.
232
232
 
233
233
  [gem-image]: https://badge.fury.io/rb/rack-dev-mark.svg
234
234
  [gem-link]: http://badge.fury.io/rb/rack-dev-mark
235
- [build-image]: https://secure.travis-ci.org/dtaniwaki/rack-dev-mark.png
235
+ [build-image]: https://secure.travis-ci.org/dtaniwaki/rack-dev-mark.svg
236
236
  [build-link]: http://travis-ci.org/dtaniwaki/rack-dev-mark
237
237
  [deps-image]: https://gemnasium.com/dtaniwaki/rack-dev-mark.svg
238
238
  [deps-link]: https://gemnasium.com/dtaniwaki/rack-dev-mark
239
239
  [cov-image]: https://coveralls.io/repos/dtaniwaki/rack-dev-mark/badge.png
240
240
  [cov-link]: https://coveralls.io/r/dtaniwaki/rack-dev-mark
241
- [gpa-image]: https://codeclimate.com/github/dtaniwaki/rack-dev-mark.png
241
+ [gpa-image]: https://codeclimate.com/github/dtaniwaki/rack-dev-mark.svg
242
242
  [gpa-link]: https://codeclimate.com/github/dtaniwaki/rack-dev-mark
243
243
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.4
1
+ 0.7.5
@@ -33,7 +33,7 @@ module Rack
33
33
  end
34
34
  end
35
35
  response.close if response.respond_to?(:close)
36
- headers['Content-Length'] &&= bytesize(new_body).to_s
36
+ headers['Content-Length'] &&= new_body.bytesize.to_s
37
37
  response = [new_body]
38
38
  end
39
39
 
@@ -17,15 +17,20 @@ module Rack
17
17
  title << timestamp if timestamp.to_s != ''
18
18
  title = title.join("&#10;")
19
19
 
20
- s = <<-EOS
20
+ style_tag_str = <<-EOS
21
21
  #{stylesheet_link_tag "github-fork-ribbon-css/gh-fork-ribbon.css"}
22
22
  <!--[if lt IE 9]>
23
23
  #{stylesheet_link_tag "github-fork-ribbon-css/gh-fork-ribbon.ie.css"}
24
24
  <![endif]-->
25
+ EOS
26
+
27
+ div_tag_str = <<-EOS
25
28
  <div class="github-fork-ribbon-wrapper #{position}#{fixed}" onClick="this.style.display='none'" title="#{title}"><div class="github-fork-ribbon #{color}"><span class="github-fork-ribbon-text">#{env}</span></div></div>
26
29
  EOS
27
30
 
28
- html.sub %r{(<body[^>]*>)}i, "\\1#{s.strip}"
31
+ html
32
+ .sub(%r{(</head>)}i, "#{style_tag_str.strip}\\1")
33
+ .sub(%r{(<body[^>]*>)}i, "\\1#{div_tag_str.strip}")
29
34
  end
30
35
  end
31
36
  end
@@ -16,6 +16,8 @@ Gem::Specification.new do |gem|
16
16
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
17
  gem.require_paths = ['lib']
18
18
 
19
+ gem.required_ruby_version = '>= 2.0.0'
20
+
19
21
  gem.add_dependency "rack", ">= 1.1"
20
22
 
21
23
  gem.add_development_dependency "rake"
@@ -5,11 +5,10 @@ describe Rack::DevMark::Theme::GithubForkRibbon do
5
5
  it_behaves_like "theme" do
6
6
  let :out do
7
7
  s = <<-EOS
8
- <html><head>head<title>title</title></head><body><style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.css"}</style>
8
+ <html><head>head<title>title</title><style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.css"}</style>
9
9
  <!--[if lt IE 9]>
10
10
  <style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.ie.css"}</style>
11
- <![endif]-->
12
- <div class="github-fork-ribbon-wrapper left" onClick="this.style.display='none'" title="rev&#10;time"><div class="github-fork-ribbon red"><span class="github-fork-ribbon-text">env</span></div></div>body</body></html>
11
+ <![endif]--></head><body><div class="github-fork-ribbon-wrapper left" onClick="this.style.display='none'" title="rev&#10;time"><div class="github-fork-ribbon red"><span class="github-fork-ribbon-text">env</span></div></div>body</body></html>
13
12
  EOS
14
13
  s.strip
15
14
  end
@@ -20,11 +19,10 @@ describe Rack::DevMark::Theme::GithubForkRibbon do
20
19
  it_behaves_like "theme" do
21
20
  let :out do
22
21
  s = <<-EOS
23
- <html><head>head<title>title</title></head><body><style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.css"}</style>
22
+ <html><head>head<title>title</title><style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.css"}</style>
24
23
  <!--[if lt IE 9]>
25
24
  <style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.ie.css"}</style>
26
- <![endif]-->
27
- <div class="github-fork-ribbon-wrapper right" onClick="this.style.display='none'" title="rev&#10;time"><div class="github-fork-ribbon red"><span class="github-fork-ribbon-text">env</span></div></div>body</body></html>
25
+ <![endif]--></head><body><div class="github-fork-ribbon-wrapper right" onClick="this.style.display='none'" title="rev&#10;time"><div class="github-fork-ribbon red"><span class="github-fork-ribbon-text">env</span></div></div>body</body></html>
28
26
  EOS
29
27
  s.strip
30
28
  end
@@ -36,11 +34,10 @@ describe Rack::DevMark::Theme::GithubForkRibbon do
36
34
  it_behaves_like "theme" do
37
35
  let :out do
38
36
  s = <<-EOS
39
- <html><head>head<title>title</title></head><body><style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.css"}</style>
37
+ <html><head>head<title>title</title><style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.css"}</style>
40
38
  <!--[if lt IE 9]>
41
39
  <style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.ie.css"}</style>
42
- <![endif]-->
43
- <div class="github-fork-ribbon-wrapper left" onClick="this.style.display='none'" title="rev&#10;time"><div class="github-fork-ribbon orange"><span class="github-fork-ribbon-text">env</span></div></div>body</body></html>
40
+ <![endif]--></head><body><div class="github-fork-ribbon-wrapper left" onClick="this.style.display='none'" title="rev&#10;time"><div class="github-fork-ribbon orange"><span class="github-fork-ribbon-text">env</span></div></div>body</body></html>
44
41
  EOS
45
42
  s.strip
46
43
  end
@@ -52,11 +49,10 @@ describe Rack::DevMark::Theme::GithubForkRibbon do
52
49
  it_behaves_like "theme" do
53
50
  let :out do
54
51
  s = <<-EOS
55
- <html><head>head<title>title</title></head><body><style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.css"}</style>
52
+ <html><head>head<title>title</title><style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.css"}</style>
56
53
  <!--[if lt IE 9]>
57
54
  <style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.ie.css"}</style>
58
- <![endif]-->
59
- <div class="github-fork-ribbon-wrapper left fixed" onClick="this.style.display='none'" title="rev&#10;time"><div class="github-fork-ribbon red"><span class="github-fork-ribbon-text">env</span></div></div>body</body></html>
55
+ <![endif]--></head><body><div class="github-fork-ribbon-wrapper left fixed" onClick="this.style.display='none'" title="rev&#10;time"><div class="github-fork-ribbon red"><span class="github-fork-ribbon-text">env</span></div></div>body</body></html>
60
56
  EOS
61
57
  s.strip
62
58
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-dev-mark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daisuke Taniwaki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-20 00:00:00.000000000 Z
11
+ date: 2016-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -134,7 +134,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - ">="
136
136
  - !ruby/object:Gem::Version
137
- version: '0'
137
+ version: 2.0.0
138
138
  required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  requirements:
140
140
  - - ">="
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  requirements: []
144
144
  rubyforge_project:
145
- rubygems_version: 2.4.5
145
+ rubygems_version: 2.5.1
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Differentiate development environment from production