rack-dev-mark 0.7.4 → 0.7.9

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: 5e1a655c2468e1c6f30cefe314b3c41d55668b87
4
+ data.tar.gz: 1e0267dc11b3cc3714c8d54709ecb0f7258227d5
5
5
  SHA512:
6
- metadata.gz: 64944f433a68c065feb9618dc55172391bd1c5d761845ef8cf4a1d9086ba4657d71a3614cdb3fa4a01978d964755d756120c9b288a0fa6465154a52dddaa83a1
7
- data.tar.gz: 602fa4ab9b0bfd1e04bea2d8ef8dafb107e98705ecd3c389ee1809467635bb93a5102ad6b6d27f4dfcd0138d81b5778deb86d4f0d88bf430e13800e915a72861
6
+ metadata.gz: 93032feab22d84a7780d5c7f465f7b147b86dd17dcf1f1c9ec1bcd3e6d9c3769ca6c2c0051fca619f9037b94b4cfa94d0fc700452eab4603f06f4c6c6fa77bb3
7
+ data.tar.gz: e84bda81dff22e7bf577ec8f33b19b22fad4e9232f8824941b758d3959908d593f25e4535f61803fcdd94970aaffcbdfcb37541ec43e4dee9f0309c7eed0b2ed
@@ -1,25 +1,46 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 1.9.3
5
- - 2.0.0
6
- - 2.1
7
- - 2.2
4
+ - 2.3
5
+ - 2.4
6
+ - 2.5
7
+ - 2.6
8
+
9
+ install:
10
+ - "gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true"
11
+ - "gem install bundler -v '< 2'"
12
+ - "bundle install --jobs=3 --retry=3"
8
13
 
9
14
  env:
10
15
  -
11
- - RACK_VERSION=1.1.0
12
- - RACK_VERSION=1.2.0
13
16
  - RACK_VERSION=1.3.0
14
17
  - RACK_VERSION=1.4.0
15
18
  - RACK_VERSION=1.5.0
16
19
  - RACK_VERSION=1.6.0
17
- - RAILS_VERSION=3.2.0
20
+ - RACK_VERSION=2.0.0
18
21
  - RAILS_VERSION=4.0.0
19
22
  - RAILS_VERSION=4.1.0
20
23
  - RAILS_VERSION=4.2.0
24
+ - RAILS_VERSION=5.0.0
25
+ - RAILS_VERSION=5.1.0
26
+ - RAILS_VERSION=5.2.0
21
27
  - I18N_VERSION=0.6.0
22
28
 
29
+ matrix:
30
+ allow_failures:
31
+ - rvm: 2.4
32
+ env: RAILS_VERSION=4.0.0
33
+ - rvm: 2.4
34
+ env: RAILS_VERSION=4.1.0
35
+ - rvm: 2.5
36
+ env: RAILS_VERSION=4.0.0
37
+ - rvm: 2.5
38
+ env: RAILS_VERSION=4.1.0
39
+ - rvm: 2.6
40
+ env: RAILS_VERSION=4.0.0
41
+ - rvm: 2.6
42
+ env: RAILS_VERSION=4.1.0
43
+
23
44
  script: "bundle exec rake spec"
24
45
 
25
46
  branches:
data/Gemfile CHANGED
@@ -4,4 +4,6 @@ gem "rack", "~> #{ENV['RACK_VERSION']}" if ENV['RACK_VERSION'].to_s != ''
4
4
  gem "rails", "~> #{ENV['RAILS_VERSION']}" if ENV['RAILS_VERSION'].to_s != ''
5
5
  gem "i18n", "~> #{ENV['I18N_VERSION']}" if ENV['I18N_VERSION'].to_s != ''
6
6
 
7
+ gem 'gem-release', '~> 2.0.0.dev.5'
8
+
7
9
  gemspec
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # rack-dev-mark
2
2
 
3
3
  [![Gem Version][gem-image]][gem-link]
4
+ [![Download][download-image]][download-link]
4
5
  [![Dependency Status][deps-image]][deps-link]
5
6
  [![Build Status][build-image]][build-link]
6
7
  [![Coverage Status][cov-image]][cov-link]
@@ -232,12 +233,14 @@ Copyright (c) 2014 Daisuke Taniwaki. See [LICENSE](LICENSE) for details.
232
233
 
233
234
  [gem-image]: https://badge.fury.io/rb/rack-dev-mark.svg
234
235
  [gem-link]: http://badge.fury.io/rb/rack-dev-mark
235
- [build-image]: https://secure.travis-ci.org/dtaniwaki/rack-dev-mark.png
236
+ [download-image]:https://img.shields.io/gem/dt/rack-dev-mark.svg
237
+ [download-link]:https://rubygems.org/gems/rack-dev-mark
238
+ [build-image]: https://secure.travis-ci.org/dtaniwaki/rack-dev-mark.svg
236
239
  [build-link]: http://travis-ci.org/dtaniwaki/rack-dev-mark
237
240
  [deps-image]: https://gemnasium.com/dtaniwaki/rack-dev-mark.svg
238
241
  [deps-link]: https://gemnasium.com/dtaniwaki/rack-dev-mark
239
242
  [cov-image]: https://coveralls.io/repos/dtaniwaki/rack-dev-mark/badge.png
240
243
  [cov-link]: https://coveralls.io/r/dtaniwaki/rack-dev-mark
241
- [gpa-image]: https://codeclimate.com/github/dtaniwaki/rack-dev-mark.png
244
+ [gpa-image]: https://codeclimate.com/github/dtaniwaki/rack-dev-mark.svg
242
245
  [gpa-link]: https://codeclimate.com/github/dtaniwaki/rack-dev-mark
243
246
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.4
1
+ 0.7.9
@@ -3,7 +3,8 @@ module Rack
3
3
  module ActionControllerHelpers
4
4
  module ClassMethods
5
5
  def skip_rack_dev_mark(options = {})
6
- before_filter options do
6
+ before_action_method_name = respond_to?(:before_action) ? :before_action : :before_filter
7
+ public_send(before_action_method_name, options) do
7
8
  disable_rack_dev_mark
8
9
  end
9
10
  end
@@ -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
 
@@ -20,7 +20,7 @@ module Rack
20
20
  racks << theme
21
21
  end
22
22
 
23
- app.config.app_middleware.send(insert_method, *racks)
23
+ app.config.middleware.send(insert_method, *racks)
24
24
  end
25
25
  end
26
26
 
@@ -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,7 +16,9 @@ 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.add_dependency "rack", ">= 1.1"
19
+ gem.required_ruby_version = ['>= 2.3']
20
+
21
+ gem.add_dependency "rack", ['>= 1.1', '< 2.3']
20
22
 
21
23
  gem.add_development_dependency "rake"
22
24
  gem.add_development_dependency "rspec", ">= 3.0"
@@ -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
@@ -11,6 +11,7 @@ shared_context 'forked spec' do
11
11
  Process.waitpid2 pid
12
12
  res = Marshal.load(read)
13
13
  example.example.send :set_exception, res if res && res.to_s != ''
14
+ example.instance_variable_set('@executed', true)
14
15
  read.close
15
16
  end
16
17
  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.9
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: 2020-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.1'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '2.3'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '1.1'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2.3'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: rake
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -134,7 +140,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
140
  requirements:
135
141
  - - ">="
136
142
  - !ruby/object:Gem::Version
137
- version: '0'
143
+ version: '2.3'
138
144
  required_rubygems_version: !ruby/object:Gem::Requirement
139
145
  requirements:
140
146
  - - ">="
@@ -142,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
148
  version: '0'
143
149
  requirements: []
144
150
  rubyforge_project:
145
- rubygems_version: 2.4.5
151
+ rubygems_version: 2.6.8
146
152
  signing_key:
147
153
  specification_version: 4
148
154
  summary: Differentiate development environment from production
@@ -162,4 +168,3 @@ test_files:
162
168
  - spec/spec_helper.rb
163
169
  - spec/support/fork_helper.rb
164
170
  - spec/support/theme_helper.rb
165
- has_rdoc: