From 9a474a7ff26f89ffa82ff287424896e0c62a68d9 Mon Sep 17 00:00:00 2001 From: Manuel Puyol Date: Wed, 24 Mar 2021 12:40:06 -0500 Subject: [PATCH 01/13] working without rails --- Gemfile | 24 +--- Gemfile.lock | 131 +++++---------------- app/components/primer/component.rb | 4 +- app/components/primer/octicon_component.rb | 4 +- demo/Gemfile | 7 +- demo/Gemfile.lock | 101 +++------------- demo/config/application.rb | 1 - demo/config/cable.yml | 10 -- demo/config/storage.yml | 34 ------ primer_view_components.gemspec | 11 +- 10 files changed, 65 insertions(+), 262 deletions(-) delete mode 100644 demo/config/cable.yml delete mode 100644 demo/config/storage.yml diff --git a/Gemfile b/Gemfile index 6dc8ab81d8..ec5c2afb4c 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,10 @@ rails_version = (ENV["RAILS_VERSION"] || "6.1.1").to_s gem "rack-cors" gem "rake", "~> 12.0" # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem "rails", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version +gem "actionview", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version +gem "activemodel", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version +gem "actionpack", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version + # Use Puma as the app server gem "puma", "~> 4.3.6" # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker @@ -19,22 +22,3 @@ gem "bootsnap", ">= 1.4.2", require: false gem "view_component", path: ENV["VIEW_COMPONENT_PATH"] if ENV["VIEW_COMPONENT_PATH"] gem "view_component_storybook", "~> 0.8.0" - -group :development, :test do - # Call 'byebug' anywhere in the code to stop execution and get a debugger console - gem "minitest", "~> 5.0" - gem "pry-rails" -end - -group :development do - # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring - gem "spring" - gem "spring-watcher-listen", "~> 2.0.0" -end - -group :test do - # Adds support for Capybara system testing and selenium driver - gem "capybara", "~> 3" - - gem "cuprite", "0.11" -end diff --git a/Gemfile.lock b/Gemfile.lock index 93dc8901f1..76a51eb9b9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,32 +2,13 @@ PATH remote: . specs: primer_view_components (0.0.32) - octicons_helper (>= 9.0.0, < 13.0.0) - rails (>= 5.0.0, < 7.0) + actionview (>= 5.0.0) + activesupport (>= 5.0.0) view_component (>= 2.0.0, < 3.0) GEM remote: https://rubygems.org/ specs: - actioncable (6.1.1) - actionpack (= 6.1.1) - activesupport (= 6.1.1) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - actionmailbox (6.1.1) - actionpack (= 6.1.1) - activejob (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) - mail (>= 2.7.1) - actionmailer (6.1.1) - actionpack (= 6.1.1) - actionview (= 6.1.1) - activejob (= 6.1.1) - activesupport (= 6.1.1) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) actionpack (6.1.1) actionview (= 6.1.1) activesupport (= 6.1.1) @@ -35,33 +16,14 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.1) - actionpack (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) - nokogiri (>= 1.8.5) actionview (6.1.1) activesupport (= 6.1.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.1) - activesupport (= 6.1.1) - globalid (>= 0.3.6) activemodel (6.1.1) activesupport (= 6.1.1) - activerecord (6.1.1) - activemodel (= 6.1.1) - activesupport (= 6.1.1) - activestorage (6.1.1) - actionpack (= 6.1.1) - activejob (= 6.1.1) - activerecord (= 6.1.1) - activesupport (= 6.1.1) - marcel (~> 0.3.1) - mimemagic (~> 0.3.2) activesupport (6.1.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) @@ -74,16 +36,16 @@ GEM ansi (1.5.0) ast (2.4.2) benchmark-ips (2.8.4) - bootsnap (1.5.1) + bootsnap (1.7.3) msgpack (~> 1.0) builder (3.2.4) - capybara (3.34.0) + capybara (3.35.3) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) - regexp_parser (~> 1.5) + regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) cliver (0.3.2) coderay (1.1.3) @@ -92,55 +54,37 @@ GEM cuprite (0.11) capybara (>= 2.1, < 4) ferrum (~> 0.9.0) - docile (1.3.4) + docile (1.3.5) erubi (1.10.0) ferrum (0.9) addressable (~> 2.5) cliver (~> 0.3) concurrent-ruby (~> 1.1) websocket-driver (>= 0.6, < 0.8) - ffi (1.14.2) - globalid (0.4.2) - activesupport (>= 4.2.0) + ffi (1.15.0) i18n (1.8.9) concurrent-ruby (~> 1.0) jaro_winkler (1.5.4) - listen (3.4.0) + listen (3.5.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.9.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.7.1) - mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) method_source (1.0.0) - mimemagic (0.3.5) mini_mime (1.0.2) - mini_portile2 (2.5.0) minitest (5.14.4) mocha (1.12.0) - msgpack (1.3.3) - nio4r (2.5.4) - nokogiri (1.11.1) - mini_portile2 (~> 2.5.0) - racc (~> 1.4) - nokogiri (1.11.1-x86_64-darwin) + msgpack (1.4.2) + nio4r (2.5.7) + nokogiri (1.11.2-x86_64-darwin) racc (~> 1.4) - octicons (12.1.0) - nokogiri (>= 1.6.3.1) - octicons_helper (12.1.0) - octicons (= 12.1.0) - rails parallel (1.20.1) parser (3.0.0.0) ast (~> 2.4.1) - pry (0.13.1) + pry (0.14.0) coderay (~> 1.1) method_source (~> 1.0) - pry-rails (0.3.9) - pry (>= 0.10.4) public_suffix (4.0.6) puma (4.3.7) nio4r (~> 2.0) @@ -152,21 +96,6 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.1) - actioncable (= 6.1.1) - actionmailbox (= 6.1.1) - actionmailer (= 6.1.1) - actionpack (= 6.1.1) - actiontext (= 6.1.1) - actionview (= 6.1.1) - activejob (= 6.1.1) - activemodel (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) - bundler (>= 1.15.0) - railties (= 6.1.1) - sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) @@ -183,7 +112,7 @@ GEM rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - regexp_parser (1.8.2) + regexp_parser (2.1.1) rexml (3.2.4) rubocop (0.82.0) jaro_winkler (~> 1.5.1) @@ -193,18 +122,18 @@ GEM rexml ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-github (0.16.0) - rubocop (<= 0.82.0) - rubocop-performance (~> 1.0) - rubocop-rails (~> 2.0) + rubocop-github (0.16.1) + rubocop (<= 1.6.1) + rubocop-performance (<= 1.7.1) + rubocop-rails (<= 2.7.1) rubocop-performance (1.7.1) rubocop (>= 0.82.0) - rubocop-rails (2.5.2) - activesupport + rubocop-rails (2.6.0) + activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 0.72.0) + rubocop (>= 0.82.0) ruby-progressbar (1.11.0) - semantic_range (2.3.1) + semantic_range (3.0.0) simplecov (0.18.5) docile (~> 1.1) simplecov-html (~> 0.11) @@ -213,10 +142,6 @@ GEM simplecov terminal-table simplecov-html (0.12.3) - spring (2.1.1) - spring-watcher-listen (2.0.1) - listen (>= 2.7, < 4.0) - spring (>= 1.2, < 3.0) sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -224,7 +149,7 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - terminal-table (2.0.0) + terminal-table (3.0.0) unicode-display_width (~> 1.1, >= 1.1.1) thor (1.1.0) tzinfo (2.0.4) @@ -248,10 +173,12 @@ GEM zeitwerk (2.4.2) PLATFORMS - ruby - x86_64-darwin-19 + x86_64-darwin-20 DEPENDENCIES + actionpack (= 6.1.1) + actionview (= 6.1.1) + activemodel (= 6.1.1) allocation_tracer (~> 0.6.3) benchmark-ips (~> 2.8.4) bootsnap (>= 1.4.2) @@ -262,18 +189,16 @@ DEPENDENCIES mocha primer_view_components! pry - pry-rails puma (~> 4.3.6) rack-cors - rails (= 6.1.1) rake (~> 12.0) rubocop (= 0.82) rubocop-github (~> 0.16.0) rubocop-performance (~> 1.7) simplecov (~> 0.18.0) simplecov-console (~> 0.7.2) - spring - spring-watcher-listen (~> 2.0.0) + sprockets + sprockets-rails view_component_storybook (~> 0.8.0) webpacker (~> 5.0) yard (~> 0.9.25) diff --git a/app/components/primer/component.rb b/app/components/primer/component.rb index f5674ca3f2..a6c0c76dc2 100644 --- a/app/components/primer/component.rb +++ b/app/components/primer/component.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require "octicons_helper/helper" +# require "octicons_helper/helper" require "view_component/version" module Primer @@ -9,7 +9,7 @@ class Component < ViewComponent::Base include ViewComponent::SlotableV2 unless ViewComponent::VERSION::STRING.to_f >= 2.28 include ClassNameHelper include FetchOrFallbackHelper - include OcticonsHelper + # include OcticonsHelper include JoinStyleArgumentsHelper include ViewHelper include Status::Dsl diff --git a/app/components/primer/octicon_component.rb b/app/components/primer/octicon_component.rb index f72d296736..8fbc26039e 100644 --- a/app/components/primer/octicon_component.rb +++ b/app/components/primer/octicon_component.rb @@ -7,7 +7,7 @@ class OcticonComponent < Primer::Component include ClassNameHelper include TestSelectorHelper - include OcticonsHelper + # include OcticonsHelper SIZE_DEFAULT = :small SIZE_MAPPINGS = { @@ -44,7 +44,7 @@ def initialize(icon_name = nil, icon: nil, size: SIZE_DEFAULT, **system_argument end def call - octicon(@icon, { **@system_arguments }) + # octicon(@icon, { **@system_arguments }) end end end diff --git a/demo/Gemfile b/demo/Gemfile index f8825e119f..eae4d4c90c 100644 --- a/demo/Gemfile +++ b/demo/Gemfile @@ -7,7 +7,10 @@ rails_version = (ENV["RAILS_VERSION"] || "6.1.1").to_s gem "rake", "~> 12.0" gem "rack-cors" # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem "rails", rails_version == "master" ? { github: "rails/rails" } : rails_version +gem "actionview", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version +gem "activemodel", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version +gem "actionpack", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version + # Use Puma as the app server gem "puma", "~> 4.3.6" @@ -21,6 +24,8 @@ group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem "minitest", "~> 5.0" gem "pry-rails" + gem "sprockets" + gem "sprockets-rails" end group :development do diff --git a/demo/Gemfile.lock b/demo/Gemfile.lock index 6ded1f6894..254e91a014 100644 --- a/demo/Gemfile.lock +++ b/demo/Gemfile.lock @@ -2,32 +2,13 @@ PATH remote: .. specs: primer_view_components (0.0.32) - octicons_helper (>= 9.0.0, < 13.0.0) - rails (>= 5.0.0, < 7.0) + actionview (>= 5.0.0) + activesupport (>= 5.0.0) view_component (>= 2.0.0, < 3.0) GEM remote: https://rubygems.org/ specs: - actioncable (6.1.1) - actionpack (= 6.1.1) - activesupport (= 6.1.1) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - actionmailbox (6.1.1) - actionpack (= 6.1.1) - activejob (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) - mail (>= 2.7.1) - actionmailer (6.1.1) - actionpack (= 6.1.1) - actionview (= 6.1.1) - activejob (= 6.1.1) - activesupport (= 6.1.1) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) actionpack (6.1.1) actionview (= 6.1.1) activesupport (= 6.1.1) @@ -35,33 +16,14 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.1) - actionpack (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) - nokogiri (>= 1.8.5) actionview (6.1.1) activesupport (= 6.1.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.1) - activesupport (= 6.1.1) - globalid (>= 0.3.6) activemodel (6.1.1) activesupport (= 6.1.1) - activerecord (6.1.1) - activemodel (= 6.1.1) - activesupport (= 6.1.1) - activestorage (6.1.1) - actionpack (= 6.1.1) - activejob (= 6.1.1) - activerecord (= 6.1.1) - activesupport (= 6.1.1) - marcel (~> 0.3.1) - mimemagic (~> 0.3.2) activesupport (6.1.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) @@ -73,35 +35,28 @@ GEM bootsnap (1.4.7) msgpack (~> 1.0) builder (3.2.4) - capybara (3.33.0) + capybara (3.35.3) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) - regexp_parser (~> 1.5) + regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) coderay (1.1.3) concurrent-ruby (1.1.8) crass (1.0.6) erubi (1.10.0) - ffi (1.13.1) - globalid (0.4.2) - activesupport (>= 4.2.0) + ffi (1.15.0) i18n (1.8.9) concurrent-ruby (~> 1.0) - listen (3.2.1) + listen (3.5.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.9.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.7.1) - mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) method_source (1.0.0) - mimemagic (0.3.5) mini_mime (1.0.2) mini_portile2 (2.5.0) minitest (5.14.4) @@ -110,17 +65,12 @@ GEM nokogiri (1.11.1) mini_portile2 (~> 2.5.0) racc (~> 1.4) - octicons (12.1.0) - nokogiri (>= 1.6.3.1) - octicons_helper (12.1.0) - octicons (= 12.1.0) - rails - pry (0.13.1) + pry (0.14.0) coderay (~> 1.1) method_source (~> 1.0) pry-rails (0.3.9) pry (>= 0.10.4) - public_suffix (4.0.5) + public_suffix (4.0.6) puma (4.3.6) nio4r (~> 2.0) racc (1.5.2) @@ -129,38 +79,17 @@ GEM rack (>= 2.0.0) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.1) - actioncable (= 6.1.1) - actionmailbox (= 6.1.1) - actionmailer (= 6.1.1) - actionpack (= 6.1.1) - actiontext (= 6.1.1) - actionview (= 6.1.1) - activejob (= 6.1.1) - activemodel (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) - bundler (>= 1.15.0) - railties (= 6.1.1) - sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.1.1) - actionpack (= 6.1.1) - activesupport (= 6.1.1) - method_source - rake (>= 0.8.7) - thor (~> 1.0) rake (12.3.3) rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - regexp_parser (1.7.1) - spring (2.1.0) + regexp_parser (2.1.1) + spring (2.1.1) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) @@ -171,16 +100,12 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - thor (1.1.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) view_component (2.28.0) activesupport (>= 5.0.0, < 7.0) view_component_storybook (0.8.0) view_component (>= 2.2) - websocket-driver (0.7.3) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.4.2) @@ -189,6 +114,9 @@ PLATFORMS ruby DEPENDENCIES + actionpack (= 6.1.1) + actionview (= 6.1.1) + activemodel (= 6.1.1) bootsnap (>= 1.4.2) capybara (~> 3) minitest (~> 5.0) @@ -196,10 +124,11 @@ DEPENDENCIES pry-rails puma (~> 4.3.6) rack-cors - rails (= 6.1.1) rake (~> 12.0) spring spring-watcher-listen (~> 2.0.0) + sprockets + sprockets-rails view_component_storybook (~> 0.8.0) BUNDLED WITH diff --git a/demo/config/application.rb b/demo/config/application.rb index 0b1fcdadef..9e241c3067 100644 --- a/demo/config/application.rb +++ b/demo/config/application.rb @@ -5,7 +5,6 @@ require "action_controller/railtie" require "action_view/railtie" require "sprockets/railtie" -require "rails/test_unit/railtie" require "view_component/engine" require "view_component/storybook/engine" require "primer/view_components/engine" diff --git a/demo/config/cable.yml b/demo/config/cable.yml deleted file mode 100644 index 5a8a13d116..0000000000 --- a/demo/config/cable.yml +++ /dev/null @@ -1,10 +0,0 @@ -development: - adapter: async - -test: - adapter: test - -production: - adapter: redis - url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> - channel_prefix: demo_production diff --git a/demo/config/storage.yml b/demo/config/storage.yml deleted file mode 100644 index d32f76e8fb..0000000000 --- a/demo/config/storage.yml +++ /dev/null @@ -1,34 +0,0 @@ -test: - service: Disk - root: <%= Rails.root.join("tmp/storage") %> - -local: - service: Disk - root: <%= Rails.root.join("storage") %> - -# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) -# amazon: -# service: S3 -# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> -# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> -# region: us-east-1 -# bucket: your_own_bucket - -# Remember not to checkin your GCS keyfile to a repository -# google: -# service: GCS -# project: your_project -# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> -# bucket: your_own_bucket - -# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) -# microsoft: -# service: AzureStorage -# storage_account_name: your_account_name -# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> -# container: your_container_name - -# mirror: -# service: Mirror -# primary: local -# mirrors: [ amazon, google, microsoft ] diff --git a/primer_view_components.gemspec b/primer_view_components.gemspec index 16f70e3221..335aaf7e88 100644 --- a/primer_view_components.gemspec +++ b/primer_view_components.gemspec @@ -27,14 +27,17 @@ Gem::Specification.new do |spec| spec.files = Dir["CHANGELOG.md", "LICENSE.txt", "README.md", "lib/**/*", "app/**/*", "static/statuses.json"] spec.require_paths = ["lib"] - spec.add_runtime_dependency "octicons_helper", [">= 9.0.0", "< 13.0.0"] - spec.add_runtime_dependency "rails", [">= 5.0.0", "< 7.0"] + spec.add_runtime_dependency "actionview", ">= 5.0.0" + spec.add_runtime_dependency "activesupport", ">= 5.0.0" + # spec.add_runtime_dependency "octicons_helper", [">= 9.0.0", "< 13.0.0"] spec.add_runtime_dependency "view_component", [">= 2.0.0", "< 3.0"] spec.add_development_dependency "allocation_tracer", "~> 0.6.3" spec.add_development_dependency "benchmark-ips", "~> 2.8.4" + spec.add_development_dependency "capybara", "~> 3" + spec.add_development_dependency "cuprite", "= 0.11" spec.add_development_dependency "listen", "~> 3.0" - spec.add_development_dependency "minitest", "= 5.6.0" + spec.add_development_dependency "minitest", "~> 5.0" spec.add_development_dependency "mocha" spec.add_development_dependency "pry" spec.add_development_dependency "rubocop", "= 0.82" @@ -42,5 +45,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency "rubocop-performance", "~> 1.7" spec.add_development_dependency "simplecov", "~> 0.18.0" spec.add_development_dependency "simplecov-console", "~> 0.7.2" + spec.add_development_dependency "sprockets" + spec.add_development_dependency "sprockets-rails" spec.add_development_dependency "yard", "~> 0.9.25" end From a765f8ebfd9399e0bef9965e2c40b982d9c118df Mon Sep 17 00:00:00 2001 From: Manuel Puyol Date: Wed, 24 Mar 2021 12:44:41 -0500 Subject: [PATCH 02/13] working storybook --- demo/Gemfile | 8 +------- demo/Gemfile.lock | 40 ++++++++++++---------------------------- 2 files changed, 13 insertions(+), 35 deletions(-) diff --git a/demo/Gemfile b/demo/Gemfile index eae4d4c90c..649835b9bf 100644 --- a/demo/Gemfile +++ b/demo/Gemfile @@ -10,6 +10,7 @@ gem "rack-cors" gem "actionview", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version gem "activemodel", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version gem "actionpack", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version +gem "railties", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version # Use Puma as the app server gem "puma", "~> 4.3.6" @@ -22,8 +23,6 @@ gem "view_component_storybook", "~> 0.8.0" group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console - gem "minitest", "~> 5.0" - gem "pry-rails" gem "sprockets" gem "sprockets-rails" end @@ -33,8 +32,3 @@ group :development do gem "spring" gem "spring-watcher-listen", "~> 2.0.0" end - -group :test do - # Adds support for Capybara system testing and selenium driver - gem "capybara", "~> 3" -end diff --git a/demo/Gemfile.lock b/demo/Gemfile.lock index 254e91a014..cce3d49329 100644 --- a/demo/Gemfile.lock +++ b/demo/Gemfile.lock @@ -30,20 +30,9 @@ GEM minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) - bootsnap (1.4.7) + bootsnap (1.7.3) msgpack (~> 1.0) builder (3.2.4) - capybara (3.35.3) - addressable - mini_mime (>= 0.1.3) - nokogiri (~> 1.8) - rack (>= 1.6.0) - rack-test (>= 0.6.3) - regexp_parser (>= 1.5, < 3.0) - xpath (~> 3.2) - coderay (1.1.3) concurrent-ruby (1.1.8) crass (1.0.6) erubi (1.10.0) @@ -57,21 +46,14 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.5.9) method_source (1.0.0) - mini_mime (1.0.2) mini_portile2 (2.5.0) minitest (5.14.4) - msgpack (1.3.3) - nio4r (2.5.5) + msgpack (1.4.2) + nio4r (2.5.7) nokogiri (1.11.1) mini_portile2 (~> 2.5.0) racc (~> 1.4) - pry (0.14.0) - coderay (~> 1.1) - method_source (~> 1.0) - pry-rails (0.3.9) - pry (>= 0.10.4) - public_suffix (4.0.6) - puma (4.3.6) + puma (4.3.7) nio4r (~> 2.0) racc (1.5.2) rack (2.2.3) @@ -84,11 +66,16 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) + railties (6.1.1) + actionpack (= 6.1.1) + activesupport (= 6.1.1) + method_source + rake (>= 0.8.7) + thor (~> 1.0) rake (12.3.3) rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - regexp_parser (2.1.1) spring (2.1.1) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) @@ -100,14 +87,13 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) + thor (1.1.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) view_component (2.28.0) activesupport (>= 5.0.0, < 7.0) view_component_storybook (0.8.0) view_component (>= 2.2) - xpath (3.2.0) - nokogiri (~> 1.8) zeitwerk (2.4.2) PLATFORMS @@ -118,12 +104,10 @@ DEPENDENCIES actionview (= 6.1.1) activemodel (= 6.1.1) bootsnap (>= 1.4.2) - capybara (~> 3) - minitest (~> 5.0) primer_view_components! - pry-rails puma (~> 4.3.6) rack-cors + railties (= 6.1.1) rake (~> 12.0) spring spring-watcher-listen (~> 2.0.0) From 8eb107a13bd592e39a62e586a87222305e9cb5da Mon Sep 17 00:00:00 2001 From: Manuel Puyol Date: Wed, 24 Mar 2021 12:46:58 -0500 Subject: [PATCH 03/13] add activesupport versioning --- Gemfile | 1 + Gemfile.lock | 1 + demo/Gemfile | 1 + demo/Gemfile.lock | 1 + 4 files changed, 4 insertions(+) diff --git a/Gemfile b/Gemfile index ec5c2afb4c..547cd57937 100644 --- a/Gemfile +++ b/Gemfile @@ -11,6 +11,7 @@ gem "rake", "~> 12.0" gem "actionview", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version gem "activemodel", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version gem "actionpack", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version +gem "activesupport", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version # Use Puma as the app server gem "puma", "~> 4.3.6" diff --git a/Gemfile.lock b/Gemfile.lock index 76a51eb9b9..aefccbb0fe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -179,6 +179,7 @@ DEPENDENCIES actionpack (= 6.1.1) actionview (= 6.1.1) activemodel (= 6.1.1) + activesupport (= 6.1.1) allocation_tracer (~> 0.6.3) benchmark-ips (~> 2.8.4) bootsnap (>= 1.4.2) diff --git a/demo/Gemfile b/demo/Gemfile index 649835b9bf..8cfca9e056 100644 --- a/demo/Gemfile +++ b/demo/Gemfile @@ -10,6 +10,7 @@ gem "rack-cors" gem "actionview", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version gem "activemodel", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version gem "actionpack", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version +gem "activesupport", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version gem "railties", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version # Use Puma as the app server diff --git a/demo/Gemfile.lock b/demo/Gemfile.lock index cce3d49329..ab0727a7c0 100644 --- a/demo/Gemfile.lock +++ b/demo/Gemfile.lock @@ -103,6 +103,7 @@ DEPENDENCIES actionpack (= 6.1.1) actionview (= 6.1.1) activemodel (= 6.1.1) + activesupport (= 6.1.1) bootsnap (>= 1.4.2) primer_view_components! puma (~> 4.3.6) From 722e4b3f0c92236d651e9d9191c16c59558ff2e2 Mon Sep 17 00:00:00 2001 From: Manuel Puyol Date: Wed, 24 Mar 2021 12:52:18 -0500 Subject: [PATCH 04/13] remove actionpack --- Gemfile | 1 - Gemfile.lock | 1 - demo/Gemfile | 1 - demo/Gemfile.lock | 1 - 4 files changed, 4 deletions(-) diff --git a/Gemfile b/Gemfile index 547cd57937..8f07b64533 100644 --- a/Gemfile +++ b/Gemfile @@ -10,7 +10,6 @@ gem "rake", "~> 12.0" # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem "actionview", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version gem "activemodel", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version -gem "actionpack", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version gem "activesupport", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version # Use Puma as the app server diff --git a/Gemfile.lock b/Gemfile.lock index aefccbb0fe..425a9fb987 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -176,7 +176,6 @@ PLATFORMS x86_64-darwin-20 DEPENDENCIES - actionpack (= 6.1.1) actionview (= 6.1.1) activemodel (= 6.1.1) activesupport (= 6.1.1) diff --git a/demo/Gemfile b/demo/Gemfile index 8cfca9e056..b9289e1212 100644 --- a/demo/Gemfile +++ b/demo/Gemfile @@ -9,7 +9,6 @@ gem "rack-cors" # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem "actionview", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version gem "activemodel", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version -gem "actionpack", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version gem "activesupport", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version gem "railties", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version diff --git a/demo/Gemfile.lock b/demo/Gemfile.lock index ab0727a7c0..b545b70778 100644 --- a/demo/Gemfile.lock +++ b/demo/Gemfile.lock @@ -100,7 +100,6 @@ PLATFORMS ruby DEPENDENCIES - actionpack (= 6.1.1) actionview (= 6.1.1) activemodel (= 6.1.1) activesupport (= 6.1.1) From 44cf15fe3dfe684971405736978957d03eba2472 Mon Sep 17 00:00:00 2001 From: Manuel Puyol Date: Wed, 24 Mar 2021 12:56:34 -0500 Subject: [PATCH 05/13] update locks --- Gemfile.lock | 47 ++++++++++++++++++++++++++--------------------- demo/Gemfile.lock | 14 +++++++------- 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 425a9fb987..055fcdf7fd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -36,16 +36,16 @@ GEM ansi (1.5.0) ast (2.4.2) benchmark-ips (2.8.4) - bootsnap (1.7.3) + bootsnap (1.5.1) msgpack (~> 1.0) builder (3.2.4) - capybara (3.35.3) + capybara (3.34.0) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) - regexp_parser (>= 1.5, < 3.0) + regexp_parser (~> 1.5) xpath (~> 3.2) cliver (0.3.2) coderay (1.1.3) @@ -54,18 +54,18 @@ GEM cuprite (0.11) capybara (>= 2.1, < 4) ferrum (~> 0.9.0) - docile (1.3.5) + docile (1.3.4) erubi (1.10.0) ferrum (0.9) addressable (~> 2.5) cliver (~> 0.3) concurrent-ruby (~> 1.1) websocket-driver (>= 0.6, < 0.8) - ffi (1.15.0) + ffi (1.14.2) i18n (1.8.9) concurrent-ruby (~> 1.0) jaro_winkler (1.5.4) - listen (3.5.0) + listen (3.4.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.9.0) @@ -73,16 +73,20 @@ GEM nokogiri (>= 1.5.9) method_source (1.0.0) mini_mime (1.0.2) + mini_portile2 (2.5.0) minitest (5.14.4) mocha (1.12.0) - msgpack (1.4.2) - nio4r (2.5.7) - nokogiri (1.11.2-x86_64-darwin) + msgpack (1.3.3) + nio4r (2.5.4) + nokogiri (1.11.1) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) + nokogiri (1.11.1-x86_64-darwin) racc (~> 1.4) parallel (1.20.1) parser (3.0.0.0) ast (~> 2.4.1) - pry (0.14.0) + pry (0.13.1) coderay (~> 1.1) method_source (~> 1.0) public_suffix (4.0.6) @@ -112,7 +116,7 @@ GEM rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - regexp_parser (2.1.1) + regexp_parser (1.8.2) rexml (3.2.4) rubocop (0.82.0) jaro_winkler (~> 1.5.1) @@ -122,18 +126,18 @@ GEM rexml ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-github (0.16.1) - rubocop (<= 1.6.1) - rubocop-performance (<= 1.7.1) - rubocop-rails (<= 2.7.1) + rubocop-github (0.16.0) + rubocop (<= 0.82.0) + rubocop-performance (~> 1.0) + rubocop-rails (~> 2.0) rubocop-performance (1.7.1) rubocop (>= 0.82.0) - rubocop-rails (2.6.0) - activesupport (>= 4.2.0) + rubocop-rails (2.5.2) + activesupport rack (>= 1.1) - rubocop (>= 0.82.0) + rubocop (>= 0.72.0) ruby-progressbar (1.11.0) - semantic_range (3.0.0) + semantic_range (2.3.1) simplecov (0.18.5) docile (~> 1.1) simplecov-html (~> 0.11) @@ -149,7 +153,7 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - terminal-table (3.0.0) + terminal-table (2.0.0) unicode-display_width (~> 1.1, >= 1.1.1) thor (1.1.0) tzinfo (2.0.4) @@ -173,7 +177,8 @@ GEM zeitwerk (2.4.2) PLATFORMS - x86_64-darwin-20 + ruby + x86_64-darwin-19 DEPENDENCIES actionview (= 6.1.1) diff --git a/demo/Gemfile.lock b/demo/Gemfile.lock index b545b70778..eae463db4d 100644 --- a/demo/Gemfile.lock +++ b/demo/Gemfile.lock @@ -30,16 +30,16 @@ GEM minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - bootsnap (1.7.3) + bootsnap (1.4.7) msgpack (~> 1.0) builder (3.2.4) concurrent-ruby (1.1.8) crass (1.0.6) erubi (1.10.0) - ffi (1.15.0) + ffi (1.13.1) i18n (1.8.9) concurrent-ruby (~> 1.0) - listen (3.5.0) + listen (3.2.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.9.0) @@ -48,12 +48,12 @@ GEM method_source (1.0.0) mini_portile2 (2.5.0) minitest (5.14.4) - msgpack (1.4.2) - nio4r (2.5.7) + msgpack (1.3.3) + nio4r (2.5.5) nokogiri (1.11.1) mini_portile2 (~> 2.5.0) racc (~> 1.4) - puma (4.3.7) + puma (4.3.6) nio4r (~> 2.0) racc (1.5.2) rack (2.2.3) @@ -76,7 +76,7 @@ GEM rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - spring (2.1.1) + spring (2.1.0) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) From 296846cda04786a30568a8139d30f72d8e6bae8d Mon Sep 17 00:00:00 2001 From: Manuel Puyol Date: Wed, 24 Mar 2021 12:58:51 -0500 Subject: [PATCH 06/13] reinstall octicons_helper --- Gemfile.lock | 66 ++++++++++++++++++++ app/components/primer/base_component.rb | 2 - app/components/primer/component.rb | 5 +- app/components/primer/octicon_component.rb | 6 +- demo/Gemfile.lock | 70 ++++++++++++++++++++++ primer_view_components.gemspec | 2 +- 6 files changed, 141 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 055fcdf7fd..acff679afe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,11 +4,31 @@ PATH primer_view_components (0.0.32) actionview (>= 5.0.0) activesupport (>= 5.0.0) + octicons_helper (>= 9.0.0, < 13.0.0) view_component (>= 2.0.0, < 3.0) GEM remote: https://rubygems.org/ specs: + actioncable (6.1.1) + actionpack (= 6.1.1) + activesupport (= 6.1.1) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (6.1.1) + actionpack (= 6.1.1) + activejob (= 6.1.1) + activerecord (= 6.1.1) + activestorage (= 6.1.1) + activesupport (= 6.1.1) + mail (>= 2.7.1) + actionmailer (6.1.1) + actionpack (= 6.1.1) + actionview (= 6.1.1) + activejob (= 6.1.1) + activesupport (= 6.1.1) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) actionpack (6.1.1) actionview (= 6.1.1) activesupport (= 6.1.1) @@ -16,14 +36,33 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.1.1) + actionpack (= 6.1.1) + activerecord (= 6.1.1) + activestorage (= 6.1.1) + activesupport (= 6.1.1) + nokogiri (>= 1.8.5) actionview (6.1.1) activesupport (= 6.1.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.1.1) + activesupport (= 6.1.1) + globalid (>= 0.3.6) activemodel (6.1.1) activesupport (= 6.1.1) + activerecord (6.1.1) + activemodel (= 6.1.1) + activesupport (= 6.1.1) + activestorage (6.1.1) + actionpack (= 6.1.1) + activejob (= 6.1.1) + activerecord (= 6.1.1) + activesupport (= 6.1.1) + marcel (~> 0.3.1) + mimemagic (~> 0.3.2) activesupport (6.1.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) @@ -62,6 +101,8 @@ GEM concurrent-ruby (~> 1.1) websocket-driver (>= 0.6, < 0.8) ffi (1.14.2) + globalid (0.4.2) + activesupport (>= 4.2.0) i18n (1.8.9) concurrent-ruby (~> 1.0) jaro_winkler (1.5.4) @@ -71,7 +112,12 @@ GEM loofah (2.9.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) + mail (2.7.1) + mini_mime (>= 0.1.1) + marcel (0.3.3) + mimemagic (~> 0.3.2) method_source (1.0.0) + mimemagic (0.3.6) mini_mime (1.0.2) mini_portile2 (2.5.0) minitest (5.14.4) @@ -83,6 +129,11 @@ GEM racc (~> 1.4) nokogiri (1.11.1-x86_64-darwin) racc (~> 1.4) + octicons (12.1.0) + nokogiri (>= 1.6.3.1) + octicons_helper (12.1.0) + octicons (= 12.1.0) + rails parallel (1.20.1) parser (3.0.0.0) ast (~> 2.4.1) @@ -100,6 +151,21 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) + rails (6.1.1) + actioncable (= 6.1.1) + actionmailbox (= 6.1.1) + actionmailer (= 6.1.1) + actionpack (= 6.1.1) + actiontext (= 6.1.1) + actionview (= 6.1.1) + activejob (= 6.1.1) + activemodel (= 6.1.1) + activerecord (= 6.1.1) + activestorage (= 6.1.1) + activesupport (= 6.1.1) + bundler (>= 1.15.0) + railties (= 6.1.1) + sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) diff --git a/app/components/primer/base_component.rb b/app/components/primer/base_component.rb index 44a31dcf8a..589cdd0872 100644 --- a/app/components/primer/base_component.rb +++ b/app/components/primer/base_component.rb @@ -39,8 +39,6 @@ module Primer class BaseComponent < Primer::Component status :beta - include TestSelectorHelper - # @param test_selector [String] Adds `data-test-selector='given value'` in non-Production environments for testing purposes. # # @param m [Integer] Margin. <%= one_of((-6..6).to_a) %> diff --git a/app/components/primer/component.rb b/app/components/primer/component.rb index a6c0c76dc2..7f6c8c4202 100644 --- a/app/components/primer/component.rb +++ b/app/components/primer/component.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# require "octicons_helper/helper" +require "octicons_helper/helper" require "view_component/version" module Primer @@ -9,7 +9,8 @@ class Component < ViewComponent::Base include ViewComponent::SlotableV2 unless ViewComponent::VERSION::STRING.to_f >= 2.28 include ClassNameHelper include FetchOrFallbackHelper - # include OcticonsHelper + include OcticonsHelper + include TestSelectorHelper include JoinStyleArgumentsHelper include ViewHelper include Status::Dsl diff --git a/app/components/primer/octicon_component.rb b/app/components/primer/octicon_component.rb index 8fbc26039e..56c5281a95 100644 --- a/app/components/primer/octicon_component.rb +++ b/app/components/primer/octicon_component.rb @@ -5,10 +5,6 @@ module Primer class OcticonComponent < Primer::Component status :beta - include ClassNameHelper - include TestSelectorHelper - # include OcticonsHelper - SIZE_DEFAULT = :small SIZE_MAPPINGS = { SIZE_DEFAULT => 16, @@ -44,7 +40,7 @@ def initialize(icon_name = nil, icon: nil, size: SIZE_DEFAULT, **system_argument end def call - # octicon(@icon, { **@system_arguments }) + octicon(@icon, { **@system_arguments }) end end end diff --git a/demo/Gemfile.lock b/demo/Gemfile.lock index eae463db4d..c2cdb9ae1e 100644 --- a/demo/Gemfile.lock +++ b/demo/Gemfile.lock @@ -4,11 +4,31 @@ PATH primer_view_components (0.0.32) actionview (>= 5.0.0) activesupport (>= 5.0.0) + octicons_helper (>= 9.0.0, < 13.0.0) view_component (>= 2.0.0, < 3.0) GEM remote: https://rubygems.org/ specs: + actioncable (6.1.1) + actionpack (= 6.1.1) + activesupport (= 6.1.1) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (6.1.1) + actionpack (= 6.1.1) + activejob (= 6.1.1) + activerecord (= 6.1.1) + activestorage (= 6.1.1) + activesupport (= 6.1.1) + mail (>= 2.7.1) + actionmailer (6.1.1) + actionpack (= 6.1.1) + actionview (= 6.1.1) + activejob (= 6.1.1) + activesupport (= 6.1.1) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) actionpack (6.1.1) actionview (= 6.1.1) activesupport (= 6.1.1) @@ -16,14 +36,33 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.1.1) + actionpack (= 6.1.1) + activerecord (= 6.1.1) + activestorage (= 6.1.1) + activesupport (= 6.1.1) + nokogiri (>= 1.8.5) actionview (6.1.1) activesupport (= 6.1.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.1.1) + activesupport (= 6.1.1) + globalid (>= 0.3.6) activemodel (6.1.1) activesupport (= 6.1.1) + activerecord (6.1.1) + activemodel (= 6.1.1) + activesupport (= 6.1.1) + activestorage (6.1.1) + actionpack (= 6.1.1) + activejob (= 6.1.1) + activerecord (= 6.1.1) + activesupport (= 6.1.1) + marcel (~> 0.3.1) + mimemagic (~> 0.3.2) activesupport (6.1.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) @@ -37,6 +76,8 @@ GEM crass (1.0.6) erubi (1.10.0) ffi (1.13.1) + globalid (0.4.2) + activesupport (>= 4.2.0) i18n (1.8.9) concurrent-ruby (~> 1.0) listen (3.2.1) @@ -45,7 +86,13 @@ GEM loofah (2.9.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) + mail (2.7.1) + mini_mime (>= 0.1.1) + marcel (0.3.3) + mimemagic (~> 0.3.2) method_source (1.0.0) + mimemagic (0.3.6) + mini_mime (1.0.2) mini_portile2 (2.5.0) minitest (5.14.4) msgpack (1.3.3) @@ -53,6 +100,11 @@ GEM nokogiri (1.11.1) mini_portile2 (~> 2.5.0) racc (~> 1.4) + octicons (12.1.0) + nokogiri (>= 1.6.3.1) + octicons_helper (12.1.0) + octicons (= 12.1.0) + rails puma (4.3.6) nio4r (~> 2.0) racc (1.5.2) @@ -61,6 +113,21 @@ GEM rack (>= 2.0.0) rack-test (1.1.0) rack (>= 1.0, < 3) + rails (6.1.1) + actioncable (= 6.1.1) + actionmailbox (= 6.1.1) + actionmailer (= 6.1.1) + actionpack (= 6.1.1) + actiontext (= 6.1.1) + actionview (= 6.1.1) + activejob (= 6.1.1) + activemodel (= 6.1.1) + activerecord (= 6.1.1) + activestorage (= 6.1.1) + activesupport (= 6.1.1) + bundler (>= 1.15.0) + railties (= 6.1.1) + sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) @@ -94,6 +161,9 @@ GEM activesupport (>= 5.0.0, < 7.0) view_component_storybook (0.8.0) view_component (>= 2.2) + websocket-driver (0.7.3) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) zeitwerk (2.4.2) PLATFORMS diff --git a/primer_view_components.gemspec b/primer_view_components.gemspec index 335aaf7e88..65eac96e43 100644 --- a/primer_view_components.gemspec +++ b/primer_view_components.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency "actionview", ">= 5.0.0" spec.add_runtime_dependency "activesupport", ">= 5.0.0" - # spec.add_runtime_dependency "octicons_helper", [">= 9.0.0", "< 13.0.0"] + spec.add_runtime_dependency "octicons_helper", [">= 9.0.0", "< 13.0.0"] spec.add_runtime_dependency "view_component", [">= 2.0.0", "< 3.0"] spec.add_development_dependency "allocation_tracer", "~> 0.6.3" From cad66f6f67fb3593807d6c7f202691cf9813978d Mon Sep 17 00:00:00 2001 From: Manuel Puyol Date: Wed, 24 Mar 2021 13:01:10 -0500 Subject: [PATCH 07/13] correctly point to main --- Gemfile | 16 +++++++++++++--- Gemfile.lock | 1 + demo/Gemfile | 17 +++++++++++++---- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index 8f07b64533..b778d12fd8 100644 --- a/Gemfile +++ b/Gemfile @@ -8,9 +8,19 @@ rails_version = (ENV["RAILS_VERSION"] || "6.1.1").to_s gem "rack-cors" gem "rake", "~> 12.0" # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem "actionview", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version -gem "activemodel", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version -gem "activesupport", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version +if ENV["RAILS_VERSION"] != "main" + gem "actionview", rails_version + gem "activemodel", rails_version + gem "activesupport", rails_version + gem "railties", rails_version +else + git "https://github.com/rails/rails.git", ref: "main" do + gem "actionview" + gem "activemodel" + gem "activesupport" + gem "railties" + end +end # Use Puma as the app server gem "puma", "~> 4.3.6" diff --git a/Gemfile.lock b/Gemfile.lock index acff679afe..88026c15a9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -262,6 +262,7 @@ DEPENDENCIES pry puma (~> 4.3.6) rack-cors + railties (= 6.1.1) rake (~> 12.0) rubocop (= 0.82) rubocop-github (~> 0.16.0) diff --git a/demo/Gemfile b/demo/Gemfile index b9289e1212..4a8351ea3b 100644 --- a/demo/Gemfile +++ b/demo/Gemfile @@ -7,10 +7,19 @@ rails_version = (ENV["RAILS_VERSION"] || "6.1.1").to_s gem "rake", "~> 12.0" gem "rack-cors" # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem "actionview", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version -gem "activemodel", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version -gem "activesupport", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version -gem "railties", rails_version == "main" ? { git: "https://github.com/rails/rails", ref: "main" } : rails_version +if ENV["RAILS_VERSION"] != "main" + gem "actionview", rails_version + gem "activemodel", rails_version + gem "activesupport", rails_version + gem "railties", rails_version +else + git "https://github.com/rails/rails.git", ref: "main" do + gem "actionview" + gem "activemodel" + gem "activesupport" + gem "railties" + end +end # Use Puma as the app server gem "puma", "~> 4.3.6" From 954b3df59891911b8a0433d839d90de0fbd14499 Mon Sep 17 00:00:00 2001 From: Manuel Puyol Date: Wed, 24 Mar 2021 14:46:38 -0500 Subject: [PATCH 08/13] lint --- Gemfile | 2 ++ demo/Gemfile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Gemfile b/Gemfile index b778d12fd8..745746269d 100644 --- a/Gemfile +++ b/Gemfile @@ -15,10 +15,12 @@ if ENV["RAILS_VERSION"] != "main" gem "railties", rails_version else git "https://github.com/rails/rails.git", ref: "main" do + # rubocop:disable Bundler/DuplicatedGem gem "actionview" gem "activemodel" gem "activesupport" gem "railties" + # rubocop:enable Bundler/DuplicatedGem end end diff --git a/demo/Gemfile b/demo/Gemfile index 4a8351ea3b..f98f2ecb8e 100644 --- a/demo/Gemfile +++ b/demo/Gemfile @@ -14,10 +14,12 @@ if ENV["RAILS_VERSION"] != "main" gem "railties", rails_version else git "https://github.com/rails/rails.git", ref: "main" do + # rubocop:disable Bundler/DuplicatedGem gem "actionview" gem "activemodel" gem "activesupport" gem "railties" + # rubocop:enable Bundler/DuplicatedGem end end From 4e8ba473e50f7406885980ff0452e741327154f8 Mon Sep 17 00:00:00 2001 From: Manuel Puyol Date: Wed, 24 Mar 2021 15:15:20 -0500 Subject: [PATCH 09/13] remove .git --- Gemfile | 2 +- demo/Gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 745746269d..fe1d260865 100644 --- a/Gemfile +++ b/Gemfile @@ -14,7 +14,7 @@ if ENV["RAILS_VERSION"] != "main" gem "activesupport", rails_version gem "railties", rails_version else - git "https://github.com/rails/rails.git", ref: "main" do + git "https://github.com/rails/rails", ref: "main" do # rubocop:disable Bundler/DuplicatedGem gem "actionview" gem "activemodel" diff --git a/demo/Gemfile b/demo/Gemfile index f98f2ecb8e..25f0820ef7 100644 --- a/demo/Gemfile +++ b/demo/Gemfile @@ -13,7 +13,7 @@ if ENV["RAILS_VERSION"] != "main" gem "activesupport", rails_version gem "railties", rails_version else - git "https://github.com/rails/rails.git", ref: "main" do + git "https://github.com/rails/rails", ref: "main" do # rubocop:disable Bundler/DuplicatedGem gem "actionview" gem "activemodel" From 5eef60f683f6cbc98486912c831d7e0497824b1b Mon Sep 17 00:00:00 2001 From: Manuel Puyol Date: Wed, 24 Mar 2021 16:22:15 -0500 Subject: [PATCH 10/13] add activerecord when building rails main --- Gemfile | 1 + demo/Gemfile | 1 + 2 files changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index fe1d260865..305f95dac7 100644 --- a/Gemfile +++ b/Gemfile @@ -18,6 +18,7 @@ else # rubocop:disable Bundler/DuplicatedGem gem "actionview" gem "activemodel" + gem "activerecord" gem "activesupport" gem "railties" # rubocop:enable Bundler/DuplicatedGem diff --git a/demo/Gemfile b/demo/Gemfile index 25f0820ef7..bf73c2a379 100644 --- a/demo/Gemfile +++ b/demo/Gemfile @@ -17,6 +17,7 @@ else # rubocop:disable Bundler/DuplicatedGem gem "actionview" gem "activemodel" + gem "activerecord" gem "activesupport" gem "railties" # rubocop:enable Bundler/DuplicatedGem From c39530820dab58a42159234288fe50f3821f7513 Mon Sep 17 00:00:00 2001 From: Manuel Puyol Date: Wed, 24 Mar 2021 16:32:16 -0500 Subject: [PATCH 11/13] Apply suggestions from code review --- Gemfile | 2 +- demo/Gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 305f95dac7..58f9b0a6a3 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,7 @@ rails_version = (ENV["RAILS_VERSION"] || "6.1.1").to_s gem "rack-cors" gem "rake", "~> 12.0" # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -if ENV["RAILS_VERSION"] != "main" +if rails_version != "main" gem "actionview", rails_version gem "activemodel", rails_version gem "activesupport", rails_version diff --git a/demo/Gemfile b/demo/Gemfile index bf73c2a379..32f714ccf6 100644 --- a/demo/Gemfile +++ b/demo/Gemfile @@ -7,7 +7,7 @@ rails_version = (ENV["RAILS_VERSION"] || "6.1.1").to_s gem "rake", "~> 12.0" gem "rack-cors" # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -if ENV["RAILS_VERSION"] != "main" +if rails_version != "main" gem "actionview", rails_version gem "activemodel", rails_version gem "activesupport", rails_version From 012693cc7fd80cac964e05b4ca2f28ba998aa489 Mon Sep 17 00:00:00 2001 From: Manuel Puyol Date: Mon, 5 Apr 2021 10:12:03 -0500 Subject: [PATCH 12/13] update octicons to 13 --- primer_view_components.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primer_view_components.gemspec b/primer_view_components.gemspec index 65eac96e43..4b423b05ec 100644 --- a/primer_view_components.gemspec +++ b/primer_view_components.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency "actionview", ">= 5.0.0" spec.add_runtime_dependency "activesupport", ">= 5.0.0" - spec.add_runtime_dependency "octicons_helper", [">= 9.0.0", "< 13.0.0"] + spec.add_runtime_dependency "octicons_helper", ">= 13.0.0" spec.add_runtime_dependency "view_component", [">= 2.0.0", "< 3.0"] spec.add_development_dependency "allocation_tracer", "~> 0.6.3" From b4d8d4094871a5afc9d5d1217cf5e3b3056cb718 Mon Sep 17 00:00:00 2001 From: Manuel Puyol Date: Tue, 6 Apr 2021 13:46:16 -0500 Subject: [PATCH 13/13] update octicons to 13 --- Gemfile.lock | 83 +++++++--------------------------------------------- 1 file changed, 11 insertions(+), 72 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 10b0758ca5..8b9dc6adfb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,31 +4,12 @@ PATH primer_view_components (0.0.34) actionview (>= 5.0.0) activesupport (>= 5.0.0) - octicons_helper (>= 9.0.0, < 13.0.0) + octicons_helper (>= 13.0.0) view_component (>= 2.0.0, < 3.0) GEM remote: https://rubygems.org/ specs: - actioncable (6.1.1) - actionpack (= 6.1.1) - activesupport (= 6.1.1) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - actionmailbox (6.1.1) - actionpack (= 6.1.1) - activejob (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) - mail (>= 2.7.1) - actionmailer (6.1.1) - actionpack (= 6.1.1) - actionview (= 6.1.1) - activejob (= 6.1.1) - activesupport (= 6.1.1) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) actionpack (6.1.1) actionview (= 6.1.1) activesupport (= 6.1.1) @@ -36,33 +17,14 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.1) - actionpack (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) - nokogiri (>= 1.8.5) actionview (6.1.1) activesupport (= 6.1.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.1) - activesupport (= 6.1.1) - globalid (>= 0.3.6) activemodel (6.1.1) activesupport (= 6.1.1) - activerecord (6.1.1) - activemodel (= 6.1.1) - activesupport (= 6.1.1) - activestorage (6.1.1) - actionpack (= 6.1.1) - activejob (= 6.1.1) - activerecord (= 6.1.1) - activesupport (= 6.1.1) - marcel (~> 0.3.1) - mimemagic (~> 0.3.2) activesupport (6.1.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) @@ -101,9 +63,7 @@ GEM concurrent-ruby (~> 1.1) websocket-driver (>= 0.6, < 0.8) ffi (1.14.2) - globalid (0.4.2) - activesupport (>= 4.2.0) - i18n (1.8.9) + i18n (1.8.10) concurrent-ruby (~> 1.0) jaro_winkler (1.5.4) listen (3.4.0) @@ -112,30 +72,24 @@ GEM loofah (2.9.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.7.1) - mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) method_source (1.0.0) - mimemagic (0.3.10) - nokogiri (~> 1) - rake - mini_mime (1.0.2) + mini_mime (1.1.0) mini_portile2 (2.5.0) minitest (5.14.4) mocha (1.12.0) msgpack (1.3.3) - nio4r (2.5.4) - nokogiri (1.11.1) + nio4r (2.5.7) + nokogiri (1.11.2) mini_portile2 (~> 2.5.0) racc (~> 1.4) - nokogiri (1.11.1-x86_64-darwin) + nokogiri (1.11.2-x86_64-darwin) racc (~> 1.4) - octicons (12.1.0) + octicons (13.0.0) nokogiri (>= 1.6.3.1) - octicons_helper (12.1.0) - octicons (= 12.1.0) - rails + octicons_helper (13.0.0) + actionview + octicons (= 13.0.0) + railties parallel (1.20.1) parser (3.0.0.0) ast (~> 2.4.1) @@ -153,21 +107,6 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.1) - actioncable (= 6.1.1) - actionmailbox (= 6.1.1) - actionmailer (= 6.1.1) - actionpack (= 6.1.1) - actiontext (= 6.1.1) - actionview (= 6.1.1) - activejob (= 6.1.1) - activemodel (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) - bundler (>= 1.15.0) - railties (= 6.1.1) - sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6)