ribbonit 1.0.0 → 2.0.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: c5ca8f4d7bea650a675a768118ad09ebcf436cbe95f030e32f24cb2531a92e2e
4
- data.tar.gz: 0af1f3378026d75532001084c855a4db7ab9a2542d10a746ff559ed5c7dee821
3
+ metadata.gz: f83935018a2b13e6ea6b47eb7c9f57429ce1d136f3946ea1d578aaca0c819565
4
+ data.tar.gz: 86a81eb156007cf4058c5d11e96c5fab629e5dfc75668048b7b72822a3e21420
5
5
  SHA512:
6
- metadata.gz: ab01f4f2611da1cc2d1b39c29aa6715e0aee4d2bea0838c045c51ec74a4592a6d85ba034994a1bab88b806cdb3d310af3f0a13d0c3cac58a40403514146d793f
7
- data.tar.gz: 82f5751ad0cd9a167f7732ec2e536ee3ccaf7cb9a773a11e90310ff725b054423dc64a926cca169775c5b7097b7a6c8ad7e07eed0c380e8bb1d0efd0805a9471
6
+ metadata.gz: 0af9e8207ae140322d7facba1bd121263ff595773507a6dae6b4bb587231ec0ad7e1584d64680e887873c9c615079e941291054510ec47df0251799eb0dc735d
7
+ data.tar.gz: 5e977b649b626e89df3118ff8b6b740497e19db2f997f1d7531c56d356c71b1cfe7edf740510326e0b157f1dd088c5b732ddba6d5dd7b66e4f502fe4f58a19b0
data/.rubocop.yml CHANGED
@@ -1,12 +1,13 @@
1
- inherit_from:
2
- - https://raw.githubusercontent.com/anthony-robin/rubocop-rules/master/.rubocop-bundler.yml
3
- - https://raw.githubusercontent.com/anthony-robin/rubocop-rules/master/.rubocop-layout.yml
4
- - https://raw.githubusercontent.com/anthony-robin/rubocop-rules/master/.rubocop-lint.yml
5
- - https://raw.githubusercontent.com/anthony-robin/rubocop-rules/master/.rubocop-naming.yml
6
- - https://raw.githubusercontent.com/anthony-robin/rubocop-rules/master/.rubocop-performance.yml
7
- - https://raw.githubusercontent.com/anthony-robin/rubocop-rules/master/.rubocop-style.yml
8
- - https://raw.githubusercontent.com/anthony-robin/rubocop-rules/master/.rubocop-rails.yml
9
-
10
1
  AllCops:
11
- DisabledByDefault: true
12
- TargetRubyVersion: 2.4
2
+ NewCops: enable
3
+ SuggestExtensions: false
4
+ TargetRubyVersion: 2.7
5
+
6
+ Layout/LineLength:
7
+ Enabled: false
8
+
9
+ Style/FrozenStringLiteralComment:
10
+ Enabled: false
11
+
12
+ Style/Documentation:
13
+ Enabled: false
data/.simplecov CHANGED
@@ -1,9 +1,8 @@
1
- require 'codacy-coverage'
2
-
3
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
4
- SimpleCov::Formatter::HTMLFormatter,
5
- Codacy::Formatter
6
- ])
1
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
2
+ [
3
+ SimpleCov::Formatter::HTMLFormatter
4
+ ]
5
+ )
7
6
 
8
7
  SimpleCov.start do
9
8
  add_group 'lib', 'lib'
data/Gemfile CHANGED
@@ -2,3 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in ribbonit.gemspec
4
4
  gemspec
5
+
6
+ gem 'bundler', '>= 2.2.33'
7
+ gem 'byebug'
8
+ gem 'rake', '~> 12.0'
9
+ gem 'rspec', '~> 3.6'
10
+ gem 'rubocop'
11
+ gem 'simplecov'
data/README.md CHANGED
@@ -5,10 +5,6 @@
5
5
  It is completely inspired from the Github 'fork me' ribbon.
6
6
 
7
7
  [![Gem Version](https://badge.fury.io/rb/ribbonit.svg)](https://rubygems.org/gems/ribbonit)
8
- [![Travis CI](https://travis-ci.org/anthony-robin/Ribbonit.svg?branch=master)](https://travis-ci.org/anthony-robin/Ribbonit)
9
- [![Codacy Badge Grade](https://api.codacy.com/project/badge/Grade/521429a8cf91432aba574c69f1385aa2)](https://www.codacy.com/app/anthony-robin/Ribbonit)
10
- [![Codacy Badge Coverage](https://api.codacy.com/project/badge/Coverage/521429a8cf91432aba574c69f1385aa2)](https://www.codacy.com/app/anthony-robin/Ribbonit)
11
- [![Dependency Status](https://gemnasium.com/badges/github.com/anthony-robin/Ribbonit.svg)](https://gemnasium.com/github.com/anthony-robin/Ribbonit)
12
8
 
13
9
  ## Installation
14
10
 
data/bin/rspec CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
- require 'pathname'
3
2
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
4
- Pathname.new(__FILE__).realpath)
3
+ Pathname.new(__FILE__).realpath)
5
4
 
6
5
  require 'rubygems'
7
6
  require 'bundler/setup'
data/bin/rubocop CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
- require 'pathname'
3
2
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
4
- Pathname.new(__FILE__).realpath)
3
+ Pathname.new(__FILE__).realpath)
5
4
 
6
5
  require 'rubygems'
7
6
  require 'bundler/setup'
@@ -1,9 +1,8 @@
1
- # rubocop:disable ClassAndModuleChildren
2
1
  module Ribbonit
3
2
  module Generators
4
3
  class InstallGenerator < ::Rails::Generators::Base
5
4
  desc 'Copy Ribbonit initializer configuration'
6
- source_root File.expand_path('../templates', __FILE__)
5
+ source_root File.expand_path('templates', __dir__)
7
6
 
8
7
  def copy_initializer
9
8
  template 'ribbonit.rb', 'config/initializers/ribbonit.rb'
@@ -1,8 +1,8 @@
1
- require 'active_support/configurable'
1
+ require 'active_support/core_ext/class/attribute'
2
2
 
3
3
  module Ribbonit
4
4
  def self.configuration
5
- @configuration ||= Ribbonit::Configuration.new
5
+ @configuration ||= Configuration
6
6
  end
7
7
 
8
8
  def self.configure
@@ -10,21 +10,20 @@ module Ribbonit
10
10
  end
11
11
 
12
12
  class Configuration
13
- include ActiveSupport::Configurable
13
+ class_attribute :infos_to_display, default: %i[
14
+ rails_version
15
+ ruby_version
16
+ ]
14
17
 
15
- config_accessor(:infos_to_display) do
16
- %i[rails_version ruby_version]
17
- end
18
- config_accessor(:extra_content) { nil }
19
- config_accessor(:root_link) { false }
20
- config_accessor(:hide_for_small) { true }
21
- config_accessor(:position) { 'top-left' }
22
- config_accessor(:sticky) { true }
23
- config_accessor(:themes) do
24
- {
25
- development: 'black',
26
- staging: 'blue'
27
- }
28
- end
18
+ class_attribute :extra_content, default: nil
19
+ class_attribute :root_link, default: false
20
+ class_attribute :hide_for_small, default: true
21
+ class_attribute :position, default: 'top-left'
22
+ class_attribute :sticky, default: true
23
+
24
+ class_attribute :themes, default: {
25
+ development: 'black',
26
+ staging: 'blue'
27
+ }
29
28
  end
30
29
  end
@@ -1,11 +1,10 @@
1
1
  require 'ribbonit/view_helpers'
2
2
 
3
- # rubocop:disable ClassAndModuleChildren
4
3
  module Ribbonit
5
4
  module Rails
6
5
  class Engine < ::Rails::Engine
7
6
  initializer 'ribbonit.view_helpers' do |_app|
8
- ActionView::Base.send :include, ViewHelpers
7
+ ActionView::Base.include ViewHelpers
9
8
  end
10
9
  end
11
10
  end
@@ -1,3 +1,3 @@
1
1
  module Ribbonit
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '2.0.0'.freeze
3
3
  end
data/ribbonit.gemspec CHANGED
@@ -1,5 +1,4 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'ribbonit/version'
5
4
 
@@ -18,13 +17,8 @@ Gem::Specification.new do |spec|
18
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
18
  spec.require_paths = ['lib']
20
19
 
21
- spec.add_dependency 'rails'
20
+ spec.required_ruby_version = '>= 2.7'
21
+ spec.add_dependency 'rails', '>= 5.2'
22
22
 
23
- spec.add_development_dependency 'bundler', '>= 2.2.33'
24
- spec.add_development_dependency 'rake', '~> 12.0'
25
- spec.add_development_dependency 'rspec', '~> 3.6'
26
- spec.add_development_dependency 'byebug'
27
- spec.add_development_dependency 'rubocop'
28
- spec.add_development_dependency 'simplecov'
29
- spec.add_development_dependency 'codacy-coverage', '~> 1.1'
23
+ spec.metadata['rubygems_mfa_required'] = 'true'
30
24
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ribbonit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Robin
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2023-12-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -16,112 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '0'
18
+ version: '5.2'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 2.2.33
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: 2.2.33
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '12.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '12.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rspec
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '3.6'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '3.6'
69
- - !ruby/object:Gem::Dependency
70
- name: byebug
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: rubocop
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: simplecov
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: codacy-coverage
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '1.1'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '1.1'
25
+ version: '5.2'
125
26
  description: Display an elegant Github like ribbon to your Rails application showing
126
27
  environment informations (Rails environment, Ruby version, Rails version, ...)
127
28
  email:
@@ -168,8 +69,8 @@ files:
168
69
  - vendor/assets/images/positions/top-right.png
169
70
  homepage: https://github.com/anthony-robin/ribbonit
170
71
  licenses: []
171
- metadata: {}
172
- post_install_message:
72
+ metadata:
73
+ rubygems_mfa_required: 'true'
173
74
  rdoc_options: []
174
75
  require_paths:
175
76
  - lib
@@ -177,15 +78,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
177
78
  requirements:
178
79
  - - ">="
179
80
  - !ruby/object:Gem::Version
180
- version: '0'
81
+ version: '2.7'
181
82
  required_rubygems_version: !ruby/object:Gem::Requirement
182
83
  requirements:
183
84
  - - ">="
184
85
  - !ruby/object:Gem::Version
185
86
  version: '0'
186
87
  requirements: []
187
- rubygems_version: 3.4.1
188
- signing_key:
88
+ rubygems_version: 4.0.6
189
89
  specification_version: 4
190
90
  summary: Display Ribbon with Rails env
191
91
  test_files: []