bard-staging_banner 0.1.0 → 0.2.0

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
- SHA1:
3
- metadata.gz: 3cea06ef3032012d955c2564856635c3cf1b9bcb
4
- data.tar.gz: 58c35d7019a04c6dce4831453f17e84454c4c5a7
2
+ SHA256:
3
+ metadata.gz: 73e3bddbb020b1a98d81b0ea6a26e85274a5388ee254a97ca8f5c1fe37b47c6c
4
+ data.tar.gz: 18acc6a44d8c3402b5e4f97c43b85646755d926c05e7a8112ee41e814de04f49
5
5
  SHA512:
6
- metadata.gz: cf858ac4b951ef3dee086ee0c45499dc0124fb3d7a93dfb2656b49f95c3ba190f91ef231b755521e7bd6a2273f4694e423802b0f78eeb096cffd353b3da0c169
7
- data.tar.gz: 2b0f4195bf65b92868a7c76e38684e8e98f0309fb71f89700b57a52f33a29a5f71f1367d8aae55ce29441eae62c75e38b9a3757a531283a2e5c7a04c23984408
6
+ metadata.gz: 4bdcccc1f36341fe7c972380a618282a677a877e05ce981f52a14ff5aa950479bcbddd7ccf0fcd42a003009f73fd28aab27049d5ea33c1cedf95736a87e3fa15
7
+ data.tar.gz: 0452244ba489e5b1ab794ed221e03b027683ea330bc0d16a3e7056da6f6bfe1b4e292d2f02d2816ebbc29b381636e0bfb94923d1e2ea2c23440008d3b91249e4
@@ -25,7 +25,54 @@ module Bard
25
25
  end
26
26
 
27
27
  def inject response
28
- markup = %(<div id="staging-banner" style="background: yellow; color: black; position: fixed; bottom: 0; left: 0; width: 100%; font: bold 16pt Arial; line-height: 1.5em; text-align: center; z-index: 999;">You are on the Staging Site</div>)
28
+ markup = <<~HTML
29
+ <div id="staging-banner-top"></div>
30
+ <div id="staging-banner-bottom"></div>
31
+ <style>
32
+ #staging-banner-top:before, #staging-banner-top:after, #staging-banner-bottom:before, #staging-banner-bottom:after {
33
+ display: flex;
34
+ justify-content: center;
35
+ align-items: flex-end;
36
+ padding: 30px 0 10px;
37
+ content: "Staging";
38
+ width: 200px;
39
+ background: yellow;
40
+ color: #0f0f0f;
41
+ position: fixed;
42
+ z-index: 99999;
43
+ font-weight: 900;
44
+ font-size: 1.2em;
45
+ text-transform: uppercase;
46
+ text-align: center;
47
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
48
+ transform-origin: 50% 50%;
49
+ }
50
+
51
+ #staging-banner-top:before {
52
+ top: 0;
53
+ left: 0;
54
+ transform: rotate(-45deg) translate(-52px, -60px);
55
+ }
56
+
57
+ #staging-banner-top:after {
58
+ top: 0;
59
+ right: 0;
60
+ transform: rotate(45deg) translate(52px, -60px);
61
+ }
62
+
63
+ #staging-banner-bottom:before {
64
+ bottom: 0;
65
+ left: 0;
66
+ transform: rotate(225deg) translate(52px, -60px);
67
+ }
68
+
69
+ #staging-banner-bottom:after {
70
+ bottom: 0;
71
+ right: 0;
72
+ transform: rotate(-225deg) translate(-52px, -60px);
73
+ }
74
+ </style>
75
+ HTML
29
76
  response.gsub(%r{</body>}, "#{markup}</body>")
30
77
  end
31
78
  end
@@ -1,5 +1,5 @@
1
1
  module Bard
2
2
  module StagingBanner
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bard-staging_banner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-12 00:00:00.000000000 Z
11
+ date: 2020-05-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Middleware to inject an annoying banner on every page in the staging
14
14
  environment
@@ -18,7 +18,7 @@ executables: []
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
- - .gitignore
21
+ - ".gitignore"
22
22
  - Gemfile
23
23
  - LICENSE.txt
24
24
  - README.md
@@ -37,17 +37,16 @@ require_paths:
37
37
  - lib
38
38
  required_ruby_version: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - '>='
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
43
  required_rubygems_version: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  requirements: []
49
- rubyforge_project:
50
- rubygems_version: 2.1.10
49
+ rubygems_version: 3.0.3
51
50
  signing_key:
52
51
  specification_version: 4
53
52
  summary: Middleware to inject an annoying banner on every page in the staging environment