staff_bar 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 286aeb0e88f9eac3dbcead561597359091f54b2dd0de2da45cf2a17a81563181
4
- data.tar.gz: d2c2e7322e189f399acabf10690fc510723655d2a58f71cb625a2556f4283744
3
+ metadata.gz: 2a7f0aea10fe08ecfd2704a11f697c126e072f2e96a62ea16c144e98445bb883
4
+ data.tar.gz: 5313f79324b933448f2ea5d94f3d47b441c1bbb1f1bc9e6c6582f90bb343d2ad
5
5
  SHA512:
6
- metadata.gz: b7bf5a4e78922598973be90066532c7e2ba8ef89ee16ce538f47a17f0d83ebb6b1a11fc7ada6b5891db1ffabc7b51d9ee392bd352260bacaf8f2ac3b79c81df9
7
- data.tar.gz: a29082f9d6d80e3256be1c8fd3d77c2b07d8ac9bdb468b6936a1588d1f44312435fda00136ec5bcba85081ccbd8497c018403f5618413008e8a9015e1ad9e53f
6
+ metadata.gz: b593bfb09fe3498a49c3be899f4226d33a4a748083d5cf386598974bcab56dbc6ebcc19d7fbc7502a106a36d6caf782767b54ce81b052a9019651e3f73e85d26
7
+ data.tar.gz: 8e4b10ed99530bcbafffc7355862616b66ccd53e1cff82fbdaef23e7eebc73f5c975e68a26475d711603198a5c33fc988795b35d5cbbe7b5f1453a0bae08e7ca
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ### unreleased
2
2
 
3
+ ### 0.3.0 / July 14, 2024
4
+
5
+ * Updated octicons to v19
6
+ * Fixed error when octicons_helper is not explicitly included in project gemfile
7
+ * Adjusted light theme link color
8
+
9
+ ### 0.2.0 / December 7, 2019
10
+
11
+ * Added highlight_envs configuration option [Rolandas Barysas]
12
+
13
+ * Hide staff bar in print mode [Rolandas Barysas]
14
+
3
15
  ### 0.1.1 / October 31, 2019
4
16
 
5
17
  * Ignore links when using sequential keyboard navigation [Rolandas Barysas]
data/README.md CHANGED
@@ -52,6 +52,7 @@ StaffBar.configure do |config|
52
52
 
53
53
  config.theme = :dark # or :light
54
54
  config.position = :bottom # or :top
55
+ config.highlight_envs = [:production]
55
56
  end
56
57
  ```
57
58
 
@@ -5,7 +5,7 @@ $color: #f2f2f2;
5
5
  $color-inverse: black;
6
6
 
7
7
  $link-color: #b8e8ff;
8
- $link-color-inverse: #166083;
8
+ $link-color-inverse: #1172ac;
9
9
 
10
10
  $border-color: black;
11
11
  $border-color-inverse: #ccc;
@@ -13,6 +13,9 @@ $border-color-inverse: #ccc;
13
13
  $green: #8cfb84;
14
14
  $green-inverse: green;
15
15
 
16
+ $red: #ff4b4b;
17
+ $red-inverse: #e82525;
18
+
16
19
  .staff-bar {
17
20
  position: relative;
18
21
  z-index: 9999;
@@ -30,6 +33,7 @@ $green-inverse: green;
30
33
 
31
34
  .octicon {
32
35
  fill: darken($color, 25%);
36
+ margin-right: 5px;
33
37
  }
34
38
 
35
39
  a {
@@ -42,9 +46,8 @@ $green-inverse: green;
42
46
  }
43
47
  }
44
48
 
45
- .staff-bar-green {
46
- color: $green;
47
- }
49
+ .staff-bar-green { color: $green; }
50
+ .staff-bar-red { color: $red; }
48
51
 
49
52
  &-inverse {
50
53
  background: $bg-inverse;
@@ -63,9 +66,8 @@ $green-inverse: green;
63
66
  }
64
67
  }
65
68
 
66
- .staff-bar-green {
67
- color: $green-inverse;
68
- }
69
+ .staff-bar-green { color: $green-inverse; }
70
+ .staff-bar-red { color: $red-inverse; }
69
71
  }
70
72
 
71
73
  &-top {
@@ -86,4 +88,12 @@ $green-inverse: green;
86
88
 
87
89
  .staff-bar-list-item {
88
90
  padding-right: 15px;
91
+ display: flex;
92
+ align-items: center;
93
+ }
94
+
95
+ @media print {
96
+ .staff-bar {
97
+ display: none !important;
98
+ }
89
99
  }
@@ -7,7 +7,7 @@
7
7
  <div class="staff-bar-list-item"><%= octicon "git-branch" %> <%= StaffBar.branch %></div>
8
8
  <% end %>
9
9
  <div class="staff-bar-list-item"><%= octicon "ruby" %> ruby-<%= StaffBar.ruby_version %> rails-<%= StaffBar.rails_version %></div>
10
- <div class="staff-bar-list-item"><%= octicon "globe" %> <%= StaffBar.environment %></div>
10
+ <div class="staff-bar-list-item <%= StaffBar.highlight_env_class %>"><%= octicon "globe" %> <%= StaffBar.environment %></div>
11
11
  <div class="staff-bar-list-item"><%= octicon "gear" %> <span class="<%= StaffBar.cache_class %>"><%= StaffBar.cache %></span></div>
12
12
  <div class="staff-bar-list-item"><%= octicon "clock" %> <%= StaffBar.time %> (<%= StaffBar.time_zone %>)</div>
13
13
  </div>
@@ -12,12 +12,13 @@ module StaffBar
12
12
  end
13
13
 
14
14
  class Config
15
- attr_accessor :links, :theme, :position
15
+ attr_accessor :links, :theme, :position, :highlight_envs
16
16
 
17
17
  def initialize
18
18
  @links = []
19
19
  @theme = :dark
20
20
  @position = :bottom
21
+ @highlight_envs = [:production]
21
22
  end
22
23
  end
23
24
  end
@@ -32,6 +32,10 @@ module StaffBar
32
32
  Rails.env
33
33
  end
34
34
 
35
+ def highlight_env_class
36
+ StaffBar.config.highlight_envs.include?(environment.to_sym) ? "staff-bar-red" : ""
37
+ end
38
+
35
39
  def time
36
40
  Time.current.to_s
37
41
  end
@@ -1,3 +1,3 @@
1
1
  module StaffBar
2
- VERSION = '0.1.1'
2
+ VERSION = '0.3.0'
3
3
  end
data/lib/staff_bar.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  require "staff_bar/config"
4
4
  require "staff_bar/core"
5
5
  require "staff_bar/engine"
6
+ require "octicons_helper"
6
7
 
7
8
  module StaffBar
8
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: staff_bar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rolandas Barysas
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-31 00:00:00.000000000 Z
11
+ date: 2024-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '9'
33
+ version: '19'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '9'
40
+ version: '19'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: sqlite3
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  description: Show a bar with general project information for administrators.
56
56
  email:
57
- - rolandas@rolandasb.com
57
+ - rolandas@barysas.lt
58
58
  executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
@@ -72,11 +72,11 @@ files:
72
72
  - lib/staff_bar/core.rb
73
73
  - lib/staff_bar/engine.rb
74
74
  - lib/staff_bar/version.rb
75
- homepage: https://github.com/decentbudget/staff_bar
75
+ homepage: https://github.com/rolandasb/staff_bar
76
76
  licenses:
77
77
  - MIT
78
78
  metadata: {}
79
- post_install_message:
79
+ post_install_message:
80
80
  rdoc_options: []
81
81
  require_paths:
82
82
  - lib
@@ -91,8 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
- rubygems_version: 3.0.3
95
- signing_key:
94
+ rubygems_version: 3.4.6
95
+ signing_key:
96
96
  specification_version: 4
97
97
  summary: Show a bar with general project information for administrators.
98
98
  test_files: []