primer_view_components 0.0.80 → 0.0.81

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: 02db6633db0431026dcc622e6935e0f27bc627408f106bd8b35ab1ab2af9f092
4
- data.tar.gz: 8fa5bcc873e721e5b988567239fa0898d02db9e5a14300afcdece1566674259f
3
+ metadata.gz: 5e807ec7189fc1b68388e5d3eabefa155c77cbf89d5d6572ac93eed37d9132e5
4
+ data.tar.gz: 4f32138832c7a375e185661f7d17e8c65f65b04364834f8a1866c4efca397232
5
5
  SHA512:
6
- metadata.gz: ddcea4c9e66c560c6b1765da45df204c82d5d0a650d37338ebdf65fda33dcffa1b4d0c3142d456be462f6340c79b22bde1e01ce1435887e50380df550aa793ed
7
- data.tar.gz: fb1112c5408048471a8ee0ca76c05dcd6d04d206e2372e331ee9edaec03cf5186bfade184f722abb064a5055f93877f78ea300cfb3f2a5ae59d8aad2279f71e3
6
+ metadata.gz: e7ee4567ce2f7a73a692a0f975a3a134b25ac5ae2183a70a295fbb4c3742d54b71944900445ed37c9257784049ffd45cb4d5c98105d7109dcf808926d1b53b7a
7
+ data.tar.gz: 415e4727e4cc542647ac1e69a407fbe7d329bdb068b724963359fc871e68699a35ba93a7e4423b69ad0f8cc2f80e70218ba6d7c1aa9ec3721569ed154ee1f0c4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.0.81
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1200](https://github.com/primer/view_components/pull/1200) [`a6505054`](https://github.com/primer/view_components/commit/a6505054a07ae006c9d48e19a2b4be6c2e2663b3) Thanks [@camertron](https://github.com/camertron)! - Use Rubocop cops to lint .erb files
8
+
9
+ * [#1201](https://github.com/primer/view_components/pull/1201) [`de2c7d68`](https://github.com/primer/view_components/commit/de2c7d68ff7d13135c04f5dd40a1e547e41923ba) Thanks [@camertron](https://github.com/camertron)! - Add xsmall size for octicons
10
+
3
11
  ## 0.0.80
4
12
 
5
13
  ### Patch Changes
@@ -5,7 +5,7 @@
5
5
  <% elsif @icon.present? %>
6
6
  <%= primer_octicon @icon, size: @icon_size, classes: "blankslate-icon" %>
7
7
  <% elsif @image_src.present? && @image_alt.present? %>
8
- <%= image_tag "#{@image_src}", class: "mb-3", size: "56x56", alt: "#{@image_alt}" %>
8
+ <%= image_tag @image_src.to_s, class: "mb-3", size: "56x56", alt: @image_alt.to_s %>
9
9
  <% end %>
10
10
 
11
11
  <% if @title.present? %>
@@ -24,7 +24,7 @@
24
24
 
25
25
  <% if @link_text.present? && @link_url.present? %>
26
26
  <p>
27
- <%= link_to "#{@link_url}" do %><%= @link_text %><% end %>
27
+ <%= link_to @link_url.to_s do %><%= @link_text %><% end %>
28
28
  </p>
29
29
  <% end %>
30
30
  <% end %>
@@ -8,10 +8,12 @@ module Primer
8
8
  class OcticonComponent < Primer::Component
9
9
  status :beta
10
10
 
11
+ SIZE_XSMALL = :xsmall
11
12
  SIZE_DEFAULT = :small
12
13
  SIZE_MEDIUM = :medium
13
14
 
14
15
  SIZE_MAPPINGS = {
16
+ SIZE_XSMALL => 12,
15
17
  SIZE_DEFAULT => 16,
16
18
  SIZE_MEDIUM => 24
17
19
  }.freeze
@@ -5,7 +5,7 @@ module Primer
5
5
  module VERSION
6
6
  MAJOR = 0
7
7
  MINOR = 0
8
- PATCH = 80
8
+ PATCH = 81
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH].join(".")
11
11
  end
@@ -1,9 +1,33 @@
1
1
  require:
2
2
  - rubocop/cop/primer
3
+ - rubocop-rails
3
4
 
4
- AllCops:
5
- DisabledByDefault: true
5
+ ####### RUBOCOP'S DEFAULTS #######
6
+ # we don't want these in .erb files
7
+ Style/FrozenStringLiteralComment:
8
+ Enabled: false
9
+
10
+ # lots of false-positives in .erb files
11
+ Layout/InitialIndentation:
12
+ Enabled: false
13
+
14
+ Style/StringLiterals:
15
+ EnforcedStyle: double_quotes
16
+
17
+ # lots of false-positives - this cop is meant for Ruby code, not .erb
18
+ Layout/TrailingEmptyLines:
19
+ Enabled: false
20
+
21
+ # it's often not desirable to add unnecessary newlines into .erb files, as
22
+ # they will appear in the rendered HTML
23
+ Layout/LineLength:
24
+ Enabled: false
25
+
26
+ # calling .html_safe in templates is ok
27
+ Rails/OutputSafety:
28
+ Enabled: false
6
29
 
30
+ ####### PRIMER COPS #######
7
31
  Primer/SystemArgumentInsteadOfClass:
8
32
  Enabled: true
9
33
 
data/static/arguments.yml CHANGED
@@ -885,7 +885,7 @@
885
885
  - name: size
886
886
  type: Symbol
887
887
  default: "`:small`"
888
- description: One of `:small` (`16`) and `:medium` (`24`).
888
+ description: One of `:xsmall` (`12`), `:small` (`16`), or `:medium` (`24`).
889
889
  - name: use_symbol
890
890
  type: Boolean
891
891
  default: "`false`"
@@ -644,14 +644,17 @@
644
644
  "Primer::OcticonComponent": {
645
645
  "SIZE_DEFAULT": "small",
646
646
  "SIZE_MAPPINGS": {
647
+ "xsmall": 12,
647
648
  "small": 16,
648
649
  "medium": 24
649
650
  },
650
651
  "SIZE_MEDIUM": "medium",
651
652
  "SIZE_OPTIONS": [
653
+ "xsmall",
652
654
  "small",
653
655
  "medium"
654
- ]
656
+ ],
657
+ "SIZE_XSMALL": "xsmall"
655
658
  },
656
659
  "Primer::OcticonSymbolsComponent": {
657
660
  },
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: primer_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.80
4
+ version: 0.0.81
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-27 00:00:00.000000000 Z
11
+ date: 2022-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview