Skip to content

Commit

Permalink
chore(main) release 1.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
allmarkedup committed Nov 17, 2022
1 parent b130c8f commit ded4f1b
Show file tree
Hide file tree
Showing 27 changed files with 95 additions and 95 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
lookbook (1.3.3)
lookbook (1.3.4)
actioncable
activemodel
css_parser
Expand Down Expand Up @@ -173,7 +173,7 @@ GEM
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unicode-display_width (2.3.0)
view_component (2.75.0)
view_component (2.76.0)
activesupport (>= 5.0.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
Expand Down
4 changes: 2 additions & 2 deletions app/components/lookbook/base_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def alpine_component

def alpine_encode(data)
if data.is_a? String
"\'#{json_escape data}\'"
"'#{json_escape data}'"
else
json_escape data.to_json.tr("\"", "\'")
json_escape data.to_json.tr("\"", "'")
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/components/lookbook/tag_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def call
end

def self.escape_attribute_key
@escape_attribute_key ||= Gem::Version.new(Rails.version) < Gem::Version.new("6.1.5.1") ? :escape_attributes : :escape
@escape_attribute_key ||= (Gem::Version.new(Rails.version) < Gem::Version.new("6.1.5.1")) ? :escape_attributes : :escape
end
end
end
2 changes: 1 addition & 1 deletion app/components/lookbook/viewport/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def initialize(src:, resize_height: true, resize_width: true, max_height: nil, i
end

def generate_id(*args)
args.map { |args| args.delete_prefix("/").tr("&?=/_\-", "-") }.join("-")
args.map { |args| args.delete_prefix("/").tr("&?=/_-", "-") }.join("-")
end

protected
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/concerns/lookbook/targetable_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def inspector_data
}

preview = @preview
target_examples = @target.type == :group ? @target.examples : [@target]
target_examples = (@target.type == :group) ? @target.examples : [@target]

examples = target_examples.map do |example|
render_args = @preview.render_args(example.name, params: preview_controller.params)
Expand All @@ -118,7 +118,7 @@ def inspector_data
example
end

target = @target.type == :group ? @target : examples.find { |e| e.lookup_path == @target.lookup_path }
target = (@target.type == :group) ? @target : examples.find { |e| e.lookup_path == @target.lookup_path }

params_ref = @params
preview.define_singleton_method(:params, proc { params_ref })
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/lookbook/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def landing_path
end

def generate_id(*args)
args.map { |args| args.delete_prefix("/").tr("&?=/_\-", "-") }.join("-")
args.map { |args| args.delete_prefix("/").tr("&?=/_-", "-") }.join("-")
end
end
end
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lookbook-docs",
"version": "1.3.3",
"version": "1.3.4",
"private": true,
"scripts": {
"esbuild": "node esbuild.config.js --minify",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/_components/shared/config_option_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ConfigOptionInfo < Shared::Base
def initialize(name:, type: nil, default: nil, title: nil, **attrs)
@name = name
@title = title || name.to_s
value = type.to_s == "String" ? "\"#{default}\"" : default
value = (type.to_s == "String") ? "\"#{default}\"" : default
@metadata = [{
label: "Type",
value: type
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "standard", "~> 1.1"
gem "standard", "~> 1.17"
gem "rails", "~> 6.0.0"

group :development, :test do
Expand Down
20 changes: 10 additions & 10 deletions gemfiles/rails_6.0.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
lookbook (1.3.3)
lookbook (1.3.4)
actioncable
activemodel
css_parser
Expand Down Expand Up @@ -189,19 +189,19 @@ GEM
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.11.1)
rubocop (1.35.1)
rubocop (1.38.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.20.1, < 2.0)
rubocop-ast (>= 1.23.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.21.0)
rubocop-ast (1.23.0)
parser (>= 3.1.1.0)
rubocop-performance (1.14.3)
rubocop-performance (1.15.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.11.0)
Expand All @@ -219,15 +219,15 @@ GEM
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.5.0-arm64-darwin)
standard (1.16.1)
rubocop (= 1.35.1)
rubocop-performance (= 1.14.3)
standard (1.17.0)
rubocop (= 1.38.0)
rubocop-performance (= 1.15.0)
thor (1.2.1)
thread_safe (0.3.6)
tzinfo (1.2.10)
thread_safe (~> 0.1)
unicode-display_width (2.3.0)
view_component (2.75.0)
view_component (2.76.0)
activesupport (>= 5.0.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
Expand Down Expand Up @@ -257,7 +257,7 @@ DEPENDENCIES
rspec-rails (>= 5.0.0)
selenium-webdriver
sqlite3 (~> 1.5)
standard (~> 1.1)
standard (~> 1.17)

BUNDLED WITH
2.2.22
2 changes: 1 addition & 1 deletion gemfiles/rails_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "standard", "~> 1.1"
gem "standard", "~> 1.17"
gem "rails", "~> 6.1.0"
gem "net-smtp", require: false
gem "net-imap", require: false
Expand Down
20 changes: 10 additions & 10 deletions gemfiles/rails_6.1.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
lookbook (1.3.3)
lookbook (1.3.4)
actioncable
activemodel
css_parser
Expand Down Expand Up @@ -208,19 +208,19 @@ GEM
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.11.1)
rubocop (1.35.1)
rubocop (1.38.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.20.1, < 2.0)
rubocop-ast (>= 1.23.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.21.0)
rubocop-ast (1.23.0)
parser (>= 3.1.1.0)
rubocop-performance (1.14.3)
rubocop-performance (1.15.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.11.0)
Expand All @@ -238,16 +238,16 @@ GEM
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.5.0-arm64-darwin)
standard (1.16.1)
rubocop (= 1.35.1)
rubocop-performance (= 1.14.3)
standard (1.17.0)
rubocop (= 1.38.0)
rubocop-performance (= 1.15.0)
strscan (3.0.4)
thor (1.2.1)
timeout (0.3.0)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unicode-display_width (2.3.0)
view_component (2.75.0)
view_component (2.76.0)
activesupport (>= 5.0.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
Expand Down Expand Up @@ -280,7 +280,7 @@ DEPENDENCIES
rspec-rails (>= 5.0.0)
selenium-webdriver
sqlite3 (~> 1.5)
standard (~> 1.1)
standard (~> 1.17)

BUNDLED WITH
2.2.22
2 changes: 1 addition & 1 deletion gemfiles/rails_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "standard", "~> 1.1"
gem "standard", "~> 1.17"
gem "rails", "~> 7.0.0"

group :development, :test do
Expand Down
20 changes: 10 additions & 10 deletions gemfiles/rails_7.0.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
lookbook (1.3.3)
lookbook (1.3.4)
actioncable
activemodel
css_parser
Expand Down Expand Up @@ -214,19 +214,19 @@ GEM
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.11.1)
rubocop (1.35.1)
rubocop (1.38.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.20.1, < 2.0)
rubocop-ast (>= 1.23.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.21.0)
rubocop-ast (1.23.0)
parser (>= 3.1.1.0)
rubocop-performance (1.14.3)
rubocop-performance (1.15.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.11.0)
Expand All @@ -237,16 +237,16 @@ GEM
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sqlite3 (1.5.0-arm64-darwin)
standard (1.16.1)
rubocop (= 1.35.1)
rubocop-performance (= 1.14.3)
standard (1.17.0)
rubocop (= 1.38.0)
rubocop-performance (= 1.15.0)
strscan (3.0.4)
thor (1.2.1)
timeout (0.3.0)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unicode-display_width (2.3.0)
view_component (2.75.0)
view_component (2.76.0)
activesupport (>= 5.0.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
Expand Down Expand Up @@ -276,7 +276,7 @@ DEPENDENCIES
rspec-rails (>= 5.0.0)
selenium-webdriver
sqlite3 (~> 1.5)
standard (~> 1.1)
standard (~> 1.17)

BUNDLED WITH
2.2.22
2 changes: 1 addition & 1 deletion lib/lookbook/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def initialize(path, base_path)
@content = ""
@page_name = remove_position_prefix(path_name)
@rel_path = @pathname.relative_path_from(@base_path)
page_path = @rel_path.dirname.to_s == "." ? @page_name : "#{@rel_path.dirname}/#{@page_name}"
page_path = (@rel_path.dirname.to_s == ".") ? @page_name : "#{@rel_path.dirname}/#{@page_name}"
extract_frontmatter(file_contents)
super(page_path)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/lookbook/services/code/code_beautifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def initialize(source, opts = {})
def call
language = opts.fetch(:language, "html")
stripped_source = source.strip
result = language.downcase == "html" ? HtmlBeautifier.beautify(stripped_source, opts) : stripped_source
result = (language.downcase == "html") ? HtmlBeautifier.beautify(stripped_source, opts) : stripped_source
result.to_s.strip.html_safe
rescue
source.strip.html_safe
Expand Down
2 changes: 1 addition & 1 deletion lib/lookbook/services/code/code_highlighter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(source, opts = {})
end

def opts
@opts.is_a?(String) || @opts.is_a?(Symbol) ? {language: @opts} : @opts.to_h
(@opts.is_a?(String) || @opts.is_a?(Symbol)) ? {language: @opts} : @opts.to_h
end

def call
Expand Down
2 changes: 1 addition & 1 deletion lib/lookbook/stores/config_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def initialize(config = nil)
end

def project_name=(name)
store[:project_name] = name == false ? nil : name
store[:project_name] = (name == false) ? nil : name
end

def page_paths=(paths = nil)
Expand Down
4 changes: 2 additions & 2 deletions lib/lookbook/stores/panel_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def self.default_config
config.each do |group, panels|
panels.map! do |opts|
opts.transform_values! do |value|
value.is_a?(String) && value.start_with?("->") ? eval(value) : value # standard:disable Security/Eval
(value.is_a?(String) && value.start_with?("->")) ? eval(value) : value # standard:disable Security/Eval
end
end
end
Expand All @@ -111,7 +111,7 @@ def insert_at_position(group_name, position, opts)
end

def insert_index(position, items_count)
index = position == 0 ? 1 : (position || 0).to_int
index = (position == 0) ? 1 : (position || 0).to_int
last_position = items_count + 1
index = last_position if index > last_position
index - 1
Expand Down
2 changes: 1 addition & 1 deletion lib/lookbook/support/store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def to_hash
protected

def normalize_value(value)
@recursive && !value.is_a?(Store) && value.is_a?(Hash) ? Store.new(value, recursive: @recursive) : value
(@recursive && !value.is_a?(Store) && value.is_a?(Hash)) ? Store.new(value, recursive: @recursive) : value
end
end
end
2 changes: 1 addition & 1 deletion lib/lookbook/tags/position_tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class PositionTag < YardTag
def value
if text.present?
int = text.to_i
int == 0 ? DEFAULT_POSITION : int
(int == 0) ? DEFAULT_POSITION : int
else
DEFAULT_POSITION
end
Expand Down
2 changes: 1 addition & 1 deletion lib/lookbook/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Lookbook
VERSION = "1.3.3"
VERSION = "1.3.4"
end
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ded4f1b

Please sign in to comment.