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 +4 -4
- data/.travis.yml +4 -1
- data/README.md +2 -2
- data/VERSION +1 -1
- data/lib/rack/dev-mark/middleware.rb +1 -1
- data/lib/rack/dev-mark/theme/github_fork_ribbon.rb +7 -2
- data/rack-dev-mark.gemspec +2 -0
- data/spec/rack/dev-mark/theme/github_fork_ribbon_spec.rb +8 -12
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca44111688527d8330ecdc41fa0c4e95f576d8cf
|
4
|
+
data.tar.gz: 6b010b7f9be269688d553b1c33e7afac38a3a3b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94427004cb1a63f329b4b4ae0cbd4f8deba84d49064a3d76f0ea8b6f9f4b402176b72624839b6135f9ade29d9b8d459d206acf2f6d4f6954cdeb8fba413c6f16
|
7
|
+
data.tar.gz: 2b0417fd89b0889c93bfe1357ef8bd9efc97064ac329f8b713ec8d8f11a82252ea0e6974841661ab89219753293c01401224d2e6011ab33cfd19fea79a0c2f21
|
data/.travis.yml
CHANGED
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.
|
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.
|
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.
|
1
|
+
0.7.5
|
@@ -17,15 +17,20 @@ module Rack
|
|
17
17
|
title << timestamp if timestamp.to_s != ''
|
18
18
|
title = title.join(" ")
|
19
19
|
|
20
|
-
|
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
|
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
|
data/rack-dev-mark.gemspec
CHANGED
@@ -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
|
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 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 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
|
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 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 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
|
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 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 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
|
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 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 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
|
+
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:
|
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:
|
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.
|
145
|
+
rubygems_version: 2.5.1
|
146
146
|
signing_key:
|
147
147
|
specification_version: 4
|
148
148
|
summary: Differentiate development environment from production
|