ribbonit 0.3.0 → 1.0.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: 59e312f51b512269d4ea31095f39b27c2d67e37a
4
- data.tar.gz: 6e346df688f98baa773efda599fc5c46647452d3
2
+ SHA256:
3
+ metadata.gz: c5ca8f4d7bea650a675a768118ad09ebcf436cbe95f030e32f24cb2531a92e2e
4
+ data.tar.gz: 0af1f3378026d75532001084c855a4db7ab9a2542d10a746ff559ed5c7dee821
5
5
  SHA512:
6
- metadata.gz: 4c14899ba350feb3d23f684a3c84f34e8227f1d475ea7ad484d5d34afbf1dc24fcde2c95df3790008d87901cc4bbd13c3fd9d280de70970c2a49a5ff27878771
7
- data.tar.gz: 6fa6226506a52ef05c0d017e994bdb9a1770f5830bd2e27de73d3c26a84431d4a1f075a5ecd56364226a97a88836f54120e84f385c343ba212eaa8368546ebcf
6
+ metadata.gz: ab01f4f2611da1cc2d1b39c29aa6715e0aee4d2bea0838c045c51ec74a4592a6d85ba034994a1bab88b806cdb3d310af3f0a13d0c3cac58a40403514146d793f
7
+ data.tar.gz: 82f5751ad0cd9a167f7732ec2e536ee3ccaf7cb9a773a11e90310ff725b054423dc64a926cca169775c5b7097b7a6c8ad7e07eed0c380e8bb1d0efd0805a9471
data/CHANGELOG.md CHANGED
@@ -1,59 +1,88 @@
1
- # Change Log
1
+ # Changelog
2
2
 
3
- ## [v0.3.0](https://github.com/anthony-robin/Ribbonit/tree/v0.3.0) (2017-11-06)
4
- [Full Changelog](https://github.com/anthony-robin/Ribbonit/compare/v0.2.1...v0.3.0)
3
+ ## [Unreleased](https://github.com/anthony-robin/ribbonit/tree/HEAD)
4
+
5
+ [Full Changelog](https://github.com/anthony-robin/ribbonit/compare/v1.0.0...HEAD)
6
+
7
+ **Closed issues:**
8
+
9
+ - +YJIT [\#27](https://github.com/anthony-robin/ribbonit/issues/27)
10
+ - config for production [\#22](https://github.com/anthony-robin/ribbonit/issues/22)
11
+
12
+ ## [v1.0.0](https://github.com/anthony-robin/ribbonit/tree/v1.0.0) (2023-12-09)
13
+
14
+ [Full Changelog](https://github.com/anthony-robin/ribbonit/compare/v0.3.0...v1.0.0)
15
+
16
+ **Implemented enhancements:**
17
+
18
+ - USE `I18n` files to store hardcoded texts [\#9](https://github.com/anthony-robin/ribbonit/issues/9)
19
+ - Add `extra_content` configuration option [\#28](https://github.com/anthony-robin/ribbonit/pull/28) ([anthony-robin](https://github.com/anthony-robin))
20
+
21
+ **Closed issues:**
22
+
23
+ - ADD option to display 'server' name [\#20](https://github.com/anthony-robin/ribbonit/issues/20)
24
+ - ADD specs [\#15](https://github.com/anthony-robin/ribbonit/issues/15)
25
+
26
+ ## [v0.3.0](https://github.com/anthony-robin/ribbonit/tree/v0.3.0) (2017-11-06)
27
+
28
+ [Full Changelog](https://github.com/anthony-robin/ribbonit/compare/v0.2.1...v0.3.0)
5
29
 
6
30
  **Implemented enhancements:**
7
31
 
8
- - REFACTOR way to define environments to apply [\#25](https://github.com/anthony-robin/Ribbonit/pull/25) ([anthony-robin](https://github.com/anthony-robin))
9
- - UPDATE Rubocop sources [\#24](https://github.com/anthony-robin/Ribbonit/pull/24) ([anthony-robin](https://github.com/anthony-robin))
32
+ - REFACTOR way to define environments to apply [\#25](https://github.com/anthony-robin/ribbonit/pull/25) ([anthony-robin](https://github.com/anthony-robin))
33
+ - UPDATE Rubocop sources [\#24](https://github.com/anthony-robin/ribbonit/pull/24) ([anthony-robin](https://github.com/anthony-robin))
10
34
 
11
35
  **Merged pull requests:**
12
36
 
13
- - CLEAN documentation options [\#26](https://github.com/anthony-robin/Ribbonit/pull/26) ([anthony-robin](https://github.com/anthony-robin))
37
+ - CLEAN documentation options [\#26](https://github.com/anthony-robin/ribbonit/pull/26) ([anthony-robin](https://github.com/anthony-robin))
14
38
 
15
- ## [v0.2.1](https://github.com/anthony-robin/Ribbonit/tree/v0.2.1) (2017-06-04)
16
- [Full Changelog](https://github.com/anthony-robin/Ribbonit/compare/v0.2.0...v0.2.1)
39
+ ## [v0.2.1](https://github.com/anthony-robin/ribbonit/tree/v0.2.1) (2017-06-04)
40
+
41
+ [Full Changelog](https://github.com/anthony-robin/ribbonit/compare/v0.2.0...v0.2.1)
17
42
 
18
43
  **Fixed bugs:**
19
44
 
20
- - FIX broken CSS [\#21](https://github.com/anthony-robin/Ribbonit/pull/21) ([anthony-robin](https://github.com/anthony-robin))
45
+ - FIX broken CSS [\#21](https://github.com/anthony-robin/ribbonit/pull/21) ([anthony-robin](https://github.com/anthony-robin))
46
+
47
+ ## [v0.2.0](https://github.com/anthony-robin/ribbonit/tree/v0.2.0) (2017-05-28)
21
48
 
22
- ## [v0.2.0](https://github.com/anthony-robin/Ribbonit/tree/v0.2.0) (2017-05-28)
23
- [Full Changelog](https://github.com/anthony-robin/Ribbonit/compare/v0.1.0...v0.2.0)
49
+ [Full Changelog](https://github.com/anthony-robin/ribbonit/compare/v0.1.0...v0.2.0)
24
50
 
25
51
  **Implemented enhancements:**
26
52
 
27
- - REFACTOR style using BEM syntax [\#19](https://github.com/anthony-robin/Ribbonit/pull/19) ([anthony-robin](https://github.com/anthony-robin))
28
- - ADD 'root\_link' option that wraps ribbon [\#18](https://github.com/anthony-robin/Ribbonit/pull/18) ([anthony-robin](https://github.com/anthony-robin))
29
- - ADD Changelog file [\#17](https://github.com/anthony-robin/Ribbonit/pull/17) ([anthony-robin](https://github.com/anthony-robin))
30
- - ADD 'git\_branch' option [\#14](https://github.com/anthony-robin/Ribbonit/pull/14) ([anthony-robin](https://github.com/anthony-robin))
31
- - ADD 'sticky' option [\#13](https://github.com/anthony-robin/Ribbonit/pull/13) ([anthony-robin](https://github.com/anthony-robin))
32
- - USE Array for infos [\#12](https://github.com/anthony-robin/Ribbonit/pull/12) ([anthony-robin](https://github.com/anthony-robin))
33
- - REPLACE 'minitest' by 'rspec' [\#8](https://github.com/anthony-robin/Ribbonit/pull/8) ([anthony-robin](https://github.com/anthony-robin))
34
- - ADD Codacy badges [\#5](https://github.com/anthony-robin/Ribbonit/pull/5) ([anthony-robin](https://github.com/anthony-robin))
35
- - ADD Gemnasium badge [\#4](https://github.com/anthony-robin/Ribbonit/pull/4) ([anthony-robin](https://github.com/anthony-robin))
36
- - ADD badge displaying 'gem' version [\#3](https://github.com/anthony-robin/Ribbonit/pull/3) ([anthony-robin](https://github.com/anthony-robin))
53
+ - REFACTOR style using BEM syntax [\#19](https://github.com/anthony-robin/ribbonit/pull/19) ([anthony-robin](https://github.com/anthony-robin))
54
+ - ADD 'root\_link' option that wraps ribbon [\#18](https://github.com/anthony-robin/ribbonit/pull/18) ([anthony-robin](https://github.com/anthony-robin))
55
+ - ADD Changelog file [\#17](https://github.com/anthony-robin/ribbonit/pull/17) ([anthony-robin](https://github.com/anthony-robin))
56
+ - ADD 'git\_branch' option [\#14](https://github.com/anthony-robin/ribbonit/pull/14) ([anthony-robin](https://github.com/anthony-robin))
57
+ - ADD 'sticky' option [\#13](https://github.com/anthony-robin/ribbonit/pull/13) ([anthony-robin](https://github.com/anthony-robin))
58
+ - USE Array for infos [\#12](https://github.com/anthony-robin/ribbonit/pull/12) ([anthony-robin](https://github.com/anthony-robin))
59
+ - REPLACE 'minitest' by 'rspec' [\#8](https://github.com/anthony-robin/ribbonit/pull/8) ([anthony-robin](https://github.com/anthony-robin))
60
+ - ADD Codacy badges [\#5](https://github.com/anthony-robin/ribbonit/pull/5) ([anthony-robin](https://github.com/anthony-robin))
61
+ - ADD Gemnasium badge [\#4](https://github.com/anthony-robin/ribbonit/pull/4) ([anthony-robin](https://github.com/anthony-robin))
62
+ - ADD badge displaying 'gem' version [\#3](https://github.com/anthony-robin/ribbonit/pull/3) ([anthony-robin](https://github.com/anthony-robin))
37
63
 
38
64
  **Fixed bugs:**
39
65
 
40
- - RUN specs with Travis [\#7](https://github.com/anthony-robin/Ribbonit/pull/7) ([anthony-robin](https://github.com/anthony-robin))
66
+ - RUN specs with Travis [\#7](https://github.com/anthony-robin/ribbonit/pull/7) ([anthony-robin](https://github.com/anthony-robin))
41
67
 
42
68
  **Closed issues:**
43
69
 
44
- - ADD 'git\_branch' option to Ribbon displayed informations [\#16](https://github.com/anthony-robin/Ribbonit/issues/16)
45
- - CREATE a 'CHANGELOG' file [\#11](https://github.com/anthony-robin/Ribbonit/issues/11)
46
- - ADD 'sticky' option to Ribbon configuration [\#10](https://github.com/anthony-robin/Ribbonit/issues/10)
70
+ - ADD 'git\_branch' option to Ribbon displayed informations [\#16](https://github.com/anthony-robin/ribbonit/issues/16)
71
+ - CREATE a 'CHANGELOG' file [\#11](https://github.com/anthony-robin/ribbonit/issues/11)
72
+ - ADD 'sticky' option to Ribbon configuration [\#10](https://github.com/anthony-robin/ribbonit/issues/10)
73
+
74
+ ## [v0.1.0](https://github.com/anthony-robin/ribbonit/tree/v0.1.0) (2017-05-21)
75
+
76
+ [Full Changelog](https://github.com/anthony-robin/ribbonit/compare/d88c4473e5d90902326a4ddbc398237872ee4462...v0.1.0)
47
77
 
48
- ## [v0.1.0](https://github.com/anthony-robin/Ribbonit/tree/v0.1.0) (2017-05-21)
49
78
  **Implemented enhancements:**
50
79
 
51
- - UPDATE travis instructions, FIX rubocop offenses [\#1](https://github.com/anthony-robin/Ribbonit/pull/1) ([anthony-robin](https://github.com/anthony-robin))
80
+ - UPDATE travis instructions, FIX rubocop offenses [\#1](https://github.com/anthony-robin/ribbonit/pull/1) ([anthony-robin](https://github.com/anthony-robin))
52
81
 
53
82
  **Fixed bugs:**
54
83
 
55
- - ADD 'line-height' css property [\#2](https://github.com/anthony-robin/Ribbonit/pull/2) ([anthony-robin](https://github.com/anthony-robin))
84
+ - ADD 'line-height' css property [\#2](https://github.com/anthony-robin/ribbonit/pull/2) ([anthony-robin](https://github.com/anthony-robin))
56
85
 
57
86
 
58
87
 
59
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
88
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/README.md CHANGED
@@ -39,9 +39,12 @@ $ bin/rails g ribbonit:install
39
39
  This will create a `ribbonit.rb` file in `config/initializers`
40
40
 
41
41
  2) Import assets
42
- ```sass
43
- // application.sass
44
- @import ribbon
42
+ ```css
43
+ /* application.css */
44
+
45
+ /*
46
+ *= require ribbon
47
+ */
45
48
  ```
46
49
 
47
50
  3) Call ribbon in layout
@@ -63,6 +66,9 @@ Ribbonit.configure do |config|
63
66
  # git_branch: Current git branch (only displayed in development)
64
67
  config.infos_to_display = %i[rails_version ruby_version git_branch]
65
68
 
69
+ # additional extra content to display at the bottom of ribbon
70
+ config.extra_content = nil # 'Foo bar'
71
+
66
72
  config.root_link = false # Wrap ribbon with root_url link ?
67
73
 
68
74
  config.hide_for_small = true # Display ribbon in small devices ?
@@ -0,0 +1,204 @@
1
+ :root {
2
+ --ribbon-width: 165px;
3
+ --ribbon-height: 165px;
4
+
5
+ --ribbon-top: 33px;
6
+ --ribbon-left: -66px;
7
+ --ribbon-offset: -5px;
8
+ }
9
+
10
+ .ribbon,
11
+ .ribbon__container {
12
+ -webkit-box-sizing: border-box;
13
+ -moz-box-sizing: border-box;
14
+ box-sizing: border-box;
15
+ }
16
+
17
+ .ribbon {
18
+ display: block;
19
+ position: absolute;
20
+ top: 0;
21
+ left: 0;
22
+ width: var(--ribbon-width);
23
+ height: var(--ribbon-height);
24
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
25
+ font-size: 16px;
26
+ line-height: 1rem;
27
+ overflow: hidden;
28
+ z-index: 1001;
29
+ }
30
+
31
+ .ribbon__container {
32
+ position: absolute;
33
+ top: var(--ribbon-top);
34
+ left: var(--ribbon-left);
35
+ width: 260px;
36
+ padding: 7px 40px;
37
+ transform: rotate(-45deg);
38
+ background: #333;
39
+ color: #fff;
40
+ font-size: 1rem;
41
+ text-align: center;
42
+ text-decoration: none;
43
+ box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
44
+ }
45
+
46
+ .ribbon__container a {
47
+ display: block;
48
+ color: inherit;
49
+ text-decoration: none;
50
+ }
51
+
52
+ .ribbon__container a:hover {
53
+ color: inherit;
54
+ }
55
+
56
+ .ribbon__container::before,
57
+ .ribbon__container::after {
58
+ display: block;
59
+ position: absolute;
60
+ top: 1px;
61
+ left: 0;
62
+ width: 100%;
63
+ height: 1px;
64
+ background: #fff;
65
+ content: '';
66
+ }
67
+
68
+ .ribbon__container::after {
69
+ top: auto;
70
+ bottom: 1px;
71
+ }
72
+
73
+ .ribbon__container--orange {
74
+ background: #f80;
75
+ }
76
+
77
+ .ribbon__container--blue {
78
+ background: #49a;
79
+ }
80
+
81
+ .ribbon__container--green {
82
+ background: #090;
83
+ }
84
+
85
+ .ribbon__container--red {
86
+ background: #a00;
87
+ }
88
+
89
+ .ribbon__container--purple {
90
+ background: #551a8b;
91
+ }
92
+
93
+ .ribbon__container--black {
94
+ background: #333;
95
+ }
96
+
97
+ .ribbon__container--white {
98
+ background: #fff;
99
+ color: #333;
100
+ }
101
+
102
+ .ribbon__container--white a {
103
+ color: #333;
104
+ }
105
+
106
+ .ribbon__container__environment {
107
+ display: block;
108
+ text-transform: uppercase;
109
+ }
110
+
111
+ .ribbon__container__version,
112
+ .ribbon__container__git {
113
+ display: block;
114
+ font-size: 11px;
115
+ }
116
+
117
+ .ribbon--sticky {
118
+ position: fixed;
119
+ }
120
+
121
+ .ribbon--top-right {
122
+ right: 0;
123
+ left: inherit;
124
+ }
125
+
126
+ .ribbon--top-right .ribbon__container {
127
+ right: var(--ribbon-left);
128
+ left: inherit;
129
+ transform: rotate(45deg);
130
+ }
131
+
132
+ .ribbon--bottom-left {
133
+ top: inherit;
134
+ bottom: 0;
135
+ }
136
+
137
+ .ribbon--bottom-left .ribbon__container {
138
+ top: inherit;
139
+ bottom: var(--ribbon-top);
140
+ transform: rotate(45deg);
141
+ }
142
+
143
+ .ribbon--bottom-right {
144
+ top: inherit;
145
+ right: 0;
146
+ bottom: 0;
147
+ left: inherit;
148
+ }
149
+
150
+ .ribbon--bottom-right .ribbon__container {
151
+ top: inherit;
152
+ right: var(--ribbon-left);
153
+ bottom:var(--ribbon-top);
154
+ left: inherit;
155
+ transform: rotate(-45deg);
156
+ }
157
+
158
+ /* 3 lines */
159
+
160
+ .ribbon--3-lines {
161
+ width: calc(var(--ribbon-width) + 15px);
162
+ height: calc(var(--ribbon-height) + 15px);
163
+ }
164
+
165
+ .ribbon--3-lines.ribbon--top-left,
166
+ .ribbon--4-lines.ribbon--top-left {
167
+ top: var(--ribbon-offset);
168
+ left: var(--ribbon-offset);
169
+ }
170
+
171
+ .ribbon--3-lines.ribbon--top-right,
172
+ .ribbon--4-lines.ribbon--top-right {
173
+ top: var(--ribbon-offset);
174
+ right: var(--ribbon-offset);
175
+ }
176
+
177
+ .ribbon--3-lines.ribbon--bottom-left,
178
+ .ribbon--4-lines.ribbon--bottom-left {
179
+ bottom: var(--ribbon-offset);
180
+ left: var(--ribbon-offset);
181
+ }
182
+
183
+ .ribbon--3-lines.ribbon--bottom-right,
184
+ .ribbon--4-lines.ribbon--bottom-right {
185
+ right: var(--ribbon-offset);
186
+ bottom: var(--ribbon-offset);
187
+ }
188
+
189
+ /* 4 lines */
190
+
191
+ .ribbon--4-lines {
192
+ width: calc(var(--ribbon-width) + 30px);
193
+ height: calc(var(--ribbon-height) + 30px);
194
+ }
195
+
196
+ .ribbon--4-lines .ribbon__container {
197
+ width: 280px;
198
+ }
199
+
200
+ @media only screen and (max-width: 40em) {
201
+ .ribbon--hide-for-small {
202
+ display: none;
203
+ }
204
+ }
@@ -15,3 +15,9 @@
15
15
  Branch: <strong><%= branch_name %></strong>
16
16
  </span>
17
17
  <% end %>
18
+
19
+ <% if config.extra_content.present? %>
20
+ <span class="ribbon__container__extra">
21
+ <%= config.extra_content %>
22
+ </span>
23
+ <% end %>
@@ -6,10 +6,10 @@
6
6
  <div class="ribbon__container ribbon__container--<%= config.themes[Rails.env.to_sym] %>">
7
7
  <% if config.root_link %>
8
8
  <%= link_to root_url do %>
9
- <%= render '/lines', config: config %>
9
+ <%= render 'lines', config: config %>
10
10
  <% end %>
11
11
  <% else %>
12
- <%= render '/lines', config: config %>
12
+ <%= render 'lines', config: config %>
13
13
  <% end %>
14
14
  </div>
15
15
  </div>
@@ -9,6 +9,11 @@ Ribbonit.configure do |config|
9
9
  #
10
10
  config.infos_to_display = %i[rails_version ruby_version git_branch]
11
11
 
12
+ ###
13
+ # Extra content to add at the end
14
+ #
15
+ config.extra_content = nil
16
+
12
17
  ###
13
18
  # Wrap ribbon with link that goes to root_url ?
14
19
  #
@@ -15,6 +15,7 @@ module Ribbonit
15
15
  config_accessor(:infos_to_display) do
16
16
  %i[rails_version ruby_version]
17
17
  end
18
+ config_accessor(:extra_content) { nil }
18
19
  config_accessor(:root_link) { false }
19
20
  config_accessor(:hide_for_small) { true }
20
21
  config_accessor(:position) { 'top-left' }
@@ -6,9 +6,6 @@ module Ribbonit
6
6
  class Engine < ::Rails::Engine
7
7
  initializer 'ribbonit.view_helpers' do |_app|
8
8
  ActionView::Base.send :include, ViewHelpers
9
- ActiveSupport.on_load(:action_controller) do
10
- append_view_path "#{Gem.loaded_specs['ribbonit'].full_gem_path}/lib/app/views/partials"
11
- end
12
9
  end
13
10
  end
14
11
  end
@@ -1,3 +1,3 @@
1
1
  module Ribbonit
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '1.0.0'.freeze
3
3
  end
@@ -1,7 +1,7 @@
1
1
  module Ribbonit
2
2
  module ViewHelpers
3
3
  def ribbonit
4
- render '/ribbon'
4
+ render 'ribbon'
5
5
  end
6
6
 
7
7
  def branch_name
@@ -10,10 +10,17 @@ module Ribbonit
10
10
 
11
11
  def line_count
12
12
  height = 1
13
- items = Ribbonit.configuration.infos_to_display
13
+ items = configuration.infos_to_display
14
14
  height += 1 if items.include?(:ruby_version) || items.include?(:rails_version)
15
15
  height += 1 if items.include?(:git_branch)
16
+ height += 1 if configuration.extra_content.present?
16
17
  height
17
18
  end
19
+
20
+ private
21
+
22
+ def configuration
23
+ Ribbonit.configuration
24
+ end
18
25
  end
19
26
  end
data/ribbonit.gemspec CHANGED
@@ -19,9 +19,8 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_dependency 'rails'
22
- spec.add_dependency 'sassc-rails'
23
22
 
24
- spec.add_development_dependency 'bundler', '~> 1.14'
23
+ spec.add_development_dependency 'bundler', '>= 2.2.33'
25
24
  spec.add_development_dependency 'rake', '~> 12.0'
26
25
  spec.add_development_dependency 'rspec', '~> 3.6'
27
26
  spec.add_development_dependency 'byebug'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ribbonit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Robin
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-06 00:00:00.000000000 Z
11
+ date: 2023-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -24,34 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: sassc-rails
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: bundler
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
- - - "~>"
31
+ - - ">="
46
32
  - !ruby/object:Gem::Version
47
- version: '1.14'
33
+ version: 2.2.33
48
34
  type: :development
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
- - - "~>"
38
+ - - ">="
53
39
  - !ruby/object:Gem::Version
54
- version: '1.14'
40
+ version: 2.2.33
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rake
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -153,12 +139,13 @@ files:
153
139
  - Gemfile
154
140
  - README.md
155
141
  - Rakefile
142
+ - app/assets/stylesheets/ribbon.css
143
+ - app/views/application/_lines.html.erb
144
+ - app/views/application/_ribbon.html.erb
156
145
  - bin/console
157
146
  - bin/rspec
158
147
  - bin/rubocop
159
148
  - bin/setup
160
- - lib/app/views/partials/_lines.html.erb
161
- - lib/app/views/partials/_ribbon.html.erb
162
149
  - lib/generators/ribbonit/install_generator.rb
163
150
  - lib/generators/ribbonit/templates/ribbonit.rb
164
151
  - lib/ribbonit.rb
@@ -179,11 +166,10 @@ files:
179
166
  - vendor/assets/images/positions/bottom-left.png
180
167
  - vendor/assets/images/positions/bottom-right.png
181
168
  - vendor/assets/images/positions/top-right.png
182
- - vendor/assets/stylesheets/_ribbon.sass
183
169
  homepage: https://github.com/anthony-robin/ribbonit
184
170
  licenses: []
185
171
  metadata: {}
186
- post_install_message:
172
+ post_install_message:
187
173
  rdoc_options: []
188
174
  require_paths:
189
175
  - lib
@@ -198,9 +184,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
184
  - !ruby/object:Gem::Version
199
185
  version: '0'
200
186
  requirements: []
201
- rubyforge_project:
202
- rubygems_version: 2.6.12
203
- signing_key:
187
+ rubygems_version: 3.4.1
188
+ signing_key:
204
189
  specification_version: 4
205
190
  summary: Display Ribbon with Rails env
206
191
  test_files: []
@@ -1,143 +0,0 @@
1
- $ribbon_width: 165px
2
- $ribbon_height: 165px
3
-
4
- $top: 33px
5
- $left: -66px
6
- $offset: -5px
7
-
8
- .ribbon,
9
- .ribbon__container
10
- -webkit-box-sizing: border-box
11
- box-sizing: border-box
12
-
13
- .ribbon
14
- display: block
15
- position: absolute
16
- top: 0
17
- left: 0
18
- width: $ribbon_width
19
- height: $ribbon_height
20
- font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif
21
- font-size: 16px
22
- line-height: 1rem
23
- overflow: hidden
24
- z-index: 1001
25
-
26
- // Container
27
- &__container
28
- position: absolute
29
- top: $top
30
- left: $left
31
- width: 260px
32
- padding: 7px 40px
33
- transform: rotate(-45deg)
34
- background: #333
35
- color: #fff
36
- font-size: 1rem
37
- text-align: center
38
- text-decoration: none
39
- box-shadow: 1px 1px 3px rgba(#000, 0.8)
40
-
41
- a
42
- display: block
43
- color: inherit
44
- text-decoration: none
45
- &:hover
46
- color: inherit
47
-
48
- &::before, &::after
49
- display: block
50
- position: absolute
51
- top: 1px
52
- left: 0
53
- width: 100%
54
- height: 1px
55
- background: #fff
56
- content: ''
57
-
58
- &::after
59
- top: auto
60
- bottom: 1px
61
-
62
- // Colors
63
- &--orange
64
- background: #f80
65
- &--blue
66
- background: #49a
67
- &--green
68
- background: #090
69
- &--red
70
- background: #a00
71
- &--purple
72
- background: #551a8b
73
- &--black
74
- background: #333
75
- &--white
76
- background: #fff
77
- color: #333
78
- a
79
- color: #333
80
-
81
- // Displayed informations
82
- &__environment
83
- display: block
84
- text-transform: uppercase
85
-
86
- &__version, &__git
87
- display: block
88
- font-size: 11px
89
-
90
- // Sticky
91
- &--sticky
92
- position: fixed
93
-
94
- // Position
95
- &--top-right
96
- right: 0
97
- left: inherit
98
- .ribbon__container
99
- right: $left
100
- left: inherit
101
- transform: rotate(45deg)
102
-
103
- &--bottom-left
104
- top: inherit
105
- bottom: 0
106
- .ribbon__container
107
- top: inherit
108
- bottom: $top
109
- transform: rotate(45deg)
110
-
111
- &--bottom-right
112
- top: inherit
113
- right: 0
114
- bottom: 0
115
- left: inherit
116
- .ribbon__container
117
- top: inherit
118
- right: $left
119
- bottom: $top
120
- left: inherit
121
- transform: rotate(-45deg)
122
-
123
- // Ribbon size depending of displayed options
124
- &--3-lines
125
- width: $ribbon_width + 15px
126
- height: $ribbon_height + 15px
127
- &--top-left
128
- top: $offset
129
- left: $offset
130
- &--top-right
131
- top: $offset
132
- right: $offset
133
- &--bottom-left
134
- bottom: $offset
135
- left: $offset
136
- &--bottom-right
137
- right: $offset
138
- bottom: $offset
139
-
140
- @media only screen and (max-width: 40em)
141
- .ribbon
142
- &--hide-for-small
143
- display: none