bard-staging_banner 0.3.2 → 0.4.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
2
  SHA256:
3
- metadata.gz: b573a9eb52fccb2bac09b886f3a3cb513a840d679f596e64de8e942734ba93d9
4
- data.tar.gz: bcc38e81e2809b62ea4181f96533ea4efa8543c2509424ae1b11cb347dda7d55
3
+ metadata.gz: d1aaf62e6c42301469ece0151c0d196397f904ad572ccb9784bdffd4aa3890a1
4
+ data.tar.gz: 698bd47d92c66ff0074888f94676c63842e7e98362dac273d52dfd15164e38e1
5
5
  SHA512:
6
- metadata.gz: d8efd4077afb6e3600d4a707b23265691eb516060ebdd075ec2ff06ff074379f7f88bb85e81dd4808e8a80940879766727a8c93101b7818b7c70c739159f63c6
7
- data.tar.gz: 6046a7ffa37428399aaa6114d92821a283ad8b34ada4cd18d4572f248ac4db9ec3929e415b054d58a3f29083f0e928634b8b0bd4830e8d698e181a5860f28e8e
6
+ metadata.gz: 93eb4b0a7dc19dac71aa20604c5f90aed4e050b12ee0e85accec05d42566e0d9cb595650b8e0f53b9040471868ed63c6fe27d2bf5923e568dfac0ff95abb5e14
7
+ data.tar.gz: 1603df1e6ef3cc048cd0211df2547f67cdce70240bf5b9141d29c2a163c974db649bbbffd2a2be0fa12c967d4394bae0426dab559e1a0aa507a03f8ed6e45f4f
@@ -34,9 +34,10 @@ module Bard
34
34
 
35
35
  def inject response
36
36
  count = mail_count
37
- mail_link = %(<a href="/mails">(#{mail_count})</a>) if count > 0
38
- html = %w[upper-left upper-right bottom-left bottom-right].map do |corner|
39
- %(<div class="staging-banner" id="#{corner}">Staging #{mail_link}</div>)
37
+ mail_link = %(<a href="/mails">(#{mail_count})</a>) if count > 0
38
+ html = %(<div class="staging-banner" id="upper-left">Staging #{mail_link}</div>)
39
+ html += %w[upper-right bottom-left bottom-right].map do |corner|
40
+ %(<div class="staging-banner" id="#{corner}"></div>)
40
41
  end.join("\n")
41
42
 
42
43
  markup = html + <<~CSS
@@ -57,6 +58,7 @@ module Bard
57
58
  text-align: center;
58
59
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
59
60
  transform-origin: 50% 50%;
61
+ opacity: 0.75;
60
62
  }
61
63
 
62
64
  #upper-left {
@@ -69,18 +71,21 @@ module Bard
69
71
  top: 0;
70
72
  right: 0;
71
73
  transform: rotate(45deg) translate(52px, -60px);
74
+ pointer-events: none;
72
75
  }
73
76
 
74
77
  #bottom-left {
75
78
  bottom: 0;
76
79
  left: 0;
77
80
  transform: rotate(225deg) translate(52px, -60px);
81
+ pointer-events: none;
78
82
  }
79
83
 
80
84
  #bottom-right {
81
85
  bottom: 0;
82
86
  right: 0;
83
87
  transform: rotate(-225deg) translate(-52px, -60px);
88
+ pointer-events: none;
84
89
  }
85
90
  </style>
86
91
  CSS
@@ -89,4 +94,3 @@ module Bard
89
94
  end
90
95
  end
91
96
  end
92
-
@@ -1,5 +1,5 @@
1
1
  module Bard
2
2
  module StagingBanner
3
- VERSION = "0.3.2"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -9,6 +9,8 @@ module Bard
9
9
  end
10
10
 
11
11
  if defined?(ActionMailer) && %w[development staging].include?(Rails.env)
12
+ require "letter_opener_web"
13
+
12
14
  initializer "bard-staging_banner.mount_letter_opener_web" do |app|
13
15
  require "letter_opener_web"
14
16
 
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.3.2
4
+ version: 0.4.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: 2023-03-19 00:00:00.000000000 Z
11
+ date: 2024-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: letter_opener_web
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  requirements: []
63
- rubygems_version: 3.1.6
63
+ rubygems_version: 3.5.4
64
64
  signing_key:
65
65
  specification_version: 4
66
66
  summary: Middleware to inject an annoying banner on every page in the staging environment