interage-helpers 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -2
- data/CHANGES +3 -0
- data/Gemfile +9 -7
- data/Gemfile.lock +66 -57
- data/VERSION +1 -1
- data/interage-helpers.gemspec +3 -2
- data/lib/interage/application_icon_helper.rb +1 -1
- data/lib/interage/bootstrap_alert_helper.rb +17 -17
- data/lib/interage/font_awesome_helper.rb +4 -2
- data/lib/interage/helpers/version.rb +1 -1
- data/lib/interage/material_design_icons_helper.rb +1 -1
- data/lib/interage/parsers/parser_cep.rb +1 -1
- data/lib/interage/parsers/parser_cnpj.rb +1 -1
- data/lib/interage/parsers/parser_cpf.rb +1 -1
- data/lib/interage/parsers/parser_phone.rb +1 -1
- data/lib/interage/translation_helper.rb +1 -1
- metadata +6 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 075f6eb9f131805a01bf51bcab93f6b1c75b4ade2c35701874fd14b3ebdf63b9
|
4
|
+
data.tar.gz: 7363304d60dc30e39934dbebee7821f706ca3950eb126f88d634975c9740b0c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36581527efc648bebd0ef2ad2d60c1e3f9ccb9bae516cbf98e8fcbd298e5f57114c2f97b05faadbef72aa98b54779c057b09638fdda3430e71a8af39830de4e8
|
7
|
+
data.tar.gz: e7066c3ebf7bc1246070f4ad7c753e06b3b2885d4661c595579d34f55bb873be5bd3c2885a4c568259820f3fde6fdf306550404cdce436510501924ca8c43227
|
data/.rubocop.yml
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
require:
|
2
2
|
- rubocop-rspec
|
3
3
|
- rubocop-performance
|
4
|
+
- rubocop-rake
|
4
5
|
|
5
|
-
Documentation:
|
6
|
+
Style/Documentation:
|
6
7
|
Enabled: false
|
7
8
|
|
8
9
|
Style/EmptyMethod:
|
@@ -20,7 +21,8 @@ Metrics/BlockLength:
|
|
20
21
|
- interage-helpers.gemspec
|
21
22
|
|
22
23
|
AllCops:
|
23
|
-
TargetRubyVersion: 2.
|
24
|
+
TargetRubyVersion: 2.7
|
25
|
+
NewCops: enable
|
24
26
|
Exclude:
|
25
27
|
- bin/**/*
|
26
28
|
- vendor/**/*
|
data/CHANGES
CHANGED
data/Gemfile
CHANGED
@@ -6,17 +6,19 @@ gemspec
|
|
6
6
|
|
7
7
|
group :development, :test do
|
8
8
|
# https://github.com/rubocop-hq/rubocop#quickstart
|
9
|
-
gem 'rubocop', '~>
|
9
|
+
gem 'rubocop', '~> 1.14'
|
10
10
|
# https://github.com/backus/rubocop-rspec
|
11
|
-
gem 'rubocop-rspec', '~>
|
11
|
+
gem 'rubocop-rspec', '~> 2.3'
|
12
12
|
# https://github.com/rubocop-hq/rubocop-performance/#usage
|
13
|
-
gem 'rubocop-performance', '~> 1.1'
|
13
|
+
gem 'rubocop-performance', '~> 1.11', '>= 1.11.3'
|
14
|
+
# https://github.com/rubocop/rubocop-rake#usage
|
15
|
+
gem 'rubocop-rake', '~> 0.5.1'
|
14
16
|
# https://github.com/rspec/rspec#install
|
15
|
-
gem 'rspec', '~> 3.
|
17
|
+
gem 'rspec', '~> 3.10'
|
16
18
|
# https://github.com/pry/pry#installation
|
17
|
-
gem 'pry', '~> 0.
|
19
|
+
gem 'pry', '~> 0.14.1'
|
18
20
|
# https://github.com/presidentbeef/brakeman
|
19
|
-
gem 'brakeman', '~>
|
21
|
+
gem 'brakeman', '~> 5.0', '>= 5.0.1', require: false
|
20
22
|
# https://github.com/rails/rails/tree/master/activesupport#download-and-installation
|
21
|
-
gem 'activesupport', '~>
|
23
|
+
gem 'activesupport', '~> 6.1'
|
22
24
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,80 +1,89 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
interage-helpers (0.1.
|
4
|
+
interage-helpers (0.1.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
activesupport (
|
9
|
+
activesupport (6.1.3.2)
|
10
10
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
11
|
-
i18n (>=
|
12
|
-
minitest (
|
13
|
-
tzinfo (~>
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
i18n (>= 1.6, < 2)
|
12
|
+
minitest (>= 5.1)
|
13
|
+
tzinfo (~> 2.0)
|
14
|
+
zeitwerk (~> 2.3)
|
15
|
+
ast (2.4.2)
|
16
|
+
brakeman (5.0.1)
|
17
|
+
coderay (1.1.3)
|
18
|
+
concurrent-ruby (1.1.8)
|
19
|
+
diff-lcs (1.4.4)
|
20
|
+
i18n (1.8.10)
|
20
21
|
concurrent-ruby (~> 1.0)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
method_source (~> 0.9.0)
|
30
|
-
psych (3.1.0)
|
22
|
+
method_source (1.0.0)
|
23
|
+
minitest (5.14.4)
|
24
|
+
parallel (1.20.1)
|
25
|
+
parser (3.0.1.1)
|
26
|
+
ast (~> 2.4.1)
|
27
|
+
pry (0.14.1)
|
28
|
+
coderay (~> 1.1)
|
29
|
+
method_source (~> 1.0)
|
31
30
|
rainbow (3.0.0)
|
32
|
-
rake (13.0.
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
rspec-
|
37
|
-
|
38
|
-
rspec-
|
39
|
-
rspec-
|
31
|
+
rake (13.0.3)
|
32
|
+
regexp_parser (2.1.1)
|
33
|
+
rexml (3.2.5)
|
34
|
+
rspec (3.10.0)
|
35
|
+
rspec-core (~> 3.10.0)
|
36
|
+
rspec-expectations (~> 3.10.0)
|
37
|
+
rspec-mocks (~> 3.10.0)
|
38
|
+
rspec-core (3.10.1)
|
39
|
+
rspec-support (~> 3.10.0)
|
40
|
+
rspec-expectations (3.10.1)
|
40
41
|
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.
|
42
|
-
rspec-mocks (3.
|
42
|
+
rspec-support (~> 3.10.0)
|
43
|
+
rspec-mocks (3.10.2)
|
43
44
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-support (3.
|
46
|
-
rubocop (
|
47
|
-
jaro_winkler (~> 1.5.1)
|
45
|
+
rspec-support (~> 3.10.0)
|
46
|
+
rspec-support (3.10.2)
|
47
|
+
rubocop (1.14.0)
|
48
48
|
parallel (~> 1.10)
|
49
|
-
parser (>=
|
50
|
-
psych (>= 3.1.0)
|
49
|
+
parser (>= 3.0.0.0)
|
51
50
|
rainbow (>= 2.2.2, < 4.0)
|
51
|
+
regexp_parser (>= 1.8, < 3.0)
|
52
|
+
rexml
|
53
|
+
rubocop-ast (>= 1.5.0, < 2.0)
|
52
54
|
ruby-progressbar (~> 1.7)
|
53
|
-
unicode-display_width (>= 1.4.0, <
|
54
|
-
rubocop-
|
55
|
-
|
56
|
-
rubocop-
|
57
|
-
rubocop (>=
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
55
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
56
|
+
rubocop-ast (1.5.0)
|
57
|
+
parser (>= 3.0.1.1)
|
58
|
+
rubocop-performance (1.11.3)
|
59
|
+
rubocop (>= 1.7.0, < 2.0)
|
60
|
+
rubocop-ast (>= 0.4.0)
|
61
|
+
rubocop-rake (0.5.1)
|
62
|
+
rubocop
|
63
|
+
rubocop-rspec (2.3.0)
|
64
|
+
rubocop (~> 1.0)
|
65
|
+
rubocop-ast (>= 1.1.0)
|
66
|
+
ruby-progressbar (1.11.0)
|
67
|
+
tzinfo (2.0.4)
|
68
|
+
concurrent-ruby (~> 1.0)
|
69
|
+
unicode-display_width (2.0.0)
|
70
|
+
zeitwerk (2.4.2)
|
63
71
|
|
64
72
|
PLATFORMS
|
65
|
-
|
73
|
+
x86_64-linux
|
66
74
|
|
67
75
|
DEPENDENCIES
|
68
|
-
activesupport (~>
|
69
|
-
brakeman (~>
|
70
|
-
bundler (~> 2.
|
76
|
+
activesupport (~> 6.1)
|
77
|
+
brakeman (~> 5.0, >= 5.0.1)
|
78
|
+
bundler (~> 2.2)
|
71
79
|
interage-helpers!
|
72
|
-
pry (~> 0.
|
80
|
+
pry (~> 0.14.1)
|
73
81
|
rake (~> 13.0)
|
74
|
-
rspec (~> 3.
|
75
|
-
rubocop (~>
|
76
|
-
rubocop-performance (~> 1.1)
|
77
|
-
rubocop-
|
82
|
+
rspec (~> 3.10)
|
83
|
+
rubocop (~> 1.14)
|
84
|
+
rubocop-performance (~> 1.11, >= 1.11.3)
|
85
|
+
rubocop-rake (~> 0.5.1)
|
86
|
+
rubocop-rspec (~> 2.3)
|
78
87
|
|
79
88
|
BUNDLED WITH
|
80
|
-
2.
|
89
|
+
2.2.14
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/interage-helpers.gemspec
CHANGED
@@ -15,6 +15,8 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.homepage = 'https://github.com/InterageASH/application-helpers'
|
16
16
|
spec.licenses = ['MIT']
|
17
17
|
|
18
|
+
spec.required_ruby_version = '>= 2.7'
|
19
|
+
|
18
20
|
if spec.respond_to?(:metadata)
|
19
21
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
20
22
|
|
@@ -35,7 +37,6 @@ Gem::Specification.new do |spec|
|
|
35
37
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
36
38
|
spec.require_paths = ['lib']
|
37
39
|
|
38
|
-
spec.add_development_dependency 'bundler', '~> 2.
|
40
|
+
spec.add_development_dependency 'bundler', '~> 2.2'
|
39
41
|
spec.add_development_dependency 'rake', '~> 13.0'
|
40
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
41
42
|
end
|
@@ -14,7 +14,7 @@ module Interage
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def app_icon_classes(icon, prefix, separator, options = {})
|
17
|
-
icon_classes = icon.to_s.split
|
17
|
+
icon_classes = icon.to_s.split.uniq.join(" #{separator}-")
|
18
18
|
|
19
19
|
"#{prefix} #{separator}-#{icon_classes} #{options[:class]}".strip
|
20
20
|
end
|
@@ -3,12 +3,12 @@
|
|
3
3
|
module Interage
|
4
4
|
module BootstrapAlertHelper
|
5
5
|
def bootstrap_alert(type, message)
|
6
|
-
icon = t("bootstrap.alert.icons.#{type}", default: type)
|
6
|
+
icon = t("bootstrap.alert.icons.#{type}", default: type.to_s)
|
7
7
|
subtitles = t("bootstrap.alert.subtitles.#{type}", default: '')
|
8
8
|
|
9
|
-
|
9
|
+
tag.div class: "alert alert-#{type} m-0" do
|
10
10
|
concat app_icon(icon)
|
11
|
-
concat
|
11
|
+
concat tag.b(" #{subtitles}: ") if subtitles.present?
|
12
12
|
concat message
|
13
13
|
end
|
14
14
|
end
|
@@ -40,40 +40,40 @@ module Interage
|
|
40
40
|
alias bs_alert_danger bootstrap_alert_danger
|
41
41
|
|
42
42
|
def bootstrap_alert_not_found(gender, model)
|
43
|
-
bs_alert_info(
|
43
|
+
bs_alert_info(text404(gender, model))
|
44
44
|
end
|
45
|
-
alias
|
45
|
+
alias bs_text404 bootstrap_alert_not_found
|
46
46
|
|
47
47
|
def bootstrap_alert_not_found_male(model)
|
48
|
-
|
48
|
+
bs_text404(:male, model)
|
49
49
|
end
|
50
|
-
alias
|
50
|
+
alias bs_male404 bootstrap_alert_not_found_male
|
51
51
|
|
52
52
|
def bootstrap_alert_not_found_female(model)
|
53
|
-
|
53
|
+
bs_text404(:female, model)
|
54
54
|
end
|
55
|
-
alias
|
55
|
+
alias bs_female404 bootstrap_alert_not_found_female
|
56
56
|
|
57
57
|
def text_not_found(gender, model)
|
58
|
-
attributes = { model: tm(model).downcase, default:
|
58
|
+
attributes = { model: tm(model).downcase, default: default404 }
|
59
59
|
|
60
|
-
t("bootstrap.alert.#{gender}.not_found", attributes)
|
60
|
+
t("bootstrap.alert.#{gender}.not_found", **attributes)
|
61
61
|
end
|
62
|
-
alias
|
62
|
+
alias text404 text_not_found
|
63
63
|
|
64
64
|
def default_not_found
|
65
65
|
t('bootstrap.alert.not_found', default: '')
|
66
66
|
end
|
67
|
-
alias
|
67
|
+
alias default404 default_not_found
|
68
68
|
|
69
69
|
def text_not_found_male(model)
|
70
|
-
|
70
|
+
text404(:male, model)
|
71
71
|
end
|
72
|
-
alias
|
72
|
+
alias male404 text_not_found_male
|
73
73
|
|
74
74
|
def text_not_found_female(model)
|
75
|
-
|
75
|
+
text404(:female, model)
|
76
76
|
end
|
77
|
-
alias
|
77
|
+
alias female404 text_not_found_female
|
78
78
|
end
|
79
79
|
end
|
@@ -9,7 +9,9 @@ module Interage
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def fa_icon(icon, options = {})
|
12
|
-
|
12
|
+
icon_html_options = options.merge(class: fa_classes(icon, options))
|
13
|
+
|
14
|
+
content_tag(:i, nil, icon_html_options)
|
13
15
|
end
|
14
16
|
|
15
17
|
def fa_fw_icon(icon, options = {})
|
@@ -24,7 +26,7 @@ module Interage
|
|
24
26
|
end
|
25
27
|
|
26
28
|
def fa_classes(icon, options = {})
|
27
|
-
icon_classes = icon.to_s.split
|
29
|
+
icon_classes = icon.to_s.split.uniq.join(' fa-')
|
28
30
|
|
29
31
|
"fa fa-#{icon_classes} #{options[:class]}".strip
|
30
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: interage-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Walmir Neto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.2'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '13.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '3.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '3.0'
|
55
41
|
description: Classes to encapsulate helpers
|
56
42
|
email:
|
57
43
|
- owalmirneto@gmail.com
|
@@ -129,14 +115,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
129
115
|
requirements:
|
130
116
|
- - ">="
|
131
117
|
- !ruby/object:Gem::Version
|
132
|
-
version: '
|
118
|
+
version: '2.7'
|
133
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
120
|
requirements:
|
135
121
|
- - ">="
|
136
122
|
- !ruby/object:Gem::Version
|
137
123
|
version: '0'
|
138
124
|
requirements: []
|
139
|
-
rubygems_version: 3.
|
125
|
+
rubygems_version: 3.2.3
|
140
126
|
signing_key:
|
141
127
|
specification_version: 4
|
142
128
|
summary: Application Helpers for Interage
|