From 50eef540ea01299fc2b6b47ee34ae8b2bddaf2fd Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Thu, 22 Jul 2021 12:34:22 +0530 Subject: [PATCH 01/48] Upgraded to rails 6.1.4 Signed-off-by: saghoshprogress --- omnibus/config/projects/supermarket.rb | 3 +- src/supermarket/.ruby-version | 2 +- src/supermarket/Gemfile | 3 +- src/supermarket/Gemfile.lock | 608 ++++++++++-------- src/supermarket/app/assets/compass/_css3.scss | 22 + .../app/assets/compass/_functions.scss | 7 + .../app/assets/compass/_layout.scss | 3 + .../app/assets/compass/_reset-legacy.scss | 3 + .../app/assets/compass/_reset.scss | 3 + .../app/assets/compass/_support.scss | 40 ++ .../app/assets/compass/_typography.scss | 4 + .../app/assets/compass/_utilities.scss | 9 + .../app/assets/compass/css3/_animation.scss | 2 + .../app/assets/compass/css3/_appearance.scss | 16 + .../assets/compass/css3/_background-clip.scss | 43 ++ .../compass/css3/_background-origin.scss | 42 ++ .../assets/compass/css3/_background-size.scss | 26 + .../assets/compass/css3/_border-radius.scss | 130 ++++ .../app/assets/compass/css3/_box-shadow.scss | 76 +++ .../app/assets/compass/css3/_box-sizing.scss | 18 + .../app/assets/compass/css3/_box.scss | 111 ++++ .../app/assets/compass/css3/_columns.scss | 157 +++++ .../app/assets/compass/css3/_filter.scss | 24 + .../app/assets/compass/css3/_flexbox.scss | 86 +++ .../app/assets/compass/css3/_font-face.scss | 48 ++ .../app/assets/compass/css3/_hyphenation.scss | 77 +++ .../app/assets/compass/css3/_images.scss | 133 ++++ .../assets/compass/css3/_inline-block.scss | 22 + .../app/assets/compass/css3/_opacity.scss | 19 + .../app/assets/compass/css3/_pie.scss | 73 +++ .../app/assets/compass/css3/_regions.scss | 22 + .../app/assets/compass/css3/_shared.scss | 38 ++ .../app/assets/compass/css3/_text-shadow.scss | 88 +++ .../compass/css3/_transform-legacy.scss | 87 +++ .../app/assets/compass/css3/_transform.scss | 598 +++++++++++++++++ .../app/assets/compass/css3/_transition.scss | 222 +++++++ .../assets/compass/css3/_user-interface.scss | 47 ++ .../app/assets/compass/functions/_colors.scss | 37 ++ .../assets/compass/functions/_constants.scss | 18 + .../functions/_cross_browser_support.scss | 72 +++ .../assets/compass/functions/_display.scss | 36 ++ .../assets/compass/functions/_font_files.scss | 95 +++ .../compass/functions/_gradient_support.scss | 15 + .../app/assets/compass/functions/_lists.scss | 90 +++ .../compass/layout/_grid-background.scss | 178 +++++ .../assets/compass/layout/_sticky-footer.scss | 23 + .../assets/compass/layout/_stretching.scss | 24 + .../compass/reset/_utilities-legacy.scss | 135 ++++ .../app/assets/compass/reset/_utilities.scss | 142 ++++ .../app/assets/compass/typography/_links.scss | 3 + .../app/assets/compass/typography/_lists.scss | 4 + .../app/assets/compass/typography/_text.scss | 4 + .../compass/typography/_vertical_rhythm.scss | 229 +++++++ .../compass/typography/links/_hover-link.scss | 5 + .../typography/links/_link-colors.scss | 28 + .../typography/links/_unstyled-link.scss | 7 + .../compass/typography/lists/_bullets.scss | 34 + .../typography/lists/_horizontal-list.scss | 61 ++ .../typography/lists/_inline-block-list.scss | 50 ++ .../typography/lists/_inline-list.scss | 44 ++ .../compass/typography/text/_ellipsis.scss | 25 + .../compass/typography/text/_force-wrap.scss | 12 + .../compass/typography/text/_nowrap.scss | 2 + .../compass/typography/text/_replacement.scss | 68 ++ .../app/assets/compass/utilities/_color.scss | 1 + .../assets/compass/utilities/_general.scss | 6 + .../app/assets/compass/utilities/_links.scss | 5 + .../app/assets/compass/utilities/_lists.scss | 6 + .../app/assets/compass/utilities/_print.scss | 17 + .../assets/compass/utilities/_sprites.scss | 2 + .../app/assets/compass/utilities/_tables.scss | 3 + .../app/assets/compass/utilities/_text.scss | 5 + .../compass/utilities/color/_contrast.scss | 28 + .../compass/utilities/general/_clearfix.scss | 44 ++ .../compass/utilities/general/_float.scss | 30 + .../compass/utilities/general/_hacks.scss | 46 ++ .../compass/utilities/general/_min.scss | 16 + .../compass/utilities/general/_reset.scss | 2 + .../compass/utilities/general/_tabs.scss | 1 + .../compass/utilities/general/_tag-cloud.scss | 18 + .../compass/utilities/links/_hover-link.scss | 3 + .../compass/utilities/links/_link-colors.scss | 3 + .../utilities/links/_unstyled-link.scss | 3 + .../compass/utilities/lists/_bullets.scss | 3 + .../utilities/lists/_horizontal-list.scss | 3 + .../utilities/lists/_inline-block-list.scss | 3 + .../compass/utilities/lists/_inline-list.scss | 3 + .../compass/utilities/sprites/_base.scss | 66 ++ .../utilities/sprites/_sprite-img.scss | 79 +++ .../tables/_alternating-rows-and-columns.scss | 22 + .../compass/utilities/tables/_borders.scss | 33 + .../utilities/tables/_scaffolding.scss | 9 + .../compass/utilities/text/_ellipsis.scss | 3 + .../compass/utilities/text/_nowrap.scss | 3 + .../compass/utilities/text/_replacement.scss | 3 + src/supermarket/app/assets/config/manifest.js | 3 + .../app/assets/stylesheets/appheader.scss | 6 +- .../stylesheets/cookbooks/badge_icons.scss | 2 +- .../stylesheets/cookbooks/cookbook.scss | 6 +- .../stylesheets/cookbooks/platform_icons.scss | 2 +- .../assets/stylesheets/cookbooks/search.scss | 7 +- .../assets/stylesheets/cookbooks/show.scss | 4 +- .../app/assets/stylesheets/dashboard.scss | 2 +- .../assets/stylesheets/default_branding.scss | 1 + .../app/assets/stylesheets/listing.scss | 2 +- .../assets/stylesheets/profile/profile.scss | 2 +- .../app/assets/stylesheets/resource.scss | 4 +- .../app/assets/stylesheets/structure.scss | 6 +- .../app/assets/stylesheets/tabs.scss | 2 +- .../app/assets/stylesheets/tools/show.scss | 4 +- .../app/assets/stylesheets/welcome.css.scss | 2 +- .../app/controllers/sessions_controller.rb | 2 - .../app/mailers/cookbook_mailer.rb | 2 +- src/supermarket/app/models/account.rb | 4 +- src/supermarket/bin/rails | 2 +- src/supermarket/bin/setup | 26 +- src/supermarket/bin/spring | 18 - src/supermarket/bin/yarn | 20 +- src/supermarket/config/boot.rb | 3 +- src/supermarket/config/cable.yml | 2 +- .../initializers/backtrace_silencers.rb | 7 +- .../initializers/filter_parameter_logging.rb | 4 +- .../new_framework_defaults_6_1.rb | 67 ++ .../config/initializers/permissions_policy.rb | 11 + src/supermarket/engines/fieri/.ruby-version | 2 +- src/supermarket/engines/fieri/Gemfile.lock | 149 +++-- src/supermarket/engines/fieri/fieri.gemspec | 2 +- .../controllers/cookbooks_controller_spec.rb | 2 +- .../lib/supermarket/authorization_spec.rb | 16 +- src/supermarket/spec/spec_helper.rb | 47 +- 130 files changed, 4823 insertions(+), 440 deletions(-) create mode 100644 src/supermarket/app/assets/compass/_css3.scss create mode 100644 src/supermarket/app/assets/compass/_functions.scss create mode 100644 src/supermarket/app/assets/compass/_layout.scss create mode 100644 src/supermarket/app/assets/compass/_reset-legacy.scss create mode 100644 src/supermarket/app/assets/compass/_reset.scss create mode 100644 src/supermarket/app/assets/compass/_support.scss create mode 100644 src/supermarket/app/assets/compass/_typography.scss create mode 100644 src/supermarket/app/assets/compass/_utilities.scss create mode 100644 src/supermarket/app/assets/compass/css3/_animation.scss create mode 100644 src/supermarket/app/assets/compass/css3/_appearance.scss create mode 100644 src/supermarket/app/assets/compass/css3/_background-clip.scss create mode 100644 src/supermarket/app/assets/compass/css3/_background-origin.scss create mode 100644 src/supermarket/app/assets/compass/css3/_background-size.scss create mode 100644 src/supermarket/app/assets/compass/css3/_border-radius.scss create mode 100644 src/supermarket/app/assets/compass/css3/_box-shadow.scss create mode 100644 src/supermarket/app/assets/compass/css3/_box-sizing.scss create mode 100644 src/supermarket/app/assets/compass/css3/_box.scss create mode 100644 src/supermarket/app/assets/compass/css3/_columns.scss create mode 100644 src/supermarket/app/assets/compass/css3/_filter.scss create mode 100644 src/supermarket/app/assets/compass/css3/_flexbox.scss create mode 100644 src/supermarket/app/assets/compass/css3/_font-face.scss create mode 100644 src/supermarket/app/assets/compass/css3/_hyphenation.scss create mode 100644 src/supermarket/app/assets/compass/css3/_images.scss create mode 100644 src/supermarket/app/assets/compass/css3/_inline-block.scss create mode 100644 src/supermarket/app/assets/compass/css3/_opacity.scss create mode 100644 src/supermarket/app/assets/compass/css3/_pie.scss create mode 100644 src/supermarket/app/assets/compass/css3/_regions.scss create mode 100644 src/supermarket/app/assets/compass/css3/_shared.scss create mode 100644 src/supermarket/app/assets/compass/css3/_text-shadow.scss create mode 100644 src/supermarket/app/assets/compass/css3/_transform-legacy.scss create mode 100644 src/supermarket/app/assets/compass/css3/_transform.scss create mode 100644 src/supermarket/app/assets/compass/css3/_transition.scss create mode 100644 src/supermarket/app/assets/compass/css3/_user-interface.scss create mode 100644 src/supermarket/app/assets/compass/functions/_colors.scss create mode 100644 src/supermarket/app/assets/compass/functions/_constants.scss create mode 100644 src/supermarket/app/assets/compass/functions/_cross_browser_support.scss create mode 100755 src/supermarket/app/assets/compass/functions/_display.scss create mode 100644 src/supermarket/app/assets/compass/functions/_font_files.scss create mode 100644 src/supermarket/app/assets/compass/functions/_gradient_support.scss create mode 100644 src/supermarket/app/assets/compass/functions/_lists.scss create mode 100644 src/supermarket/app/assets/compass/layout/_grid-background.scss create mode 100644 src/supermarket/app/assets/compass/layout/_sticky-footer.scss create mode 100644 src/supermarket/app/assets/compass/layout/_stretching.scss create mode 100644 src/supermarket/app/assets/compass/reset/_utilities-legacy.scss create mode 100644 src/supermarket/app/assets/compass/reset/_utilities.scss create mode 100644 src/supermarket/app/assets/compass/typography/_links.scss create mode 100644 src/supermarket/app/assets/compass/typography/_lists.scss create mode 100644 src/supermarket/app/assets/compass/typography/_text.scss create mode 100644 src/supermarket/app/assets/compass/typography/_vertical_rhythm.scss create mode 100644 src/supermarket/app/assets/compass/typography/links/_hover-link.scss create mode 100644 src/supermarket/app/assets/compass/typography/links/_link-colors.scss create mode 100644 src/supermarket/app/assets/compass/typography/links/_unstyled-link.scss create mode 100644 src/supermarket/app/assets/compass/typography/lists/_bullets.scss create mode 100644 src/supermarket/app/assets/compass/typography/lists/_horizontal-list.scss create mode 100644 src/supermarket/app/assets/compass/typography/lists/_inline-block-list.scss create mode 100644 src/supermarket/app/assets/compass/typography/lists/_inline-list.scss create mode 100644 src/supermarket/app/assets/compass/typography/text/_ellipsis.scss create mode 100644 src/supermarket/app/assets/compass/typography/text/_force-wrap.scss create mode 100644 src/supermarket/app/assets/compass/typography/text/_nowrap.scss create mode 100644 src/supermarket/app/assets/compass/typography/text/_replacement.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_color.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_general.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_links.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_lists.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_print.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_sprites.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_tables.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_text.scss create mode 100644 src/supermarket/app/assets/compass/utilities/color/_contrast.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_clearfix.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_float.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_hacks.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_min.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_reset.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_tabs.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_tag-cloud.scss create mode 100644 src/supermarket/app/assets/compass/utilities/links/_hover-link.scss create mode 100644 src/supermarket/app/assets/compass/utilities/links/_link-colors.scss create mode 100644 src/supermarket/app/assets/compass/utilities/links/_unstyled-link.scss create mode 100644 src/supermarket/app/assets/compass/utilities/lists/_bullets.scss create mode 100644 src/supermarket/app/assets/compass/utilities/lists/_horizontal-list.scss create mode 100644 src/supermarket/app/assets/compass/utilities/lists/_inline-block-list.scss create mode 100644 src/supermarket/app/assets/compass/utilities/lists/_inline-list.scss create mode 100644 src/supermarket/app/assets/compass/utilities/sprites/_base.scss create mode 100644 src/supermarket/app/assets/compass/utilities/sprites/_sprite-img.scss create mode 100644 src/supermarket/app/assets/compass/utilities/tables/_alternating-rows-and-columns.scss create mode 100644 src/supermarket/app/assets/compass/utilities/tables/_borders.scss create mode 100644 src/supermarket/app/assets/compass/utilities/tables/_scaffolding.scss create mode 100644 src/supermarket/app/assets/compass/utilities/text/_ellipsis.scss create mode 100644 src/supermarket/app/assets/compass/utilities/text/_nowrap.scss create mode 100644 src/supermarket/app/assets/compass/utilities/text/_replacement.scss create mode 100644 src/supermarket/app/assets/config/manifest.js delete mode 100755 src/supermarket/bin/spring create mode 100644 src/supermarket/config/initializers/new_framework_defaults_6_1.rb create mode 100644 src/supermarket/config/initializers/permissions_policy.rb diff --git a/omnibus/config/projects/supermarket.rb b/omnibus/config/projects/supermarket.rb index 5bc15969b..edfd44396 100644 --- a/omnibus/config/projects/supermarket.rb +++ b/omnibus/config/projects/supermarket.rb @@ -29,7 +29,7 @@ build_iteration 1 override :postgresql, version: '9.3.25' -override :ruby, version: "2.6.7" +override :ruby, version: "2.6.8" override :rubygems, version: "3.1.2" # rubygems ships its own bundler which may differ from bundler defined below and then we get double bundler which makes the omnibus environment unhappy. Make sure these versions match before bumping either. override :bundler, version: "2.1.2" # this must match the BUNDLED WITH in all the repo's Gemfile.locks override :'chef-gem', version: '14.14.29' @@ -64,3 +64,4 @@ compression_level 1 compression_type :xz end +{"mode":"full","isActive":false} \ No newline at end of file diff --git a/src/supermarket/.ruby-version b/src/supermarket/.ruby-version index e261122d5..a4dd9dba4 100644 --- a/src/supermarket/.ruby-version +++ b/src/supermarket/.ruby-version @@ -1 +1 @@ -2.6.7 +2.7.4 diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 77a5deae6..87371621b 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -4,7 +4,7 @@ source "https://rubygems.org" # https://github.com/chef/omnibus-supermarket/blob/master/config/projects/supermarket.rb gem "fieri", path: "engines/fieri" -gem "rails", "~> 5.2.6" +gem "rails", "~> 6.1.4" gem "omniauth" gem "omniauth-chef-oauth2" @@ -78,6 +78,7 @@ group :test do gem "shoulda-matchers" gem "vcr", require: false gem "webmock", require: false + gem "puma" end group :development, :test do diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 36c85b301..90c32cba1 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -7,63 +7,80 @@ PATH foodcritic (~> 16.3) mixlib-archive (~> 0.4) octokit (~> 4.0) - rails (>= 5.1, < 6) + rails (>= 6.1, < 7) ruby-filemagic sidekiq (~> 4.2) GEM remote: https://rubygems.org/ specs: - actioncable (5.2.6) - actionpack (= 5.2.6) + actioncable (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) + actionmailbox (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) + mail (>= 2.7.1) + actionmailer (6.1.4) + actionpack (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activesupport (= 6.1.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.6) - actionview (= 5.2.6) - activesupport (= 5.2.6) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.4) + actionview (= 6.1.4) + activesupport (= 6.1.4) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.6) - activesupport (= 5.2.6) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.1.4) + actionpack (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) + nokogiri (>= 1.8.5) + actionview (6.1.4) + activesupport (= 6.1.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.6) - activesupport (= 5.2.6) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.1.4) + activesupport (= 6.1.4) globalid (>= 0.3.6) - activemodel (5.2.6) - activesupport (= 5.2.6) - activerecord (5.2.6) - activemodel (= 5.2.6) - activesupport (= 5.2.6) - arel (>= 9.0) - activestorage (5.2.6) - actionpack (= 5.2.6) - activerecord (= 5.2.6) + activemodel (6.1.4) + activesupport (= 6.1.4) + activerecord (6.1.4) + activemodel (= 6.1.4) + activesupport (= 6.1.4) + activestorage (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activesupport (= 6.1.4) marcel (~> 1.0.0) - activesupport (5.2.6) + mini_mime (>= 1.1.0) + activesupport (6.1.4) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) and_feathers (1.0.0.pre.2) and_feathers-gzipped_tarball (1.0.0.pre) - arel (9.0.0) ast (2.4.2) aws-eventstream (1.1.1) - aws-partitions (1.473.0) - aws-sdk-core (3.115.0) + aws-partitions (1.477.0) + aws-sdk-core (3.117.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) @@ -75,82 +92,78 @@ GEM aws-sdk-core (~> 3, >= 3.112.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.3) + aws-sigv4 (1.2.4) aws-eventstream (~> 1, >= 1.0.2) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) - bcrypt_pbkdf (1.1.0.rc1) builder (3.2.4) byebug (11.1.3) - capybara (2.18.0) + capybara (3.35.3) addressable mini_mime (>= 0.1.3) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (>= 2.0, < 4.0) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) capybara-screenshot (1.0.25) capybara (>= 1.0, < 4) launchy - chef (16.2.44) + chef (17.2.29) addressable - bcrypt_pbkdf (= 1.1.0.rc1) - bundler (>= 1.10) - chef-config (= 16.2.44) - chef-utils (= 16.2.44) + chef-config (= 17.2.29) + chef-utils (= 17.2.29) chef-vault chef-zero (>= 14.0.11) - diff-lcs (~> 1.2, >= 1.2.4) - ed25519 (~> 1.2) + diff-lcs (>= 1.2.4, < 1.4.0) erubis (~> 2.7) - ffi (>= 1.9.25) - ffi-libarchive + ffi (>= 1.5.0) + ffi-libarchive (~> 1.0, >= 1.0.3) ffi-yajl (~> 2.2) - highline (>= 1.6.9, < 3) iniparse (~> 1.4) - license-acceptance (~> 1.0, >= 1.0.5) + inspec-core (~> 4.23) + license-acceptance (>= 1.0.5, < 3) mixlib-archive (>= 0.4, < 2.0) mixlib-authentication (>= 2.1, < 4) mixlib-cli (>= 2.1.1, < 3.0) mixlib-log (>= 2.0.3, < 4.0) - mixlib-shellout (>= 3.0.3, < 4.0) + mixlib-shellout (>= 3.1.1, < 4.0) net-sftp (>= 2.1.2, < 4.0) - net-ssh (>= 4.2, < 7) - net-ssh-multi (~> 1.2, >= 1.2.1) - ohai (~> 16.0) - pastel + ohai (~> 17.0) plist (~> 3.2) proxifier (~> 1.0) syslog-logger (~> 1.6) train-core (~> 3.2, >= 3.2.28) train-winrm (>= 0.2.5) - tty-screen (~> 0.6) - uuidtools (~> 2.1.5) - chef-config (16.2.44) + uuidtools (>= 2.1.5, < 3.0) + chef-config (17.2.29) addressable - chef-utils (= 16.2.44) + chef-utils (= 17.2.29) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) tomlrb (~> 1.2) - chef-utils (16.2.44) - chef-vault (4.0.1) - chef-zero (15.0.0) + chef-telemetry (1.0.29) + chef-config + concurrent-ruby (~> 1.0) + chef-utils (17.2.29) + concurrent-ruby + chef-vault (4.1.0) + chef-zero (15.0.7) ffi-yajl (~> 2.2) hashie (>= 2.0, < 5.0) mixlib-log (>= 2.0, < 4.0) rack (~> 2.0, >= 2.0.6) uuidtools (~> 2.1) - chefstyle (1.4.5) - rubocop (= 0.93.1) + webrick + chefstyle (2.0.6) + rubocop (= 1.18.3) chunky_png (1.4.0) climate_control (0.2.0) cliver (0.3.2) - cocaine (0.5.8) - climate_control (>= 0.0.3, < 1.0) - coderay (1.1.1) + coderay (1.1.3) coercible (1.0.0) descendants_tracker (~> 0.0.1) compass (1.0.3) @@ -165,57 +178,72 @@ GEM sass (>= 3.3.0, < 3.5) compass-import-once (1.0.5) sass (>= 3.2, < 3.5) - compass-rails (4.0.0) + compass-rails (2.0.1) compass (~> 1.0.0) - sass-rails (< 5.1) - sprockets (< 4.0) concurrent-ruby (1.1.9) - connection_pool (2.2.1) - cookstyle (6.21.1) - rubocop (= 0.93.1) + connection_pool (2.2.5) + cookstyle (7.15.1) + rubocop (= 1.18.3) crack (0.4.5) rexml crass (1.0.6) css_parser (1.9.0) addressable - database_cleaner (1.6.1) - ddtrace (0.7.1) + database_cleaner (2.0.1) + database_cleaner-active_record (~> 2.0.0) + database_cleaner-active_record (2.0.1) + activerecord (>= 5.a) + database_cleaner-core (~> 2.0.0) + database_cleaner-core (2.0.1) + ddtrace (0.51.0) + ffi (~> 1.0) msgpack descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - diff-lcs (1.4) + diff-lcs (1.3) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.7.6) dotenv-rails (2.7.6) dotenv (= 2.7.6) railties (>= 3.2) - ed25519 (1.2.4) equalizer (0.0.11) - equatable (0.6.1) erubi (1.10.0) erubis (2.7.0) - et-orbi (1.1.5) + et-orbi (1.2.4) tzinfo - excon (0.83.0) - execjs (2.7.0) - factory_bot (6.0.2) + excon (0.84.0) + execjs (2.8.1) + factory_bot (6.2.0) activesupport (>= 5.0.0) - factory_bot_rails (6.0.0) - factory_bot (~> 6.0.0) + factory_bot_rails (6.2.0) + factory_bot (~> 6.2.0) railties (>= 5.0.0) - faker (1.7.3) - i18n (~> 0.5) - faraday (0.15.4) + faker (2.18.0) + i18n (>= 1.6, < 2) + faraday (1.4.3) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) multipart-post (>= 1.2, < 3) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday_middleware (1.0.0) + faraday (~> 1.0) ffi (1.15.3) ffi-compiler (1.0.1) ffi (>= 1.0.0) rake - ffi-libarchive (1.0.0) + ffi-libarchive (1.0.17) ffi (~> 1.0) - ffi-yajl (2.3.3) - libyajl2 (~> 1.2) + ffi-yajl (2.4.0) + libyajl2 (>= 1.2) foodcritic (16.3.0) erubis ffi-yajl (~> 2.0) @@ -223,21 +251,20 @@ GEM rake rufus-lru (~> 1.0) treetop (~> 1.4) - foreman (0.84.0) - thor (~> 0.19.1) - formatador (0.2.5) - fugit (1.1.5) - et-orbi (~> 1.1, >= 1.1.3) - raabro (~> 1.1) + foreman (0.87.2) + formatador (0.3.0) + fugit (1.5.0) + et-orbi (~> 1.1, >= 1.1.8) + raabro (~> 1.4) fuzzyurl (0.9.0) globalid (0.4.2) activesupport (>= 4.2.0) - gssapi (1.3.0) + gssapi (1.3.1) ffi (>= 1.0.1) - guard (2.14.1) + guard (2.17.0) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) - lumberjack (~> 1.0) + lumberjack (>= 1.0.12, < 2.0) nenv (~> 0.1) notiffany (~> 0.0) pry (>= 0.9.12) @@ -248,14 +275,13 @@ GEM guard (~> 2.1) guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) - guard-rubocop (1.2.0) + guard-rubocop (1.4.0) guard (~> 2.0) - rubocop (~> 0.20) + rubocop (< 2.0) gyoku (1.3.1) builder (>= 2.1.2) hashdiff (1.0.1) hashie (4.1.0) - highline (2.0.3) honeycomb-beeline (2.4.2) libhoney (~> 1.14, >= 1.14.2) html_truncator (0.4.2) @@ -272,16 +298,39 @@ GEM http-parser (1.2.3) ffi-compiler (>= 1.0, < 2.0) httpclient (2.8.3) - i18n (0.9.5) + i18n (1.8.10) concurrent-ruby (~> 1.0) ice_nine (0.11.2) iniparse (1.5.0) + inspec-core (4.38.3) + addressable (~> 2.4) + chef-telemetry (~> 1.0, >= 1.0.8) + faraday (>= 0.9.0, < 1.5) + faraday_middleware (~> 1.0) + hashie (>= 3.4, < 5.0) + license-acceptance (>= 0.2.13, < 3.0) + method_source (>= 0.8, < 2.0) + mixlib-log (~> 3.0) + multipart-post (~> 2.0) + parallel (~> 1.9) + parslet (>= 1.5, < 2.0) + pry (~> 0.13) + rspec (>= 3.9, < 3.11) + rspec-its (~> 1.2) + rubyzip (>= 1.2.2, < 3.0) + semverse (~> 3.0) + sslshake (~> 1.2) + thor (>= 0.20, < 2.0) + tomlrb (>= 1.2, < 2.1) + train-core (~> 3.0) + tty-prompt (~> 0.17) + tty-table (~> 0.10) ipaddress (0.8.3) jbuilder (2.11.2) activesupport (>= 5.0.0) jmespath (1.4.0) json (2.5.1) - jwt (2.2.1) + jwt (2.2.3) kaminari (1.2.1) activesupport (>= 4.1.0) kaminari-actionview (= 1.2.1) @@ -294,47 +343,46 @@ GEM activerecord kaminari-core (= 1.2.1) kaminari-core (1.2.1) - kgio (2.11.2) + kgio (2.11.4) launchy (2.5.0) addressable (~> 2.7) libhoney (1.18.0) addressable (~> 2.0) excon http (>= 2.0, < 5.0) - libyajl2 (1.2.0) - license-acceptance (1.0.19) + libyajl2 (2.1.0) + license-acceptance (2.1.13) pastel (~> 0.7) - tomlrb (~> 1.2) - tty-box (~> 0.3) - tty-prompt (~> 0.18) - license_finder (5.10.2) + tomlrb (>= 1.2, < 3.0) + tty-box (~> 0.6) + tty-prompt (~> 0.20) + license_finder (6.14.1) bundler - rubyzip - thor - toml (= 0.2.0) + rubyzip (>= 1, < 3) + thor (~> 1.0.1) + tomlrb (>= 1.3, < 2.1) with_env (= 1.1.0) - xml-simple - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) + xml-simple (~> 1.1.5) + listen (3.5.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) little-plugger (1.1.4) - logging (2.2.2) + logging (2.3.0) little-plugger (~> 1.1) - multi_json (~> 1.10) + multi_json (~> 1.14) loofah (2.10.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - lumberjack (1.0.12) + lumberjack (1.2.8) mail (2.7.1) mini_mime (>= 0.1.1) mail_view (2.0.4) tilt marcel (1.0.1) - method_source (0.8.2) + method_source (1.0.0) mime-types (3.3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2019.1009) + mime-types-data (3.2021.0704) mimemagic (0.3.10) nokogiri (~> 1) rake @@ -343,58 +391,53 @@ GEM minitest (5.14.4) mixlib-archive (0.4.20) mixlib-log - mixlib-authentication (3.0.6) - mixlib-cli (2.1.6) - mixlib-config (3.0.6) + mixlib-authentication (3.0.10) + mixlib-cli (2.1.8) + mixlib-config (3.0.9) tomlrb - mixlib-log (3.0.8) + mixlib-log (3.0.9) mixlib-shellout (3.2.5) chef-utils - msgpack (1.1.0) + msgpack (1.4.2) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.1.1) - necromancer (0.5.1) nenv (0.3.0) net-scp (3.0.0) net-ssh (>= 2.6.5, < 7.0.0) net-sftp (3.0.0) net-ssh (>= 5.0.0, < 7.0.0) net-ssh (6.1.0) - net-ssh-gateway (2.0.0) - net-ssh (>= 4.0.0) - net-ssh-multi (1.2.1) - net-ssh (>= 2.6.5) - net-ssh-gateway (>= 1.2.0) - newrelic_rpm (4.1.0.333) + newrelic_rpm (7.2.0) nio4r (2.5.7) - nokogiri (1.11.5) + nokogiri (1.11.7) mini_portile2 (~> 2.5.0) racc (~> 1.4) nori (2.6.0) - notiffany (0.1.1) + notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) - oauth2 (1.4.1) - faraday (>= 0.8, < 0.16.0) + oauth2 (1.4.7) + faraday (>= 0.8, < 2.0) jwt (>= 1.0, < 3.0) multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - octokit (4.7.0) + octokit (4.21.0) + faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) - ohai (16.2.1) - chef-config (>= 12.8, < 17) - chef-utils (>= 16.0, < 17) + ohai (17.1.0) + chef-config (>= 14.12, < 18) + chef-utils (>= 16.0, < 18) ffi (~> 1.9) ffi-yajl (~> 2.2) ipaddress mixlib-cli (>= 1.7.0) mixlib-config (>= 2.0, < 4.0) mixlib-log (>= 2.0.1, < 4.0) - mixlib-shellout (>= 2.0, < 4.0) + mixlib-shellout (~> 3.2, >= 3.2.5) plist (~> 3.1) - systemu (~> 2.6.4) + train-core wmi-lite (~> 1.0) omniauth (1.9.1) hashie (>= 3.4.6) @@ -411,26 +454,25 @@ GEM omniauth-rails_csrf_protection (0.1.2) actionpack (>= 4.2) omniauth (>= 1.3.1) - paperclip (5.2.1) + paperclip (6.1.0) activemodel (>= 4.2.0) activesupport (>= 4.2.0) - cocaine (~> 0.5.5) mime-types mimemagic (~> 0.3.0) + terrapin (~> 0.6.0) parallel (1.20.1) - parser (3.0.1.1) + parser (3.0.2.0) ast (~> 2.4.1) parslet (1.8.2) - pastel (0.7.4) - equatable (~> 0.6) + pastel (0.8.0) tty-color (~> 0.5) - pg (0.20.0) - pg_search (2.3.2) + pg (1.2.3) + pg_search (2.3.5) activerecord (>= 5.2) activesupport (>= 5.2) - plist (3.5.0) - poltergeist (1.15.0) - capybara (~> 2.1) + plist (3.6.0) + poltergeist (1.18.1) + capybara (>= 2.1, < 4) cliver (~> 0.3.1) websocket-driver (>= 0.2.0) polyglot (0.3.5) @@ -442,37 +484,40 @@ GEM actionmailer (>= 3) premailer (~> 1.7, >= 1.7.9) proxifier (1.0.3) - pry (0.10.4) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - pry-byebug (3.8.0) + pry (0.13.1) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.9.0) byebug (~> 11.0) - pry (~> 0.10) - pry-rails (0.3.6) + pry (~> 0.13.0) + pry-rails (0.3.9) pry (>= 0.10.4) public_suffix (4.0.6) - pundit (1.1.0) + puma (5.3.2) + nio4r (~> 2.0) + pundit (2.1.0) activesupport (>= 3.0.0) - raabro (1.1.6) + raabro (1.4.0) racc (1.5.2) rack (2.2.3) - rack-protection (2.0.1) + rack-protection (2.1.0) rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.6) - actioncable (= 5.2.6) - actionmailer (= 5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) - activemodel (= 5.2.6) - activerecord (= 5.2.6) - activestorage (= 5.2.6) - activesupport (= 5.2.6) - bundler (>= 1.3.0) - railties (= 5.2.6) + rails (6.1.4) + actioncable (= 6.1.4) + actionmailbox (= 6.1.4) + actionmailer (= 6.1.4) + actionpack (= 6.1.4) + actiontext (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activemodel (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) + bundler (>= 1.15.0) + railties (= 6.1.4) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -483,29 +528,29 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (5.2.6) - actionpack (= 5.2.6) - activesupport (= 5.2.6) + railties (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) method_source - rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) + rake (>= 0.13) + thor (~> 1.0) rainbow (3.0.0) - raindrops (0.19.0) - rake (13.0.3) + raindrops (0.19.2) + rake (13.0.6) rb-fsevent (0.11.0) rb-inotify (0.10.1) ffi (~> 1.0) rb-readline (0.5.5) redcarpet (3.5.1) redis (3.3.5) - redis-actionpack (5.0.2) - actionpack (>= 4.0, < 6) - redis-rack (>= 1, < 3) + redis-actionpack (5.2.0) + actionpack (>= 5, < 7) + redis-rack (>= 2.1.0, < 3) redis-store (>= 1.1.0, < 2) - redis-activesupport (5.0.4) - activesupport (>= 3, < 6) + redis-activesupport (5.2.1) + activesupport (>= 3, < 7) redis-store (>= 1.3, < 2) - redis-rack (2.1.2) + redis-rack (2.1.3) rack (>= 2.0.8, < 3) redis-store (>= 1.2, < 2) redis-rails (5.0.2) @@ -518,100 +563,106 @@ GEM rexml (3.2.5) rinku (2.0.6) rollout (2.4.3) - rspec (3.6.0) - rspec-core (~> 3.6.0) - rspec-expectations (~> 3.6.0) - rspec-mocks (~> 3.6.0) - rspec-core (3.6.0) - rspec-support (~> 3.6.0) - rspec-expectations (3.6.0) + rspec (3.10.0) + rspec-core (~> 3.10.0) + rspec-expectations (~> 3.10.0) + rspec-mocks (~> 3.10.0) + rspec-core (3.10.1) + rspec-support (~> 3.10.0) + rspec-expectations (3.10.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) - rspec-mocks (3.6.0) + rspec-support (~> 3.10.0) + rspec-its (1.3.0) + rspec-core (>= 3.0.0) + rspec-expectations (>= 3.0.0) + rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) - rspec-rails (3.6.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.6.0) - rspec-expectations (~> 3.6.0) - rspec-mocks (~> 3.6.0) - rspec-support (~> 3.6.0) - rspec-support (3.6.0) - rubocop (0.93.1) + rspec-support (~> 3.10.0) + rspec-rails (5.0.1) + actionpack (>= 5.2) + activesupport (>= 5.2) + railties (>= 5.2) + rspec-core (~> 3.10) + rspec-expectations (~> 3.10) + rspec-mocks (~> 3.10) + rspec-support (~> 3.10) + rspec-support (3.10.2) + rubocop (1.18.3) parallel (~> 1.10) - parser (>= 2.7.1.5) + parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8) + regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 0.6.0) + rubocop-ast (>= 1.7.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 2.0) + unicode-display_width (>= 1.4.0, < 3.0) rubocop-ast (1.7.0) parser (>= 3.0.1.1) - rubocop-rails (2.9.1) + rubocop-rails (2.11.3) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 0.90.0, < 2.0) + rubocop (>= 1.7.0, < 2.0) ruby-filemagic (0.7.2) ruby-progressbar (1.11.0) - ruby_dep (1.5.0) - rubyntlm (0.6.2) - rubyzip (2.0.0) + ruby2_keywords (0.0.4) + rubyntlm (0.6.3) + rubyzip (2.3.2) rufus-lru (1.1.0) sass (3.4.25) sass-globbing (1.1.5) sass (>= 3.1) - sass-rails (5.0.6) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) + sass-rails (6.0.0) + sassc-rails (~> 2.1, >= 2.1.1) + sassc (2.4.0) + ffi (~> 1.9) + sassc-rails (2.1.2) + railties (>= 4.0.0) + sassc (>= 2.0) + sprockets (> 3.0) + sprockets-rails + tilt sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) - sentry-raven (2.4.0) - faraday (>= 0.7.6, < 1.0) + semverse (3.0.0) + sentry-raven (3.1.2) + faraday (>= 1.0) shellany (0.0.1) - shoulda-matchers (4.5.1) - activesupport (>= 4.2.0) + shoulda-matchers (5.0.0) + activesupport (>= 5.2.0) sidekiq (4.2.10) concurrent-ruby (~> 1.0) connection_pool (~> 2.2, >= 2.2.0) rack-protection (>= 1.5.0) redis (~> 3.2, >= 3.2.1) - sidekiq-cron (1.0.4) + sidekiq-cron (1.2.0) fugit (~> 1.1) sidekiq (>= 4.2.1) - sitemap_generator (5.3.1) + sitemap_generator (6.1.2) builder (~> 3.0) - slop (3.6.0) - spring (2.0.1) - activesupport (>= 4.2) + spring (2.1.1) spring-commands-rspec (1.0.4) spring (>= 0.9.1) - sprockets (3.7.2) + sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - statsd-ruby (1.4.0) - strings (0.1.8) - strings-ansi (~> 0.1) - unicode-display_width (~> 1.5) + sslshake (1.3.1) + statsd-ruby (1.5.0) + strings (0.2.1) + strings-ansi (~> 0.2) + unicode-display_width (>= 1.5, < 3.0) unicode_utils (~> 1.4) strings-ansi (0.2.0) syslog-logger (1.6.8) - systemu (2.6.5) - thor (0.19.4) + terrapin (0.6.0) + climate_control (>= 0.0.3, < 1.0) + thor (1.0.1) thread_safe (0.3.6) tilt (2.0.10) - toml (0.2.0) - parslet (~> 1.8.0) tomlrb (1.3.0) train-core (3.7.4) addressable (~> 2.5) @@ -620,36 +671,40 @@ GEM mixlib-shellout (>= 2.0, < 4.0) net-scp (>= 1.2, < 4.0) net-ssh (>= 2.9, < 7.0) - train-winrm (0.2.6) - winrm (~> 2.0) + train-winrm (0.2.12) + winrm (>= 2.3.6, < 3.0) + winrm-elevated (~> 1.2.2) winrm-fs (~> 1.0) - treetop (1.6.10) + treetop (1.6.11) polyglot (~> 0.3) - tty-box (0.5.0) - pastel (~> 0.7.2) - strings (~> 0.1.6) + tty-box (0.7.0) + pastel (~> 0.8) + strings (~> 0.2.0) tty-cursor (~> 0.7) - tty-color (0.5.1) + tty-color (0.6.0) tty-cursor (0.7.1) - tty-prompt (0.21.0) - necromancer (~> 0.5.0) - pastel (~> 0.7.0) - tty-reader (~> 0.7.0) - tty-reader (0.7.0) + tty-prompt (0.23.1) + pastel (~> 0.8) + tty-reader (~> 0.8) + tty-reader (0.9.0) tty-cursor (~> 0.7) - tty-screen (~> 0.7) - wisper (~> 2.0.0) - tty-screen (0.8.0) - tzinfo (1.2.9) - thread_safe (~> 0.1) - uglifier (3.2.0) + tty-screen (~> 0.8) + wisper (~> 2.0) + tty-screen (0.8.1) + tty-table (0.12.0) + pastel (~> 0.8) + strings (~> 0.2.0) + tty-screen (~> 0.8) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) + uglifier (4.2.0) execjs (>= 0.3.0, < 3) unf (0.1.4) unf_ext unf_ext (0.0.7.7) - unicode-display_width (1.7.0) + unicode-display_width (2.0.0) unicode_utils (1.4.0) - unicorn (5.4.0) + unicorn (6.0.0) kgio (~> 2.6) raindrops (~> 0.7) unicorn-rails (2.2.1) @@ -657,7 +712,7 @@ GEM unicorn utf8-cleaner (1.0.0) activesupport - uuidtools (2.1.5) + uuidtools (2.2.0) validate_url (1.0.13) activemodel (>= 3.0.0) public_suffix @@ -671,10 +726,11 @@ GEM addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) + webrick (1.7.0) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - winrm (2.3.4) + winrm (2.3.6) builder (>= 2.1.2) erubi (~> 1.8) gssapi (~> 1.2) @@ -682,8 +738,12 @@ GEM httpclient (~> 2.2, >= 2.2.0.2) logging (>= 1.6.1, < 3.0) nori (~> 2.0) - rubyntlm (~> 0.6.0, >= 0.6.1) - winrm-fs (1.3.4) + rubyntlm (~> 0.6.0, >= 0.6.3) + winrm-elevated (1.2.3) + erubi (~> 1.8) + winrm (~> 2.0) + winrm-fs (~> 1.0) + winrm-fs (1.3.5) erubi (~> 1.8) logging (>= 1.6.1, < 3.0) rubyzip (~> 2.0) @@ -691,11 +751,12 @@ GEM wisper (2.0.1) with_env (1.1.0) wmi-lite (1.0.5) - xml-simple (1.1.5) + xml-simple (1.1.8) xpath (3.2.0) nokogiri (~> 1.8) - yajl-ruby (1.3.1) - yard (0.9.20) + yajl-ruby (1.4.1) + yard (0.9.26) + zeitwerk (2.4.2) PLATFORMS ruby @@ -743,8 +804,9 @@ DEPENDENCIES premailer-rails pry-byebug pry-rails + puma pundit - rails (~> 5.2.6) + rails (~> 6.1.4) rails-controller-testing rb-readline redcarpet diff --git a/src/supermarket/app/assets/compass/_css3.scss b/src/supermarket/app/assets/compass/_css3.scss new file mode 100644 index 000000000..199d89d07 --- /dev/null +++ b/src/supermarket/app/assets/compass/_css3.scss @@ -0,0 +1,22 @@ +@import "css3/border-radius"; +@import "css3/inline-block"; +@import "css3/opacity"; +@import "css3/box-shadow"; +@import "css3/text-shadow"; +@import "css3/columns"; +@import "css3/box-sizing"; +@import "css3/box"; +@import "css3/images"; +@import "css3/background-clip"; +@import "css3/background-origin"; +@import "css3/background-size"; +@import "css3/font-face"; +@import "css3/transform"; +@import "css3/transition"; +@import "css3/appearance"; +@import "css3/regions"; +@import "css3/hyphenation"; +@import "css3/filter"; +@import "css3/pie"; +@import "css3/user-interface"; +@import "css3/flexbox"; \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/_functions.scss b/src/supermarket/app/assets/compass/_functions.scss new file mode 100644 index 000000000..eb521f2ef --- /dev/null +++ b/src/supermarket/app/assets/compass/_functions.scss @@ -0,0 +1,7 @@ +@import "functions/lists"; +@import "functions/cross_browser_support"; +@import "functions/gradient_support"; +@import "functions/constants"; +@import "functions/display"; +@import "functions/colors"; +@import "functions/font_files"; diff --git a/src/supermarket/app/assets/compass/_layout.scss b/src/supermarket/app/assets/compass/_layout.scss new file mode 100644 index 000000000..55bf9ee7d --- /dev/null +++ b/src/supermarket/app/assets/compass/_layout.scss @@ -0,0 +1,3 @@ +@import "layout/grid-background"; +@import "layout/sticky-footer"; +@import "layout/stretching"; diff --git a/src/supermarket/app/assets/compass/_reset-legacy.scss b/src/supermarket/app/assets/compass/_reset-legacy.scss new file mode 100644 index 000000000..f11f07acd --- /dev/null +++ b/src/supermarket/app/assets/compass/_reset-legacy.scss @@ -0,0 +1,3 @@ +@import "reset/utilities-legacy"; + +@include global-reset; diff --git a/src/supermarket/app/assets/compass/_reset.scss b/src/supermarket/app/assets/compass/_reset.scss new file mode 100644 index 000000000..e181dd780 --- /dev/null +++ b/src/supermarket/app/assets/compass/_reset.scss @@ -0,0 +1,3 @@ +@import "reset/utilities"; + +@include global-reset; diff --git a/src/supermarket/app/assets/compass/_support.scss b/src/supermarket/app/assets/compass/_support.scss new file mode 100644 index 000000000..37b6e1729 --- /dev/null +++ b/src/supermarket/app/assets/compass/_support.scss @@ -0,0 +1,40 @@ +// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both. +$legacy-support-for-ie: true !default; + +// Setting this to false will result in smaller output, but no support for ie6 hacks +$legacy-support-for-ie6: $legacy-support-for-ie !default; + +// Setting this to false will result in smaller output, but no support for ie7 hacks +$legacy-support-for-ie7: $legacy-support-for-ie !default; + +// Setting this to false will result in smaller output, but no support for legacy ie8 hacks +$legacy-support-for-ie8: $legacy-support-for-ie !default; + +// @private +// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly, +// But in case the user set each of those explicitly, we need to sync the value of +// this combined variable. +$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8; + +// Whether to output legacy support for mozilla. +// Usually this means hacks to support Firefox 3.6 or earlier. +$legacy-support-for-mozilla: true; + +// Support for mozilla in experimental css3 properties (-moz). +$experimental-support-for-mozilla : true !default; +// Support for webkit in experimental css3 properties (-webkit). +$experimental-support-for-webkit : true !default; +// Support for webkit's original (non-standard) gradient syntax. +$support-for-original-webkit-gradients : true !default; +// Support for opera in experimental css3 properties (-o). +$experimental-support-for-opera : true !default; +// Support for microsoft in experimental css3 properties (-ms). +$experimental-support-for-microsoft : true !default; +// Support for khtml in experimental css3 properties (-khtml). +$experimental-support-for-khtml : false !default; +// Support for svg in experimental css3 properties. +// Setting this to true might add significant size to your +// generated stylesheets. +$experimental-support-for-svg : false !default; +// Support for CSS PIE in experimental css3 properties (-pie). +$experimental-support-for-pie : false !default; diff --git a/src/supermarket/app/assets/compass/_typography.scss b/src/supermarket/app/assets/compass/_typography.scss new file mode 100644 index 000000000..4d9cb5d55 --- /dev/null +++ b/src/supermarket/app/assets/compass/_typography.scss @@ -0,0 +1,4 @@ +@import "typography/links"; +@import "typography/lists"; +@import "typography/text"; +@import "typography/vertical_rhythm"; diff --git a/src/supermarket/app/assets/compass/_utilities.scss b/src/supermarket/app/assets/compass/_utilities.scss new file mode 100644 index 000000000..53a02445d --- /dev/null +++ b/src/supermarket/app/assets/compass/_utilities.scss @@ -0,0 +1,9 @@ +@import "utilities/color"; +@import "utilities/general"; +@import "utilities/sprites"; +@import "utilities/tables"; + +// deprecated +@import "typography/links"; +@import "typography/lists"; +@import "typography/text"; diff --git a/src/supermarket/app/assets/compass/css3/_animation.scss b/src/supermarket/app/assets/compass/css3/_animation.scss new file mode 100644 index 000000000..823a727b2 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_animation.scss @@ -0,0 +1,2 @@ +// Core imported by default. You can also import 'animate' for predefined animations. +@import "animation/core"; diff --git a/src/supermarket/app/assets/compass/css3/_appearance.scss b/src/supermarket/app/assets/compass/css3/_appearance.scss new file mode 100644 index 000000000..87c725155 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_appearance.scss @@ -0,0 +1,16 @@ +@import "shared"; + +// Change the appearance for Mozilla, Webkit and possibly the future. +// The appearance property is currently not present in any newer CSS specification. +// +// There is no official list of accepted values, but you might check these source: +// Mozilla : https://developer.mozilla.org/en/CSS/-moz-appearance +// Webkit : http://code.google.com/p/webkit-mirror/source/browse/Source/WebCore/css/CSSValueKeywords.in?spec=svnf1aea559dcd025a8946aa7da6e4e8306f5c1b604&r=63c7d1af44430b314233fea342c3ddb2a052e365 +// (search for 'appearance' within the page) + +@mixin appearance($ap) { + $ap: unquote($ap); + @include experimental(appearance, $ap, + -moz, -webkit, not(-o), not(-ms), not(-khtml), official + ); +} diff --git a/src/supermarket/app/assets/compass/css3/_background-clip.scss b/src/supermarket/app/assets/compass/css3/_background-clip.scss new file mode 100644 index 000000000..3c05ee5ba --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_background-clip.scss @@ -0,0 +1,43 @@ +@import "shared"; + +// The default value is `padding-box` -- the box model used by modern browsers. +// +// If you wish to do so, you can override the default constant with `border-box` +// +// To override to the default border-box model, use this code: +// $default-background-clip: border-box + +$default-background-clip: padding-box !default; + +// Clip the background (image and color) at the edge of the padding or border. +// +// Legal Values: +// +// * padding-box +// * border-box +// * text + +@mixin background-clip($clip: $default-background-clip) { + // webkit and mozilla use the deprecated short [border | padding] + $clip: unquote($clip); + $deprecated: $clip; + @if $clip == padding-box { $deprecated: padding; } + @if $clip == border-box { $deprecated: border; } + // Support for webkit and mozilla's use of the deprecated short form + @include experimental(background-clip, $deprecated, + -moz, + -webkit, + not(-o), + not(-ms), + not(-khtml), + not official + ); + @include experimental(background-clip, $clip, + not(-moz), + not(-webkit), + not(-o), + not(-ms), + -khtml, + official + ); +} diff --git a/src/supermarket/app/assets/compass/css3/_background-origin.scss b/src/supermarket/app/assets/compass/css3/_background-origin.scss new file mode 100644 index 000000000..eefd2623c --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_background-origin.scss @@ -0,0 +1,42 @@ +// Override `$default-background-origin` to change the default. + +@import "shared"; + +$default-background-origin: content-box !default; + +// Position the background off the edge of the padding, border or content +// +// * Possible values: +// * `padding-box` +// * `border-box` +// * `content-box` +// * browser defaults to `padding-box` +// * mixin defaults to `content-box` + + +@mixin background-origin($origin: $default-background-origin) { + $origin: unquote($origin); + // webkit and mozilla use the deprecated short [border | padding | content] + $deprecated: $origin; + @if $origin == padding-box { $deprecated: padding; } + @if $origin == border-box { $deprecated: border; } + @if $origin == content-box { $deprecated: content; } + + // Support for webkit and mozilla's use of the deprecated short form + @include experimental(background-origin, $deprecated, + -moz, + -webkit, + not(-o), + not(-ms), + not(-khtml), + not official + ); + @include experimental(background-origin, $origin, + not(-moz), + not(-webkit), + -o, + -ms, + -khtml, + official + ); +} diff --git a/src/supermarket/app/assets/compass/css3/_background-size.scss b/src/supermarket/app/assets/compass/css3/_background-size.scss new file mode 100644 index 000000000..5e46ae34d --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_background-size.scss @@ -0,0 +1,26 @@ +@import "shared"; + +// override to change the default +$default-background-size: 100% auto !default; + +// Set the size of background images using px, width and height, or percentages. +// Currently supported in: Opera, Gecko, Webkit. +// +// * percentages are relative to the background-origin (default = padding-box) +// * mixin defaults to: `$default-background-size` +@mixin background-size( + $size-1: $default-background-size, + $size-2: false, + $size-3: false, + $size-4: false, + $size-5: false, + $size-6: false, + $size-7: false, + $size-8: false, + $size-9: false, + $size-10: false +) { + $size-1: if(type-of($size-1) == string, unquote($size-1), $size-1); + $sizes: compact($size-1, $size-2, $size-3, $size-4, $size-5, $size-6, $size-7, $size-8, $size-9, $size-10); + @include experimental(background-size, $sizes, -moz, -webkit, -o, not(-ms), not(-khtml)); +} diff --git a/src/supermarket/app/assets/compass/css3/_border-radius.scss b/src/supermarket/app/assets/compass/css3/_border-radius.scss new file mode 100644 index 000000000..8e09c8a4c --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_border-radius.scss @@ -0,0 +1,130 @@ +@import "shared"; + +$default-border-radius: 5px !default; + +// Round all corners by a specific amount, defaults to value of `$default-border-radius`. +// +// When two values are passed, the first is the horizontal radius +// and the second is the vertical radius. +// +// Note: webkit does not support shorthand syntax for several corners at once. +// So in the case where you pass several values only the first will be passed to webkit. +// +// Examples: +// +// .simple { @include border-radius(4px, 4px); } +// .compound { @include border-radius(2px 5px, 3px 6px); } +// .crazy { @include border-radius(1px 3px 5px 7px, 2px 4px 6px 8px)} +// +// Which generates: +// +// .simple { +// -webkit-border-radius: 4px 4px; +// -moz-border-radius: 4px / 4px; +// -khtml-border-radius: 4px / 4px; +// border-radius: 4px / 4px; } +// +// .compound { +// -webkit-border-radius: 2px 3px; +// -moz-border-radius: 2px 5px / 3px 6px; +// -khtml-border-radius: 2px 5px / 3px 6px; +// border-radius: 2px 5px / 3px 6px; } +// +// .crazy { +// -webkit-border-radius: 1px 2px; +// -moz-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; +// -khtml-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; +// border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; } + +@mixin border-radius($radius: $default-border-radius, $vertical-radius: false) { + + @if $vertical-radius { + // Webkit doesn't understand the official shorthand syntax for specifying + // a vertical radius unless so in case there's several we only take the first. + @include experimental(border-radius, first-value-of($radius) first-value-of($vertical-radius), + not(-moz), + -webkit, + not(-o), + not(-ms), + not(-khtml), + not(official) + ); + @include experimental("border-radius", $radius unquote("/") $vertical-radius, + -moz, + not(-webkit), + not(-o), + not(-ms), + -khtml, + official + ); + } + @else { + @include experimental(border-radius, $radius); + } +} + +// Round radius at position by amount. +// +// * legal values for `$vert`: `top`, `bottom` +// * legal values for `$horz`: `left`, `right` + +@mixin border-corner-radius($vert, $horz, $radius: $default-border-radius) { + // Support for mozilla's syntax for specifying a corner + @include experimental("border-radius-#{$vert}#{$horz}", $radius, + -moz, + not(-webkit), + not(-o), + not(-ms), + not(-khtml), + not(official) + ); + @include experimental("border-#{$vert}-#{$horz}-radius", $radius, + not(-moz), + -webkit, + not(-o), + not(-ms), + -khtml, + official + ); + +} + +// Round top-left corner only + +@mixin border-top-left-radius($radius: $default-border-radius) { + @include border-corner-radius(top, left, $radius); } + +// Round top-right corner only + +@mixin border-top-right-radius($radius: $default-border-radius) { + @include border-corner-radius(top, right, $radius); } + +// Round bottom-left corner only + +@mixin border-bottom-left-radius($radius: $default-border-radius) { + @include border-corner-radius(bottom, left, $radius); } + +// Round bottom-right corner only + +@mixin border-bottom-right-radius($radius: $default-border-radius) { + @include border-corner-radius(bottom, right, $radius); } + +// Round both top corners by amount +@mixin border-top-radius($radius: $default-border-radius) { + @include border-top-left-radius($radius); + @include border-top-right-radius($radius); } + +// Round both right corners by amount +@mixin border-right-radius($radius: $default-border-radius) { + @include border-top-right-radius($radius); + @include border-bottom-right-radius($radius); } + +// Round both bottom corners by amount +@mixin border-bottom-radius($radius: $default-border-radius) { + @include border-bottom-left-radius($radius); + @include border-bottom-right-radius($radius); } + +// Round both left corners by amount +@mixin border-left-radius($radius: $default-border-radius) { + @include border-top-left-radius($radius); + @include border-bottom-left-radius($radius); } diff --git a/src/supermarket/app/assets/compass/css3/_box-shadow.scss b/src/supermarket/app/assets/compass/css3/_box-shadow.scss new file mode 100644 index 000000000..037776799 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_box-shadow.scss @@ -0,0 +1,76 @@ +// @doc off +// These defaults make the arguments optional for this mixin +// If you like, set different defaults before importing. +// @doc on + +@import "shared"; +@import "../functions"; + +// The default color for box shadows +$default-box-shadow-color: #333333 !default; + +// The default horizontal offset. Positive is to the right. +$default-box-shadow-h-offset: 0px !default; + +// The default vertical offset. Positive is down. +$default-box-shadow-v-offset: 0px !default; + +// The default blur length. +$default-box-shadow-blur: 5px !default; + +// The default spread length. +$default-box-shadow-spread : false !default; + +// The default shadow inset: inset or false (for standard shadow). +$default-box-shadow-inset : false !default; + +// Provides cross-browser for Webkit, Gecko, and CSS3 box shadows when one or more box +// shadows are needed. +// Each shadow argument should adhere to the standard css3 syntax for the +// box-shadow property. +@mixin box-shadow( + $shadow-1 : default, + $shadow-2 : false, + $shadow-3 : false, + $shadow-4 : false, + $shadow-5 : false, + $shadow-6 : false, + $shadow-7 : false, + $shadow-8 : false, + $shadow-9 : false, + $shadow-10: false +) { + @if $shadow-1 == default { + $shadow-1 : -compass-space-list(compact(if($default-box-shadow-inset, inset, false), $default-box-shadow-h-offset, $default-box-shadow-v-offset, $default-box-shadow-blur, $default-box-shadow-spread, $default-box-shadow-color)); + } + $shadow : compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10); + @include experimental(box-shadow, $shadow, + -moz, -webkit, not(-o), not(-ms), not(-khtml), official + ); +} + +// Provides a single cross-browser CSS box shadow for Webkit, Gecko, and CSS3. +// Includes default arguments for horizontal offset, vertical offset, blur length, spread length, color and inset. +@mixin single-box-shadow( + $hoff : $default-box-shadow-h-offset, + $voff : $default-box-shadow-v-offset, + $blur : $default-box-shadow-blur, + $spread : $default-box-shadow-spread, + $color : $default-box-shadow-color, + $inset : $default-box-shadow-inset +) { + @if not ($inset == true or $inset == false or $inset == inset) { + @warn "$inset expected to be true or the inset keyword. Got #{$inset} instead. Using: inset"; + } + + @if $color == none { + @include box-shadow(none); + } @else { + $full : $hoff $voff; + @if $blur { $full: $full $blur; } + @if $spread { $full: $full $spread; } + @if $color { $full: $full $color; } + @if $inset { $full: inset $full; } + @include box-shadow($full); + } +} diff --git a/src/supermarket/app/assets/compass/css3/_box-sizing.scss b/src/supermarket/app/assets/compass/css3/_box-sizing.scss new file mode 100644 index 000000000..b12e9801f --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_box-sizing.scss @@ -0,0 +1,18 @@ +@import "shared"; + +// The default box-sizing model when no argument is provided to the box-sizing mixin: [ content-box | border-box | padding-box ] +// +// The browser default is content-box, compass defaults to border-box. +$default-box-sizing: border-box !default; + +// Change the box model for Mozilla, Webkit, IE8 and the future +// +// @param $bs +// [ content-box | border-box ] + +@mixin box-sizing($bs: $default-box-sizing) { + $bs: unquote($bs); + @include experimental(box-sizing, $bs, + -moz, -webkit, not(-o), not(-ms), not(-khtml), official + ); +} diff --git a/src/supermarket/app/assets/compass/css3/_box.scss b/src/supermarket/app/assets/compass/css3/_box.scss new file mode 100644 index 000000000..eac53c927 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_box.scss @@ -0,0 +1,111 @@ +@import "shared"; + +// display:box; must be used for any of the other flexbox mixins to work properly +@mixin display-box { + @include experimental-value(display, box, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// Default box orientation, assuming that the user wants something less block-like +$default-box-orient: horizontal !default; + +// Box orientation [ horizontal | vertical | inline-axis | block-axis | inherit ] +@mixin box-orient( + $orientation: $default-box-orient +) { + $orientation : unquote($orientation); + @include experimental(box-orient, $orientation, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// Default box-align +$default-box-align: stretch !default; + +// Box align [ start | end | center | baseline | stretch ] +@mixin box-align( + $alignment: $default-box-align +) { + $alignment : unquote($alignment); + @include experimental(box-align, $alignment, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// Default box flex +$default-box-flex: 0 !default; + +// mixin which takes an int argument for box flex. Apply this to the children inside the box. +// +// For example: "div.display-box > div.child-box" would get the box flex mixin. +@mixin box-flex( + $flex: $default-box-flex +) { + @include experimental(box-flex, $flex, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// Default flex group +$default-box-flex-group: 1 !default; + +// mixin which takes an int argument for flexible grouping +@mixin box-flex-group( + $group: $default-box-flex-group +) { + @include experimental(box-flex-group, $group, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// default for ordinal group +$default-box-ordinal-group: 1 !default; + +// mixin which takes an int argument for ordinal grouping and rearranging the order +@mixin box-ordinal-group( + $group: $default-ordinal-flex-group +) { + @include experimental(box-ordinal-group, $group, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// Box direction default value +$default-box-direction: normal !default; + +// mixin for box-direction [ normal | reverse | inherit ] +@mixin box-direction( + $direction: $default-box-direction +) { + $direction: unquote($direction); + @include experimental(box-direction, $direction, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// default for box lines +$default-box-lines: single !default; + +// mixin for box lines [ single | multiple ] +@mixin box-lines( + $lines: $default-box-lines +) { + $lines: unquote($lines); + @include experimental(box-lines, $lines, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// default for box pack +$default-box-pack: start !default; + +// mixin for box pack [ start | end | center | justify ] +@mixin box-pack( + $pack: $default-box-pack +) { + $pack: unquote($pack); + @include experimental(box-pack, $pack, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/css3/_columns.scss b/src/supermarket/app/assets/compass/css3/_columns.scss new file mode 100644 index 000000000..635cd3c1b --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_columns.scss @@ -0,0 +1,157 @@ +@import "shared"; +@import "../functions"; + +// Specify the shorthand `columns` property. +// +// Example: +// +// @include columns(20em 2) +@mixin columns($width-and-count) { + @include experimental(columns, $width-and-count, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify the number of columns +@mixin column-count($count) { + @include experimental(column-count, $count, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify the gap between columns e.g. `20px` +@mixin column-gap($width) { + @include experimental(column-gap, $width, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify the width of columns e.g. `100px` +@mixin column-width($width) { + @include experimental(column-width, $width, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify how many columns an element should span across. +// * legal values are none, all +@mixin column-span($columns) { + @include experimental(column-span, $columns, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify the width of the rule between columns e.g. `1px` +@mixin column-rule-width($width) { + @include experimental(column-rule-width, $width, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify the style of the rule between columns e.g. `dotted`. +// This works like border-style. +@mixin column-rule-style($style) { + @include experimental(column-rule-style, unquote($style), + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify the color of the rule between columns e.g. `blue`. +// This works like border-color. +@mixin column-rule-color($color) { + @include experimental(column-rule-color, $color, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Mixin encompassing all column rule properties +// For example: +// +// @include column-rule(1px, solid, #c00) +// +// Or the values can be space separated: +// +// @include column-rule(1px solid #c00) +@mixin column-rule($width, $style: false, $color: false) { + $full : -compass-space-list(compact($width, $style, $color)); + @include experimental(column-rule, $full, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Mixin for setting column-break-before +// +// * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column +// +// Example: +// h2.before {@include column-break-before(always);} +// +// Which generates: +// +// h2.before { +// -webkit-column-break-before: always; +// column-break-before: always;} +@mixin column-break-before($value: auto){ + @include experimental(column-break-before, $value, not(-moz), -webkit, not(-o), not(-ms), not(-khtml), official ); +} + +// Mixin for setting column-break-after +// +// * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column +// +// Example: +// h2.after {@include column-break-after(always); } +// +// Which generates: +// +// h2.after { +// -webkit-column-break-after: always; +// column-break-after: always; } +@mixin column-break-after($value: auto){ + @include experimental(column-break-after, $value, not(-moz), -webkit, not(-o), not(-ms), not(-khtml), official ); +} + +// Mixin for setting column-break-inside +// +// * legal values are auto, avoid, avoid-page, avoid-column +// +// Example: +// h2.inside {@include column-break-inside();} +// Which generates: +// +// h2.inside { +// -webkit-column-break-inside: auto; +// column-break-inside: auto;} +@mixin column-break-inside($value: auto){ + @include experimental(column-break-inside, $value, not(-moz), -webkit, not(-o), not(-ms), not(-khtml), official ); +} + +// All-purpose mixin for setting column breaks. +// +// * legal values for $type : before, after, inside +// * legal values for '$value' are dependent on $type +// * when $type = before, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column +// * when $type = after, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column +// * when $type = inside, legal values are auto, avoid, avoid-page, avoid-column +// +// Examples: +// h2.before {@include column-break(before, always);} +// h2.after {@include column-break(after, always); } +// h2.inside {@include column-break(inside); } +// +// Which generates: +// h2.before { +// -webkit-column-break-before: always; +// column-break-before: always;} +// +// h2.after { +// -webkit-column-break-after: always; +// column-break-after: always; } +// +// h2.inside { +// -webkit-column-break-inside: auto; +// column-break-inside: auto;} + +@mixin column-break($type: before, $value: auto){ + @include experimental("column-break-#{$type}", $value, not(-moz), -webkit, not(-o), not(-ms), not(-khtml), official ); +} diff --git a/src/supermarket/app/assets/compass/css3/_filter.scss b/src/supermarket/app/assets/compass/css3/_filter.scss new file mode 100644 index 000000000..a21bd474a --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_filter.scss @@ -0,0 +1,24 @@ +@import "shared"; +@import "../functions"; + +// Provides cross-browser support for the upcoming (?) css3 filter property. +// +// Each filter argument should adhere to the standard css3 syntax for the +// filter property. +@mixin filter ( + $filter-1, + $filter-2 : false, + $filter-3 : false, + $filter-4 : false, + $filter-5 : false, + $filter-6 : false, + $filter-7 : false, + $filter-8 : false, + $filter-9 : false, + $filter-10: false +) { + $filter : compact($filter-1, $filter-2, $filter-3, $filter-4, $filter-5, $filter-6, $filter-7, $filter-8, $filter-9, $filter-10); + @include experimental(filter, $filter, + -moz, -webkit, not(-o), not(-ms), not(-khtml), official + ); +} diff --git a/src/supermarket/app/assets/compass/css3/_flexbox.scss b/src/supermarket/app/assets/compass/css3/_flexbox.scss new file mode 100644 index 000000000..f83f28734 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_flexbox.scss @@ -0,0 +1,86 @@ +@import "../support"; +@import "shared"; + +// This is the underlying implementation for all the other mixins in this module. +// It is the only way to access prefix support for older versions of the spec. +// Deviates from canonical Compass implementation by dropping support for +// older versions of the Flexbox spec. +// +// `$properties`: map of property-value pairs that should be prefixed +@mixin flexbox($properties) { + @each $prop, $value in $properties { + @if $prop == display { + @include experimental-value(display, $value, not(-moz), -webkit, + not(-o), not(-ms), not(-khtml), official); + } @else { + @include experimental($prop, $value, not(-moz), -webkit, not(-o), + not(-ms), not(-khtml), official); + } + } +} + +// Values for $display are: flex (default), inline-flex +@mixin display-flex($display: flex) { + @include flexbox((display: $display)); +} + +// Values: row | row-reverse | column | column-reverse +@mixin flex-direction($direction) { + @include flexbox((flex-direction: $direction)); +} + +// Values: nowrap | wrap | wrap-reverse +@mixin flex-wrap($wrap) { + @include flexbox((flex-wrap: $wrap)); +} + +// Shorthand for flex-direction and flex-wrap. +@mixin flex-flow($flow) { + @include flexbox((flex-flow: $flow)); +} + +// Accepts an integer +@mixin order($order) { + @include flexbox((order: $order)); +} + +// Shorthand for flex-grow, flex-shrink and optionally flex-basis. +// Space separated, in that order. +@mixin flex($flex) { + @include flexbox((flex: $flex)); +} + +// Accepts a number. +@mixin flex-grow($flex-grow) { + @include flexbox((flex-grow: $flex-grow)); +} + +// Accepts a number. +@mixin flex-shrink($flex-shrink) { + @include flexbox((flex-shrink: $flex-shrink)); +} + +// Accepts any legal value for the width property. +@mixin flex-basis($flex-basis) { + @include flexbox((flex-basis: $flex-basis)); +} + +// Legal values: flex-start | flex-end | center | space-between | space-around +@mixin justify-content($justify-content) { + @include flexbox((justify-content: $justify-content)); +} + +// Legal values: flex-start | flex-end | center | baseline | stretch +@mixin align-items($align-items) { + @include flexbox((align-items: $align-items)); +} + +// Legal values: auto | flex-start | flex-end | center | baseline | stretch +@mixin align-self($align-self) { + @include flexbox((align-self: $align-self)); +} + +// Legal values: flex-start | flex-end | center | space-between | space-around | stretch +@mixin align-content($align-content) { + @include flexbox((align-content: $align-content)); +} diff --git a/src/supermarket/app/assets/compass/css3/_font-face.scss b/src/supermarket/app/assets/compass/css3/_font-face.scss new file mode 100644 index 000000000..bd3db3402 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_font-face.scss @@ -0,0 +1,48 @@ +@import "shared"; + +// Cross-browser support for @font-face. Supports IE, Gecko, Webkit, Opera. +// +// * $name is required, arbitrary, and what you will use in font stacks. +// * $font-files is required using font-files('relative/location', 'format'). +// for best results use this order: woff, opentype/truetype, svg +// * $eot is required by IE, and is a relative location of the eot file. +// * $weight shows if the font is bold, defaults to normal +// * $style defaults to normal, might be also italic +// * For android 2.2 Compatiblity, please ensure that your web page has +// a meta viewport tag. +// * To support iOS < 4.2, an SVG file must be provided +// +// If you need to generate other formats check out the Font Squirrel +// [font generator](http://www.fontsquirrel.com/fontface/generator) +// + +// In order to refer to a specific style of the font in your stylesheets as +// e.g. "font-style: italic;", you may add a couple of @font-face includes +// containing the respective font files for each style and specying +// respective the $style parameter. + +// Order of the includes matters, and it is: normal, bold, italic, bold+italic. + +@mixin font-face( + $name, + $font-files, + $eot: false, + $weight: false, + $style: false +) { + $iefont: unquote("#{$eot}?#iefix"); + @font-face { + font-family: quote($name); + @if $eot { + src: font-url($eot); + $font-files: font-url($iefont) unquote("format('eot')"), $font-files; + } + src: $font-files; + @if $weight { + font-weight: $weight; + } + @if $style { + font-style: $style; + } + } +} diff --git a/src/supermarket/app/assets/compass/css3/_hyphenation.scss b/src/supermarket/app/assets/compass/css3/_hyphenation.scss new file mode 100644 index 000000000..5a76586db --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_hyphenation.scss @@ -0,0 +1,77 @@ +@import "shared"; + +// Mixins to support specific CSS Text Level 3 elements +// +// +// +// Mixin for word-break properties +// http://www.w3.org/css3-text/#word-break +// * legal values for $type : normal, keep-all, break-all +// +// Example: +// p.wordBreak {@include word-break(break-all);} +// +// Which generates: +// p.wordBreak { +// -ms-word-break: break-all; +// word-break: break-all; +// word-break: break-word;} +// +@mixin word-break($value: normal){ + @if $value == break-all { + //Most browsers handle the break-all case the same... + @include experimental(word-break, $value, + not(-moz), not(-webkit), not(-o), -ms, not(-khtml), official + ); + //Webkit handles break-all differently... as break-word + @include experimental(word-break, break-word, + not(-moz), not(-webkit), not(-o), not(-ms), not(-khtml), official + ); + } + @else { + @include experimental(word-break, $value, + not(-moz), not(-webkit), not(-o), -ms, not(-khtml), official + ); + } +} + +// Mixin for the hyphens property +// +// W3C specification: http://www.w3.org/TR/css3-text/#hyphens +// * legal values for $type : auto, manual, none +// +// Example: +// p { +// @include hyphens(auto);} +// Which generates: +// p { +// -moz-hyphens: auto; +// -webkit-hyphens: auto; +// hyphens: auto;} +// +@mixin hyphens($value: auto){ + @include experimental(hyphens, $value, + -moz, -webkit, not(-o), not(-ms), not(-khtml), official + ); +} + +// Mixin for x-browser hyphenation based on @auchenberg's post: +// Removes the need for the HTML tag +// http://blog.kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/ +// +// Example: +// div {@include hyphenation;} +// +// Which generates: +// div { +// -ms-word-break: break-all; +// word-break: break-all; +// word-break: break-word; +// -moz-hyphens: auto; +// -webkit-hyphens: auto; +// hyphens: auto;} +// +@mixin hyphenation{ + @include word-break(break-all); + @include hyphens; +} diff --git a/src/supermarket/app/assets/compass/css3/_images.scss b/src/supermarket/app/assets/compass/css3/_images.scss new file mode 100644 index 000000000..07394a43e --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_images.scss @@ -0,0 +1,133 @@ +@import "shared"; +@import "../utilities/general/hacks"; +@import "../functions"; + +// Background property support for vendor prefixing within values. +@mixin background( + $background-1, + $background-2: false, + $background-3: false, + $background-4: false, + $background-5: false, + $background-6: false, + $background-7: false, + $background-8: false, + $background-9: false, + $background-10: false +) { + $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5, + $background-6, $background-7, $background-8, $background-9, $background-10); + $mult-bgs: -compass-list-size($backgrounds) > 1; + $add-pie-bg: prefixed(-pie, $backgrounds) or $mult-bgs; + @if $experimental-support-for-svg and prefixed(-svg, $backgrounds) { background: -svg($backgrounds); } + @if $support-for-original-webkit-gradients and prefixed(-owg, $backgrounds) { background: -owg($backgrounds); } + @if $experimental-support-for-webkit and prefixed(-webkit, $backgrounds) { background: -webkit($backgrounds); } + @if $experimental-support-for-mozilla and prefixed(-moz, $backgrounds) { background: -moz($backgrounds); } + @if $experimental-support-for-opera and prefixed(-o, $backgrounds) { background: -o($backgrounds); } + @if $experimental-support-for-pie and $add-pie-bg { -pie-background: $backgrounds ; } + background: $backgrounds ; +} + +@mixin background-with-css2-fallback( + $background-1, + $background-2: false, + $background-3: false, + $background-4: false, + $background-5: false, + $background-6: false, + $background-7: false, + $background-8: false, + $background-9: false, + $background-10: false +) { + $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5, + $background-6, $background-7, $background-8, $background-9, $background-10); + $mult-bgs: -compass-list-size($backgrounds) > 1; + $simple-background: if($mult-bgs or prefixed(-css2, $backgrounds), -css2(-compass-nth($backgrounds, last)), false); + @if not(blank($simple-background)) { background: $simple-background; } + @include background($background-1, $background-2, $background-3, $background-4, $background-5, + $background-6, $background-7, $background-8, $background-9, $background-10); +} + + +// Background image property support for vendor prefixing within values. +@mixin background-image( + $image-1, + $image-2: false, + $image-3: false, + $image-4: false, + $image-5: false, + $image-6: false, + $image-7: false, + $image-8: false, + $image-9: false, + $image-10: false +) { + $images: compact($image-1, $image-2, $image-3, $image-4, $image-5, $image-6, $image-7, $image-8, $image-9, $image-10); + $add-pie-bg: prefixed(-pie, $images) or -compass-list-size($images) > 1; + + @if $experimental-support-for-svg and prefixed(-svg, $images) { background-image: -svg($images); background-size: 100%; } + @if $support-for-original-webkit-gradients and prefixed(-owg, $images) { background-image: -owg($images); } + @if $experimental-support-for-webkit and prefixed(-webkit, $images) { background-image: -webkit($images); } + @if $experimental-support-for-mozilla and prefixed(-moz, $images) { background-image: -moz($images); } + @if $experimental-support-for-opera and prefixed(-o, $images) { background-image: -o($images); } + @if $experimental-support-for-pie and $add-pie-bg { @warn "PIE does not support background-image. Use @include background(#{$images}) instead." } + background-image: $images ; +} + +// Emit a IE-Specific filters that renders a simple linear gradient. +// For use in IE 6 - 8. Best practice would have you apply this via a +// conditional IE stylesheet, but if you must, you should place this before +// any background-image properties that you have specified. +// +// For the `$orientation` parameter, you can pass `vertical` or `horizontal`. +@mixin filter-gradient($start-color, $end-color, $orientation: vertical) { + @include has-layout; + $gradient-type: if($orientation == vertical, 0, 1); + @if $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 { + filter: progid:DXImageTransform.Microsoft.gradient(gradientType=#{$gradient-type}, startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}'); + } +} + + +// Border image property support for vendor prefixing properties and values. +@mixin border-image($value) { + @if $experimental-support-for-mozilla { -moz-border-image: -moz(reject(-compass-list($value), fill)); } + @if $support-for-original-webkit-gradients { -webkit-border-image: -owg(reject(-compass-list($value), fill)); } + @if $experimental-support-for-webkit { -webkit-border-image: -webkit(reject(-compass-list($value), fill)); } + @if $experimental-support-for-opera { -o-border-image: -o(reject(-compass-list($value), fill)); } + @if $experimental-support-for-svg { border-image: -svg(reject(-compass-list($value), fill)); } + border-image: $value; +} + +// List style image property support for vendor prefixing within values. +@mixin list-style-image($image) { + @if $experimental-support-for-mozilla and prefixed(-moz, $image) { list-style-image: -moz($image); } + @if $support-for-original-webkit-gradients and prefixed(-owg, $image) { list-style-image: -owg($image); } + @if $experimental-support-for-webkit and prefixed(-webkit, $image) { list-style-image: -webkit($image); } + @if $experimental-support-for-opera and prefixed(-o, $image) { list-style-image: -o($image); } + @if $experimental-support-for-svg and prefixed(-svg, $image) { list-style-image: -svg($image); } + list-style-image: $image ; +} + +// List style property support for vendor prefixing within values. +@mixin list-style($value) { + $value: -compass-list($value); + @if $experimental-support-for-mozilla and prefixed(-moz, $value) { list-style-image: -moz($value); } + @if $support-for-original-webkit-gradients and prefixed(-owg, $value) { list-style-image: -owg($value); } + @if $experimental-support-for-webkit and prefixed(-webkit, $value) { list-style-image: -webkit($value); } + @if $experimental-support-for-opera and prefixed(-o, $value) { list-style-image: -o($value); } + @if $experimental-support-for-svg and prefixed(-svg, $value) { list-style-image: -svg($value); } + list-style-image: $value ; +} + +// content property support for vendor prefixing within values. +@mixin content($value) { + $value: -compass-list($value); + @if $experimental-support-for-mozilla and prefixed(-moz, $value) { content: -moz($value); } + @if $support-for-original-webkit-gradients and prefixed(-owg, $value) { content: -owg($value); } + @if $experimental-support-for-webkit and prefixed(-webkit, $value) { content: -webkit($value); } + @if $experimental-support-for-opera and prefixed(-o, $value) { content: -o($value); } + @if $experimental-support-for-svg and prefixed(-svg, $value) { content: -svg($value); } + content: $value ; +} diff --git a/src/supermarket/app/assets/compass/css3/_inline-block.scss b/src/supermarket/app/assets/compass/css3/_inline-block.scss new file mode 100644 index 000000000..75519b131 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_inline-block.scss @@ -0,0 +1,22 @@ +@import "shared"; + +// Set `$inline-block-alignment` to `none` or `false` to disable the output +// of a vertical-align property in the inline-block mixin. +// Or set it to a legal value for `vertical-align` to change the default. +$inline-block-alignment: middle !default; + +// Provides a cross-browser method to implement `display: inline-block;` +@mixin inline-block($alignment: $inline-block-alignment) { + @if $legacy-support-for-mozilla { + display: -moz-inline-stack; + } + display: inline-block; + @if $alignment and $alignment != none { + vertical-align: $alignment; + } + @if $legacy-support-for-ie { + *vertical-align: auto; + zoom: 1; + *display: inline; + } +} diff --git a/src/supermarket/app/assets/compass/css3/_opacity.scss b/src/supermarket/app/assets/compass/css3/_opacity.scss new file mode 100644 index 000000000..fc497ffe4 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_opacity.scss @@ -0,0 +1,19 @@ +@import "shared"; + +// Provides cross-browser CSS opacity. Takes a number between 0 and 1 as the argument, e.g. 0.5 for 50% opacity. +// +// @param $opacity +// A number between 0 and 1, where 0 is transparent and 1 is opaque. + +@mixin opacity($opacity) { + @if $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 { + filter: unquote("progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})"); + } + opacity: $opacity; +} + +// Make an element completely transparent. +@mixin transparent { @include opacity(0); } + +// Make an element completely opaque. +@mixin opaque { @include opacity(1); } diff --git a/src/supermarket/app/assets/compass/css3/_pie.scss b/src/supermarket/app/assets/compass/css3/_pie.scss new file mode 100644 index 000000000..69390fd3d --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_pie.scss @@ -0,0 +1,73 @@ +$experimental-support-for-pie: true !default; + +// It is recommended that you use Sass's @extend directive to apply the behavior +// to your PIE elements. To assist you, Compass provides this variable. +// When set, it will cause the `@include pie` mixin to extend this class. +// The class name you provide should **not** include the `.`. +$pie-base-class: false !default; + +// The default approach to using PIE. +// Can be one of: +// +// * relative (default) +// * z-index +// * none +$pie-default-approach: relative !default; + +// The location of your PIE behavior file +// This should be root-relative to your web server +// relative assets don't work. It is recommended that +// you set this yourself. +$pie-behavior: stylesheet-url("PIE.htc") !default; + +// When using the z-index approach, the +// first ancestor of the PIE element at +// or before the container's opaque background +// should have a z-index set as well to ensure +// propert z-index stacking. +// +// The `$position` argument must be some non-static +// value (absolute, relative, etc.) +@mixin pie-container($z-index: 0, $position: relative) { + z-index: $z-index; + position: $position; +} + +// PIE elements must have this behavior attached to them. +// IE is broken -- it doesn't think of behavior urls as +// relative to the stylesheet. It considers them relative +// to the webpage. As a result, you cannot reliably use +// compass's relative_assets with PIE. +// +// * `$approach` - one of: relative, z-index, or none +// * `$z-index` - when using the z-index approach, this +// is the z-index that is applied. +@mixin pie-element( + $approach: $pie-default-approach, + $z-index: 0 +) { + behavior: $pie-behavior; + @if $approach == relative { + position: relative; + } + @else if $approach == z-index { + z-index: $z-index; + } +} + +// a smart mixin that knows to extend or include pie-element according +// to your stylesheet's configuration variables. +@mixin pie($base-class: $pie-base-class) { + @if $base-class { + @extend .#{$base-class}; + } + @else { + @include pie-element; + } +} + +// Watch `$n` levels of ancestors for changes to their class attribute +// So that cascading styles will work correctly on the PIE element. +@mixin pie-watch-ancestors($n) { + -pie-watch-ancestors: $n; +} diff --git a/src/supermarket/app/assets/compass/css3/_regions.scss b/src/supermarket/app/assets/compass/css3/_regions.scss new file mode 100644 index 000000000..1cd623f3a --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_regions.scss @@ -0,0 +1,22 @@ +@import "shared"; + +// Webkit, IE10 and future support for [CSS Regions](http://dev.w3.org/csswg/css3-regions/) +// +// $target is a value you use to link two regions of your css. Give the source of your content the flow-into property, and give your target container the flow-from property. +// +// For a visual explanation, see the diagrams at Chris Coyier's +// [CSS-Tricks](http://css-tricks.com/content-folding/) + +@mixin flow-into($target) { + $target: unquote($target); + @include experimental(flow-into, $target, + not(-moz), -webkit, not(-o), -ms, not(-khtml), not official + ); +} + +@mixin flow-from($target) { + $target: unquote($target); + @include experimental(flow-from, $target, + not(-moz), -webkit, not(-o), -ms, not(-khtml), not official + ); +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/css3/_shared.scss b/src/supermarket/app/assets/compass/css3/_shared.scss new file mode 100644 index 000000000..784ab213d --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_shared.scss @@ -0,0 +1,38 @@ +@import "../support"; + +// This mixin provides basic support for CSS3 properties and +// their corresponding experimental CSS2 properties when +// the implementations are identical except for the property +// prefix. +@mixin experimental($property, $value, + $moz : $experimental-support-for-mozilla, + $webkit : $experimental-support-for-webkit, + $o : $experimental-support-for-opera, + $ms : $experimental-support-for-microsoft, + $khtml : $experimental-support-for-khtml, + $official : true +) { + @if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : $value; } + @if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : $value; } + @if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; } + @if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; } + @if $o and $experimental-support-for-opera { -o-#{$property} : $value; } + @if $official { #{$property} : $value; } +} + +// Same as experimental(), but for cases when the property is the same and the value is vendorized +@mixin experimental-value($property, $value, + $moz : $experimental-support-for-mozilla, + $webkit : $experimental-support-for-webkit, + $o : $experimental-support-for-opera, + $ms : $experimental-support-for-microsoft, + $khtml : $experimental-support-for-khtml, + $official : true +) { + @if $webkit and $experimental-support-for-webkit { #{$property} : -webkit-#{$value}; } + @if $khtml and $experimental-support-for-khtml { #{$property} : -khtml-#{$value}; } + @if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; } + @if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; } + @if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; } + @if $official { #{$property} : #{$value}; } +} diff --git a/src/supermarket/app/assets/compass/css3/_text-shadow.scss b/src/supermarket/app/assets/compass/css3/_text-shadow.scss new file mode 100644 index 000000000..e60a615e2 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_text-shadow.scss @@ -0,0 +1,88 @@ +@import "shared"; +@import "../functions"; + +// These defaults make the arguments optional for this mixin +// If you like, set different defaults in your project + +$default-text-shadow-color: #aaa !default; +$default-text-shadow-h-offset: 0px !default; +$default-text-shadow-v-offset: 0px !default; +$default-text-shadow-blur: 1px !default; +$default-text-shadow-spread: false !default; + +// Provides cross-browser text shadows when one or more shadows are needed. +// Each shadow argument should adhere to the standard css3 syntax for the +// text-shadow property. +// +// Note: if any shadow has a spread parameter, this will cause the mixin +// to emit the shadow declaration twice, first without the spread, +// then with the spread included. This allows you to progressively +// enhance the browsers that do support the spread parameter. +@mixin text-shadow( + $shadow-1 : default, + $shadow-2 : false, + $shadow-3 : false, + $shadow-4 : false, + $shadow-5 : false, + $shadow-6 : false, + $shadow-7 : false, + $shadow-8 : false, + $shadow-9 : false, + $shadow-10: false +) { + @if $shadow-1 == default { + $shadow-1: compact($default-text-shadow-h-offset $default-text-shadow-v-offset $default-text-shadow-blur $default-text-shadow-spread $default-text-shadow-color); + } + $shadows-without-spread: join((),(),comma); + $shadows: join((),(),comma); + $has-spread: false; + @each $shadow in compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, + $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10) { + @if length($shadow) > 4 { + $has-spread: true; + $shadows-without-spread: append($shadows-without-spread, nth($shadow,1) nth($shadow,2) nth($shadow,3) nth($shadow,5)); + $shadows: append($shadows, $shadow); + } else { + $shadows-without-spread: append($shadows-without-spread, $shadow); + $shadows: append($shadows, $shadow); + } + } + @if $has-spread { + text-shadow: $shadows-without-spread; + } + text-shadow: $shadows; +} + +// Provides a single cross-browser CSS text shadow. +// +// Provides sensible defaults for the color, horizontal offset, vertical offset, blur, and spread +// according to the configuration defaults above. +@mixin single-text-shadow( + $hoff: false, + $voff: false, + $blur: false, + $spread: false, + $color: false +) { + // A lot of people think the color comes first. It doesn't. + @if type-of($hoff) == color { + $temp-color: $hoff; + $hoff: $voff; + $voff: $blur; + $blur: $spread; + $spread: $color; + $color: $temp-color; + } + // Can't rely on default assignment with multiple supported argument orders. + $hoff: if($hoff, $hoff, $default-text-shadow-h-offset); + $voff: if($voff, $voff, $default-text-shadow-v-offset); + $blur: if($blur, $blur, $default-text-shadow-blur ); + $spread: if($spread, $spread, $default-text-shadow-spread ); + $color: if($color, $color, $default-text-shadow-color ); + // We don't need experimental support for this property. + @if $color == none or $hoff == none { + @include text-shadow(none); + } @else { + @include text-shadow(compact($hoff $voff $blur $spread $color)); + } +} diff --git a/src/supermarket/app/assets/compass/css3/_transform-legacy.scss b/src/supermarket/app/assets/compass/css3/_transform-legacy.scss new file mode 100644 index 000000000..3af4795e1 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_transform-legacy.scss @@ -0,0 +1,87 @@ +@import "shared"; + +@warn "This version of the transform module has been deprecated and will be removed."; + +// CSS Transform and Transform-Origin + +// Apply a transform sent as a complete string. + +@mixin apply-transform($transform) { + @include experimental(transform, $transform, + -moz, -webkit, -o, not(-ms), not(-khtml), official + ); +} + +// Apply a transform-origin sent as a complete string. + +@mixin apply-origin($origin) { + @include experimental(transform-origin, $origin, + -moz, -webkit, -o, not(-ms), not(-khtml), official + ); +} + +// transform-origin requires x and y coordinates +// +// * only applies the coordinates if they are there so that it can be called by scale, rotate and skew safely + +@mixin transform-origin($originx: 50%, $originy: 50%) { + @if $originx or $originy { + @if $originy { + @include apply-origin($originx or 50% $originy); + } @else { + @include apply-origin($originx); + } + } +} + +// A full transform mixin with everything you could want +// +// * including origin adjustments if you want them +// * scale, rotate and skew require units of degrees(deg) +// * scale takes a multiplier, rotate and skew take degrees + +@mixin transform( + $scale: 1, + $rotate: 0deg, + $transx: 0, + $transy: 0, + $skewx: 0deg, + $skewy: 0deg, + $originx: false, + $originy: false +) { + $transform : scale($scale) rotate($rotate) translate($transx, $transy) skew($skewx, $skewy); + @include apply-transform($transform); + @include transform-origin($originx, $originy); +} + +// Transform Partials +// +// These work well on their own, but they don't add to each other, they override. +// Use them with extra origin args, or along side +transform-origin + +// Adjust only the scale, with optional origin coordinates + +@mixin scale($scale: 1.25, $originx: false, $originy: false) { + @include apply-transform(scale($scale)); + @include transform-origin($originx, $originy); +} + +// Adjust only the rotation, with optional origin coordinates + +@mixin rotate($rotate: 45deg, $originx: false, $originy: false) { + @include apply-transform(rotate($rotate)); + @include transform-origin($originx, $originy); +} + +// Adjust only the translation + +@mixin translate($transx: 0, $transy: 0) { + @include apply-transform(translate($transx, $transy)); +} + +// Adjust only the skew, with optional origin coordinates +@mixin skew($skewx: 0deg, $skewy: 0deg, $originx: false, $originy: false) { + @include apply-transform(skew($skewx, $skewy)); + @include transform-origin($originx, $originy); +} diff --git a/src/supermarket/app/assets/compass/css3/_transform.scss b/src/supermarket/app/assets/compass/css3/_transform.scss new file mode 100644 index 000000000..20a5ad698 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_transform.scss @@ -0,0 +1,598 @@ +@import "shared"; + +// @doc off +// Note ---------------------------------------------------------------------- +// Safari, Chrome, and Firefox all support 3D transforms. However, +// only in the most recent builds. You should also provide fallback 2d support for +// Opera and IE. IE10 is slated to have 3d enabled, but is currently unreleased. +// To make that easy, all 2D transforms include an browser-targeting toggle ($only3d) +// to switch between the two support lists. The toggle defaults to 'false' (2D), +// and also accepts 'true' (3D). Currently the lists are as follows: +// 2D: Mozilla, Webkit, Opera, Official +// 3D: Webkit, Firefox. + +// Available Transforms ------------------------------------------------------ +// - Scale (2d and 3d) +// - Rotate (2d and 3d) +// - Translate (2d and 3d) +// - Skew (2d only) + +// Transform Parameters ------------------------------------------------------ +// - Transform Origin (2d and 3d) +// - Perspective (3d) +// - Perspective Origin (3d) +// - Transform Style (3d) +// - Backface Visibility (3d) + +// Mixins -------------------------------------------------------------------- +// transform-origin +// - shortcuts: transform-origin2d, transform-origin3d +// - helpers: apply-origin +// transform +// - shortcuts: transform2d, transform3d +// - helpers: simple-transform, create-transform +// perspective +// - helpers: perspective-origin +// transform-style +// backface-visibility +// scale +// - shortcuts: scaleX, scaleY, scaleZ, scale3d +// rotate +// - shortcuts: rotateX, rotateY, rotate3d +// translate +// - shortcuts: translateX, translateY, translateZ, translate3d +// skew +// - shortcuts: skewX, skewY + +// Defaults ------------------------------------------------------------------ +// @doc on + +// The default x-origin for transforms +$default-origin-x : 50% !default; +// The default y-origin for transforms +$default-origin-y : 50% !default; +// The default z-origin for transforms +$default-origin-z : 50% !default; + + +// The default x-multiplier for scaling +$default-scale-x : 1.25 !default; +// The default y-multiplier for scaling +$default-scale-y : $default-scale-x !default; +// The default z-multiplier for scaling +$default-scale-z : $default-scale-x !default; + + +// The default angle for rotations +$default-rotate : 45deg !default; + + +// The default x-vector for the axis of 3d rotations +$default-vector-x : 1 !default; +// The default y-vector for the axis of 3d rotations +$default-vector-y : 1 !default; +// The default z-vector for the axis of 3d rotations +$default-vector-z : 1 !default; + + +// The default x-length for translations +$default-translate-x : 1em !default; +// The default y-length for translations +$default-translate-y : $default-translate-x !default; +// The default z-length for translations +$default-translate-z : $default-translate-x !default; + + +// The default x-angle for skewing +$default-skew-x : 5deg !default; +// The default y-angle for skewing +$default-skew-y : 5deg !default; + + +// **Transform-origin** +// Transform-origin sent as a complete string +// +// @include apply-origin( origin [, 3D-only ] ) +// +// where 'origin' is a space separated list containing 1-3 (x/y/z) coordinates +// in percentages, absolute (px, cm, in, em etc..) or relative +// (left, top, right, bottom, center) units +// +// @param only3d Set this to true to only apply this +// mixin where browsers have 3D support. +@mixin apply-origin($origin, $only3d) { + $only3d: $only3d or -compass-list-size(-compass-list($origin)) > 2; + @if $only3d { + @include experimental(transform-origin, $origin, + -moz, -webkit, -o, -ms, not(-khtml), official + ); + } @else { + @include experimental(transform-origin, $origin, + -moz, -webkit, -o, -ms, not(-khtml), official + ); + } +} + +// Transform-origin sent as individual arguments: +// +// @include transform-origin( [ origin-x, origin-y, origin-z, 3D-only ] ) +// +// where the 3 'origin-' arguments represent x/y/z coordinates. +// +// **NOTE:** setting z coordinates triggers 3D support list, leave false for 2D support +@mixin transform-origin( + $origin-x: $default-origin-x, + $origin-y: $default-origin-y, + $origin-z: false, + $only3d: if($origin-z, true, false) +) { + $origin: unquote(''); + @if $origin-x or $origin-y or $origin-z { + @if $origin-x { $origin: $origin-x; } @else { $origin: 50%; } + @if $origin-y { $origin: $origin $origin-y; } @else { @if $origin-z { $origin: $origin 50%; }} + @if $origin-z { $origin: $origin $origin-z; } + @include apply-origin($origin, $only3d); + } +} + + +// Transform sent as a complete string: +// +// @include transform( transforms [, 3D-only ] ) +// +// where 'transforms' is a space separated list of all the transforms to be applied. +@mixin transform( + $transform, + $only3d: false +) { + @if $only3d { + @include experimental(transform, $transform, + -moz, -webkit, -o, -ms, not(-khtml), official + ); + } @else { + @include experimental(transform, $transform, + -moz, -webkit, -o, -ms, not(-khtml), official + ); + } +} + +// Shortcut to target all browsers with 2D transform support +@mixin transform2d($trans) { + @include transform($trans, false); +} + +// Shortcut to target only browsers with 3D transform support +@mixin transform3d($trans) { + @include transform($trans, true); +} + +// @doc off +// 3D Parameters ------------------------------------------------------------- +// @doc on + +// Set the perspective of 3D transforms on the children of an element: +// +// @include perspective( perspective ) +// +// where 'perspective' is a unitless number representing the depth of the +// z-axis. The higher the perspective, the more exaggerated the foreshortening. +// values from 500 to 1000 are more-or-less "normal" - a good starting-point. +@mixin perspective($p) { + @include experimental(perspective, $p, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Set the origin position for the perspective +// +// @include perspective-origin(origin-x [origin-y]) +// +// where the two arguments represent x/y coordinates +@mixin perspective-origin($origin: 50%) { + @include experimental(perspective-origin, $origin, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Determine whether a 3D objects children also live in the given 3D space +// +// @include transform-style( [ style ] ) +// +// where `style` can be either `flat` or `preserve-3d`. +// Browsers default to `flat`, mixin defaults to `preserve-3d`. +@mixin transform-style($style: preserve-3d) { + @include experimental(transform-style, $style, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Determine the visibility of an element when it's back is turned +// +// @include backface-visibility( [ visibility ] ) +// +// where `visibility` can be either `visible` or `hidden`. +// Browsers default to visible, mixin defaults to hidden +@mixin backface-visibility($visibility: hidden) { + @include experimental(backface-visibility, $visibility, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// @doc off +// Transform Partials -------------------------------------------------------- +// These work well on their own, but they don't add to each other, they override. +// Use along with transform parameter mixins to adjust origin, perspective and style +// --------------------------------------------------------------------------- + + +// Scale --------------------------------------------------------------------- +// @doc on + +// Scale an object along the x and y axis: +// +// @include scale( [ scale-x, scale-y, perspective, 3D-only ] ) +// +// where the 'scale-' arguments are unitless multipliers of the x and y dimensions +// and perspective, which works the same as the stand-alone perspective property/mixin +// but applies to the individual element (multiplied with any parent perspective) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin scale( + $scale-x: $default-scale-x, + $scale-y: $scale-x, + $perspective: false, + $only3d: false +) { + $trans: scale($scale-x, $scale-y); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// Scale an object along the x axis +// @include scaleX( [ scale-x, perspective, 3D-only ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin scaleX( + $scale: $default-scale-x, + $perspective: false, + $only3d: false +) { + $trans: scaleX($scale); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// Scale an object along the y axis +// @include scaleY( [ scale-y, perspective, 3D-only ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin scaleY( + $scale: $default-scale-y, + $perspective: false, + $only3d: false +) { + $trans: scaleY($scale); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// Scale an object along the z axis +// @include scaleZ( [ scale-z, perspective ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin scaleZ( + $scale: $default-scale-z, + $perspective: false +) { + $trans: scaleZ($scale); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// Scale and object along all three axis +// @include scale3d( [ scale-x, scale-y, scale-z, perspective ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin scale3d( + $scale-x: $default-scale-x, + $scale-y: $default-scale-y, + $scale-z: $default-scale-z, + $perspective: false +) { + $trans: scale3d($scale-x, $scale-y, $scale-z); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// @doc off +// Rotate -------------------------------------------------------------------- +// @doc on + +// Rotate an object around the z axis (2D) +// @include rotate( [ rotation, perspective, 3D-only ] ) +// where 'rotation' is an angle set in degrees (deg) or radian (rad) units +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin rotate( + $rotate: $default-rotate, + $perspective: false, + $only3d: false +) { + $trans: rotate($rotate); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// A longcut for 'rotate' in case you forget that 'z' is implied +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin rotateZ( + $rotate: $default-rotate, + $perspective: false, + $only3d: false +) { + @include rotate($rotate, $perspective, $only3d); +} + +// Rotate an object around the x axis (3D) +// @include rotateX( [ rotation, perspective ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin rotateX( + $rotate: $default-rotate, + $perspective: false +) { + $trans: rotateX($rotate); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// Rotate an object around the y axis (3D) +// @include rotate( [ rotation, perspective ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin rotateY( + $rotate: $default-rotate, + $perspective: false +) { + $trans: rotateY($rotate); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// Rotate an object around an arbitrary axis (3D) +// @include rotate( [ vector-x, vector-y, vector-z, rotation, perspective ] ) +// where the 'vector-' arguments accept unitless numbers. +// These numbers are not important on their own, but in relation to one another +// creating an axis from your transform-origin, along the axis of Xx = Yy = Zz. +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin rotate3d( + $vector-x: $default-vector-x, + $vector-y: $default-vector-y, + $vector-z: $default-vector-z, + $rotate: $default-rotate, + $perspective: false +) { + $trans: rotate3d($vector-x, $vector-y, $vector-z, $rotate); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// @doc off +// Translate ----------------------------------------------------------------- +// @doc on + +// Move an object along the x or y axis (2D) +// @include translate( [ translate-x, translate-y, perspective, 3D-only ] ) +// where the 'translate-' arguments accept any distance in percentages or absolute (px, cm, in, em etc..) units. +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin translate( + $translate-x: $default-translate-x, + $translate-y: $default-translate-y, + $perspective: false, + $only3d: false +) { + $trans: translate($translate-x, $translate-y); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// Move an object along the x axis (2D) +// @include translate( [ translate-x, perspective, 3D-only ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin translateX( + $trans-x: $default-translate-x, + $perspective: false, + $only3d: false +) { + $trans: translateX($trans-x); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// Move an object along the y axis (2D) +// @include translate( [ translate-y, perspective, 3D-only ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin translateY( + $trans-y: $default-translate-y, + $perspective: false, + $only3d: false +) { + $trans: translateY($trans-y); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// Move an object along the z axis (3D) +// @include translate( [ translate-z, perspective ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin translateZ( + $trans-z: $default-translate-z, + $perspective: false +) { + $trans: translateZ($trans-z); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// Move an object along the x, y and z axis (3D) +// @include translate( [ translate-x, translate-y, translate-z, perspective ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin translate3d( + $translate-x: $default-translate-x, + $translate-y: $default-translate-y, + $translate-z: $default-translate-z, + $perspective: false +) { + $trans: translate3d($translate-x, $translate-y, $translate-z); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// @doc off +// Skew ---------------------------------------------------------------------- +// @doc on + +// Skew an element: +// +// @include skew( [ skew-x, skew-y, 3D-only ] ) +// +// where the 'skew-' arguments accept css angles in degrees (deg) or radian (rad) units. +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin skew( + $skew-x: $default-skew-x, + $skew-y: $default-skew-y, + $only3d: false +) { + $trans: skew($skew-x, $skew-y); + @include transform($trans, $only3d); +} + +// Skew an element along the x axiz +// +// @include skew( [ skew-x, 3D-only ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin skewX( + $skew-x: $default-skew-x, + $only3d: false +) { + $trans: skewX($skew-x); + @include transform($trans, $only3d); +} + +// Skew an element along the y axis +// +// @include skew( [ skew-y, 3D-only ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin skewY( + $skew-y: $default-skew-y, + $only3d: false +) { + $trans: skewY($skew-y); + @include transform($trans, $only3d); +} + + +// Full transform mixins +// For settings any combination of transforms as arguments +// These are complex and not highly recommended for daily use. They are mainly +// here for backward-compatibility purposes. +// +// * they include origin adjustments +// * scale takes a multiplier (unitless), rotate and skew take degrees (deg) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin create-transform( + $perspective: false, + $scale-x: false, + $scale-y: false, + $scale-z: false, + $rotate-x: false, + $rotate-y: false, + $rotate-z: false, + $rotate3d: false, + $trans-x: false, + $trans-y: false, + $trans-z: false, + $skew-x: false, + $skew-y: false, + $origin-x: false, + $origin-y: false, + $origin-z: false, + $only3d: false +) { + $trans: unquote(""); + + // perspective + @if $perspective { $trans: perspective($perspective) ; } + + // scale + @if $scale-x and $scale-y { + @if $scale-z { $trans: $trans scale3d($scale-x, $scale-y, $scale-z); } + @else { $trans: $trans scale($scale-x, $scale-y); } + } @else { + @if $scale-x { $trans: $trans scaleX($scale-x); } + @if $scale-y { $trans: $trans scaleY($scale-y); } + @if $scale-z { $trans: $trans scaleZ($scale-z); } + } + + // rotate + @if $rotate-x { $trans: $trans rotateX($rotate-x); } + @if $rotate-y { $trans: $trans rotateY($rotate-y); } + @if $rotate-z { $trans: $trans rotateZ($rotate-z); } + @if $rotate3d { $trans: $trans rotate3d($rotate3d); } + + // translate + @if $trans-x and $trans-y { + @if $trans-z { $trans: $trans translate3d($trans-x, $trans-y, $trans-z); } + @else { $trans: $trans translate($trans-x, $trans-y); } + } @else { + @if $trans-x { $trans: $trans translateX($trans-x); } + @if $trans-y { $trans: $trans translateY($trans-y); } + @if $trans-z { $trans: $trans translateZ($trans-z); } + } + + // skew + @if $skew-x and $skew-y { $trans: $trans skew($skew-x, $skew-y); } + @else { + @if $skew-x { $trans: $trans skewX($skew-x); } + @if $skew-y { $trans: $trans skewY($skew-y); } + } + + // apply it! + @include transform($trans, $only3d); + @include transform-origin($origin-x, $origin-y, $origin-z, $only3d); +} + + +// A simplified set of options +// backwards-compatible with the previous version of the 'transform' mixin +@mixin simple-transform( + $scale: false, + $rotate: false, + $trans-x: false, + $trans-y: false, + $skew-x: false, + $skew-y: false, + $origin-x: false, + $origin-y: false +) { + @include create-transform( + false, + $scale, $scale, false, + false, false, $rotate, false, + $trans-x, $trans-y, false, + $skew-x, $skew-y, + $origin-x, $origin-y, false, + false + ); +} diff --git a/src/supermarket/app/assets/compass/css3/_transition.scss b/src/supermarket/app/assets/compass/css3/_transition.scss new file mode 100644 index 000000000..f6666eaaa --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_transition.scss @@ -0,0 +1,222 @@ +@import "shared"; +@import "../functions"; + +// CSS Transitions +// Currently only works in Webkit. +// +// * expected in CSS3, FireFox 3.6/7 and Opera Presto 2.3 +// * We'll be prepared. +// +// Including this submodule sets following defaults for the mixins: +// +// $default-transition-property : all +// $default-transition-duration : 1s +// $default-transition-function : false +// $default-transition-delay : false +// +// Override them if you like. Timing-function and delay are set to false for browser defaults (ease, 0s). + +$default-transition-property: all !default; + +$default-transition-duration: 1s !default; + +$default-transition-function: false !default; + +$default-transition-delay: false !default; + +$transitionable-prefixed-values: transform, transform-origin !default; + +// One or more properties to transition +// +// * for multiple, use a comma-delimited list +// * also accepts "all" or "none" + +@mixin transition-property($property-1: $default-transition-property, + $property-2 : false, + $property-3 : false, + $property-4 : false, + $property-5 : false, + $property-6 : false, + $property-7 : false, + $property-8 : false, + $property-9 : false, + $property-10: false +) { + @if type-of($property-1) == string { $property-1: unquote($property-1); } + $properties: compact($property-1, $property-2, $property-3, $property-4, $property-5, $property-6, $property-7, $property-8, $property-9, $property-10); + @if $experimental-support-for-webkit { -webkit-transition-property : prefixed-for-transition(-webkit, $properties); } + @if $experimental-support-for-mozilla { -moz-transition-property : prefixed-for-transition(-moz, $properties); } + @if $experimental-support-for-opera { -o-transition-property : prefixed-for-transition(-o, $properties); } + transition-property : $properties; +} + +// One or more durations in seconds +// +// * for multiple, use a comma-delimited list +// * these durations will affect the properties in the same list position + +@mixin transition-duration($duration-1: $default-transition-duration, + $duration-2 : false, + $duration-3 : false, + $duration-4 : false, + $duration-5 : false, + $duration-6 : false, + $duration-7 : false, + $duration-8 : false, + $duration-9 : false, + $duration-10: false +) { + @if type-of($duration-1) == string { $duration-1: unquote($duration-1); } + $durations: compact($duration-1, $duration-2, $duration-3, $duration-4, $duration-5, $duration-6, $duration-7, $duration-8, $duration-9, $duration-10); + @include experimental(transition-duration, $durations, + -moz, -webkit, -o, not(-ms), not(-khtml), official + ); +} + +// One or more timing functions +// +// * [ ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier(x1, y1, x2, y2)] +// * For multiple, use a comma-delimited list +// * These functions will effect the properties in the same list position + +@mixin transition-timing-function($function-1: $default-transition-function, + $function-2 : false, + $function-3 : false, + $function-4 : false, + $function-5 : false, + $function-6 : false, + $function-7 : false, + $function-8 : false, + $function-9 : false, + $function-10: false +) { + $function-1: unquote($function-1); + $functions: compact($function-1, $function-2, $function-3, $function-4, $function-5, $function-6, $function-7, $function-8, $function-9, $function-10); + @include experimental(transition-timing-function, $functions, + -moz, -webkit, -o, not(-ms), not(-khtml), official + ); +} + +// One or more transition-delays in seconds +// +// * for multiple, use a comma-delimited list +// * these delays will effect the properties in the same list position + +@mixin transition-delay($delay-1: $default-transition-delay, + $delay-2 : false, + $delay-3 : false, + $delay-4 : false, + $delay-5 : false, + $delay-6 : false, + $delay-7 : false, + $delay-8 : false, + $delay-9 : false, + $delay-10: false +) { + @if type-of($delay-1) == string { $delay-1: unquote($delay-1); } + $delays: compact($delay-1, $delay-2, $delay-3, $delay-4, $delay-5, $delay-6, $delay-7, $delay-8, $delay-9, $delay-10); + @include experimental(transition-delay, $delays, + -moz, -webkit, -o, not(-ms), not(-khtml), official + ); +} + +// Transition all-in-one shorthand + +@mixin single-transition( + $property: $default-transition-property, + $duration: $default-transition-duration, + $function: $default-transition-function, + $delay: $default-transition-delay +) { + @include transition(compact($property $duration $function $delay)); +} + +@mixin transition( + $transition-1 : default, + $transition-2 : false, + $transition-3 : false, + $transition-4 : false, + $transition-5 : false, + $transition-6 : false, + $transition-7 : false, + $transition-8 : false, + $transition-9 : false, + $transition-10: false +) { + @if $transition-1 == default { + $transition-1 : compact($default-transition-property $default-transition-duration $default-transition-function $default-transition-delay); + } + $transitions: false; + @if type-of($transition-1) == list and type-of(nth($transition-1,1)) == list { + $transitions: join($transition-1, compact($transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10), comma); + } @else { + $transitions : compact($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10); + } + $delays: comma-list(); + $has-delays: false; + $webkit-value: comma-list(); + $moz-value: comma-list(); + $o-value: comma-list(); + + // This block can be made considerably simpler at the point in time that + // we no longer need to deal with the differences in how delays are treated. + @each $transition in $transitions { + // Extract the values from the list + // (this would be cleaner if nth took a 3rd argument to provide a default value). + $property: nth($transition, 1); + $duration: false; + $timing-function: false; + $delay: false; + @if length($transition) > 1 { $duration: nth($transition, 2); } + @if length($transition) > 2 { $timing-function: nth($transition, 3); } + @if length($transition) > 3 { $delay: nth($transition, 4); $has-delays: true; } + + // If a delay is provided without a timing function + @if is-time($timing-function) and not($delay) { $delay: $timing-function; $timing-function: false; $has-delays: true; } + + // Keep a list of delays in case one is specified + $delays: append($delays, if($delay, $delay, 0s)); + + $webkit-value: append($webkit-value, compact((prefixed-for-transition(-webkit, $property) $duration $timing-function)...)); + $moz-value: append( $moz-value, compact((prefixed-for-transition( -moz, $property) $duration $timing-function $delay)...)); + $o-value: append( $o-value, compact((prefixed-for-transition( -o, $property) $duration $timing-function $delay)...)); + } + + @if $experimental-support-for-webkit { -webkit-transition : $webkit-value; + // old webkit doesn't support the delay parameter in the shorthand so we progressively enhance it. + @if $has-delays { -webkit-transition-delay : $delays; } } + @if $experimental-support-for-mozilla { -moz-transition : $moz-value; } + @if $experimental-support-for-opera { -o-transition : $o-value; } + transition : $transitions; +} + +// coerce a list to be comma delimited or make a new, empty comma delimited list. +@function comma-list($list: ()) { + @return join((), $list, comma); +} + +// Returns `$property` with the given prefix if it is found in `$transitionable-prefixed-values`. +@function prefixed-for-transition($prefix, $property) { + @if type-of($property) == list { + $new-list: comma-list(); + @each $v in $property { + $new-list: append($new-list, prefixed-for-transition($prefix, $v)); + } + @return $new-list; + } @else { + @if index($transitionable-prefixed-values, $property) { + @return #{$prefix}-#{$property}; + } @else { + @return $property; + } + } +} + +// Checks if the value given is a unit of time. +@function is-time($value) { + @if type-of($value) == number { + @return not(not(index(s ms, unit($value)))); + } @else { + @return false; + } +} diff --git a/src/supermarket/app/assets/compass/css3/_user-interface.scss b/src/supermarket/app/assets/compass/css3/_user-interface.scss new file mode 100644 index 000000000..bbb270fd8 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_user-interface.scss @@ -0,0 +1,47 @@ +// User Interface ------------------------------------------------------------ +// This file can be expanded to handle all the user interface properties as +// they become available in browsers: +// http://www.w3.org/TR/2000/WD-css3-userint-20000216 +@import "shared"; + + +// This property controls the selection model and granularity of an element. +// +// @param $select +// [ none | text | toggle | element | elements | all | inherit ] +@mixin user-select($select) { + $select: unquote($select); + @include experimental(user-select, $select, + -moz, -webkit, not(-o), -ms, -khtml, official + ); +} + +// Style the html5 input placeholder in browsers that support it. +// +// The styles for the input placeholder are passed as mixin content +// and the selector comes from the mixin's context. +// +// For example: +// +// #{elements-of-type(text-input)} { +// @include input-placeholder { +// color: #bfbfbf; +// font-style: italic; +// } +// } +// +// if you want to apply the placeholder styles to all elements supporting +// the `input-placeholder` pseudo class (beware of performance impacts): +// +// * { +// @include input-placeholder { +// color: #bfbfbf; +// font-style: italic; +// } +// } +@mixin input-placeholder { + &:-ms-input-placeholder { @content; } + &:-moz-placeholder { @content; } + &::-moz-placeholder { @content; } + &::-webkit-input-placeholder { @content; } +} diff --git a/src/supermarket/app/assets/compass/functions/_colors.scss b/src/supermarket/app/assets/compass/functions/_colors.scss new file mode 100644 index 000000000..a3efe78ad --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_colors.scss @@ -0,0 +1,37 @@ +// +// A partial implementation of the Ruby colors functions from Compass: +// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/colors.rb +// + +// a genericized version of lighten/darken so that negative values can be used. +@function adjust-lightness($color, $amount) { + @return adjust-color($color, $lightness: $amount); +} + +// Scales a color's lightness by some percentage. +// If the amount is negative, the color is scaled darker, if positive, it is scaled lighter. +// This will never return a pure light or dark color unless the amount is 100%. +@function scale-lightness($color, $amount) { + @return scale-color($color, $lightness: $amount); +} + +// a genericized version of saturate/desaturate so that negative values can be used. +@function adjust-saturation($color, $amount) { + @return adjust-color($color, $saturation: $amount); +} + +// Scales a color's saturation by some percentage. +// If the amount is negative, the color is desaturated, if positive, it is saturated. +// This will never return a pure saturated or desaturated color unless the amount is 100%. +@function scale-saturation($color, $amount) { + @return scale-color($color, $saturation: $amount); +} + +@function shade($color, $percentage) { + @return mix(#000000, $color, $percentage); +} + +@function tint($color, $percentage) { + @return mix(#ffffff, $color, $percentage); +} + diff --git a/src/supermarket/app/assets/compass/functions/_constants.scss b/src/supermarket/app/assets/compass/functions/_constants.scss new file mode 100644 index 000000000..ea2e096e4 --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_constants.scss @@ -0,0 +1,18 @@ +// +// A partial implementation of the Ruby constants functions from Compass: +// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb +// + +@function opposite-position($from) { + @if ($from == top) { + @return bottom; + } @else if ($from == bottom) { + @return top; + } @else if ($from == left) { + @return right; + } @else if ($from == right) { + @return left; + } @else if ($from == center) { + @return center; + } +} diff --git a/src/supermarket/app/assets/compass/functions/_cross_browser_support.scss b/src/supermarket/app/assets/compass/functions/_cross_browser_support.scss new file mode 100644 index 000000000..371c97256 --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_cross_browser_support.scss @@ -0,0 +1,72 @@ +// +// A partial implementation of the Ruby cross browser support functions from Compass: +// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb +// + +@function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9; + $prefixed: false; + @each $item in $properties { + @if type-of($item) == 'string' { + $prefixed: $prefixed or str-index($item, 'url') != 1 and str-index($item, 'rgb') != 1 and str-index($item, '#') != 1; + } @else if type-of($item) == 'color' { + } @else if $item != null { + $prefixed: true; + } + } + @return $prefixed; +} + +@function prefix($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + $properties: ""; + + // Support for polymorphism. + @if type-of($property1) == 'list' { + // Passing a single array of properties. + $properties: $property1; + } @else { + // Passing multiple properties. + $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9; + } + + $props: false; + @each $item in $properties { + @if $item == null {} + @else { + @if prefixed($prefix, $item) { + $item: #{$prefix}-#{$item}; + } + @if $props { + $props: $props, $item; + } + @else { + $props: $item; + } + } + } + @return $props; +} + +@function -svg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + @return prefix('-svg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9); +} + +@function -owg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + @return prefix('-owg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9); +} + +@function -webkit($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + @return prefix('-webkit', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9); +} + +@function -moz($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + @return prefix('-moz', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9); +} + +@function -o($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + @return prefix('-o', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9); +} + +@function -pie($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + @return prefix('-pie', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9); +} diff --git a/src/supermarket/app/assets/compass/functions/_display.scss b/src/supermarket/app/assets/compass/functions/_display.scss new file mode 100755 index 000000000..eb096e41d --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_display.scss @@ -0,0 +1,36 @@ +// +// A partial implementation of the Ruby display functions from Compass: +// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/display.rb +// + +@function elements-of-type($type){ + @if ($type == block){ + @return address, article, aside, blockquote, center, dir, div, dd, details, dl, dt, fieldset, figcaption, figure, form, footer, frameset, h1, h2, h3, h4, h5, h6, hr, header, hgroup, isindex, main, menu, nav, noframes, noscript, ol, p, pre, section, summary, ul; + } @else if ($type == inline){ + @return a, abbr, acronym, audio, b, basefont, bdo, big, br, canvas, cite, code, command, datalist, dfn, em, embed, font, i, img, input, keygen, kbd, label, mark, meter, output, progress, q, rp, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, textarea, time, tt, u, var, video, wbr; + } @else if ($type == inline-block){ + @return img; + } @else if ($type == table){ + @return table; + } @else if ($type == list-item){ + @return li; + } @else if ($type == table-row-group){ + @return tbody; + } @else if ($type == table-header-group){ + @return thead; + } @else if ($type == table-footer-group){ + @return tfoot; + } @else if ($type == table-row){ + @return tr; + } @else if ($type == table-cell){ + @return th, td; + } @else if ($type == html5-block){ + @return article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary; + } @else if ($type == html5-inline){ + @return audio, canvas, command, datalist, embed, keygen, mark, meter, output, progress, rp, rt, ruby, time, video, wbr; + } @else if ($type == html5){ + @return article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, main, mark, menu, meter, nav, output, progress, rp, rt, ruby, section, summary, time, video, wbr; + } @else if ($type == text-input){ + @return input, textarea; + } +} diff --git a/src/supermarket/app/assets/compass/functions/_font_files.scss b/src/supermarket/app/assets/compass/functions/_font_files.scss new file mode 100644 index 000000000..1bb27a176 --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_font_files.scss @@ -0,0 +1,95 @@ +// +// A partial implementation of the Ruby fonts functions from Compass: +// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/font_files.rb +// +// and several functions from the file: +// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/urls.rb +// ----------------------------------------------------------------------------- +// Helper functions font-files and font-url for font-face mixins. +// ----------------------------------------------------------------------------- +// use mixin this way: +// +// $font-path: "/public/fonts/roboto"; +// @include font-face( +// 'Roboto', +// font_files("roboto.ttf", "truetype", "roboto.woff", "roboto.woff2"), // or +// font_files("roboto.ttf", "roboto.woff", "roboto.woff2"), +// "roboto.eot", // [$eot] +// normal, // [$weight] +// normal // [$style] +// ); +// ----------------------------------------------------------------------------- + + +@function font-url($path) { + $font-path: 'fonts' !default; + @return url("#{$font-path}/#{$path}"); +} + + +// ----------------------------------------------------------------------------- +// helper function to create a list of font files for the src attribute in @font-face. +// In the global variable $font-path, you can specify the path to the folder +// with fonts relative to style files, by default the path to the fonts is "fonts". +// +// Usage: font-files ('file-name-w-ext'[, 'format'][,'file-name-w-ext'[, 'format']]...). +// If the font format is not specified, the function will add the format corresponding to the file extension. +// +// for best results use this order: woff, opentype / truetype, svg. +// ----------------------------------------------------------------------------- +// function ported from Ruby. +// ----------------------------------------------------------------------------- +@function font-files($font-files...) { + $font-path: 'fonts' !default; + // types of font formats from module Compass::Core::SassExtensions::Functions::FontFiles. + $font-types: ( + 'woff': "woff", + 'woff2': "woff2", + 'opentype': "otf", + // 'opentype': "opentype", + 'truetype': "ttf", + // 'truetype': "truetype", + 'svg': "svg", + 'embedded-opentype': "eot" + ); + + $full: ''; + // if the font format is specified after the font file name, skip the next iteration. + $skip-next: false; + // number of font files including font format. + $font-file-length: length($font-files); + + @for $i from 1 through $font-file-length { + @if(not $skip-next) { + $font-file: nth($font-files, $i); + $font-file-next: if($i < $font-file-length, nth($font-files, $i + 1), false); + + // add font url. + $full: $full + 'url("#{$font-path}/#{$font-file}")'; + + // add the font format if it is specified after the font file name. + @if $font-file-next and map-has-key($font-types, $font-file-next) { + $full: $full + ' format("#{$font-file-next}")'; + $skip-next: true; + } @else { + // add a font format based on the font file name extension. + @each $type, $extension in $font-types { + $pos: str-index($font-file, '.' + $extension); + + @if($font-file-next == $extension) { + $full: $full + ' format("#{$type}")'; + $skip-next: true; + } @else if ($pos and (to-lower-case(str-slice($font-file, $pos + 1)) == $extension)) { + $full: $full + ' format("#{$type}")'; + } + } + } + } @else { + $skip-next: false; + } + + @if (not $skip-next and $i != $font-file-length) { $full: $full + ', ';} + } + + @return unquote($full); +} diff --git a/src/supermarket/app/assets/compass/functions/_gradient_support.scss b/src/supermarket/app/assets/compass/functions/_gradient_support.scss new file mode 100644 index 000000000..b2035b348 --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_gradient_support.scss @@ -0,0 +1,15 @@ +// +// A partial implementation of the Ruby gradient support functions from Compass: +// https://github.com/Compass/compass/blob/v0.12.2/lib/compass/sass_extensions/functions/gradient_support.rb +// + +@function color-stops($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) { + $items: $item2, $item3, $item4, $item5, $item6, $item7, $item8, $item9; + $full: $item1; + @each $item in $items { + @if $item != null { + $full: $full, $item; + } + } + @return $full; +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/functions/_lists.scss b/src/supermarket/app/assets/compass/functions/_lists.scss new file mode 100644 index 000000000..e24cc80e0 --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_lists.scss @@ -0,0 +1,90 @@ +// +// A partial implementation of the Ruby list functions from Compass: +// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/lists.rb +// + + +// compact is part of libsass + +@function -compass-nth($list, $place) { + // Yep, Sass-lists are 1-indexed. + @if $place == "first" { + $place: 1; + } + @if $place == "last" { + $place: length($list); + } + @return nth($list, $place); +} + +// compass_list can't be implemented in sass script + +@function -compass-space-list($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) { + $items: (); + // Support for polymorphism. + @if type-of($item1) == 'list' { + // Passing a single array of properties. + $items: $item1; + } @else { + $items: $item1 $item2 $item3 $item4 $item5 $item6 $item7 $item8 $item9; + } + + $full: first-value-of($items); + + @for $i from 2 through length($items) { + $item: nth($items, $i); + @if $item != null { + $full: $full $item; + } + } + + @return $full; +} + +@function -compass-list-size($list) { + @return length($list); +} + +@function -compass-slice($list, $start, $end: false) { + @if $end == false { + $end: length($list); + } + $full: nth($list, $start); + @for $i from $start + 1 through $end { + $full: $full, nth($list, $i); + } + @return $full; +} + +@function reject($list, $reject1, $reject2:null, $reject3:null, $reject4:null, $reject5:null, $reject6:null, $reject7:null, $reject8:null, $reject9:null) { + $rejects: $reject1, $reject2, $reject3, $reject4, $reject5, $reject6, $reject7, $reject8, $reject9; + + $full: false; + @each $item in $list { + @if index($rejects, $item) {} + @else { + @if $full { + $full: $full, $item; + } + @else { + $full: $item; + } + } + } + @return $full; +} + +@function first-value-of($list) { + @return nth($list, 1); +} + +@function compact($vars...) { + $separator: list-separator($vars); + $list: (); + @each $var in $vars { + @if $var { + $list: append($list, $var, $separator); + } + } + @return $list; +} diff --git a/src/supermarket/app/assets/compass/layout/_grid-background.scss b/src/supermarket/app/assets/compass/layout/_grid-background.scss new file mode 100644 index 000000000..4d3820c63 --- /dev/null +++ b/src/supermarket/app/assets/compass/layout/_grid-background.scss @@ -0,0 +1,178 @@ +@import "../css3/images"; +@import "../css3/background-size"; + +// Set the color of your columns +$grid-background-column-color : rgba(100, 100, 225, 0.25) !default; +// Set the color of your gutters +$grid-background-gutter-color : rgba(0, 0, 0, 0) !default; + +// Set the total number of columns in your grid +$grid-background-total-columns : 24 !default; +// Set the width of your columns +$grid-background-column-width : 30px !default; +// Set the width of your gutters +$grid-background-gutter-width : 10px !default; +// Set the offset, if your columns are padded in from the container edge +$grid-background-offset : 0px !default; + +// Set the color of your baseline +$grid-background-baseline-color : rgba(0, 0, 0, 0.5) !default; +// Set the height of your baseline grid +$grid-background-baseline-height : 1.5em !default; + +// toggle your columns grids on and off +$show-column-grid-backgrounds : true !default; +// toggle your vertical grids on and off +$show-baseline-grid-backgrounds : true !default; +// toggle all your grids on and off +$show-grid-backgrounds : true !default; + +// optionally force your grid-image to remain fluid +// no matter what units you used to declared your grid. +$grid-background-force-fluid : false !default; + + +// Create the gradient needed for baseline grids +@function get-baseline-gradient( + $color : $grid-background-baseline-color +) { + $gradient: linear-gradient(bottom, $color 5%, rgba($color,0) 5%); + @return $gradient; +} + +// Create the color-stops needed for horizontal grids +@function build-grid-background( + $total : $grid-background-total-columns, + $column : $grid-background-column-width, + $gutter : $grid-background-gutter-width, + $offset : $grid-background-offset, + $column-color : $grid-background-column-color, + $gutter-color : $grid-background-gutter-color +) { + $grid: compact(); + $grid: append($grid, $gutter-color $offset, comma); + @for $i from 0 to $total { + + // $a represents the start of this column, initially equal to the offset + $a: $offset; + @if $i > 0 { $a: $a + (($column + $gutter) * $i); } + + // $g represents the start of this gutter, equal to $a plus one column-width + $g: $a + $column; + + // $z represents the end of a gutter, equal to $g plus one gutter-width + $z: $g + $gutter; + + @if (unit($a) == "%") and ($i == ($total - 1)) { + $z: 100%; + } + + // and we add this column/gutter pair to our grid + $grid: join($grid, ($column-color $a, $column-color $g, $gutter-color $g, $gutter-color $z)); + } + + @return $grid; +} + +// Return the gradient needed for horizontal grids +@function get-column-gradient( + $total : $grid-background-total-columns, + $column : $grid-background-column-width, + $gutter : $grid-background-gutter-width, + $offset : $grid-background-offset, + $column-color : $grid-background-column-color, + $gutter-color : $grid-background-gutter-color, + $force-fluid : $grid-background-force-fluid +) { + $grid: unquote(""); + + // don't force fluid grids when they are already fluid. + @if unit($column) == "%" { $force-fluid: false; } + + @if $force-fluid { + $grid: get-column-fluid-grid($total,$column,$gutter,$offset,$column-color,$gutter-color); + } @else { + $grid: build-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color); + } + + // return the horizontal grid as a gradient + $gradient: linear-gradient(left, $grid); + @return $gradient; +} + +// Convert a grid from fixed units into percentages. +@function get-column-fluid-grid( + $total : $grid-background-total-columns, + $column : $grid-background-column-width, + $gutter : $grid-background-gutter-width, + $offset : $grid-background-offset, + $column-color : $grid-background-column-color, + $gutter-color : $grid-background-gutter-color +) { + $context: ($column * $total) + ($gutter * ($total - 1) + ($offset * 2)); + $offset: $offset / $context * 100%; + $column: $column / $context * 100%; + $gutter: $gutter / $context * 100%; + + // return the horizontal grid as a set of color-stops + $grid: build-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color); + @return $grid; +} + + +// Add just the baseline grid to an element's background +@mixin baseline-grid-background( + $baseline : $grid-background-baseline-height, + $color : $grid-background-baseline-color +) { + @if $show-grid-backgrounds and $show-baseline-grid-backgrounds { + @include background-image(get-baseline-gradient($color)); + @include background-size(100% $baseline); + background-position: left top; + } +} + +// Add just the horizontal grid to an element's background +@mixin column-grid-background( + $total : $grid-background-total-columns, + $column : $grid-background-column-width, + $gutter : $grid-background-gutter-width, + $offset : $grid-background-offset, + $column-color : $grid-background-column-color, + $gutter-color : $grid-background-gutter-color, + $force-fluid : $grid-background-force-fluid +) { + @if $show-grid-backgrounds and $show-column-grid-backgrounds { + @include background-image( + get-column-gradient($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid) + ); + background-position: left top; + } +} + +// Add both horizontal and baseline grids to an element's background +@mixin grid-background( + $total : $grid-background-total-columns, + $column : $grid-background-column-width, + $gutter : $grid-background-gutter-width, + $baseline : $grid-background-baseline-height, + $offset : $grid-background-offset, + $column-color : $grid-background-column-color, + $gutter-color : $grid-background-gutter-color, + $baseline-color : $grid-background-baseline-color, + $force-fluid : $grid-background-force-fluid +) { + @if $show-grid-backgrounds { + @if $show-baseline-grid-backgrounds and $show-column-grid-backgrounds { + @include background-image( + get-baseline-gradient($baseline-color), + get-column-gradient($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid) + ); + @include background-size(100% $baseline, auto); + background-position: left top; + } @else { + @include baseline-grid-background($baseline, $baseline-color); + @include column-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid); + } + } +} diff --git a/src/supermarket/app/assets/compass/layout/_sticky-footer.scss b/src/supermarket/app/assets/compass/layout/_sticky-footer.scss new file mode 100644 index 000000000..055f64163 --- /dev/null +++ b/src/supermarket/app/assets/compass/layout/_sticky-footer.scss @@ -0,0 +1,23 @@ +// Based on a [blog post by Ryan Fait](http://ryanfait.com/resources/footer-stick-to-bottom-of-page/). +// +// Must be mixed into the top level of your stylesheet. +// +// Footer element must be outside of root wrapper element. +// +// Footer must be a fixed height. + +@mixin sticky-footer($footer-height, $root-selector: unquote("#root"), $root-footer-selector: unquote("#root_footer"), $footer-selector: unquote("#footer")) { + html, body { + height: 100%; } + #{$root-selector} { + clear: both; + min-height: 100%; + height: auto !important; + height: 100%; + margin-bottom: -$footer-height; + #{$root-footer-selector} { + height: $footer-height; } } + #{$footer-selector} { + clear: both; + position: relative; + height: $footer-height; } } diff --git a/src/supermarket/app/assets/compass/layout/_stretching.scss b/src/supermarket/app/assets/compass/layout/_stretching.scss new file mode 100644 index 000000000..c123e3d15 --- /dev/null +++ b/src/supermarket/app/assets/compass/layout/_stretching.scss @@ -0,0 +1,24 @@ + +// stretch element height to specified top and bottom position + +@mixin stretch-y($offset-top:0, $offset-bottom:0) { + @include stretch($offset-top, false, $offset-bottom, false); +} + + +// stretch element width to specified left and right position + +@mixin stretch-x($offset-left:0, $offset-right:0) { + @include stretch(false, $offset-right, false, $offset-left); +} + + +// shorthand to stretch element height and width + +@mixin stretch($offset-top:0, $offset-right:0, $offset-bottom:0, $offset-left:0) { + position: absolute; + @if $offset-top { top: $offset-top; } + @if $offset-bottom { bottom: $offset-bottom; } + @if $offset-left { left: $offset-left; } + @if $offset-right { right: $offset-right; } +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/reset/_utilities-legacy.scss b/src/supermarket/app/assets/compass/reset/_utilities-legacy.scss new file mode 100644 index 000000000..8273ca339 --- /dev/null +++ b/src/supermarket/app/assets/compass/reset/_utilities-legacy.scss @@ -0,0 +1,135 @@ +// Based on [Eric Meyer's reset](http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/) +// Global reset rules. +// For more specific resets, use the reset mixins provided below +// +// *Please Note*: tables still need `cellspacing="0"` in the markup. +@mixin global-reset { + html, body, div, span, applet, object, iframe, + h1, h2, h3, h4, h5, h6, p, blockquote, pre, + a, abbr, acronym, address, big, cite, code, + del, dfn, em, font, img, ins, kbd, q, s, samp, + small, strike, strong, sub, sup, tt, var, + dl, dt, dd, ol, ul, li, + fieldset, form, label, legend, + table, caption, tbody, tfoot, thead, tr, th, td { + @include reset-box-model; + @include reset-font; } + body { + @include reset-body; } + ol, ul { + @include reset-list-style; } + table { + @include reset-table; } + caption, th, td { + @include reset-table-cell; } + q, blockquote { + @include reset-quotation; } + a img { + @include reset-image-anchor-border; } } + +// Reset all elements within some selector scope. To reset the selector itself, +// mixin the appropriate reset mixin for that element type as well. This could be +// useful if you want to style a part of your page in a dramatically different way. +// +// *Please Note*: tables still need `cellspacing="0"` in the markup. +@mixin nested-reset { + div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, + pre, a, abbr, acronym, address, code, del, dfn, em, img, + dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr { + @include reset-box-model; + @include reset-font; } + table { + @include reset-table; } + caption, th, td { + @include reset-table-cell; } + q, blockquote { + @include reset-quotation; } + a img { + @include reset-image-anchor-border; } } + +// Reset the box model measurements. +@mixin reset-box-model { + margin: 0; + padding: 0; + border: 0; + outline: 0; } + +// Reset the font and vertical alignment. +@mixin reset-font { + font: { + weight: inherit; + style: inherit; + size: 100%; + family: inherit; }; + vertical-align: baseline; } + +// Resets the outline when focus. +// For accessibility you need to apply some styling in its place. +@mixin reset-focus { + outline: 0; } + +// Reset a body element. +@mixin reset-body { + line-height: 1; + color: black; + background: white; } + +// Reset the list style of an element. +@mixin reset-list-style { + list-style: none; } + +// Reset a table +@mixin reset-table { + border-collapse: separate; + border-spacing: 0; + vertical-align: middle; } + +// Reset a table cell (`th`, `td`) +@mixin reset-table-cell { + text-align: left; + font-weight: normal; + vertical-align: middle; } + +// Reset a quotation (`q`, `blockquote`) +@mixin reset-quotation { + quotes: "" ""; + &:before, &:after { + content: ""; } } + +// Resets the border. +@mixin reset-image-anchor-border { + border: none; } + +// Unrecognized elements are displayed inline. +// This reset provides a basic reset for html5 elements +// so they are rendered correctly in browsers that don't recognize them +// and reset in browsers that have default styles for them. +@mixin reset-html5 { + #{elements-of-type(html5-block)} { + @include reset-box-model; + display: block; } } + +// Resets the display of inline and block elements to their default display +// according to their tag type. Elements that have a default display that varies across +// versions of html or browser are not handled here, but this covers the 90% use case. +// Usage Example: +// +// // Turn off the display for both of these classes +// .unregistered-only, .registered-only +// display: none +// // Now turn only one of them back on depending on some other context. +// body.registered +// +reset-display(".registered-only") +// body.unregistered +// +reset-display(".unregistered-only") +@mixin reset-display($selector: "", $important: false) { + #{append-selector(elements-of-type("inline"), $selector)} { + @if $important { + display: inline !important; } + @else { + display: inline; } } + #{append-selector(elements-of-type("block"), $selector)} { + @if $important { + display: block !important; } + @else { + display: block; } } } diff --git a/src/supermarket/app/assets/compass/reset/_utilities.scss b/src/supermarket/app/assets/compass/reset/_utilities.scss new file mode 100644 index 000000000..d173f3e57 --- /dev/null +++ b/src/supermarket/app/assets/compass/reset/_utilities.scss @@ -0,0 +1,142 @@ +// Based on [Eric Meyer's reset 2.0](http://meyerweb.com/eric/tools/css/reset/index.html) +// Global reset rules. +// For more specific resets, use the reset mixins provided below +@mixin global-reset { + html, body, div, span, applet, object, iframe, + h1, h2, h3, h4, h5, h6, p, blockquote, pre, + a, abbr, acronym, address, big, cite, code, + del, dfn, em, img, ins, kbd, q, s, samp, + small, strike, strong, sub, sup, tt, var, + b, u, i, center, + dl, dt, dd, ol, ul, li, + fieldset, form, label, legend, + table, caption, tbody, tfoot, thead, tr, th, td, + article, aside, canvas, details, embed, + figure, figcaption, footer, header, hgroup, + menu, nav, output, ruby, section, summary, + time, mark, audio, video { + @include reset-box-model; + @include reset-font; } + // Unlike Eric's original reset, we reset the html element to be compatible + // with the vertical rhythm mixins. + html { + @include reset-body; } + ol, ul { + @include reset-list-style; } + table { + @include reset-table; } + caption, th, td { + @include reset-table-cell; } + q, blockquote { + @include reset-quotation; } + a img { + @include reset-image-anchor-border; } + @include reset-html5; } + +// Reset all elements within some selector scope. To reset the selector itself, +// mixin the appropriate reset mixin for that element type as well. This could be +// useful if you want to style a part of your page in a dramatically different way. +@mixin nested-reset { + div, span, applet, object, iframe, + h1, h2, h3, h4, h5, h6, p, blockquote, pre, + a, abbr, acronym, address, big, cite, code, + del, dfn, em, img, ins, kbd, q, s, samp, + small, strike, strong, sub, sup, tt, var, + b, u, i, center, + dl, dt, dd, ol, ul, li, + fieldset, form, label, legend, + table, caption, tbody, tfoot, thead, tr, th, td, + article, aside, canvas, details, embed, + figure, figcaption, footer, header, hgroup, + menu, nav, output, ruby, section, summary, + time, mark, audio, video { + @include reset-box-model; + @include reset-font; } + table { + @include reset-table; } + caption, th, td { + @include reset-table-cell; } + q, blockquote { + @include reset-quotation; } + a img { + @include reset-image-anchor-border; } } + +// Reset the box model measurements. +@mixin reset-box-model { + margin: 0; + padding: 0; + border: 0; } + +// Reset the font and vertical alignment. +@mixin reset-font { + font: inherit; + font-size: 100%; + vertical-align: baseline; } + +// Resets the outline when focus. +// For accessibility you need to apply some styling in its place. +@mixin reset-focus { + outline: 0; } + +// Reset a body element. +@mixin reset-body { + line-height: 1; } + +// Reset the list style of an element. +@mixin reset-list-style { + list-style: none; } + +// Reset a table +@mixin reset-table { + border-collapse: collapse; + border-spacing: 0; } + +// Reset a table cell (`th`, `td`) +@mixin reset-table-cell { + text-align: left; + font-weight: normal; + vertical-align: middle; } + +// Reset a quotation (`q`, `blockquote`) +@mixin reset-quotation { + quotes: none; + &:before, &:after { + content: ""; + content: none; } } + +// Resets the border. +@mixin reset-image-anchor-border { + border: none; } + +// Unrecognized elements are displayed inline. +// This reset provides a basic reset for block html5 elements +// so they are rendered correctly in browsers that don't recognize them +// and reset in browsers that have default styles for them. +@mixin reset-html5 { + #{elements-of-type(html5-block)} { + display: block; } } + +// Resets the display of inline and block elements to their default display +// according to their tag type. Elements that have a default display that varies across +// versions of html or browser are not handled here, but this covers the 90% use case. +// Usage Example: +// +// // Turn off the display for both of these classes +// .unregistered-only, .registered-only +// display: none +// // Now turn only one of them back on depending on some other context. +// body.registered +// +reset-display(".registered-only") +// body.unregistered +// +reset-display(".unregistered-only") +@mixin reset-display($selector: "", $important: false) { + #{append-selector(elements-of-type("inline"), $selector)} { + @if $important { + display: inline !important; } + @else { + display: inline; } } + #{append-selector(elements-of-type("block"), $selector)} { + @if $important { + display: block !important; } + @else { + display: block; } } } diff --git a/src/supermarket/app/assets/compass/typography/_links.scss b/src/supermarket/app/assets/compass/typography/_links.scss new file mode 100644 index 000000000..735000e01 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/_links.scss @@ -0,0 +1,3 @@ +@import "links/hover-link"; +@import "links/link-colors"; +@import "links/unstyled-link"; diff --git a/src/supermarket/app/assets/compass/typography/_lists.scss b/src/supermarket/app/assets/compass/typography/_lists.scss new file mode 100644 index 000000000..3365f30a1 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/_lists.scss @@ -0,0 +1,4 @@ +@import "lists/horizontal-list"; +@import "lists/inline-list"; +@import "lists/inline-block-list"; +@import "lists/bullets"; diff --git a/src/supermarket/app/assets/compass/typography/_text.scss b/src/supermarket/app/assets/compass/typography/_text.scss new file mode 100644 index 000000000..885f729da --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/_text.scss @@ -0,0 +1,4 @@ +@import "text/ellipsis"; +@import "text/nowrap"; +@import "text/replacement"; +@import "text/force-wrap"; diff --git a/src/supermarket/app/assets/compass/typography/_vertical_rhythm.scss b/src/supermarket/app/assets/compass/typography/_vertical_rhythm.scss new file mode 100644 index 000000000..14efa82de --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/_vertical_rhythm.scss @@ -0,0 +1,229 @@ +@import "../layout/grid-background"; + +// The base font size. +$base-font-size: 16px !default; + +// The base line height determines the basic unit of vertical rhythm. +$base-line-height: 24px !default; + +// Set the default border style for rhythm borders. +$default-rhythm-border-style: solid !default; + +// The default font size in all browsers. +$browser-default-font-size: 16px; + +// Set to false if you want to use absolute pixels in sizing your typography. +$relative-font-sizing: true !default; + +// Allows the `adjust-font-size-to` mixin and the `lines-for-font-size` function +// to round the line height to the nearest half line height instead of the +// nearest integral line height to avoid large spacing between lines. +$round-to-nearest-half-line: false !default; + +// Ensure there is at least this many pixels +// of vertical padding above and below the text. +$min-line-padding: 2px !default; + +// $base-font-size but in your output unit of choice. +// Defaults to 1em when `$relative-font-sizing` is true. +$font-unit: if($relative-font-sizing, 1em, $base-font-size) !default; + +// The basic unit of font rhythm. +$base-rhythm-unit: $base-line-height / $base-font-size * $font-unit; + +// The leader is the amount of whitespace in a line. +// It might be useful in your calculations. +$base-leader: ($base-line-height - $base-font-size) * $font-unit / $base-font-size; + +// The half-leader is the amount of whitespace above and below a line. +// It might be useful in your calculations. +$base-half-leader: $base-leader / 2; + +// True if a number has a relative unit. +@function relative-unit($number) { + @return unit($number) == "%" or unit($number) == "em" or unit($number) == "rem" +} + +// True if a number has an absolute unit. +@function absolute-unit($number) { + @return not(relative-unit($number) or unitless($number)); +} + +@if $relative-font-sizing and not(relative-unit($font-unit)) { + @warn "$relative-font-sizing is true but $font-unit is set to #{$font-unit} which is not a relative unit."; +} + +// Establishes a font baseline for the given font-size. +@mixin establish-baseline($font-size: $base-font-size) { + // IE 6 refuses to resize fonts set in pixels and it weirdly resizes fonts + // whose root is set in ems. So we set the root font size in percentages of + // the default font size. + * html { + font-size: 100% * ($font-size / $browser-default-font-size); + } + html { + font-size: $font-size; + @include adjust-leading-to(1, if($relative-font-sizing, $font-size, $base-font-size)); + } +} + +// Resets the line-height to 1 vertical rhythm unit. +// Does not work on elements whose font-size is different from $base-font-size. +// +// @deprecated This mixin will be removed in the next release. +// Please use the `adjust-leading-to` mixin instead. +@mixin reset-baseline { + @include adjust-leading-to(1, if($relative-font-sizing, $base-font-size, $base-font-size)); +} + +// Show a background image that can be used to debug your alignments. +// Include the $img argument if you would rather use your own image than the +// Compass default gradient image. +@mixin debug-vertical-alignment($img: false) { + @if $img { + background: image-url($img); + } @else { + @include baseline-grid-background($base-rhythm-unit); + } +} + +// Adjust a block to have a different font size and line height to maintain the +// rhythm. $lines specifies how many multiples of the baseline rhythm each line +// of this font should use up. It does not have to be an integer, but it +// defaults to the smallest integer that is large enough to fit the font. +// Use $from-size to adjust from a font-size other than the base font-size. +@mixin adjust-font-size-to($to-size, $lines: lines-for-font-size($to-size), $from-size: $base-font-size) { + @if not($relative-font-sizing) and $from-size != $base-font-size { + @warn "$relative-font-sizing is false but a relative font size was passed to adjust-font-size-to"; + } + font-size: $font-unit * $to-size / $from-size; + @include adjust-leading-to($lines, if($relative-font-sizing, $to-size, $base-font-size)); +} + +// Adjust a block to have different line height to maintain the rhythm. +// $lines specifies how many multiples of the baseline rhythm each line of this +// font should use up. It does not have to be an integer, but it defaults to the +// smallest integer that is large enough to fit the font. +@mixin adjust-leading-to($lines, $font-size: $base-font-size) { + line-height: rhythm($lines, $font-size); +} + +// Calculate rhythm units. +@function rhythm( + $lines: 1, + $font-size: $base-font-size, + $offset: 0 +) { + @if not($relative-font-sizing) and $font-size != $base-font-size { + @warn "$relative-font-sizing is false but a relative font size was passed to the rhythm function"; + } + $rhythm: $font-unit * ($lines * $base-line-height - $offset) / $font-size; + // Round the pixels down to nearest integer. + @if unit($rhythm) == px { + $rhythm: floor($rhythm); + } + @return $rhythm; +} + +// Calculate the minimum multiple of rhythm units needed to contain the font-size. +@function lines-for-font-size($font-size) { + $lines: if($round-to-nearest-half-line, + ceil(2 * $font-size / $base-line-height) / 2, + ceil($font-size / $base-line-height)); + @if $lines * $base-line-height - $font-size < $min-line-padding * 2 { + $lines: $lines + if($round-to-nearest-half-line, 0.5, 1); + } + @return $lines; +} + +// Apply leading whitespace. The $property can be margin or padding. +@mixin leader($lines: 1, $font-size: $base-font-size, $property: margin) { + #{$property}-top: rhythm($lines, $font-size); +} + +// Apply leading whitespace as padding. +@mixin padding-leader($lines: 1, $font-size: $base-font-size) { + padding-top: rhythm($lines, $font-size); +} + +// Apply leading whitespace as margin. +@mixin margin-leader($lines: 1, $font-size: $base-font-size) { + margin-top: rhythm($lines, $font-size); +} + +// Apply trailing whitespace. The $property can be margin or padding. +@mixin trailer($lines: 1, $font-size: $base-font-size, $property: margin) { + #{$property}-bottom: rhythm($lines, $font-size); +} + +// Apply trailing whitespace as padding. +@mixin padding-trailer($lines: 1, $font-size: $base-font-size) { + padding-bottom: rhythm($lines, $font-size); +} + +// Apply trailing whitespace as margin. +@mixin margin-trailer($lines: 1, $font-size: $base-font-size) { + margin-bottom: rhythm($lines, $font-size); +} + +// Shorthand mixin to apply whitespace for top and bottom margins and padding. +@mixin rhythm($leader: 0, $padding-leader: 0, $padding-trailer: 0, $trailer: 0, $font-size: $base-font-size) { + @include leader($leader, $font-size); + @include padding-leader($padding-leader, $font-size); + @include padding-trailer($padding-trailer, $font-size); + @include trailer($trailer, $font-size); +} + +// Apply a border and whitespace to any side without destroying the vertical +// rhythm. The whitespace must be greater than the width of the border. +@mixin apply-side-rhythm-border($side, $width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { + @if not($relative-font-sizing) and $font-size != $base-font-size { + @warn "$relative-font-sizing is false but a relative font size was passed to apply-side-rhythm-border"; + } + border-#{$side}-style: $border-style; + border-#{$side}-width: $font-unit * $width / $font-size; + padding-#{$side}: rhythm($lines, $font-size, $offset: $width); +} + +// Apply borders and whitespace equally to all sides. +@mixin rhythm-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { + @if not($relative-font-sizing) and $font-size != $base-font-size { + @warn "$relative-font-sizing is false but a relative font size was passed to rhythm-borders"; + } + border: { + style: $border-style; + width: $font-unit * $width / $font-size; + }; + padding: rhythm($lines, $font-size, $offset: $width); +} + +// Apply a leading border. +@mixin leading-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { + @include apply-side-rhythm-border(top, $width, $lines, $font-size, $border-style); +} + +// Apply a trailing border. +@mixin trailing-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { + @include apply-side-rhythm-border(bottom, $width, $lines, $font-size, $border-style); +} + +// Apply both leading and trailing borders. +@mixin horizontal-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { + @include leading-border($width, $lines, $font-size, $border-style); + @include trailing-border($width, $lines, $font-size, $border-style); +} + +// Alias for `horizontal-borders` mixin. +@mixin h-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { + @include horizontal-borders($width, $lines, $font-size, $border-style); +} + +// Shorthand mixin to apply whitespace for top and bottom margins. +@mixin rhythm-margins( + $leader: 1, + $trailer: $leader, + $font-size: $base-font-size +) { + @include leader($leader, $font-size); + @include trailer($trailer, $font-size); +} diff --git a/src/supermarket/app/assets/compass/typography/links/_hover-link.scss b/src/supermarket/app/assets/compass/typography/links/_hover-link.scss new file mode 100644 index 000000000..8c72bc1fd --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/links/_hover-link.scss @@ -0,0 +1,5 @@ +// a link that only has an underline when you hover over it +@mixin hover-link { + text-decoration: none; + &:hover { + text-decoration: underline; } } diff --git a/src/supermarket/app/assets/compass/typography/links/_link-colors.scss b/src/supermarket/app/assets/compass/typography/links/_link-colors.scss new file mode 100644 index 000000000..5d641f781 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/links/_link-colors.scss @@ -0,0 +1,28 @@ +// Set all the colors for a link with one mixin call. +// Order of arguments is: +// +// 1. normal +// 2. hover +// 3. active +// 4. visited +// 5. focus +// +// Those states not specified will inherit. +// Mixin to an anchor link like so: +// a +// +link-colors(#00c, #0cc, #c0c, #ccc, #cc0) + +@mixin link-colors($normal, $hover: false, $active: false, $visited: false, $focus: false) { + color: $normal; + @if $visited { + &:visited { + color: $visited; } } + @if $focus { + &:focus { + color: $focus; } } + @if $hover { + &:hover { + color: $hover; } } + @if $active { + &:active { + color: $active; } } } diff --git a/src/supermarket/app/assets/compass/typography/links/_unstyled-link.scss b/src/supermarket/app/assets/compass/typography/links/_unstyled-link.scss new file mode 100644 index 000000000..e39c2d678 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/links/_unstyled-link.scss @@ -0,0 +1,7 @@ +// A link that looks and acts like the text it is contained within +@mixin unstyled-link { + color: inherit; + text-decoration: inherit; + cursor: inherit; + &:active, &:focus { + outline: none; } } diff --git a/src/supermarket/app/assets/compass/typography/lists/_bullets.scss b/src/supermarket/app/assets/compass/typography/lists/_bullets.scss new file mode 100644 index 000000000..958eefc04 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/lists/_bullets.scss @@ -0,0 +1,34 @@ +// Turn off the bullet for an element of a list +@mixin no-bullet { + list-style-image : none; + list-style-type : none; + margin-left : 0; +} + +// turns off the bullets for an entire list +@mixin no-bullets { + list-style: none; + li { @include no-bullet; } +} + +// Make a list(ul/ol) have an image bullet. +// +// The mixin should be used like this for an icon that is 5x7: +// +// ul.pretty +// +pretty-bullets("my-icon.png", 5px, 7px) +// +// Additionally, if the image dimensions are not provided, +// The image dimensions will be extracted from the image itself. +// +// ul.pretty +// +pretty-bullets("my-icon.png") +// +@mixin pretty-bullets($bullet-icon, $width: image-width($bullet-icon), $height: image-height($bullet-icon), $line-height: 18px, $padding: 14px) { + margin-left: 0; + li { + padding-left: $padding; + background: image-url($bullet-icon) no-repeat ($padding - $width) / 2 ($line-height - $height) / 2; + list-style-type: none; + } +} diff --git a/src/supermarket/app/assets/compass/typography/lists/_horizontal-list.scss b/src/supermarket/app/assets/compass/typography/lists/_horizontal-list.scss new file mode 100644 index 000000000..b66e4c040 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/lists/_horizontal-list.scss @@ -0,0 +1,61 @@ +// Horizontal list layout module. +// +// Easy mode using simple descendant li selectors: +// +// ul.nav +// +horizontal-list +// +// Advanced mode: +// If you need to target the list items using a different selector then use +// +horizontal-list-container on your ul/ol and +horizontal-list-item on your li. +// This may help when working on layouts involving nested lists. For example: +// +// ul.nav +// +horizontal-list-container +// > li +// +horizontal-list-item + +@import "bullets"; +@import "../../utilities/general/clearfix"; +@import "../../utilities/general/reset"; +@import "../../utilities/general/float"; + +// Can be mixed into any selector that target a ul or ol that is meant +// to have a horizontal layout. Used to implement +horizontal-list. +@mixin horizontal-list-container { + @include reset-box-model; + @include clearfix; } + +// Can be mixed into any li selector that is meant to participate in a horizontal layout. +// Used to implement +horizontal-list. +// +// :last-child is not fully supported +// see http://www.quirksmode.org/css/contents.html#t29 for the support matrix +// +// IE8 ignores rules that are included on the same line as :last-child +// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details +// +// Setting `$padding` to `false` disables the padding between list elements +@mixin horizontal-list-item($padding: 4px, $direction: left) { + @include no-bullet; + white-space: nowrap; + @include float($direction); + @if $padding { + padding: { + left: $padding; + right: $padding; + } + &:first-child, &.first { padding-#{$direction}: 0; } + &:last-child { padding-#{opposite-position($direction)}: 0; } + &.last { padding-#{opposite-position($direction)}: 0; } + } +} + +// A list(ol,ul) that is layed out such that the elements are floated left and won't wrap. +// This is not an inline list. +// +// Setting `$padding` to `false` disables the padding between list elements +@mixin horizontal-list($padding: 4px, $direction: left) { + @include horizontal-list-container; + li { + @include horizontal-list-item($padding, $direction); } } diff --git a/src/supermarket/app/assets/compass/typography/lists/_inline-block-list.scss b/src/supermarket/app/assets/compass/typography/lists/_inline-block-list.scss new file mode 100644 index 000000000..ea031dcdc --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/lists/_inline-block-list.scss @@ -0,0 +1,50 @@ +// Inline-Block list layout module. +// +// Easy mode using simple descendant li selectors: +// +// ul.nav { +// @import inline-block-list; +// } +// +// Advanced mode: +// If you need to target the list items using a different selector then use +// `@include inline-block-list-container` on your ul/ol and +// `@include inline-block-list-item` on your li. This may help when working +// on layouts involving nested lists. For example: +// +// ul.nav { +// @include inline-block-list-container; +// > li { +// @include inline-block-list-item; +// } +// } + +@import "bullets"; +@import "horizontal-list"; +@import "../../utilities/general/float"; +@import "../../css3/inline-block"; + +// Can be mixed into any selector that target a ul or ol that is meant +// to have an inline-block layout. Used to implement `inline-block-list`. +@mixin inline-block-list-container { + @include horizontal-list-container; } + +// Can be mixed into any li selector that is meant to participate in a horizontal layout. +// Used to implement `inline-block-list`. +@mixin inline-block-list-item($padding: false) { + @include no-bullet; + @include inline-block; + white-space: nowrap; + @if $padding { + padding: { + left: $padding; + right: $padding; + }; + } +} + +// A list(ol,ul) that is layed out such that the elements are inline-block and won't wrap. +@mixin inline-block-list($padding: false) { + @include inline-block-list-container; + li { + @include inline-block-list-item($padding); } } diff --git a/src/supermarket/app/assets/compass/typography/lists/_inline-list.scss b/src/supermarket/app/assets/compass/typography/lists/_inline-list.scss new file mode 100644 index 000000000..caff6fd67 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/lists/_inline-list.scss @@ -0,0 +1,44 @@ +// makes a list inline. + +@mixin inline-list { + list-style-type: none; + &, & li { + margin: 0px; + padding: 0px; + display: inline; + } +} + +// makes an inline list delimited with the passed string. +// Defaults to making a comma-separated list. +// +// Please make note of the browser support issues before using this mixin: +// +// use of `content` and `:after` is not fully supported in all browsers. +// See quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t15) +// +// `:last-child` is not fully supported. +// see quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t29). +// +// IE8 ignores rules that are included on the same line as :last-child +// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details + +@mixin delimited-list($separator: ", ") { + @include inline-list; + li { + &:after { content: $separator; } + &:last-child { + &:after { content: ""; } + } + &.last { + &:after { content: ""; } + } + } +} + +// See [delimited-list](#mixin-delimited-list) +// @deprecated +@mixin comma-delimited-list { + @warn "comma-delimited-list is deprecated. Please use delimited-list instead."; + @include delimited-list; +} diff --git a/src/supermarket/app/assets/compass/typography/text/_ellipsis.scss b/src/supermarket/app/assets/compass/typography/text/_ellipsis.scss new file mode 100644 index 000000000..04de9551a --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/text/_ellipsis.scss @@ -0,0 +1,25 @@ +@import "../../css3/shared"; + +// To get full firefox support, you must install the ellipsis pattern: +// +// compass install compass/ellipsis +$use-mozilla-ellipsis-binding: false !default; + +// This technique, by [Justin Maxwell](http://code404.com/), was originally +// published [here](http://mattsnider.com/css/css-string-truncation-with-ellipsis/). +// Firefox implementation by [Rikkert Koppes](http://www.rikkertkoppes.com/thoughts/2008/6/). +@mixin ellipsis($no-wrap: true) { + @if $no-wrap { white-space: nowrap; } + overflow: hidden; + @include experimental(text-overflow, ellipsis, + not(-moz), + not(-webkit), + -o, + -ms, + not(-khtml), + official + ); + @if $experimental-support-for-mozilla and $use-mozilla-ellipsis-binding { + -moz-binding: stylesheet-url(unquote("xml/ellipsis.xml#ellipsis")); + } +} diff --git a/src/supermarket/app/assets/compass/typography/text/_force-wrap.scss b/src/supermarket/app/assets/compass/typography/text/_force-wrap.scss new file mode 100644 index 000000000..8a14e8f46 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/text/_force-wrap.scss @@ -0,0 +1,12 @@ +// Prevent long urls and text from breaking layouts +// [originally from perishablepress.com](http://perishablepress.com/press/2010/06/01/wrapping-content/) +@mixin force-wrap { + white-space: pre; // CSS 2.0 + white-space: pre-wrap; // CSS 2.1 + white-space: pre-line; // CSS 3.0 + white-space: -pre-wrap; // Opera 4-6 + white-space: -o-pre-wrap; // Opera 7 + white-space: -moz-pre-wrap; // Mozilla + white-space: -hp-pre-wrap; // HP Printers + word-wrap: break-word; // IE 5+ +} diff --git a/src/supermarket/app/assets/compass/typography/text/_nowrap.scss b/src/supermarket/app/assets/compass/typography/text/_nowrap.scss new file mode 100644 index 000000000..1613dd671 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/text/_nowrap.scss @@ -0,0 +1,2 @@ +// When remembering whether or not there's a hyphen in white-space is too hard +@mixin nowrap { white-space: nowrap; } diff --git a/src/supermarket/app/assets/compass/typography/text/_replacement.scss b/src/supermarket/app/assets/compass/typography/text/_replacement.scss new file mode 100644 index 000000000..bb0e6d521 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/text/_replacement.scss @@ -0,0 +1,68 @@ +// Indicates the direction you prefer to move your text +// when hiding it. +// +// `left` is more robust, especially in older browsers. +// `right` seems have better runtime performance. +$hide-text-direction: left !default; + +// Hides html text and replaces it with an image. +// If you use this on an inline element, you will need to change the display to block or inline-block. +// Also, if the size of the image differs significantly from the font size, you'll need to set the width and/or height. +// +// Parameters: +// +// * `img` -- the relative path from the project image directory to the image, or a url literal. +// * `x` -- the x position of the background image. +// * `y` -- the y position of the background image. +@mixin replace-text($img, $x: 50%, $y: 50%) { + @include hide-text; + background: { + @if is-url($img) { + image: url($img); + } @else { + image: image-url($img); + } + repeat: no-repeat; + position: $x $y; + }; +} + +// Like the `replace-text` mixin, but also sets the width +// and height of the element according the dimensions of the image. +// +// If you set `$inline` to true, then an inline image (data uri) will be used. +@mixin replace-text-with-dimensions($img, $x: 50%, $y: 50%, $inline: false) { + @include replace-text(if($inline, inline-image($img), $img), $x, $y); + width: image-width($img); + height: image-height($img); +} + +// Hides text in an element so you can see the background. +// +// The direction indicates how the text should be moved out of view. +// +// See `$hide-text-direction` for more information and to set this globally +// for your application. +@mixin hide-text($direction: $hide-text-direction) { + @if $direction == left { + $approximate-em-value: 12px; + $wider-than-any-screen: -9999; + text-indent: $wider-than-any-screen * $approximate-em-value; + overflow: hidden; + text-align: left; + } @else { + // slightly wider than the box prevents issues with inline-block elements + text-indent: 110%; + white-space: nowrap; + overflow: hidden; + } +} + +// Hides text in an element by squishing the text into oblivion. +// Use this if you need to hide text contained in an inline element +// but still have it read by a screen reader. +@mixin squish-text { + font: 0/0 serif; + text-shadow: none; + color: transparent; +} diff --git a/src/supermarket/app/assets/compass/utilities/_color.scss b/src/supermarket/app/assets/compass/utilities/_color.scss new file mode 100644 index 000000000..0cc7fd163 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_color.scss @@ -0,0 +1 @@ +@import "color/contrast"; \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/utilities/_general.scss b/src/supermarket/app/assets/compass/utilities/_general.scss new file mode 100644 index 000000000..047e6368d --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_general.scss @@ -0,0 +1,6 @@ +@import "general/reset"; +@import "general/clearfix"; +@import "general/float"; +@import "general/tag-cloud"; +@import "general/hacks"; +@import "general/min"; diff --git a/src/supermarket/app/assets/compass/utilities/_links.scss b/src/supermarket/app/assets/compass/utilities/_links.scss new file mode 100644 index 000000000..e0e32512c --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_links.scss @@ -0,0 +1,5 @@ +@warn "This import is deprecated. Use 'compass/typography/links' instead."; + +@import "../typography/links/hover-link"; +@import "../typography/links/link-colors"; +@import "../typography/links/unstyled-link"; diff --git a/src/supermarket/app/assets/compass/utilities/_lists.scss b/src/supermarket/app/assets/compass/utilities/_lists.scss new file mode 100644 index 000000000..4833ee1ec --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_lists.scss @@ -0,0 +1,6 @@ +@warn "This import is deprecated. Use 'compass/typography/lists' instead."; + +@import "../typography/lists/horizontal-list"; +@import "../typography/lists/inline-list"; +@import "../typography/lists/inline-block-list"; +@import "../typography/lists/bullets"; diff --git a/src/supermarket/app/assets/compass/utilities/_print.scss b/src/supermarket/app/assets/compass/utilities/_print.scss new file mode 100644 index 000000000..4771e080a --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_print.scss @@ -0,0 +1,17 @@ +// Classes that are useful for controlling what gets printed. +// You must mix `+print-utilities` into your print stylesheet +// and `+print-utilities(screen)` into your screen stylesheet. +// Note: these aren't semantic. +@mixin print-utilities($media: print) { + @if $media == print { + .noprint, .no-print { display: none; } + #{elements-of-type(block)} { + &.print-only { display: block; } + } + #{elements-of-type(inline)} { + &.print-only { display: inline; } + } + } @else { + .print-only { display: none; } + } +} diff --git a/src/supermarket/app/assets/compass/utilities/_sprites.scss b/src/supermarket/app/assets/compass/utilities/_sprites.scss new file mode 100644 index 000000000..006680487 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_sprites.scss @@ -0,0 +1,2 @@ +@import "sprites/base"; +@import "sprites/sprite-img"; diff --git a/src/supermarket/app/assets/compass/utilities/_tables.scss b/src/supermarket/app/assets/compass/utilities/_tables.scss new file mode 100644 index 000000000..4af1d51b3 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_tables.scss @@ -0,0 +1,3 @@ +@import "tables/alternating-rows-and-columns"; +@import "tables/borders"; +@import "tables/scaffolding"; diff --git a/src/supermarket/app/assets/compass/utilities/_text.scss b/src/supermarket/app/assets/compass/utilities/_text.scss new file mode 100644 index 000000000..bb73c25d0 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_text.scss @@ -0,0 +1,5 @@ +@warn "This import is deprecated. Use 'compass/typography/text' instead."; + +@import "../typography/text/ellipsis"; +@import "../typography/text/nowrap"; +@import "../typography/text/replacement"; diff --git a/src/supermarket/app/assets/compass/utilities/color/_contrast.scss b/src/supermarket/app/assets/compass/utilities/color/_contrast.scss new file mode 100644 index 000000000..fc73905e1 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/color/_contrast.scss @@ -0,0 +1,28 @@ +$contrasted-dark-default: #000 !default; +$contrasted-light-default: #fff !default; +$contrasted-lightness-threshold: 30% !default; + +// Returns the `$light` color when the `$color` is dark +// and the `$dark` color when the `$color` is light. +// The `$threshold` is a percent between `0%` and `100%` and it determines +// when the lightness of `$color` changes from "dark" to "light". +@function contrast-color( + $color, + $dark: $contrasted-dark-default, + $light: $contrasted-light-default, + $threshold: $contrasted-lightness-threshold +) { + @return if(lightness($color) < $threshold, $light, $dark) +} + +// Sets the specified background color and calculates a dark or light contrasted text color. +// The arguments are passed through to the [contrast-color function](#function-contrast-color). +@mixin contrasted( + $background-color, + $dark: $contrasted-dark-default, + $light: $contrasted-light-default, + $threshold: $contrasted-lightness-threshold +) { + background-color: $background-color; + color: contrast-color($background-color, $dark, $light, $threshold); +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/utilities/general/_clearfix.scss b/src/supermarket/app/assets/compass/utilities/general/_clearfix.scss new file mode 100644 index 000000000..73f9254c0 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_clearfix.scss @@ -0,0 +1,44 @@ +// @doc off +// Extends the bottom of the element to enclose any floats it contains. +// @doc on + +@import "hacks"; + +// This basic method is preferred for the usual case, when positioned +// content will not show outside the bounds of the container. +// +// Recommendations include using this in conjunction with a width. +// Credit: [quirksmode.org](http://www.quirksmode.org/blog/archives/2005/03/clearing_floats.html) +@mixin clearfix { + overflow: hidden; + @include has-layout; +} + +// This older method from Position Is Everything called +// [Easy Clearing](http://www.positioniseverything.net/easyclearing.html) +// has the advantage of allowing positioned elements to hang +// outside the bounds of the container at the expense of more tricky CSS. +@mixin legacy-pie-clearfix { + &:after { + content : "\0020"; + display : block; + height : 0; + clear : both; + overflow : hidden; + visibility : hidden; + } + @include has-layout; +} + +// This is an updated version of the PIE clearfix method that reduces the amount of CSS output. +// If you need to support Firefox before 3.5 you need to use `legacy-pie-clearfix` instead. +// +// Adapted from: [A new micro clearfix hack](http://nicolasgallagher.com/micro-clearfix-hack/) +@mixin pie-clearfix { + &:after { + content: ""; + display: table; + clear: both; + } + @include has-layout; +} diff --git a/src/supermarket/app/assets/compass/utilities/general/_float.scss b/src/supermarket/app/assets/compass/utilities/general/_float.scss new file mode 100644 index 000000000..914f184d7 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_float.scss @@ -0,0 +1,30 @@ +// Implementation of float:left with fix for the +// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html) +@mixin float-left { + @include float(left); } + +// Implementation of float:right with fix for the +// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html) +@mixin float-right { + @include float(right); } + +// Direction independent float mixin that fixes the +// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html) +@mixin float($side: left) { + display: inline; + float: unquote($side); } + +// Resets floated elements back to their default of `float: none` and defaults +// to `display: block` unless you pass `inline` as an argument +// +// Usage Example: +// +// body.homepage +// #footer li +// +float-left +// body.signup +// #footer li +// +reset-float +@mixin reset-float($display: block) { + float: none; + display: $display; } \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/utilities/general/_hacks.scss b/src/supermarket/app/assets/compass/utilities/general/_hacks.scss new file mode 100644 index 000000000..706265ec4 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_hacks.scss @@ -0,0 +1,46 @@ +@import "../../support"; + +// The `zoom` approach generates less CSS but does not validate. +// Set this to `block` to use the display-property to hack the +// element to gain layout. +$default-has-layout-approach: zoom !default; + +// This mixin causes an element matching the selector +// to gain the "hasLayout" property in internet explorer. +// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout). +@mixin has-layout($approach: $default-has-layout-approach) { + @if $legacy-support-for-ie { + @if $approach == zoom { + @include has-layout-zoom; + } @else if $approach == block { + @include has-layout-block; + } @else { + @warn "Unknown has-layout approach: #{$approach}"; + @include has-layout-zoom; + } + } +} + +@mixin has-layout-zoom { + @if $legacy-support-for-ie6 or $legacy-support-for-ie7 { + *zoom: 1; + } +} + +@mixin has-layout-block { + @if $legacy-support-for-ie { + // This makes ie6 get layout + display: inline-block; + // and this puts it back to block + & { display: block; } + } +} + +// A hack to supply IE6 (and below) with a different property value. +// [Read more](http://www.cssportal.com/css-hacks/#in_css-important). +@mixin bang-hack($property, $value, $ie6-value) { + @if $legacy-support-for-ie6 { + #{$property}: #{$value} !important; + #{$property}: #{$ie6-value}; + } +} diff --git a/src/supermarket/app/assets/compass/utilities/general/_min.scss b/src/supermarket/app/assets/compass/utilities/general/_min.scss new file mode 100644 index 000000000..99a676b33 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_min.scss @@ -0,0 +1,16 @@ +@import "hacks"; + +//** +// Cross browser min-height mixin. +@mixin min-height($value) { + @include hacked-minimum(height, $value); } + +//** +// Cross browser min-width mixin. +@mixin min-width($value) { + @include hacked-minimum(width, $value); } + +// @private This mixin is not meant to be used directly. +@mixin hacked-minimum($property, $value) { + min-#{$property}: $value; + @include bang-hack($property, auto, $value); } diff --git a/src/supermarket/app/assets/compass/utilities/general/_reset.scss b/src/supermarket/app/assets/compass/utilities/general/_reset.scss new file mode 100644 index 000000000..058c8a17c --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_reset.scss @@ -0,0 +1,2 @@ +// This module has moved. +@import "../../reset/utilities"; diff --git a/src/supermarket/app/assets/compass/utilities/general/_tabs.scss b/src/supermarket/app/assets/compass/utilities/general/_tabs.scss new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_tabs.scss @@ -0,0 +1 @@ + diff --git a/src/supermarket/app/assets/compass/utilities/general/_tag-cloud.scss b/src/supermarket/app/assets/compass/utilities/general/_tag-cloud.scss new file mode 100644 index 000000000..7ccae0551 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_tag-cloud.scss @@ -0,0 +1,18 @@ +// Emits styles for a tag cloud +@mixin tag-cloud($base-size: 1em) { + font-size: $base-size; + line-height: 1.2 * $base-size; + .xxs, .xs, .s, .l, .xl, .xxl { + line-height: 1.2 * $base-size; } + .xxs { + font-size: $base-size / 2; } + .xs { + font-size: 2 * $base-size / 3; } + .s { + font-size: 3 * $base-size / 4; } + .l { + font-size: 4 * $base-size / 3; } + .xl { + font-size: 3 * $base-size / 2; } + .xxl { + font-size: 2 * $base-size; } } diff --git a/src/supermarket/app/assets/compass/utilities/links/_hover-link.scss b/src/supermarket/app/assets/compass/utilities/links/_hover-link.scss new file mode 100644 index 000000000..843459fa8 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/links/_hover-link.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/links/hover-link' instead."; + +@import "../../typography/links/hover-link"; diff --git a/src/supermarket/app/assets/compass/utilities/links/_link-colors.scss b/src/supermarket/app/assets/compass/utilities/links/_link-colors.scss new file mode 100644 index 000000000..fac94387f --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/links/_link-colors.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/links/link-colors' instead."; + +@import "../../typography/links/link-colors"; diff --git a/src/supermarket/app/assets/compass/utilities/links/_unstyled-link.scss b/src/supermarket/app/assets/compass/utilities/links/_unstyled-link.scss new file mode 100644 index 000000000..1c48f4684 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/links/_unstyled-link.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/links/unstyled-link' instead."; + +@import "../../typography/links/unstyled-link"; diff --git a/src/supermarket/app/assets/compass/utilities/lists/_bullets.scss b/src/supermarket/app/assets/compass/utilities/lists/_bullets.scss new file mode 100644 index 000000000..796e1cd02 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/lists/_bullets.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/lists/bullets' instead."; + +@import "../../typography/lists/bullets"; diff --git a/src/supermarket/app/assets/compass/utilities/lists/_horizontal-list.scss b/src/supermarket/app/assets/compass/utilities/lists/_horizontal-list.scss new file mode 100644 index 000000000..38ae85cc4 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/lists/_horizontal-list.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/lists/horizontal-list' instead."; + +@import "../../typography/lists/horizontal-list"; diff --git a/src/supermarket/app/assets/compass/utilities/lists/_inline-block-list.scss b/src/supermarket/app/assets/compass/utilities/lists/_inline-block-list.scss new file mode 100644 index 000000000..5d4a12985 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/lists/_inline-block-list.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/lists/inline-block-list' instead."; + +@import "../../typography/lists/inline-block-list"; diff --git a/src/supermarket/app/assets/compass/utilities/lists/_inline-list.scss b/src/supermarket/app/assets/compass/utilities/lists/_inline-list.scss new file mode 100644 index 000000000..fb1dfeb9d --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/lists/_inline-list.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/lists/inline-list' instead."; + +@import "../../typography/lists/inline-list"; diff --git a/src/supermarket/app/assets/compass/utilities/sprites/_base.scss b/src/supermarket/app/assets/compass/utilities/sprites/_base.scss new file mode 100644 index 000000000..ef8feb6b9 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/sprites/_base.scss @@ -0,0 +1,66 @@ +// Determines those states for which you want to enable magic sprite selectors +$sprite-selectors: hover, target, active !default; + +// Set the width and height of an element to the original +// dimensions of an image before it was included in the sprite. +@mixin sprite-dimensions($map, $sprite) { + height: image-height(sprite-file($map, $sprite)); + width: image-width(sprite-file($map, $sprite)); +} + +// Set the background position of the given sprite `$map` to display the +// sprite of the given `$sprite` name. You can move the image relative to its +// natural position by passing `$offset-x` and `$offset-y`. +@mixin sprite-background-position($map, $sprite, $offset-x: 0, $offset-y: 0) { + background-position: sprite-position($map, $sprite, $offset-x, $offset-y); +} + + +// Determines if you want to include magic selectors in your sprites +$disable-magic-sprite-selectors:false !default; + +// Include the position and (optionally) dimensions of this `$sprite` +// in the given sprite `$map`. The sprite url should come from either a base +// class or you can specify the `sprite-url` explicitly like this: +// +// background: $map no-repeat; +@mixin sprite($map, $sprite, $dimensions: false, $offset-x: 0, $offset-y: 0) { + @include sprite-background-position($map, $sprite, $offset-x, $offset-y); + @if $dimensions { + @include sprite-dimensions($map, $sprite); + } + @if not($disable-magic-sprite-selectors) { + @include sprite-selectors($map, $sprite, $sprite, $offset-x, $offset-y); + } +} + +// Include the selectors for the `$sprite` given the `$map` and the +// `$full-sprite-name` +// @private +@mixin sprite-selectors($map, $sprite-name, $full-sprite-name, $offset-x: 0, $offset-y: 0) { + @each $selector in $sprite-selectors { + @if sprite_has_selector($map, $sprite-name, $selector) { + &:#{$selector}, &.#{$full-sprite-name}_#{$selector}, &.#{$full-sprite-name}-#{$selector} { + @include sprite-background-position($map, "#{$sprite-name}_#{$selector}", $offset-x, $offset-y); + } + } + } +} + +// Generates a class for each space separated name in `$sprite-names`. +// The class will be of the form .-. +// +// If a base class is provided, then each class will extend it. +// +// If `$dimensions` is `true`, the sprite dimensions will specified. +@mixin sprites($map, $sprite-names, $base-class: false, $dimensions: false, $prefix: sprite-map-name($map), $offset-x: 0, $offset-y: 0) { + @each $sprite-name in $sprite-names { + @if sprite_does_not_have_parent($map, $sprite-name) { + $full-sprite-name: "#{$prefix}-#{$sprite-name}"; + .#{$full-sprite-name} { + @if $base-class { @extend #{$base-class}; } + @include sprite($map, $sprite-name, $dimensions, $offset-x, $offset-y); + } + } + } +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/utilities/sprites/_sprite-img.scss b/src/supermarket/app/assets/compass/utilities/sprites/_sprite-img.scss new file mode 100644 index 000000000..ff90c00ab --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/sprites/_sprite-img.scss @@ -0,0 +1,79 @@ +// @doc off +// Example 1: +// +// a.twitter +// +sprite-img("icons-32.png", 1) +// a.facebook +// +sprite-img("icons-32png", 2) +// +// Example 2: +// +// a +// +sprite-background("icons-32.png") +// a.twitter +// +sprite-column(1) +// a.facebook +// +sprite-row(2) +// @doc on + +$sprite-default-size: 32px !default; + +$sprite-default-margin: 0px !default; + +$sprite-image-default-width: $sprite-default-size !default; + +$sprite-image-default-height: $sprite-default-size !default; + +// Sets all the rules for a sprite from a given sprite image to show just one of the sprites. +// To reduce duplication use a sprite-bg mixin for common properties and a sprite-select mixin for positioning. +@mixin sprite-img($img, $col, $row: 1, $width: $sprite-image-default-width, $height: $sprite-image-default-height, $margin: $sprite-default-margin) { + @include sprite-background($img, $width, $height); + @include sprite-position($col, $row, $width, $height, $margin); +} + +// Sets rules common for all sprites, assumes you want a square, but allows a rectangular region. +@mixin sprite-background($img, $width: $sprite-default-size, $height: $width) { + @include sprite-background-rectangle($img, $width, $height); +} + +// Sets rules common for all sprites, assumes a rectangular region. +@mixin sprite-background-rectangle($img, $width: $sprite-image-default-width, $height: $sprite-image-default-height) { + background: image-url($img) no-repeat; + width: $width; + height: $height; + overflow: hidden; +} + +// Allows horizontal sprite positioning optimized for a single row of sprites. +@mixin sprite-column($col, $width: $sprite-image-default-width, $margin: $sprite-default-margin) { + @include sprite-position($col, 1, $width, 0px, $margin); +} + +// Allows vertical sprite positioning optimized for a single column of sprites. +@mixin sprite-row($row, $height: $sprite-image-default-height, $margin: $sprite-default-margin) { + @include sprite-position(1, $row, 0px, $height, $margin); +} + +// Allows vertical and horizontal sprite positioning from a grid of equal dimensioned sprites. +@mixin sprite-position($col, $row: 1, $width: $sprite-image-default-width, $height: $sprite-image-default-height, $margin: $sprite-default-margin) { + $x: ($col - 1) * -$width - ($col - 1) * $margin; + $y: ($row - 1) * -$height - ($row - 1) * $margin; + background-position: $x $y; +} + + + +// Similar to 'sprite-replace-text-with-dimensions' but does not autmaticly set the demensions +@mixin sprite-replace-text ($map, $sprite, $dimensions: false, $offset-x: 0, $offset-y: 0) { + @include hide-text; + @include sprite($map, $sprite, $dimensions, $offset-x, $offset-y); + background-image: $map; + background-repeat: no-repeat; +} + +// Similar to 'replace-text-with-dimensions' but with sprites +// To use, create your sprite and then pass it in the `$map` param +// The name of the image in the sprite folder should be `$img-name` +@mixin sprite-replace-text-with-dimensions ($map, $sprite, $offset-x: 0, $offset-y: 0){ + @include sprite-replace-text ($map, $sprite, true, $offset-x, $offset-y); +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/utilities/tables/_alternating-rows-and-columns.scss b/src/supermarket/app/assets/compass/utilities/tables/_alternating-rows-and-columns.scss new file mode 100644 index 000000000..4da78e24b --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/tables/_alternating-rows-and-columns.scss @@ -0,0 +1,22 @@ +@mixin alternating-rows-and-columns($even-row-color, $odd-row-color, $dark-intersection, $header-color: white, $footer-color: white) { + th { + background-color: $header-color; + &.even, &:nth-child(2n) { + background-color: $header-color - $dark-intersection; } } + tr { + &.odd, &:nth-child(2n+1) { + td { + background-color: $odd-row-color; + &.even, &:nth-child(2n) { + background-color: $odd-row-color - $dark-intersection; } } } + } + tr.even { + td { + background-color: $even-row-color; + &.even, &:nth-child(2n) { + background-color: $even-row-color - $dark-intersection; } } } + tfoot { + th, td { + background-color: $footer-color; + &.even, &:nth-child(2n) { + background-color: $footer-color - $dark-intersection; } } } } diff --git a/src/supermarket/app/assets/compass/utilities/tables/_borders.scss b/src/supermarket/app/assets/compass/utilities/tables/_borders.scss new file mode 100644 index 000000000..120896dc9 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/tables/_borders.scss @@ -0,0 +1,33 @@ +@mixin outer-table-borders($width: 2px, $color: black) { + border: $width solid $color; + thead { + th { + border-bottom: $width solid $color; } } + tfoot { + th, td { + border-top: $width solid $color; } } + th { + &:first-child { + border-right: $width solid $color; } } } + +@mixin inner-table-borders($width: 2px, $color: black) { + th, td { + border: { + right: $width solid $color; + bottom: $width solid $color; + left-width: 0px; + top-width: 0px; }; + &:last-child, + &.last { + border-right-width: 0px; } } + +// IE8 ignores rules that are included on the same line as :last-child +// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details + + tbody, tfoot { + tr:last-child { + th, td { + border-bottom-width: 0px; } } + tr.last { + th, td { + border-bottom-width: 0px; } } } } diff --git a/src/supermarket/app/assets/compass/utilities/tables/_scaffolding.scss b/src/supermarket/app/assets/compass/utilities/tables/_scaffolding.scss new file mode 100644 index 000000000..cc19d0404 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/tables/_scaffolding.scss @@ -0,0 +1,9 @@ +@mixin table-scaffolding { + th { + text-align: center; + font-weight: bold; } + td, + th { + padding: 2px; + &.numeric { + text-align: right; } } } diff --git a/src/supermarket/app/assets/compass/utilities/text/_ellipsis.scss b/src/supermarket/app/assets/compass/utilities/text/_ellipsis.scss new file mode 100644 index 000000000..b1727547e --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/text/_ellipsis.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/text/ellipsis' instead."; + +@import "../../typography/text/ellipsis"; diff --git a/src/supermarket/app/assets/compass/utilities/text/_nowrap.scss b/src/supermarket/app/assets/compass/utilities/text/_nowrap.scss new file mode 100644 index 000000000..ca4a22f98 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/text/_nowrap.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/text/nowrap' instead."; + +@import "../../typography/text/nowrap"; diff --git a/src/supermarket/app/assets/compass/utilities/text/_replacement.scss b/src/supermarket/app/assets/compass/utilities/text/_replacement.scss new file mode 100644 index 000000000..809c6a8bc --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/text/_replacement.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/text/replacement' instead."; + +@import "../../typography/text/replacement"; diff --git a/src/supermarket/app/assets/config/manifest.js b/src/supermarket/app/assets/config/manifest.js new file mode 100644 index 000000000..e694c757a --- /dev/null +++ b/src/supermarket/app/assets/config/manifest.js @@ -0,0 +1,3 @@ + //= link_tree ../images + //= link_directory ../javascripts .js + //= link_directory ../stylesheets .css \ No newline at end of file diff --git a/src/supermarket/app/assets/stylesheets/appheader.scss b/src/supermarket/app/assets/stylesheets/appheader.scss index e82ac1945..76295f67f 100644 --- a/src/supermarket/app/assets/stylesheets/appheader.scss +++ b/src/supermarket/app/assets/stylesheets/appheader.scss @@ -1,8 +1,8 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/background-size"; -@import "compass/css3/border-radius"; -@import "compass/css3/box-shadow"; +@import "../compass/css3/background-size"; +@import "../compass/css3/border-radius"; +@import "../compass/css3/box-shadow"; // Global Header // Header wrapping element and row diff --git a/src/supermarket/app/assets/stylesheets/cookbooks/badge_icons.scss b/src/supermarket/app/assets/stylesheets/cookbooks/badge_icons.scss index 63616dcbb..f9682b4e8 100644 --- a/src/supermarket/app/assets/stylesheets/cookbooks/badge_icons.scss +++ b/src/supermarket/app/assets/stylesheets/cookbooks/badge_icons.scss @@ -1,5 +1,5 @@ @import "common"; -@import "compass/css3/box-sizing"; +@import "../../compass/css3/box-sizing"; // Styles for the various cookbook badge icons diff --git a/src/supermarket/app/assets/stylesheets/cookbooks/cookbook.scss b/src/supermarket/app/assets/stylesheets/cookbooks/cookbook.scss index df4f069f0..b4a4e12b3 100644 --- a/src/supermarket/app/assets/stylesheets/cookbooks/cookbook.scss +++ b/src/supermarket/app/assets/stylesheets/cookbooks/cookbook.scss @@ -1,8 +1,8 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/border-radius"; -@import "compass/css3/box-shadow"; -@import "compass/css3/inline-block"; +@import "../../compass/css3/border-radius"; +@import "../../compass/css3/box-shadow"; +@import "../../compass/css3/inline-block"; .cookbook_stats { list-style: none; diff --git a/src/supermarket/app/assets/stylesheets/cookbooks/platform_icons.scss b/src/supermarket/app/assets/stylesheets/cookbooks/platform_icons.scss index 1508b168a..a45b0e494 100644 --- a/src/supermarket/app/assets/stylesheets/cookbooks/platform_icons.scss +++ b/src/supermarket/app/assets/stylesheets/cookbooks/platform_icons.scss @@ -1,5 +1,5 @@ @import "common"; -@import "compass/css3/box-sizing"; +@import "../../compass/css3/box-sizing"; // Styles for the various cookbook platform icons diff --git a/src/supermarket/app/assets/stylesheets/cookbooks/search.scss b/src/supermarket/app/assets/stylesheets/cookbooks/search.scss index 7a922a854..c2f18b7a5 100644 --- a/src/supermarket/app/assets/stylesheets/cookbooks/search.scss +++ b/src/supermarket/app/assets/stylesheets/cookbooks/search.scss @@ -1,9 +1,8 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/border-radius"; -@import "compass/css3/box-shadow"; -@import "compass/css3/inline-block"; - +@import "../../compass/css3/border-radius"; +@import "../../compass/css3/box-shadow"; +@import "../../compass/css3/inline-block"; // Styles for the Cookbooks search interface .search_form { diff --git a/src/supermarket/app/assets/stylesheets/cookbooks/show.scss b/src/supermarket/app/assets/stylesheets/cookbooks/show.scss index 2947f24ec..fe43c9baf 100644 --- a/src/supermarket/app/assets/stylesheets/cookbooks/show.scss +++ b/src/supermarket/app/assets/stylesheets/cookbooks/show.scss @@ -1,7 +1,7 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/border-radius"; -@import "compass/css3/inline-block"; +@import "../../compass/css3/border-radius"; +@import "../../compass/css3/inline-block"; .cookbook_show { .deprecation-notice { diff --git a/src/supermarket/app/assets/stylesheets/dashboard.scss b/src/supermarket/app/assets/stylesheets/dashboard.scss index de8b9e6fd..058b9f7c6 100644 --- a/src/supermarket/app/assets/stylesheets/dashboard.scss +++ b/src/supermarket/app/assets/stylesheets/dashboard.scss @@ -1,6 +1,6 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/border-radius"; +@import "../compass/css3/border-radius"; .dashboard { .gravatar { diff --git a/src/supermarket/app/assets/stylesheets/default_branding.scss b/src/supermarket/app/assets/stylesheets/default_branding.scss index 678f35b88..6e271756e 100644 --- a/src/supermarket/app/assets/stylesheets/default_branding.scss +++ b/src/supermarket/app/assets/stylesheets/default_branding.scss @@ -1,3 +1,4 @@ +@import "variables"; $search_bar_background: $primary_blue; $appheader_logo_svg: 'logo-supermarket.svg'; $appheader_logo_png: 'logo-supermarket.png'; diff --git a/src/supermarket/app/assets/stylesheets/listing.scss b/src/supermarket/app/assets/stylesheets/listing.scss index e5eecc06a..66e39bfcf 100644 --- a/src/supermarket/app/assets/stylesheets/listing.scss +++ b/src/supermarket/app/assets/stylesheets/listing.scss @@ -1,6 +1,6 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/inline-block"; +@import "../compass/css3/inline-block"; .listing { list-style-type: none; diff --git a/src/supermarket/app/assets/stylesheets/profile/profile.scss b/src/supermarket/app/assets/stylesheets/profile/profile.scss index 0224939ce..312999a5d 100644 --- a/src/supermarket/app/assets/stylesheets/profile/profile.scss +++ b/src/supermarket/app/assets/stylesheets/profile/profile.scss @@ -1,5 +1,5 @@ @import "common"; -@import "compass/css3/border-radius"; +@import "../../compass/css3/border-radius"; @import "foundation/components/grid"; @import "foundation/components/block-grid"; diff --git a/src/supermarket/app/assets/stylesheets/resource.scss b/src/supermarket/app/assets/stylesheets/resource.scss index 83dcef129..182c513e2 100644 --- a/src/supermarket/app/assets/stylesheets/resource.scss +++ b/src/supermarket/app/assets/stylesheets/resource.scss @@ -1,6 +1,6 @@ @import "common"; -@import "compass/css3/inline-block"; -@import "compass/css3/border-radius"; +@import "../compass/css3/inline-block"; +@import "../compass/css3/border-radius"; .resource { .sidebar { diff --git a/src/supermarket/app/assets/stylesheets/structure.scss b/src/supermarket/app/assets/stylesheets/structure.scss index 1b9f4065d..87aa76a11 100644 --- a/src/supermarket/app/assets/stylesheets/structure.scss +++ b/src/supermarket/app/assets/stylesheets/structure.scss @@ -1,8 +1,8 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/transition"; -@import "compass/css3/border-radius"; -@import "compass/css3/inline-block"; +@import "../compass/css3/transition"; +@import "../compass/css3/border-radius"; +@import "../compass/css3/inline-block"; // Basic structural elements html, body { height: 100%; min-height: 100%; } diff --git a/src/supermarket/app/assets/stylesheets/tabs.scss b/src/supermarket/app/assets/stylesheets/tabs.scss index cc011f884..37a9d8e28 100644 --- a/src/supermarket/app/assets/stylesheets/tabs.scss +++ b/src/supermarket/app/assets/stylesheets/tabs.scss @@ -1,5 +1,5 @@ @import "common"; -@import "compass/css3/border-radius"; +@import "../compass/css3/border-radius"; // Tab structure .tabs { diff --git a/src/supermarket/app/assets/stylesheets/tools/show.scss b/src/supermarket/app/assets/stylesheets/tools/show.scss index 090c661e1..ac5b8b7db 100644 --- a/src/supermarket/app/assets/stylesheets/tools/show.scss +++ b/src/supermarket/app/assets/stylesheets/tools/show.scss @@ -1,7 +1,7 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/border-radius"; -@import "compass/css3/inline-block"; +@import "../../compass/css3/border-radius"; +@import "../../compass/css3/inline-block"; .tool_show .sidebar .other h3 { margin-bottom: 0; diff --git a/src/supermarket/app/assets/stylesheets/welcome.css.scss b/src/supermarket/app/assets/stylesheets/welcome.css.scss index 2c1cc9eed..c1dc9a3eb 100644 --- a/src/supermarket/app/assets/stylesheets/welcome.css.scss +++ b/src/supermarket/app/assets/stylesheets/welcome.css.scss @@ -1,6 +1,6 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/border-radius"; +@import "../compass/css3/border-radius"; .sign_up_in { padding-bottom: rem-calc(55); diff --git a/src/supermarket/app/controllers/sessions_controller.rb b/src/supermarket/app/controllers/sessions_controller.rb index 9bd1c2e4b..de59e0bfe 100644 --- a/src/supermarket/app/controllers/sessions_controller.rb +++ b/src/supermarket/app/controllers/sessions_controller.rb @@ -26,9 +26,7 @@ def create # def destroy reset_session - flash[:signout] = true - redirect_to root_path, notice: t("user.signed_out") end diff --git a/src/supermarket/app/mailers/cookbook_mailer.rb b/src/supermarket/app/mailers/cookbook_mailer.rb index a0a4734e3..69f34c20c 100644 --- a/src/supermarket/app/mailers/cookbook_mailer.rb +++ b/src/supermarket/app/mailers/cookbook_mailer.rb @@ -1,5 +1,5 @@ class CookbookMailer < ApplicationMailer - add_template_helper(CookbookVersionsHelper) + helper CookbookVersionsHelper # # Creates an email to a user that is a cookbook follower diff --git a/src/supermarket/app/models/account.rb b/src/supermarket/app/models/account.rb index 011e2f96d..549f39762 100644 --- a/src/supermarket/app/models/account.rb +++ b/src/supermarket/app/models/account.rb @@ -30,11 +30,11 @@ def self.tokens_expiring_soon(nowish) # def unique_username_and_provider if Account.exists?(provider: provider, username: username) - errors[:base] << I18n.t( + errors.add(:base, I18n.t( "account.already_connected", provider: provider.titleize, username: username - ) + )) end end end diff --git a/src/supermarket/bin/rails b/src/supermarket/bin/rails index efc037749..6fb4e4051 100755 --- a/src/supermarket/bin/rails +++ b/src/supermarket/bin/rails @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -APP_PATH = File.expand_path("../config/application", __dir__) +APP_PATH = File.expand_path('../config/application', __dir__) require_relative "../config/boot" require "rails/commands" diff --git a/src/supermarket/bin/setup b/src/supermarket/bin/setup index ebdfd0277..90700ac4f 100755 --- a/src/supermarket/bin/setup +++ b/src/supermarket/bin/setup @@ -1,36 +1,36 @@ #!/usr/bin/env ruby require "fileutils" -include FileUtils # path to your application root. -APP_ROOT = File.expand_path("..", __dir__) +APP_ROOT = File.expand_path('..', __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end -chdir APP_ROOT do - # This script is a starting point to setup your application. +FileUtils.chdir APP_ROOT do + # This script is a way to set up or update your development environment automatically. + # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. - puts "== Installing dependencies ==" - system! "gem install bundler --conservative" - system("bundle check") || system!("bundle install") + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') - # Install JavaScript dependencies if using Yarn - # system('bin/yarn') + # Install JavaScript dependencies + system! 'bin/yarn' # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') - # cp 'config/database.yml.sample', 'config/database.yml' + # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' # end puts "\n== Preparing database ==" - system! "bin/rails db:setup" + system! 'bin/rails db:prepare' puts "\n== Removing old logs and tempfiles ==" - system! "bin/rails log:clear tmp:clear" + system! 'bin/rails log:clear tmp:clear' puts "\n== Restarting application server ==" - system! "bin/rails restart" + system! 'bin/rails restart' end diff --git a/src/supermarket/bin/spring b/src/supermarket/bin/spring deleted file mode 100755 index 7909370d8..000000000 --- a/src/supermarket/bin/spring +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ruby - -# This file loads spring without using Bundler, in order to be fast -# It gets overwritten when you run the `spring binstub` command - -unless defined?(Spring) - require "rubygems" - require "bundler" - match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m) - if match - ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR) - ENV["GEM_HOME"] = "" - Gem.paths = ENV - - gem "spring", match[1] - require "spring/binstub" - end -end diff --git a/src/supermarket/bin/yarn b/src/supermarket/bin/yarn index 66a5d02be..9fab2c350 100755 --- a/src/supermarket/bin/yarn +++ b/src/supermarket/bin/yarn @@ -1,9 +1,17 @@ #!/usr/bin/env ruby -APP_ROOT = File.expand_path("..", __dir__) +APP_ROOT = File.expand_path('..', __dir__) Dir.chdir(APP_ROOT) do - exec "yarnpkg #{ARGV.join(" ")}" -rescue Errno::ENOENT - warn "Yarn executable was not detected in the system." - warn "Download Yarn at https://yarnpkg.com/en/docs/install" - exit 1 + yarn = ENV["PATH"].split(File::PATH_SEPARATOR). + select { |dir| File.expand_path(dir) != __dir__ }. + product(["yarn", "yarn.cmd", "yarn.ps1"]). + map { |dir, file| File.expand_path(file, dir) }. + find { |file| File.executable?(file) } + + if yarn + exec yarn, *ARGV + else + $stderr.puts "Yarn executable was not detected in the system." + $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" + exit 1 + end end diff --git a/src/supermarket/config/boot.rb b/src/supermarket/config/boot.rb index ebfe695f4..d69bd27dc 100644 --- a/src/supermarket/config/boot.rb +++ b/src/supermarket/config/boot.rb @@ -1,4 +1,3 @@ -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. -# require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/src/supermarket/config/cable.yml b/src/supermarket/config/cable.yml index 9250c7460..4fe3b3ddd 100644 --- a/src/supermarket/config/cable.yml +++ b/src/supermarket/config/cable.yml @@ -2,7 +2,7 @@ development: adapter: async test: - adapter: async + adapter: test production: adapter: redis diff --git a/src/supermarket/config/initializers/backtrace_silencers.rb b/src/supermarket/config/initializers/backtrace_silencers.rb index 59385cdf3..33699c309 100644 --- a/src/supermarket/config/initializers/backtrace_silencers.rb +++ b/src/supermarket/config/initializers/backtrace_silencers.rb @@ -1,7 +1,8 @@ # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } +# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code +# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". +Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] diff --git a/src/supermarket/config/initializers/filter_parameter_logging.rb b/src/supermarket/config/initializers/filter_parameter_logging.rb index 4a994e1e7..4b34a0366 100644 --- a/src/supermarket/config/initializers/filter_parameter_logging.rb +++ b/src/supermarket/config/initializers/filter_parameter_logging.rb @@ -1,4 +1,6 @@ # Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. -Rails.application.config.filter_parameters += [:password] +Rails.application.config.filter_parameters += [ + :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/src/supermarket/config/initializers/new_framework_defaults_6_1.rb b/src/supermarket/config/initializers/new_framework_defaults_6_1.rb new file mode 100644 index 000000000..9526b835a --- /dev/null +++ b/src/supermarket/config/initializers/new_framework_defaults_6_1.rb @@ -0,0 +1,67 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 6.1 upgrade. +# +# Once upgraded flip defaults one by one to migrate to the new default. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. + +# Support for inversing belongs_to -> has_many Active Record associations. +# Rails.application.config.active_record.has_many_inversing = true + +# Track Active Storage variants in the database. +# Rails.application.config.active_storage.track_variants = true + +# Apply random variation to the delay when retrying failed jobs. +# Rails.application.config.active_job.retry_jitter = 0.15 + +# Stop executing `after_enqueue`/`after_perform` callbacks if +# `before_enqueue`/`before_perform` respectively halts with `throw :abort`. +# Rails.application.config.active_job.skip_after_callbacks_if_terminated = true + +# Specify cookies SameSite protection level: either :none, :lax, or :strict. +# +# This change is not backwards compatible with earlier Rails versions. +# It's best enabled when your entire app is migrated and stable on 6.1. +# Rails.application.config.action_dispatch.cookies_same_site_protection = :lax + +# Generate CSRF tokens that are encoded in URL-safe Base64. +# +# This change is not backwards compatible with earlier Rails versions. +# It's best enabled when your entire app is migrated and stable on 6.1. +# Rails.application.config.action_controller.urlsafe_csrf_tokens = true + +# Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an +# UTC offset or a UTC time. +# ActiveSupport.utc_to_local_returns_utc_offset_times = true + +# Change the default HTTP status code to `308` when redirecting non-GET/HEAD +# requests to HTTPS in `ActionDispatch::SSL` middleware. +# Rails.application.config.action_dispatch.ssl_default_redirect_status = 308 + +# Use new connection handling API. For most applications this won't have any +# effect. For applications using multiple databases, this new API provides +# support for granular connection swapping. +# Rails.application.config.active_record.legacy_connection_handling = false + +# Make `form_with` generate non-remote forms by default. +# Rails.application.config.action_view.form_with_generates_remote_forms = false + +# Set the default queue name for the analysis job to the queue adapter default. +# Rails.application.config.active_storage.queues.analysis = nil + +# Set the default queue name for the purge job to the queue adapter default. +# Rails.application.config.active_storage.queues.purge = nil + +# Set the default queue name for the incineration job to the queue adapter default. +# Rails.application.config.action_mailbox.queues.incineration = nil + +# Set the default queue name for the routing job to the queue adapter default. +# Rails.application.config.action_mailbox.queues.routing = nil + +# Set the default queue name for the mail deliver job to the queue adapter default. +# Rails.application.config.action_mailer.deliver_later_queue_name = nil + +# Generate a `Link` header that gives a hint to modern browsers about +# preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`. +# Rails.application.config.action_view.preload_links_header = true diff --git a/src/supermarket/config/initializers/permissions_policy.rb b/src/supermarket/config/initializers/permissions_policy.rb new file mode 100644 index 000000000..00f64d71b --- /dev/null +++ b/src/supermarket/config/initializers/permissions_policy.rb @@ -0,0 +1,11 @@ +# Define an application-wide HTTP permissions policy. For further +# information see https://developers.google.com/web/updates/2018/06/feature-policy +# +# Rails.application.config.permissions_policy do |f| +# f.camera :none +# f.gyroscope :none +# f.microphone :none +# f.usb :none +# f.fullscreen :self +# f.payment :self, "https://secure.example.com" +# end diff --git a/src/supermarket/engines/fieri/.ruby-version b/src/supermarket/engines/fieri/.ruby-version index e261122d5..a4dd9dba4 100644 --- a/src/supermarket/engines/fieri/.ruby-version +++ b/src/supermarket/engines/fieri/.ruby-version @@ -1 +1 @@ -2.6.7 +2.7.4 diff --git a/src/supermarket/engines/fieri/Gemfile.lock b/src/supermarket/engines/fieri/Gemfile.lock index a28568928..1c1a0fdec 100644 --- a/src/supermarket/engines/fieri/Gemfile.lock +++ b/src/supermarket/engines/fieri/Gemfile.lock @@ -7,64 +7,81 @@ PATH foodcritic (~> 16.3) mixlib-archive (~> 0.4) octokit (~> 4.0) - rails (>= 5.1, < 6) + rails (>= 6.1, < 7) ruby-filemagic sidekiq (~> 4.2) GEM remote: https://rubygems.org/ specs: - actioncable (5.2.6) - actionpack (= 5.2.6) + actioncable (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) + actionmailbox (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) + mail (>= 2.7.1) + actionmailer (6.1.4) + actionpack (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activesupport (= 6.1.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.6) - actionview (= 5.2.6) - activesupport (= 5.2.6) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.4) + actionview (= 6.1.4) + activesupport (= 6.1.4) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.6) - activesupport (= 5.2.6) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.1.4) + actionpack (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) + nokogiri (>= 1.8.5) + actionview (6.1.4) + activesupport (= 6.1.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.6) - activesupport (= 5.2.6) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.1.4) + activesupport (= 6.1.4) globalid (>= 0.3.6) - activemodel (5.2.6) - activesupport (= 5.2.6) - activerecord (5.2.6) - activemodel (= 5.2.6) - activesupport (= 5.2.6) - arel (>= 9.0) - activestorage (5.2.6) - actionpack (= 5.2.6) - activerecord (= 5.2.6) + activemodel (6.1.4) + activesupport (= 6.1.4) + activerecord (6.1.4) + activemodel (= 6.1.4) + activesupport (= 6.1.4) + activestorage (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activesupport (= 6.1.4) marcel (~> 1.0.0) - activesupport (5.2.6) + mini_mime (>= 1.1.0) + activesupport (6.1.4) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) - arel (9.0.0) ast (2.4.2) builder (3.2.4) chefstyle (2.0.6) rubocop (= 1.18.3) coderay (1.1.3) concurrent-ruby (1.1.9) - connection_pool (2.2.3) + connection_pool (2.2.5) cookstyle (7.15.1) rubocop (= 1.18.3) crack (0.4.5) @@ -77,21 +94,25 @@ GEM railties (>= 3.2) erubi (1.10.0) erubis (2.7.0) - faraday (1.4.2) + faraday (1.5.1) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0.1) faraday-net_http (~> 1.0) faraday-net_http_persistent (~> 1.1) + faraday-patron (~> 1.0) multipart-post (>= 1.2, < 3) ruby2_keywords (>= 0.0.4) faraday-em_http (1.0.0) faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) + faraday-httpclient (1.0.1) faraday-net_http (1.0.1) - faraday-net_http_persistent (1.1.0) - ffi-yajl (2.3.3) - libyajl2 (~> 1.2) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + ffi-yajl (2.4.0) + libyajl2 (>= 1.2) foodcritic (16.3.0) erubis ffi-yajl (~> 2.0) @@ -104,7 +125,7 @@ GEM hashdiff (1.0.1) i18n (1.8.10) concurrent-ruby (~> 1.0) - libyajl2 (1.2.0) + libyajl2 (2.1.0) loofah (2.10.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -117,7 +138,7 @@ GEM minitest (5.14.4) mixlib-archive (0.4.20) mixlib-log - mixlib-log (3.0.8) + mixlib-log (3.0.9) multipart-post (2.1.1) nio4r (2.5.7) nokogiri (1.11.7) @@ -136,36 +157,38 @@ GEM public_suffix (4.0.6) racc (1.5.2) rack (2.2.3) - rack-protection (2.0.8.1) + rack-protection (2.1.0) rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.6) - actioncable (= 5.2.6) - actionmailer (= 5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) - activemodel (= 5.2.6) - activerecord (= 5.2.6) - activestorage (= 5.2.6) - activesupport (= 5.2.6) - bundler (>= 1.3.0) - railties (= 5.2.6) + rails (6.1.4) + actioncable (= 6.1.4) + actionmailbox (= 6.1.4) + actionmailer (= 6.1.4) + actionpack (= 6.1.4) + actiontext (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activemodel (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) + bundler (>= 1.15.0) + railties (= 6.1.4) 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 (5.2.6) - actionpack (= 5.2.6) - activesupport (= 5.2.6) + railties (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) method_source - rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) + rake (>= 0.13) + thor (~> 1.0) rainbow (3.0.0) - rake (13.0.3) + rake (13.0.6) redis (3.3.5) regexp_parser (2.1.1) rexml (3.2.5) @@ -222,19 +245,19 @@ GEM sprockets (>= 3.0.0) sqlite3 (1.4.2) thor (1.1.0) - thread_safe (0.3.6) - treetop (1.6.10) + treetop (1.6.11) polyglot (~> 0.3) - tzinfo (1.2.9) - thread_safe (~> 0.1) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) unicode-display_width (2.0.0) webmock (3.13.0) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket-driver (0.7.3) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) + zeitwerk (2.4.2) PLATFORMS ruby @@ -249,4 +272,4 @@ DEPENDENCIES webmock BUNDLED WITH - 1.17.3 + 2.1.4 diff --git a/src/supermarket/engines/fieri/fieri.gemspec b/src/supermarket/engines/fieri/fieri.gemspec index 107e6c672..47a6c6d1d 100644 --- a/src/supermarket/engines/fieri/fieri.gemspec +++ b/src/supermarket/engines/fieri/fieri.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |s| s.add_dependency "foodcritic", "~> 16.3" s.add_dependency "mixlib-archive", "~> 0.4" s.add_dependency "octokit", "~> 4.0" - s.add_dependency "rails", [">= 5.1", "< 6"] + s.add_dependency "rails", [">= 6.1", "< 7"] s.add_dependency "ruby-filemagic" s.add_dependency "sidekiq", "~> 4.2" end diff --git a/src/supermarket/spec/controllers/cookbooks_controller_spec.rb b/src/supermarket/spec/controllers/cookbooks_controller_spec.rb index b982eb054..746a72448 100644 --- a/src/supermarket/spec/controllers/cookbooks_controller_spec.rb +++ b/src/supermarket/spec/controllers/cookbooks_controller_spec.rb @@ -863,7 +863,7 @@ it "responds with JSON" do get :deprecate_search, params: { id: postgresql, q: "postgresql", format: :json } - expect(response.content_type).to eql("application/json") + expect(response.content_type).to eql("application/json; charset=utf-8") end it "assigns results" do diff --git a/src/supermarket/spec/lib/supermarket/authorization_spec.rb b/src/supermarket/spec/lib/supermarket/authorization_spec.rb index 9acfcb16e..1914f0752 100644 --- a/src/supermarket/spec/lib/supermarket/authorization_spec.rb +++ b/src/supermarket/spec/lib/supermarket/authorization_spec.rb @@ -23,6 +23,11 @@ def policy_class Class.new(ApplicationController) do include Supermarket::Authorization def current_user; end + #in latest new Pundit gem authorize is a protected method, + # so we need to call it from an instace method + def public_authorize(record, query = nil) + authorize!(record, query) + end end.new end @@ -30,15 +35,14 @@ def current_user; end describe "#authorize!" do it "raises an error if the user is not authorized" do - allow(subject).to receive(:params).and_return(action: "edit") - - expect { subject.authorize!(read_only_object) } - .to raise_error(Supermarket::Authorization::NotAuthorizedError) + allow(subject).to receive(:action_name).and_return("edit") + expect { subject.public_authorize(read_only_object).to + raise_error(Supermarket::Authorization::NotAuthorizedError)} end it "does nothing with the user is authorized" do - allow(subject).to receive(:params).and_return(action: "show") - expect { subject.authorize!(read_only_object) }.to_not raise_error + allow(subject).to receive(:action_name).and_return("show") + expect { subject.public_authorize(read_only_object) }.to_not raise_error end end end diff --git a/src/supermarket/spec/spec_helper.rb b/src/supermarket/spec/spec_helper.rb index c4866ff91..237aee6e6 100644 --- a/src/supermarket/spec/spec_helper.rb +++ b/src/supermarket/spec/spec_helper.rb @@ -25,7 +25,7 @@ # Use a quieter Poltergeist driver # This eliminates the debug warnings regarding unrecognized viewport # arguments and the like -Capybara.register_driver :quiet_ghost do |app| +Capybara.register_driver :poltergeist do |app| error_logger = Logger.new(STDERR).tap { |l| l.level = Logger::ERROR } Capybara::Poltergeist::Driver.new( @@ -40,7 +40,9 @@ ) end -Capybara.javascript_driver = :quiet_ghost +Capybara.javascript_driver = :poltergeist +Capybara::Screenshot.prune_strategy = { keep: 5 } +Capybara.server = :puma, { Silent: true } if ENV["CAPYBARA_SCREENSHOT_TO_S3"] == "true" if ENV["SCREENIE_AWS_ID"].present? && ENV["SCREENIE_AWS_SECRET"].present? @@ -136,26 +138,39 @@ config.use_transactional_fixtures = false - config.before(:suite) do - DatabaseCleaner.clean_with :truncation - end - - config.before(:each) do |example| + #=======================OLD Cleaning strategy====================== + # config.before(:suite) do + # DatabaseCleaner.clean_with :truncation + # end + + # config.before(:each) do |example| + # Rails.cache.clear + # DatabaseCleaner.strategy = if example.metadata[:js] || example.metadata[:type] == :feature + # :truncation + # else + # :transaction + # end + # DatabaseCleaner.start + # end + + # config.after(:each) do + # DatabaseCleaner.clean + # end + #================================================================ + config.before(:suite) do |example| Rails.cache.clear - DatabaseCleaner.strategy = if example.metadata[:js] || example.metadata[:type] == :feature - :truncation - else - :transaction - end - DatabaseCleaner.start + DatabaseCleaner.strategy = :deletion + DatabaseCleaner.clean_with(:deletion) end - config.after(:each) do - DatabaseCleaner.clean + config.around(:each) do |example| + DatabaseCleaner.cleaning do + example.run + end end config.before(type: :feature) do |example| - Capybara.current_driver = :quiet_ghost if example.metadata[:use_poltergeist] == true + Capybara.current_driver = :poltergeist if example.metadata[:use_poltergeist] == true end # If true, the base class of anonymous controllers will be inferred From a350a26740414a239633609901cdaab3d878d863 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Thu, 29 Jul 2021 17:11:04 +0530 Subject: [PATCH 02/48] Omnibus Fix --- omnibus/config/projects/supermarket.rb | 2 +- omnibus/config/software/supermarket-ctl.rb | 2 +- omnibus/config/software/supermarket.rb | 3 ++- omnibus/omnibus.rb | 2 +- src/supermarket/Gemfile | 4 ++++ 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/omnibus/config/projects/supermarket.rb b/omnibus/config/projects/supermarket.rb index edfd44396..1d7afdffc 100644 --- a/omnibus/config/projects/supermarket.rb +++ b/omnibus/config/projects/supermarket.rb @@ -29,7 +29,7 @@ build_iteration 1 override :postgresql, version: '9.3.25' -override :ruby, version: "2.6.8" +override :ruby, version: "2.7.4" override :rubygems, version: "3.1.2" # rubygems ships its own bundler which may differ from bundler defined below and then we get double bundler which makes the omnibus environment unhappy. Make sure these versions match before bumping either. override :bundler, version: "2.1.2" # this must match the BUNDLED WITH in all the repo's Gemfile.locks override :'chef-gem', version: '14.14.29' diff --git a/omnibus/config/software/supermarket-ctl.rb b/omnibus/config/software/supermarket-ctl.rb index c9c1284ff..85e965ccc 100644 --- a/omnibus/config/software/supermarket-ctl.rb +++ b/omnibus/config/software/supermarket-ctl.rb @@ -26,7 +26,7 @@ build do env = with_standard_compiler_flags(with_embedded_path) - bundle "install", env: env + #bundle "install", env: env block do erb source: "supermarket-ctl.erb", diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index 86a3feb3c..068afbc83 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -45,7 +45,8 @@ " --without development doc", env: env # This fails because we're installing Ruby C extensions in the wrong place! - bundle "exec rake assets:precompile", env: env.merge('RAILS_ENV' => 'production') + # bundle "exec rake assets:precompile", env: env.merge('RAILS_ENV' => 'production') + bundle "exec rake assets:precompile" sync project_dir, "#{install_dir}/embedded/service/supermarket/", exclude: %w( .cookbooks .direnv .envrc .env.* .gitignore .kitchen* diff --git a/omnibus/omnibus.rb b/omnibus/omnibus.rb index ce3e6dad3..53df12292 100644 --- a/omnibus/omnibus.rb +++ b/omnibus/omnibus.rb @@ -37,7 +37,7 @@ # Customize compiler bits # ------------------------------ -build_retries 5 +build_retries 1 fetcher_read_timeout 120 # Load additional software diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 87371621b..4fc7b60cc 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -56,6 +56,10 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" +gem 'therubyracer' +gem 'execjs' +gem 'listen' + group :doc do gem "yard", require: false end From fe7042762fe28b2eeb9379057cce870e4b8bf389 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Thu, 29 Jul 2021 17:55:55 +0530 Subject: [PATCH 03/48] Modified the gemlock --- src/supermarket/Gemfile.lock | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 90c32cba1..2d4aa37b4 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -350,6 +350,7 @@ GEM addressable (~> 2.0) excon http (>= 2.0, < 5.0) + libv8 (3.16.14.19) libyajl2 (2.1.0) license-acceptance (2.1.13) pastel (~> 0.7) @@ -559,6 +560,7 @@ GEM redis-store (>= 1.2, < 2) redis-store (1.6.0) redis (>= 2.2, < 5) + ref (2.0.0) regexp_parser (2.1.1) rexml (3.2.5) rinku (2.0.6) @@ -660,6 +662,9 @@ GEM syslog-logger (1.6.8) terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) + therubyracer (0.12.3) + libv8 (~> 3.16.14.15) + ref thor (1.0.1) thread_safe (0.3.6) tilt (2.0.10) @@ -773,6 +778,7 @@ DEPENDENCIES database_cleaner ddtrace dotenv + execjs factory_bot_rails faker ffi-libarchive @@ -787,6 +793,7 @@ DEPENDENCIES kaminari launchy license_finder + listen mail_view mixlib-authentication (~> 3.0) newrelic_rpm @@ -827,6 +834,7 @@ DEPENDENCIES spring-commands-rspec sprockets statsd-ruby + therubyracer tomlrb uglifier unicorn From dbe951a1ab513809da102261b2e6fe5759fec734 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Thu, 29 Jul 2021 19:34:06 +0530 Subject: [PATCH 04/48] Updfated the ruby js runtime --- src/supermarket/Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 4fc7b60cc..2d48d5dfc 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -56,7 +56,7 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" -gem 'therubyracer' +gem 'mini_racer' gem 'execjs' gem 'listen' From 6f3b53410c0924bb42c3cea9eff4f390c8b92460 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Thu, 29 Jul 2021 20:19:09 +0530 Subject: [PATCH 05/48] Modified the all flag --- omnibus/config/software/supermarket.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index 068afbc83..fe0d2854a 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -36,7 +36,11 @@ build do env = with_standard_compiler_flags(with_embedded_path) - bundle "package --all --no-install" + if Bundler.feature_flag.cache_all? + bundle "package --no-install" + else + bundle "package --all --no-install" + end bundle "install" \ " --jobs #{workers}" \ From 01e075e56d8204d510459f696baa5d0fb714b636 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Fri, 30 Jul 2021 15:26:38 +0530 Subject: [PATCH 06/48] Updated the Gemfile.lock --- src/supermarket/Gemfile.lock | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 2d4aa37b4..8be909528 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -350,7 +350,7 @@ GEM addressable (~> 2.0) excon http (>= 2.0, < 5.0) - libv8 (3.16.14.19) + libv8-node (15.14.0.1) libyajl2 (2.1.0) license-acceptance (2.1.13) pastel (~> 0.7) @@ -389,6 +389,8 @@ GEM rake mini_mime (1.1.0) mini_portile2 (2.5.3) + mini_racer (0.4.0) + libv8-node (~> 15.14.0.0) minitest (5.14.4) mixlib-archive (0.4.20) mixlib-log @@ -560,7 +562,6 @@ GEM redis-store (>= 1.2, < 2) redis-store (1.6.0) redis (>= 2.2, < 5) - ref (2.0.0) regexp_parser (2.1.1) rexml (3.2.5) rinku (2.0.6) @@ -662,9 +663,6 @@ GEM syslog-logger (1.6.8) terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) - therubyracer (0.12.3) - libv8 (~> 3.16.14.15) - ref thor (1.0.1) thread_safe (0.3.6) tilt (2.0.10) @@ -795,6 +793,7 @@ DEPENDENCIES license_finder listen mail_view + mini_racer mixlib-authentication (~> 3.0) newrelic_rpm nokogiri @@ -834,7 +833,6 @@ DEPENDENCIES spring-commands-rspec sprockets statsd-ruby - therubyracer tomlrb uglifier unicorn From 0ac7da0da95a1557c9d619bc43d5efc5d2ab8d3c Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 2 Aug 2021 13:21:54 +0530 Subject: [PATCH 07/48] Fixed the omnibuc build Signed-off-by: saghoshprogress --- omnibus/config/software/supermarket.rb | 2 +- omnibus/omnibus.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index fe0d2854a..cc963f421 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -24,7 +24,7 @@ dependency "chef-gem" dependency "git" dependency "nginx" -dependency "nodejs" +# dependency "nodejs" dependency "postgresql" dependency "redis" dependency "ruby" diff --git a/omnibus/omnibus.rb b/omnibus/omnibus.rb index 53df12292..ce3e6dad3 100644 --- a/omnibus/omnibus.rb +++ b/omnibus/omnibus.rb @@ -37,7 +37,7 @@ # Customize compiler bits # ------------------------------ -build_retries 1 +build_retries 5 fetcher_read_timeout 120 # Load additional software From 7e05fa8706af4b07c7ce7ee63b7c14d51f888789 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Thu, 22 Jul 2021 12:34:22 +0530 Subject: [PATCH 08/48] Upgraded to rails 6.1.4 Signed-off-by: saghoshprogress --- omnibus/config/projects/supermarket.rb | 1 + src/supermarket/.ruby-version | 2 +- src/supermarket/Gemfile | 3 +- src/supermarket/Gemfile.lock | 545 +++++++++------- src/supermarket/app/assets/compass/_css3.scss | 22 + .../app/assets/compass/_functions.scss | 7 + .../app/assets/compass/_layout.scss | 3 + .../app/assets/compass/_reset-legacy.scss | 3 + .../app/assets/compass/_reset.scss | 3 + .../app/assets/compass/_support.scss | 40 ++ .../app/assets/compass/_typography.scss | 4 + .../app/assets/compass/_utilities.scss | 9 + .../app/assets/compass/css3/_animation.scss | 2 + .../app/assets/compass/css3/_appearance.scss | 16 + .../assets/compass/css3/_background-clip.scss | 43 ++ .../compass/css3/_background-origin.scss | 42 ++ .../assets/compass/css3/_background-size.scss | 26 + .../assets/compass/css3/_border-radius.scss | 130 ++++ .../app/assets/compass/css3/_box-shadow.scss | 76 +++ .../app/assets/compass/css3/_box-sizing.scss | 18 + .../app/assets/compass/css3/_box.scss | 111 ++++ .../app/assets/compass/css3/_columns.scss | 157 +++++ .../app/assets/compass/css3/_filter.scss | 24 + .../app/assets/compass/css3/_flexbox.scss | 86 +++ .../app/assets/compass/css3/_font-face.scss | 48 ++ .../app/assets/compass/css3/_hyphenation.scss | 77 +++ .../app/assets/compass/css3/_images.scss | 133 ++++ .../assets/compass/css3/_inline-block.scss | 22 + .../app/assets/compass/css3/_opacity.scss | 19 + .../app/assets/compass/css3/_pie.scss | 73 +++ .../app/assets/compass/css3/_regions.scss | 22 + .../app/assets/compass/css3/_shared.scss | 38 ++ .../app/assets/compass/css3/_text-shadow.scss | 88 +++ .../compass/css3/_transform-legacy.scss | 87 +++ .../app/assets/compass/css3/_transform.scss | 598 ++++++++++++++++++ .../app/assets/compass/css3/_transition.scss | 222 +++++++ .../assets/compass/css3/_user-interface.scss | 47 ++ .../app/assets/compass/functions/_colors.scss | 37 ++ .../assets/compass/functions/_constants.scss | 18 + .../functions/_cross_browser_support.scss | 72 +++ .../assets/compass/functions/_display.scss | 36 ++ .../assets/compass/functions/_font_files.scss | 95 +++ .../compass/functions/_gradient_support.scss | 15 + .../app/assets/compass/functions/_lists.scss | 90 +++ .../compass/layout/_grid-background.scss | 178 ++++++ .../assets/compass/layout/_sticky-footer.scss | 23 + .../assets/compass/layout/_stretching.scss | 24 + .../compass/reset/_utilities-legacy.scss | 135 ++++ .../app/assets/compass/reset/_utilities.scss | 142 +++++ .../app/assets/compass/typography/_links.scss | 3 + .../app/assets/compass/typography/_lists.scss | 4 + .../app/assets/compass/typography/_text.scss | 4 + .../compass/typography/_vertical_rhythm.scss | 229 +++++++ .../compass/typography/links/_hover-link.scss | 5 + .../typography/links/_link-colors.scss | 28 + .../typography/links/_unstyled-link.scss | 7 + .../compass/typography/lists/_bullets.scss | 34 + .../typography/lists/_horizontal-list.scss | 61 ++ .../typography/lists/_inline-block-list.scss | 50 ++ .../typography/lists/_inline-list.scss | 44 ++ .../compass/typography/text/_ellipsis.scss | 25 + .../compass/typography/text/_force-wrap.scss | 12 + .../compass/typography/text/_nowrap.scss | 2 + .../compass/typography/text/_replacement.scss | 68 ++ .../app/assets/compass/utilities/_color.scss | 1 + .../assets/compass/utilities/_general.scss | 6 + .../app/assets/compass/utilities/_links.scss | 5 + .../app/assets/compass/utilities/_lists.scss | 6 + .../app/assets/compass/utilities/_print.scss | 17 + .../assets/compass/utilities/_sprites.scss | 2 + .../app/assets/compass/utilities/_tables.scss | 3 + .../app/assets/compass/utilities/_text.scss | 5 + .../compass/utilities/color/_contrast.scss | 28 + .../compass/utilities/general/_clearfix.scss | 44 ++ .../compass/utilities/general/_float.scss | 30 + .../compass/utilities/general/_hacks.scss | 46 ++ .../compass/utilities/general/_min.scss | 16 + .../compass/utilities/general/_reset.scss | 2 + .../compass/utilities/general/_tabs.scss | 1 + .../compass/utilities/general/_tag-cloud.scss | 18 + .../compass/utilities/links/_hover-link.scss | 3 + .../compass/utilities/links/_link-colors.scss | 3 + .../utilities/links/_unstyled-link.scss | 3 + .../compass/utilities/lists/_bullets.scss | 3 + .../utilities/lists/_horizontal-list.scss | 3 + .../utilities/lists/_inline-block-list.scss | 3 + .../compass/utilities/lists/_inline-list.scss | 3 + .../compass/utilities/sprites/_base.scss | 66 ++ .../utilities/sprites/_sprite-img.scss | 79 +++ .../tables/_alternating-rows-and-columns.scss | 22 + .../compass/utilities/tables/_borders.scss | 33 + .../utilities/tables/_scaffolding.scss | 9 + .../compass/utilities/text/_ellipsis.scss | 3 + .../compass/utilities/text/_nowrap.scss | 3 + .../compass/utilities/text/_replacement.scss | 3 + src/supermarket/app/assets/config/manifest.js | 3 + .../app/assets/stylesheets/appheader.scss | 6 +- .../stylesheets/cookbooks/badge_icons.scss | 2 +- .../stylesheets/cookbooks/cookbook.scss | 6 +- .../stylesheets/cookbooks/platform_icons.scss | 2 +- .../assets/stylesheets/cookbooks/search.scss | 7 +- .../assets/stylesheets/cookbooks/show.scss | 4 +- .../app/assets/stylesheets/dashboard.scss | 2 +- .../assets/stylesheets/default_branding.scss | 1 + .../app/assets/stylesheets/listing.scss | 2 +- .../assets/stylesheets/profile/profile.scss | 2 +- .../app/assets/stylesheets/resource.scss | 4 +- .../app/assets/stylesheets/structure.scss | 6 +- .../app/assets/stylesheets/tabs.scss | 2 +- .../app/assets/stylesheets/tools/show.scss | 4 +- .../app/assets/stylesheets/welcome.css.scss | 2 +- .../app/controllers/sessions_controller.rb | 2 - .../app/mailers/cookbook_mailer.rb | 2 +- src/supermarket/app/models/account.rb | 4 +- src/supermarket/bin/rails | 2 +- src/supermarket/bin/setup | 26 +- src/supermarket/bin/spring | 18 - src/supermarket/bin/yarn | 20 +- src/supermarket/config/boot.rb | 3 +- src/supermarket/config/cable.yml | 2 +- .../initializers/backtrace_silencers.rb | 7 +- .../initializers/filter_parameter_logging.rb | 4 +- .../new_framework_defaults_6_1.rb | 67 ++ .../config/initializers/permissions_policy.rb | 11 + src/supermarket/engines/fieri/.ruby-version | 2 +- src/supermarket/engines/fieri/Gemfile.lock | 149 +++-- src/supermarket/engines/fieri/fieri.gemspec | 2 +- .../controllers/cookbooks_controller_spec.rb | 2 +- .../lib/supermarket/authorization_spec.rb | 16 +- src/supermarket/spec/spec_helper.rb | 47 +- 130 files changed, 4791 insertions(+), 407 deletions(-) create mode 100644 src/supermarket/app/assets/compass/_css3.scss create mode 100644 src/supermarket/app/assets/compass/_functions.scss create mode 100644 src/supermarket/app/assets/compass/_layout.scss create mode 100644 src/supermarket/app/assets/compass/_reset-legacy.scss create mode 100644 src/supermarket/app/assets/compass/_reset.scss create mode 100644 src/supermarket/app/assets/compass/_support.scss create mode 100644 src/supermarket/app/assets/compass/_typography.scss create mode 100644 src/supermarket/app/assets/compass/_utilities.scss create mode 100644 src/supermarket/app/assets/compass/css3/_animation.scss create mode 100644 src/supermarket/app/assets/compass/css3/_appearance.scss create mode 100644 src/supermarket/app/assets/compass/css3/_background-clip.scss create mode 100644 src/supermarket/app/assets/compass/css3/_background-origin.scss create mode 100644 src/supermarket/app/assets/compass/css3/_background-size.scss create mode 100644 src/supermarket/app/assets/compass/css3/_border-radius.scss create mode 100644 src/supermarket/app/assets/compass/css3/_box-shadow.scss create mode 100644 src/supermarket/app/assets/compass/css3/_box-sizing.scss create mode 100644 src/supermarket/app/assets/compass/css3/_box.scss create mode 100644 src/supermarket/app/assets/compass/css3/_columns.scss create mode 100644 src/supermarket/app/assets/compass/css3/_filter.scss create mode 100644 src/supermarket/app/assets/compass/css3/_flexbox.scss create mode 100644 src/supermarket/app/assets/compass/css3/_font-face.scss create mode 100644 src/supermarket/app/assets/compass/css3/_hyphenation.scss create mode 100644 src/supermarket/app/assets/compass/css3/_images.scss create mode 100644 src/supermarket/app/assets/compass/css3/_inline-block.scss create mode 100644 src/supermarket/app/assets/compass/css3/_opacity.scss create mode 100644 src/supermarket/app/assets/compass/css3/_pie.scss create mode 100644 src/supermarket/app/assets/compass/css3/_regions.scss create mode 100644 src/supermarket/app/assets/compass/css3/_shared.scss create mode 100644 src/supermarket/app/assets/compass/css3/_text-shadow.scss create mode 100644 src/supermarket/app/assets/compass/css3/_transform-legacy.scss create mode 100644 src/supermarket/app/assets/compass/css3/_transform.scss create mode 100644 src/supermarket/app/assets/compass/css3/_transition.scss create mode 100644 src/supermarket/app/assets/compass/css3/_user-interface.scss create mode 100644 src/supermarket/app/assets/compass/functions/_colors.scss create mode 100644 src/supermarket/app/assets/compass/functions/_constants.scss create mode 100644 src/supermarket/app/assets/compass/functions/_cross_browser_support.scss create mode 100755 src/supermarket/app/assets/compass/functions/_display.scss create mode 100644 src/supermarket/app/assets/compass/functions/_font_files.scss create mode 100644 src/supermarket/app/assets/compass/functions/_gradient_support.scss create mode 100644 src/supermarket/app/assets/compass/functions/_lists.scss create mode 100644 src/supermarket/app/assets/compass/layout/_grid-background.scss create mode 100644 src/supermarket/app/assets/compass/layout/_sticky-footer.scss create mode 100644 src/supermarket/app/assets/compass/layout/_stretching.scss create mode 100644 src/supermarket/app/assets/compass/reset/_utilities-legacy.scss create mode 100644 src/supermarket/app/assets/compass/reset/_utilities.scss create mode 100644 src/supermarket/app/assets/compass/typography/_links.scss create mode 100644 src/supermarket/app/assets/compass/typography/_lists.scss create mode 100644 src/supermarket/app/assets/compass/typography/_text.scss create mode 100644 src/supermarket/app/assets/compass/typography/_vertical_rhythm.scss create mode 100644 src/supermarket/app/assets/compass/typography/links/_hover-link.scss create mode 100644 src/supermarket/app/assets/compass/typography/links/_link-colors.scss create mode 100644 src/supermarket/app/assets/compass/typography/links/_unstyled-link.scss create mode 100644 src/supermarket/app/assets/compass/typography/lists/_bullets.scss create mode 100644 src/supermarket/app/assets/compass/typography/lists/_horizontal-list.scss create mode 100644 src/supermarket/app/assets/compass/typography/lists/_inline-block-list.scss create mode 100644 src/supermarket/app/assets/compass/typography/lists/_inline-list.scss create mode 100644 src/supermarket/app/assets/compass/typography/text/_ellipsis.scss create mode 100644 src/supermarket/app/assets/compass/typography/text/_force-wrap.scss create mode 100644 src/supermarket/app/assets/compass/typography/text/_nowrap.scss create mode 100644 src/supermarket/app/assets/compass/typography/text/_replacement.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_color.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_general.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_links.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_lists.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_print.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_sprites.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_tables.scss create mode 100644 src/supermarket/app/assets/compass/utilities/_text.scss create mode 100644 src/supermarket/app/assets/compass/utilities/color/_contrast.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_clearfix.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_float.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_hacks.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_min.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_reset.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_tabs.scss create mode 100644 src/supermarket/app/assets/compass/utilities/general/_tag-cloud.scss create mode 100644 src/supermarket/app/assets/compass/utilities/links/_hover-link.scss create mode 100644 src/supermarket/app/assets/compass/utilities/links/_link-colors.scss create mode 100644 src/supermarket/app/assets/compass/utilities/links/_unstyled-link.scss create mode 100644 src/supermarket/app/assets/compass/utilities/lists/_bullets.scss create mode 100644 src/supermarket/app/assets/compass/utilities/lists/_horizontal-list.scss create mode 100644 src/supermarket/app/assets/compass/utilities/lists/_inline-block-list.scss create mode 100644 src/supermarket/app/assets/compass/utilities/lists/_inline-list.scss create mode 100644 src/supermarket/app/assets/compass/utilities/sprites/_base.scss create mode 100644 src/supermarket/app/assets/compass/utilities/sprites/_sprite-img.scss create mode 100644 src/supermarket/app/assets/compass/utilities/tables/_alternating-rows-and-columns.scss create mode 100644 src/supermarket/app/assets/compass/utilities/tables/_borders.scss create mode 100644 src/supermarket/app/assets/compass/utilities/tables/_scaffolding.scss create mode 100644 src/supermarket/app/assets/compass/utilities/text/_ellipsis.scss create mode 100644 src/supermarket/app/assets/compass/utilities/text/_nowrap.scss create mode 100644 src/supermarket/app/assets/compass/utilities/text/_replacement.scss create mode 100644 src/supermarket/app/assets/config/manifest.js delete mode 100755 src/supermarket/bin/spring create mode 100644 src/supermarket/config/initializers/new_framework_defaults_6_1.rb create mode 100644 src/supermarket/config/initializers/permissions_policy.rb diff --git a/omnibus/config/projects/supermarket.rb b/omnibus/config/projects/supermarket.rb index 3a10e4841..edfd44396 100644 --- a/omnibus/config/projects/supermarket.rb +++ b/omnibus/config/projects/supermarket.rb @@ -64,3 +64,4 @@ compression_level 1 compression_type :xz end +{"mode":"full","isActive":false} \ No newline at end of file diff --git a/src/supermarket/.ruby-version b/src/supermarket/.ruby-version index 743af5e12..a4dd9dba4 100644 --- a/src/supermarket/.ruby-version +++ b/src/supermarket/.ruby-version @@ -1 +1 @@ -2.6.8 +2.7.4 diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 6c0acefcf..b6c0a91b4 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" gem "fieri", path: "engines/fieri" -gem "rails", "~> 5.2.6" +gem "rails", "~> 6.1.4" gem "omniauth" gem "omniauth-chef-oauth2" @@ -75,6 +75,7 @@ group :test do gem "shoulda-matchers" gem "vcr", require: false gem "webmock", require: false + gem "puma" end group :development, :test do diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index a7aa593a9..54ef75f2b 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -7,63 +7,80 @@ PATH foodcritic (~> 16.3) mixlib-archive (~> 0.4) octokit (~> 4.0) - rails (>= 5.1, < 6) + rails (>= 6.1, < 7) ruby-filemagic sidekiq (~> 4.2) GEM remote: https://rubygems.org/ specs: - actioncable (5.2.6) - actionpack (= 5.2.6) + actioncable (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) + actionmailbox (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) + mail (>= 2.7.1) + actionmailer (6.1.4) + actionpack (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activesupport (= 6.1.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.6) - actionview (= 5.2.6) - activesupport (= 5.2.6) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.4) + actionview (= 6.1.4) + activesupport (= 6.1.4) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.6) - activesupport (= 5.2.6) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.1.4) + actionpack (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) + nokogiri (>= 1.8.5) + actionview (6.1.4) + activesupport (= 6.1.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.6) - activesupport (= 5.2.6) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.1.4) + activesupport (= 6.1.4) globalid (>= 0.3.6) - activemodel (5.2.6) - activesupport (= 5.2.6) - activerecord (5.2.6) - activemodel (= 5.2.6) - activesupport (= 5.2.6) - arel (>= 9.0) - activestorage (5.2.6) - actionpack (= 5.2.6) - activerecord (= 5.2.6) + activemodel (6.1.4) + activesupport (= 6.1.4) + activerecord (6.1.4) + activemodel (= 6.1.4) + activesupport (= 6.1.4) + activestorage (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activesupport (= 6.1.4) marcel (~> 1.0.0) - activesupport (5.2.6) + mini_mime (>= 1.1.0) + activesupport (6.1.4) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) and_feathers (1.0.0.pre.2) and_feathers-gzipped_tarball (1.0.0.pre) - arel (9.0.0) ast (2.4.2) aws-eventstream (1.1.1) - aws-partitions (1.473.0) - aws-sdk-core (3.115.0) + aws-partitions (1.477.0) + aws-sdk-core (3.117.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) @@ -75,7 +92,7 @@ GEM aws-sdk-core (~> 3, >= 3.112.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.3) + aws-sigv4 (1.2.4) aws-eventstream (~> 1, >= 1.0.2) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) @@ -85,73 +102,70 @@ GEM brakeman (5.1.1) builder (3.2.4) byebug (11.1.3) - capybara (2.18.0) + capybara (3.35.3) addressable mini_mime (>= 0.1.3) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (>= 2.0, < 4.0) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) capybara-screenshot (1.0.25) capybara (>= 1.0, < 4) launchy - chef (16.2.44) + chef (17.2.29) addressable - bcrypt_pbkdf (= 1.1.0.rc1) - bundler (>= 1.10) - chef-config (= 16.2.44) - chef-utils (= 16.2.44) + chef-config (= 17.2.29) + chef-utils (= 17.2.29) chef-vault chef-zero (>= 14.0.11) - diff-lcs (~> 1.2, >= 1.2.4) - ed25519 (~> 1.2) + diff-lcs (>= 1.2.4, < 1.4.0) erubis (~> 2.7) - ffi (>= 1.9.25) - ffi-libarchive + ffi (>= 1.5.0) + ffi-libarchive (~> 1.0, >= 1.0.3) ffi-yajl (~> 2.2) - highline (>= 1.6.9, < 3) iniparse (~> 1.4) - license-acceptance (~> 1.0, >= 1.0.5) + inspec-core (~> 4.23) + license-acceptance (>= 1.0.5, < 3) mixlib-archive (>= 0.4, < 2.0) mixlib-authentication (>= 2.1, < 4) mixlib-cli (>= 2.1.1, < 3.0) mixlib-log (>= 2.0.3, < 4.0) - mixlib-shellout (>= 3.0.3, < 4.0) + mixlib-shellout (>= 3.1.1, < 4.0) net-sftp (>= 2.1.2, < 4.0) - net-ssh (>= 4.2, < 7) - net-ssh-multi (~> 1.2, >= 1.2.1) - ohai (~> 16.0) - pastel + ohai (~> 17.0) plist (~> 3.2) proxifier (~> 1.0) syslog-logger (~> 1.6) train-core (~> 3.2, >= 3.2.28) train-winrm (>= 0.2.5) - tty-screen (~> 0.6) - uuidtools (~> 2.1.5) - chef-config (16.2.44) + uuidtools (>= 2.1.5, < 3.0) + chef-config (17.2.29) addressable - chef-utils (= 16.2.44) + chef-utils (= 17.2.29) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) tomlrb (~> 1.2) - chef-utils (16.2.44) - chef-vault (4.0.1) - chef-zero (15.0.0) + chef-telemetry (1.0.29) + chef-config + concurrent-ruby (~> 1.0) + chef-utils (17.2.29) + concurrent-ruby + chef-vault (4.1.0) + chef-zero (15.0.7) ffi-yajl (~> 2.2) hashie (>= 2.0, < 5.0) mixlib-log (>= 2.0, < 4.0) rack (~> 2.0, >= 2.0.6) uuidtools (~> 2.1) - chefstyle (1.4.5) - rubocop (= 0.93.1) + webrick + chefstyle (2.0.6) + rubocop (= 1.18.3) chunky_png (1.4.0) climate_control (0.2.0) cliver (0.3.2) - cocaine (0.5.8) - climate_control (>= 0.0.3, < 1.0) - coderay (1.1.1) + coderay (1.1.3) coercible (1.0.0) descendants_tracker (~> 0.0.1) compass (1.0.3) @@ -166,21 +180,25 @@ GEM sass (>= 3.3.0, < 3.5) compass-import-once (1.0.5) sass (>= 3.2, < 3.5) - compass-rails (4.0.0) + compass-rails (2.0.1) compass (~> 1.0.0) - sass-rails (< 5.1) - sprockets (< 4.0) concurrent-ruby (1.1.9) - connection_pool (2.2.1) - cookstyle (6.21.1) - rubocop (= 0.93.1) + connection_pool (2.2.5) + cookstyle (7.15.1) + rubocop (= 1.18.3) crack (0.4.5) rexml crass (1.0.6) css_parser (1.9.0) addressable - database_cleaner (1.6.1) - ddtrace (0.7.1) + database_cleaner (2.0.1) + database_cleaner-active_record (~> 2.0.0) + database_cleaner-active_record (2.0.1) + activerecord (>= 5.a) + database_cleaner-core (~> 2.0.0) + database_cleaner-core (2.0.1) + ddtrace (0.51.0) + ffi (~> 1.0) msgpack descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) @@ -191,32 +209,43 @@ GEM dotenv-rails (2.7.6) dotenv (= 2.7.6) railties (>= 3.2) - ed25519 (1.2.4) equalizer (0.0.11) - equatable (0.6.1) erubi (1.10.0) erubis (2.7.0) - et-orbi (1.1.5) + et-orbi (1.2.4) tzinfo - excon (0.83.0) - execjs (2.7.0) - factory_bot (6.0.2) + excon (0.84.0) + execjs (2.8.1) + factory_bot (6.2.0) activesupport (>= 5.0.0) - factory_bot_rails (6.0.0) - factory_bot (~> 6.0.0) + factory_bot_rails (6.2.0) + factory_bot (~> 6.2.0) railties (>= 5.0.0) - faker (1.7.3) - i18n (~> 0.5) - faraday (0.17.4) + faker (2.18.0) + i18n (>= 1.6, < 2) + faraday (1.4.3) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) multipart-post (>= 1.2, < 3) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday_middleware (1.0.0) + faraday (~> 1.0) ffi (1.15.3) ffi-compiler (1.0.1) ffi (>= 1.0.0) rake - ffi-libarchive (1.0.0) + ffi-libarchive (1.0.17) ffi (~> 1.0) - ffi-yajl (2.3.3) - libyajl2 (~> 1.2) + ffi-yajl (2.4.0) + libyajl2 (>= 1.2) foodcritic (16.3.0) erubis ffi-yajl (~> 2.0) @@ -224,21 +253,20 @@ GEM rake rufus-lru (~> 1.0) treetop (~> 1.4) - foreman (0.84.0) - thor (~> 0.19.1) - formatador (0.2.5) - fugit (1.1.5) - et-orbi (~> 1.1, >= 1.1.3) - raabro (~> 1.1) + foreman (0.87.2) + formatador (0.3.0) + fugit (1.5.0) + et-orbi (~> 1.1, >= 1.1.8) + raabro (~> 1.4) fuzzyurl (0.9.0) globalid (0.4.2) activesupport (>= 4.2.0) - gssapi (1.3.0) + gssapi (1.3.1) ffi (>= 1.0.1) - guard (2.14.1) + guard (2.17.0) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) - lumberjack (~> 1.0) + lumberjack (>= 1.0.12, < 2.0) nenv (~> 0.1) notiffany (~> 0.0) pry (>= 0.9.12) @@ -249,14 +277,13 @@ GEM guard (~> 2.1) guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) - guard-rubocop (1.2.0) + guard-rubocop (1.4.0) guard (~> 2.0) - rubocop (~> 0.20) + rubocop (< 2.0) gyoku (1.3.1) builder (>= 2.1.2) hashdiff (1.0.1) hashie (4.1.0) - highline (2.0.3) honeycomb-beeline (2.4.2) libhoney (~> 1.14, >= 1.14.2) html_truncator (0.4.2) @@ -273,10 +300,33 @@ GEM http-parser (1.2.3) ffi-compiler (>= 1.0, < 2.0) httpclient (2.8.3) - i18n (0.9.5) + i18n (1.8.10) concurrent-ruby (~> 1.0) ice_nine (0.11.2) iniparse (1.5.0) + inspec-core (4.38.3) + addressable (~> 2.4) + chef-telemetry (~> 1.0, >= 1.0.8) + faraday (>= 0.9.0, < 1.5) + faraday_middleware (~> 1.0) + hashie (>= 3.4, < 5.0) + license-acceptance (>= 0.2.13, < 3.0) + method_source (>= 0.8, < 2.0) + mixlib-log (~> 3.0) + multipart-post (~> 2.0) + parallel (~> 1.9) + parslet (>= 1.5, < 2.0) + pry (~> 0.13) + rspec (>= 3.9, < 3.11) + rspec-its (~> 1.2) + rubyzip (>= 1.2.2, < 3.0) + semverse (~> 3.0) + sslshake (~> 1.2) + thor (>= 0.20, < 2.0) + tomlrb (>= 1.2, < 2.1) + train-core (~> 3.0) + tty-prompt (~> 0.17) + tty-table (~> 0.10) ipaddress (0.8.3) jbuilder (2.11.2) activesupport (>= 5.0.0) @@ -295,47 +345,46 @@ GEM activerecord kaminari-core (= 1.2.1) kaminari-core (1.2.1) - kgio (2.11.2) + kgio (2.11.4) launchy (2.5.0) addressable (~> 2.7) libhoney (1.18.0) addressable (~> 2.0) excon http (>= 2.0, < 5.0) - libyajl2 (1.2.0) - license-acceptance (1.0.19) + libyajl2 (2.1.0) + license-acceptance (2.1.13) pastel (~> 0.7) - tomlrb (~> 1.2) - tty-box (~> 0.3) - tty-prompt (~> 0.18) - license_finder (5.10.2) + tomlrb (>= 1.2, < 3.0) + tty-box (~> 0.6) + tty-prompt (~> 0.20) + license_finder (6.14.1) bundler - rubyzip - thor - toml (= 0.2.0) + rubyzip (>= 1, < 3) + thor (~> 1.0.1) + tomlrb (>= 1.3, < 2.1) with_env (= 1.1.0) - xml-simple - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) + xml-simple (~> 1.1.5) + listen (3.5.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) little-plugger (1.1.4) - logging (2.2.2) + logging (2.3.0) little-plugger (~> 1.1) - multi_json (~> 1.10) + multi_json (~> 1.14) loofah (2.10.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - lumberjack (1.0.12) + lumberjack (1.2.8) mail (2.7.1) mini_mime (>= 0.1.1) mail_view (2.0.4) tilt marcel (1.0.1) - method_source (0.8.2) + method_source (1.0.0) mime-types (3.3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2019.1009) + mime-types-data (3.2021.0704) mimemagic (0.3.10) nokogiri (~> 1) rake @@ -344,36 +393,30 @@ GEM minitest (5.14.4) mixlib-archive (0.4.20) mixlib-log - mixlib-authentication (3.0.6) - mixlib-cli (2.1.6) - mixlib-config (3.0.6) + mixlib-authentication (3.0.10) + mixlib-cli (2.1.8) + mixlib-config (3.0.9) tomlrb - mixlib-log (3.0.8) + mixlib-log (3.0.9) mixlib-shellout (3.2.5) chef-utils - msgpack (1.1.0) + msgpack (1.4.2) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.1.1) - necromancer (0.5.1) nenv (0.3.0) net-scp (3.0.0) net-ssh (>= 2.6.5, < 7.0.0) net-sftp (3.0.0) net-ssh (>= 5.0.0, < 7.0.0) net-ssh (6.1.0) - net-ssh-gateway (2.0.0) - net-ssh (>= 4.0.0) - net-ssh-multi (1.2.1) - net-ssh (>= 2.6.5) - net-ssh-gateway (>= 1.2.0) - newrelic_rpm (4.1.0.333) + newrelic_rpm (7.2.0) nio4r (2.5.7) - nokogiri (1.11.5) + nokogiri (1.11.7) mini_portile2 (~> 2.5.0) racc (~> 1.4) nori (2.6.0) - notiffany (0.1.1) + notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) oauth2 (1.4.7) @@ -382,20 +425,21 @@ GEM multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - octokit (4.7.0) + octokit (4.21.0) + faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) - ohai (16.2.1) - chef-config (>= 12.8, < 17) - chef-utils (>= 16.0, < 17) + ohai (17.1.0) + chef-config (>= 14.12, < 18) + chef-utils (>= 16.0, < 18) ffi (~> 1.9) ffi-yajl (~> 2.2) ipaddress mixlib-cli (>= 1.7.0) mixlib-config (>= 2.0, < 4.0) mixlib-log (>= 2.0.1, < 4.0) - mixlib-shellout (>= 2.0, < 4.0) + mixlib-shellout (~> 3.2, >= 3.2.5) plist (~> 3.1) - systemu (~> 2.6.4) + train-core wmi-lite (~> 1.0) omniauth (1.9.1) hashie (>= 3.4.6) @@ -412,26 +456,25 @@ GEM omniauth-rails_csrf_protection (0.1.2) actionpack (>= 4.2) omniauth (>= 1.3.1) - paperclip (5.2.1) + paperclip (6.1.0) activemodel (>= 4.2.0) activesupport (>= 4.2.0) - cocaine (~> 0.5.5) mime-types mimemagic (~> 0.3.0) + terrapin (~> 0.6.0) parallel (1.20.1) - parser (3.0.1.1) + parser (3.0.2.0) ast (~> 2.4.1) parslet (1.8.2) - pastel (0.7.4) - equatable (~> 0.6) + pastel (0.8.0) tty-color (~> 0.5) - pg (0.20.0) - pg_search (2.3.2) + pg (1.2.3) + pg_search (2.3.5) activerecord (>= 5.2) activesupport (>= 5.2) - plist (3.5.0) - poltergeist (1.15.0) - capybara (~> 2.1) + plist (3.6.0) + poltergeist (1.18.1) + capybara (>= 2.1, < 4) cliver (~> 0.3.1) websocket-driver (>= 0.2.0) polyglot (0.3.5) @@ -443,37 +486,40 @@ GEM actionmailer (>= 3) premailer (~> 1.7, >= 1.7.9) proxifier (1.0.3) - pry (0.10.4) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - pry-byebug (3.8.0) + pry (0.13.1) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.9.0) byebug (~> 11.0) - pry (~> 0.10) - pry-rails (0.3.6) + pry (~> 0.13.0) + pry-rails (0.3.9) pry (>= 0.10.4) public_suffix (4.0.6) - pundit (1.1.0) + puma (5.3.2) + nio4r (~> 2.0) + pundit (2.1.0) activesupport (>= 3.0.0) - raabro (1.1.6) + raabro (1.4.0) racc (1.5.2) rack (2.2.3) - rack-protection (2.0.1) + rack-protection (2.1.0) rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.6) - actioncable (= 5.2.6) - actionmailer (= 5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) - activemodel (= 5.2.6) - activerecord (= 5.2.6) - activestorage (= 5.2.6) - activesupport (= 5.2.6) - bundler (>= 1.3.0) - railties (= 5.2.6) + rails (6.1.4) + actioncable (= 6.1.4) + actionmailbox (= 6.1.4) + actionmailer (= 6.1.4) + actionpack (= 6.1.4) + actiontext (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activemodel (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) + bundler (>= 1.15.0) + railties (= 6.1.4) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -484,14 +530,14 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (5.2.6) - actionpack (= 5.2.6) - activesupport (= 5.2.6) + railties (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) method_source - rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) + rake (>= 0.13) + thor (~> 1.0) rainbow (3.0.0) - raindrops (0.19.0) + raindrops (0.19.2) rake (13.0.6) rb-fsevent (0.11.0) rb-inotify (0.10.1) @@ -528,6 +574,9 @@ GEM rspec-expectations (3.10.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) + rspec-its (1.3.0) + rspec-core (>= 3.0.0) + rspec-expectations (>= 3.0.0) rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) @@ -540,79 +589,82 @@ GEM rspec-mocks (~> 3.10) rspec-support (~> 3.10) rspec-support (3.10.2) - rubocop (0.93.1) + rubocop (1.18.3) parallel (~> 1.10) - parser (>= 2.7.1.5) + parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8) + regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 0.6.0) + rubocop-ast (>= 1.7.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 2.0) + unicode-display_width (>= 1.4.0, < 3.0) rubocop-ast (1.7.0) parser (>= 3.0.1.1) - rubocop-rails (2.9.1) + rubocop-rails (2.11.3) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 0.90.0, < 2.0) + rubocop (>= 1.7.0, < 2.0) ruby-filemagic (0.7.2) ruby-progressbar (1.11.0) - ruby_dep (1.5.0) - rubyntlm (0.6.2) - rubyzip (2.0.0) + ruby2_keywords (0.0.4) + rubyntlm (0.6.3) + rubyzip (2.3.2) rufus-lru (1.1.0) sass (3.4.25) sass-globbing (1.1.5) sass (>= 3.1) - sass-rails (5.0.8) - railties (>= 5.2.0) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) + sass-rails (6.0.0) + sassc-rails (~> 2.1, >= 2.1.1) + sassc (2.4.0) + ffi (~> 1.9) + sassc-rails (2.1.2) + railties (>= 4.0.0) + sassc (>= 2.0) + sprockets (> 3.0) + sprockets-rails + tilt sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) - sentry-raven (2.4.0) - faraday (>= 0.7.6, < 1.0) + semverse (3.0.0) + sentry-raven (3.1.2) + faraday (>= 1.0) shellany (0.0.1) - shoulda-matchers (4.5.1) - activesupport (>= 4.2.0) + shoulda-matchers (5.0.0) + activesupport (>= 5.2.0) sidekiq (4.2.10) concurrent-ruby (~> 1.0) connection_pool (~> 2.2, >= 2.2.0) rack-protection (>= 1.5.0) redis (~> 3.2, >= 3.2.1) - sidekiq-cron (1.0.4) + sidekiq-cron (1.2.0) fugit (~> 1.1) sidekiq (>= 4.2.1) - sitemap_generator (5.3.1) + sitemap_generator (6.1.2) builder (~> 3.0) - slop (3.6.0) - spring (2.0.1) - activesupport (>= 4.2) + spring (2.1.1) spring-commands-rspec (1.0.4) spring (>= 0.9.1) - sprockets (3.7.2) + sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - statsd-ruby (1.4.0) - strings (0.1.8) - strings-ansi (~> 0.1) - unicode-display_width (~> 1.5) + sslshake (1.3.1) + statsd-ruby (1.5.0) + strings (0.2.1) + strings-ansi (~> 0.2) + unicode-display_width (>= 1.5, < 3.0) unicode_utils (~> 1.4) strings-ansi (0.2.0) syslog-logger (1.6.8) - systemu (2.6.5) - thor (0.19.4) + terrapin (0.6.0) + climate_control (>= 0.0.3, < 1.0) + thor (1.0.1) thread_safe (0.3.6) tilt (2.0.10) - toml (0.2.0) - parslet (~> 1.8.0) tomlrb (1.3.0) train-core (3.7.4) addressable (~> 2.5) @@ -621,36 +673,40 @@ GEM mixlib-shellout (>= 2.0, < 4.0) net-scp (>= 1.2, < 4.0) net-ssh (>= 2.9, < 7.0) - train-winrm (0.2.6) - winrm (~> 2.0) + train-winrm (0.2.12) + winrm (>= 2.3.6, < 3.0) + winrm-elevated (~> 1.2.2) winrm-fs (~> 1.0) - treetop (1.6.10) + treetop (1.6.11) polyglot (~> 0.3) - tty-box (0.5.0) - pastel (~> 0.7.2) - strings (~> 0.1.6) + tty-box (0.7.0) + pastel (~> 0.8) + strings (~> 0.2.0) tty-cursor (~> 0.7) - tty-color (0.5.1) + tty-color (0.6.0) tty-cursor (0.7.1) - tty-prompt (0.21.0) - necromancer (~> 0.5.0) - pastel (~> 0.7.0) - tty-reader (~> 0.7.0) - tty-reader (0.7.0) + tty-prompt (0.23.1) + pastel (~> 0.8) + tty-reader (~> 0.8) + tty-reader (0.9.0) tty-cursor (~> 0.7) - tty-screen (~> 0.7) - wisper (~> 2.0.0) - tty-screen (0.8.0) - tzinfo (1.2.9) - thread_safe (~> 0.1) - uglifier (3.2.0) + tty-screen (~> 0.8) + wisper (~> 2.0) + tty-screen (0.8.1) + tty-table (0.12.0) + pastel (~> 0.8) + strings (~> 0.2.0) + tty-screen (~> 0.8) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) + uglifier (4.2.0) execjs (>= 0.3.0, < 3) unf (0.1.4) unf_ext unf_ext (0.0.7.7) - unicode-display_width (1.7.0) + unicode-display_width (2.0.0) unicode_utils (1.4.0) - unicorn (5.4.0) + unicorn (6.0.0) kgio (~> 2.6) raindrops (~> 0.7) unicorn-rails (2.2.1) @@ -658,7 +714,7 @@ GEM unicorn utf8-cleaner (1.0.0) activesupport - uuidtools (2.1.5) + uuidtools (2.2.0) validate_url (1.0.13) activemodel (>= 3.0.0) public_suffix @@ -672,10 +728,11 @@ GEM addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) + webrick (1.7.0) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - winrm (2.3.4) + winrm (2.3.6) builder (>= 2.1.2) erubi (~> 1.8) gssapi (~> 1.2) @@ -683,8 +740,12 @@ GEM httpclient (~> 2.2, >= 2.2.0.2) logging (>= 1.6.1, < 3.0) nori (~> 2.0) - rubyntlm (~> 0.6.0, >= 0.6.1) - winrm-fs (1.3.4) + rubyntlm (~> 0.6.0, >= 0.6.3) + winrm-elevated (1.2.3) + erubi (~> 1.8) + winrm (~> 2.0) + winrm-fs (~> 1.0) + winrm-fs (1.3.5) erubi (~> 1.8) logging (>= 1.6.1, < 3.0) rubyzip (~> 2.0) @@ -692,11 +753,12 @@ GEM wisper (2.0.1) with_env (1.1.0) wmi-lite (1.0.5) - xml-simple (1.1.5) + xml-simple (1.1.8) xpath (3.2.0) nokogiri (~> 1.8) yajl-ruby (1.4.1) - yard (0.9.20) + yard (0.9.26) + zeitwerk (2.4.2) PLATFORMS ruby @@ -745,8 +807,9 @@ DEPENDENCIES premailer-rails pry-byebug pry-rails + puma pundit - rails (~> 5.2.6) + rails (~> 6.1.4) rails-controller-testing rb-readline redcarpet diff --git a/src/supermarket/app/assets/compass/_css3.scss b/src/supermarket/app/assets/compass/_css3.scss new file mode 100644 index 000000000..199d89d07 --- /dev/null +++ b/src/supermarket/app/assets/compass/_css3.scss @@ -0,0 +1,22 @@ +@import "css3/border-radius"; +@import "css3/inline-block"; +@import "css3/opacity"; +@import "css3/box-shadow"; +@import "css3/text-shadow"; +@import "css3/columns"; +@import "css3/box-sizing"; +@import "css3/box"; +@import "css3/images"; +@import "css3/background-clip"; +@import "css3/background-origin"; +@import "css3/background-size"; +@import "css3/font-face"; +@import "css3/transform"; +@import "css3/transition"; +@import "css3/appearance"; +@import "css3/regions"; +@import "css3/hyphenation"; +@import "css3/filter"; +@import "css3/pie"; +@import "css3/user-interface"; +@import "css3/flexbox"; \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/_functions.scss b/src/supermarket/app/assets/compass/_functions.scss new file mode 100644 index 000000000..eb521f2ef --- /dev/null +++ b/src/supermarket/app/assets/compass/_functions.scss @@ -0,0 +1,7 @@ +@import "functions/lists"; +@import "functions/cross_browser_support"; +@import "functions/gradient_support"; +@import "functions/constants"; +@import "functions/display"; +@import "functions/colors"; +@import "functions/font_files"; diff --git a/src/supermarket/app/assets/compass/_layout.scss b/src/supermarket/app/assets/compass/_layout.scss new file mode 100644 index 000000000..55bf9ee7d --- /dev/null +++ b/src/supermarket/app/assets/compass/_layout.scss @@ -0,0 +1,3 @@ +@import "layout/grid-background"; +@import "layout/sticky-footer"; +@import "layout/stretching"; diff --git a/src/supermarket/app/assets/compass/_reset-legacy.scss b/src/supermarket/app/assets/compass/_reset-legacy.scss new file mode 100644 index 000000000..f11f07acd --- /dev/null +++ b/src/supermarket/app/assets/compass/_reset-legacy.scss @@ -0,0 +1,3 @@ +@import "reset/utilities-legacy"; + +@include global-reset; diff --git a/src/supermarket/app/assets/compass/_reset.scss b/src/supermarket/app/assets/compass/_reset.scss new file mode 100644 index 000000000..e181dd780 --- /dev/null +++ b/src/supermarket/app/assets/compass/_reset.scss @@ -0,0 +1,3 @@ +@import "reset/utilities"; + +@include global-reset; diff --git a/src/supermarket/app/assets/compass/_support.scss b/src/supermarket/app/assets/compass/_support.scss new file mode 100644 index 000000000..37b6e1729 --- /dev/null +++ b/src/supermarket/app/assets/compass/_support.scss @@ -0,0 +1,40 @@ +// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both. +$legacy-support-for-ie: true !default; + +// Setting this to false will result in smaller output, but no support for ie6 hacks +$legacy-support-for-ie6: $legacy-support-for-ie !default; + +// Setting this to false will result in smaller output, but no support for ie7 hacks +$legacy-support-for-ie7: $legacy-support-for-ie !default; + +// Setting this to false will result in smaller output, but no support for legacy ie8 hacks +$legacy-support-for-ie8: $legacy-support-for-ie !default; + +// @private +// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly, +// But in case the user set each of those explicitly, we need to sync the value of +// this combined variable. +$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8; + +// Whether to output legacy support for mozilla. +// Usually this means hacks to support Firefox 3.6 or earlier. +$legacy-support-for-mozilla: true; + +// Support for mozilla in experimental css3 properties (-moz). +$experimental-support-for-mozilla : true !default; +// Support for webkit in experimental css3 properties (-webkit). +$experimental-support-for-webkit : true !default; +// Support for webkit's original (non-standard) gradient syntax. +$support-for-original-webkit-gradients : true !default; +// Support for opera in experimental css3 properties (-o). +$experimental-support-for-opera : true !default; +// Support for microsoft in experimental css3 properties (-ms). +$experimental-support-for-microsoft : true !default; +// Support for khtml in experimental css3 properties (-khtml). +$experimental-support-for-khtml : false !default; +// Support for svg in experimental css3 properties. +// Setting this to true might add significant size to your +// generated stylesheets. +$experimental-support-for-svg : false !default; +// Support for CSS PIE in experimental css3 properties (-pie). +$experimental-support-for-pie : false !default; diff --git a/src/supermarket/app/assets/compass/_typography.scss b/src/supermarket/app/assets/compass/_typography.scss new file mode 100644 index 000000000..4d9cb5d55 --- /dev/null +++ b/src/supermarket/app/assets/compass/_typography.scss @@ -0,0 +1,4 @@ +@import "typography/links"; +@import "typography/lists"; +@import "typography/text"; +@import "typography/vertical_rhythm"; diff --git a/src/supermarket/app/assets/compass/_utilities.scss b/src/supermarket/app/assets/compass/_utilities.scss new file mode 100644 index 000000000..53a02445d --- /dev/null +++ b/src/supermarket/app/assets/compass/_utilities.scss @@ -0,0 +1,9 @@ +@import "utilities/color"; +@import "utilities/general"; +@import "utilities/sprites"; +@import "utilities/tables"; + +// deprecated +@import "typography/links"; +@import "typography/lists"; +@import "typography/text"; diff --git a/src/supermarket/app/assets/compass/css3/_animation.scss b/src/supermarket/app/assets/compass/css3/_animation.scss new file mode 100644 index 000000000..823a727b2 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_animation.scss @@ -0,0 +1,2 @@ +// Core imported by default. You can also import 'animate' for predefined animations. +@import "animation/core"; diff --git a/src/supermarket/app/assets/compass/css3/_appearance.scss b/src/supermarket/app/assets/compass/css3/_appearance.scss new file mode 100644 index 000000000..87c725155 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_appearance.scss @@ -0,0 +1,16 @@ +@import "shared"; + +// Change the appearance for Mozilla, Webkit and possibly the future. +// The appearance property is currently not present in any newer CSS specification. +// +// There is no official list of accepted values, but you might check these source: +// Mozilla : https://developer.mozilla.org/en/CSS/-moz-appearance +// Webkit : http://code.google.com/p/webkit-mirror/source/browse/Source/WebCore/css/CSSValueKeywords.in?spec=svnf1aea559dcd025a8946aa7da6e4e8306f5c1b604&r=63c7d1af44430b314233fea342c3ddb2a052e365 +// (search for 'appearance' within the page) + +@mixin appearance($ap) { + $ap: unquote($ap); + @include experimental(appearance, $ap, + -moz, -webkit, not(-o), not(-ms), not(-khtml), official + ); +} diff --git a/src/supermarket/app/assets/compass/css3/_background-clip.scss b/src/supermarket/app/assets/compass/css3/_background-clip.scss new file mode 100644 index 000000000..3c05ee5ba --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_background-clip.scss @@ -0,0 +1,43 @@ +@import "shared"; + +// The default value is `padding-box` -- the box model used by modern browsers. +// +// If you wish to do so, you can override the default constant with `border-box` +// +// To override to the default border-box model, use this code: +// $default-background-clip: border-box + +$default-background-clip: padding-box !default; + +// Clip the background (image and color) at the edge of the padding or border. +// +// Legal Values: +// +// * padding-box +// * border-box +// * text + +@mixin background-clip($clip: $default-background-clip) { + // webkit and mozilla use the deprecated short [border | padding] + $clip: unquote($clip); + $deprecated: $clip; + @if $clip == padding-box { $deprecated: padding; } + @if $clip == border-box { $deprecated: border; } + // Support for webkit and mozilla's use of the deprecated short form + @include experimental(background-clip, $deprecated, + -moz, + -webkit, + not(-o), + not(-ms), + not(-khtml), + not official + ); + @include experimental(background-clip, $clip, + not(-moz), + not(-webkit), + not(-o), + not(-ms), + -khtml, + official + ); +} diff --git a/src/supermarket/app/assets/compass/css3/_background-origin.scss b/src/supermarket/app/assets/compass/css3/_background-origin.scss new file mode 100644 index 000000000..eefd2623c --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_background-origin.scss @@ -0,0 +1,42 @@ +// Override `$default-background-origin` to change the default. + +@import "shared"; + +$default-background-origin: content-box !default; + +// Position the background off the edge of the padding, border or content +// +// * Possible values: +// * `padding-box` +// * `border-box` +// * `content-box` +// * browser defaults to `padding-box` +// * mixin defaults to `content-box` + + +@mixin background-origin($origin: $default-background-origin) { + $origin: unquote($origin); + // webkit and mozilla use the deprecated short [border | padding | content] + $deprecated: $origin; + @if $origin == padding-box { $deprecated: padding; } + @if $origin == border-box { $deprecated: border; } + @if $origin == content-box { $deprecated: content; } + + // Support for webkit and mozilla's use of the deprecated short form + @include experimental(background-origin, $deprecated, + -moz, + -webkit, + not(-o), + not(-ms), + not(-khtml), + not official + ); + @include experimental(background-origin, $origin, + not(-moz), + not(-webkit), + -o, + -ms, + -khtml, + official + ); +} diff --git a/src/supermarket/app/assets/compass/css3/_background-size.scss b/src/supermarket/app/assets/compass/css3/_background-size.scss new file mode 100644 index 000000000..5e46ae34d --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_background-size.scss @@ -0,0 +1,26 @@ +@import "shared"; + +// override to change the default +$default-background-size: 100% auto !default; + +// Set the size of background images using px, width and height, or percentages. +// Currently supported in: Opera, Gecko, Webkit. +// +// * percentages are relative to the background-origin (default = padding-box) +// * mixin defaults to: `$default-background-size` +@mixin background-size( + $size-1: $default-background-size, + $size-2: false, + $size-3: false, + $size-4: false, + $size-5: false, + $size-6: false, + $size-7: false, + $size-8: false, + $size-9: false, + $size-10: false +) { + $size-1: if(type-of($size-1) == string, unquote($size-1), $size-1); + $sizes: compact($size-1, $size-2, $size-3, $size-4, $size-5, $size-6, $size-7, $size-8, $size-9, $size-10); + @include experimental(background-size, $sizes, -moz, -webkit, -o, not(-ms), not(-khtml)); +} diff --git a/src/supermarket/app/assets/compass/css3/_border-radius.scss b/src/supermarket/app/assets/compass/css3/_border-radius.scss new file mode 100644 index 000000000..8e09c8a4c --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_border-radius.scss @@ -0,0 +1,130 @@ +@import "shared"; + +$default-border-radius: 5px !default; + +// Round all corners by a specific amount, defaults to value of `$default-border-radius`. +// +// When two values are passed, the first is the horizontal radius +// and the second is the vertical radius. +// +// Note: webkit does not support shorthand syntax for several corners at once. +// So in the case where you pass several values only the first will be passed to webkit. +// +// Examples: +// +// .simple { @include border-radius(4px, 4px); } +// .compound { @include border-radius(2px 5px, 3px 6px); } +// .crazy { @include border-radius(1px 3px 5px 7px, 2px 4px 6px 8px)} +// +// Which generates: +// +// .simple { +// -webkit-border-radius: 4px 4px; +// -moz-border-radius: 4px / 4px; +// -khtml-border-radius: 4px / 4px; +// border-radius: 4px / 4px; } +// +// .compound { +// -webkit-border-radius: 2px 3px; +// -moz-border-radius: 2px 5px / 3px 6px; +// -khtml-border-radius: 2px 5px / 3px 6px; +// border-radius: 2px 5px / 3px 6px; } +// +// .crazy { +// -webkit-border-radius: 1px 2px; +// -moz-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; +// -khtml-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; +// border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; } + +@mixin border-radius($radius: $default-border-radius, $vertical-radius: false) { + + @if $vertical-radius { + // Webkit doesn't understand the official shorthand syntax for specifying + // a vertical radius unless so in case there's several we only take the first. + @include experimental(border-radius, first-value-of($radius) first-value-of($vertical-radius), + not(-moz), + -webkit, + not(-o), + not(-ms), + not(-khtml), + not(official) + ); + @include experimental("border-radius", $radius unquote("/") $vertical-radius, + -moz, + not(-webkit), + not(-o), + not(-ms), + -khtml, + official + ); + } + @else { + @include experimental(border-radius, $radius); + } +} + +// Round radius at position by amount. +// +// * legal values for `$vert`: `top`, `bottom` +// * legal values for `$horz`: `left`, `right` + +@mixin border-corner-radius($vert, $horz, $radius: $default-border-radius) { + // Support for mozilla's syntax for specifying a corner + @include experimental("border-radius-#{$vert}#{$horz}", $radius, + -moz, + not(-webkit), + not(-o), + not(-ms), + not(-khtml), + not(official) + ); + @include experimental("border-#{$vert}-#{$horz}-radius", $radius, + not(-moz), + -webkit, + not(-o), + not(-ms), + -khtml, + official + ); + +} + +// Round top-left corner only + +@mixin border-top-left-radius($radius: $default-border-radius) { + @include border-corner-radius(top, left, $radius); } + +// Round top-right corner only + +@mixin border-top-right-radius($radius: $default-border-radius) { + @include border-corner-radius(top, right, $radius); } + +// Round bottom-left corner only + +@mixin border-bottom-left-radius($radius: $default-border-radius) { + @include border-corner-radius(bottom, left, $radius); } + +// Round bottom-right corner only + +@mixin border-bottom-right-radius($radius: $default-border-radius) { + @include border-corner-radius(bottom, right, $radius); } + +// Round both top corners by amount +@mixin border-top-radius($radius: $default-border-radius) { + @include border-top-left-radius($radius); + @include border-top-right-radius($radius); } + +// Round both right corners by amount +@mixin border-right-radius($radius: $default-border-radius) { + @include border-top-right-radius($radius); + @include border-bottom-right-radius($radius); } + +// Round both bottom corners by amount +@mixin border-bottom-radius($radius: $default-border-radius) { + @include border-bottom-left-radius($radius); + @include border-bottom-right-radius($radius); } + +// Round both left corners by amount +@mixin border-left-radius($radius: $default-border-radius) { + @include border-top-left-radius($radius); + @include border-bottom-left-radius($radius); } diff --git a/src/supermarket/app/assets/compass/css3/_box-shadow.scss b/src/supermarket/app/assets/compass/css3/_box-shadow.scss new file mode 100644 index 000000000..037776799 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_box-shadow.scss @@ -0,0 +1,76 @@ +// @doc off +// These defaults make the arguments optional for this mixin +// If you like, set different defaults before importing. +// @doc on + +@import "shared"; +@import "../functions"; + +// The default color for box shadows +$default-box-shadow-color: #333333 !default; + +// The default horizontal offset. Positive is to the right. +$default-box-shadow-h-offset: 0px !default; + +// The default vertical offset. Positive is down. +$default-box-shadow-v-offset: 0px !default; + +// The default blur length. +$default-box-shadow-blur: 5px !default; + +// The default spread length. +$default-box-shadow-spread : false !default; + +// The default shadow inset: inset or false (for standard shadow). +$default-box-shadow-inset : false !default; + +// Provides cross-browser for Webkit, Gecko, and CSS3 box shadows when one or more box +// shadows are needed. +// Each shadow argument should adhere to the standard css3 syntax for the +// box-shadow property. +@mixin box-shadow( + $shadow-1 : default, + $shadow-2 : false, + $shadow-3 : false, + $shadow-4 : false, + $shadow-5 : false, + $shadow-6 : false, + $shadow-7 : false, + $shadow-8 : false, + $shadow-9 : false, + $shadow-10: false +) { + @if $shadow-1 == default { + $shadow-1 : -compass-space-list(compact(if($default-box-shadow-inset, inset, false), $default-box-shadow-h-offset, $default-box-shadow-v-offset, $default-box-shadow-blur, $default-box-shadow-spread, $default-box-shadow-color)); + } + $shadow : compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10); + @include experimental(box-shadow, $shadow, + -moz, -webkit, not(-o), not(-ms), not(-khtml), official + ); +} + +// Provides a single cross-browser CSS box shadow for Webkit, Gecko, and CSS3. +// Includes default arguments for horizontal offset, vertical offset, blur length, spread length, color and inset. +@mixin single-box-shadow( + $hoff : $default-box-shadow-h-offset, + $voff : $default-box-shadow-v-offset, + $blur : $default-box-shadow-blur, + $spread : $default-box-shadow-spread, + $color : $default-box-shadow-color, + $inset : $default-box-shadow-inset +) { + @if not ($inset == true or $inset == false or $inset == inset) { + @warn "$inset expected to be true or the inset keyword. Got #{$inset} instead. Using: inset"; + } + + @if $color == none { + @include box-shadow(none); + } @else { + $full : $hoff $voff; + @if $blur { $full: $full $blur; } + @if $spread { $full: $full $spread; } + @if $color { $full: $full $color; } + @if $inset { $full: inset $full; } + @include box-shadow($full); + } +} diff --git a/src/supermarket/app/assets/compass/css3/_box-sizing.scss b/src/supermarket/app/assets/compass/css3/_box-sizing.scss new file mode 100644 index 000000000..b12e9801f --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_box-sizing.scss @@ -0,0 +1,18 @@ +@import "shared"; + +// The default box-sizing model when no argument is provided to the box-sizing mixin: [ content-box | border-box | padding-box ] +// +// The browser default is content-box, compass defaults to border-box. +$default-box-sizing: border-box !default; + +// Change the box model for Mozilla, Webkit, IE8 and the future +// +// @param $bs +// [ content-box | border-box ] + +@mixin box-sizing($bs: $default-box-sizing) { + $bs: unquote($bs); + @include experimental(box-sizing, $bs, + -moz, -webkit, not(-o), not(-ms), not(-khtml), official + ); +} diff --git a/src/supermarket/app/assets/compass/css3/_box.scss b/src/supermarket/app/assets/compass/css3/_box.scss new file mode 100644 index 000000000..eac53c927 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_box.scss @@ -0,0 +1,111 @@ +@import "shared"; + +// display:box; must be used for any of the other flexbox mixins to work properly +@mixin display-box { + @include experimental-value(display, box, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// Default box orientation, assuming that the user wants something less block-like +$default-box-orient: horizontal !default; + +// Box orientation [ horizontal | vertical | inline-axis | block-axis | inherit ] +@mixin box-orient( + $orientation: $default-box-orient +) { + $orientation : unquote($orientation); + @include experimental(box-orient, $orientation, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// Default box-align +$default-box-align: stretch !default; + +// Box align [ start | end | center | baseline | stretch ] +@mixin box-align( + $alignment: $default-box-align +) { + $alignment : unquote($alignment); + @include experimental(box-align, $alignment, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// Default box flex +$default-box-flex: 0 !default; + +// mixin which takes an int argument for box flex. Apply this to the children inside the box. +// +// For example: "div.display-box > div.child-box" would get the box flex mixin. +@mixin box-flex( + $flex: $default-box-flex +) { + @include experimental(box-flex, $flex, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// Default flex group +$default-box-flex-group: 1 !default; + +// mixin which takes an int argument for flexible grouping +@mixin box-flex-group( + $group: $default-box-flex-group +) { + @include experimental(box-flex-group, $group, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// default for ordinal group +$default-box-ordinal-group: 1 !default; + +// mixin which takes an int argument for ordinal grouping and rearranging the order +@mixin box-ordinal-group( + $group: $default-ordinal-flex-group +) { + @include experimental(box-ordinal-group, $group, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// Box direction default value +$default-box-direction: normal !default; + +// mixin for box-direction [ normal | reverse | inherit ] +@mixin box-direction( + $direction: $default-box-direction +) { + $direction: unquote($direction); + @include experimental(box-direction, $direction, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// default for box lines +$default-box-lines: single !default; + +// mixin for box lines [ single | multiple ] +@mixin box-lines( + $lines: $default-box-lines +) { + $lines: unquote($lines); + @include experimental(box-lines, $lines, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} + +// default for box pack +$default-box-pack: start !default; + +// mixin for box pack [ start | end | center | justify ] +@mixin box-pack( + $pack: $default-box-pack +) { + $pack: unquote($pack); + @include experimental(box-pack, $pack, + -moz, -webkit, not(-o), -ms, not(-khtml), official + ); +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/css3/_columns.scss b/src/supermarket/app/assets/compass/css3/_columns.scss new file mode 100644 index 000000000..635cd3c1b --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_columns.scss @@ -0,0 +1,157 @@ +@import "shared"; +@import "../functions"; + +// Specify the shorthand `columns` property. +// +// Example: +// +// @include columns(20em 2) +@mixin columns($width-and-count) { + @include experimental(columns, $width-and-count, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify the number of columns +@mixin column-count($count) { + @include experimental(column-count, $count, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify the gap between columns e.g. `20px` +@mixin column-gap($width) { + @include experimental(column-gap, $width, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify the width of columns e.g. `100px` +@mixin column-width($width) { + @include experimental(column-width, $width, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify how many columns an element should span across. +// * legal values are none, all +@mixin column-span($columns) { + @include experimental(column-span, $columns, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify the width of the rule between columns e.g. `1px` +@mixin column-rule-width($width) { + @include experimental(column-rule-width, $width, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify the style of the rule between columns e.g. `dotted`. +// This works like border-style. +@mixin column-rule-style($style) { + @include experimental(column-rule-style, unquote($style), + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Specify the color of the rule between columns e.g. `blue`. +// This works like border-color. +@mixin column-rule-color($color) { + @include experimental(column-rule-color, $color, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Mixin encompassing all column rule properties +// For example: +// +// @include column-rule(1px, solid, #c00) +// +// Or the values can be space separated: +// +// @include column-rule(1px solid #c00) +@mixin column-rule($width, $style: false, $color: false) { + $full : -compass-space-list(compact($width, $style, $color)); + @include experimental(column-rule, $full, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Mixin for setting column-break-before +// +// * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column +// +// Example: +// h2.before {@include column-break-before(always);} +// +// Which generates: +// +// h2.before { +// -webkit-column-break-before: always; +// column-break-before: always;} +@mixin column-break-before($value: auto){ + @include experimental(column-break-before, $value, not(-moz), -webkit, not(-o), not(-ms), not(-khtml), official ); +} + +// Mixin for setting column-break-after +// +// * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column +// +// Example: +// h2.after {@include column-break-after(always); } +// +// Which generates: +// +// h2.after { +// -webkit-column-break-after: always; +// column-break-after: always; } +@mixin column-break-after($value: auto){ + @include experimental(column-break-after, $value, not(-moz), -webkit, not(-o), not(-ms), not(-khtml), official ); +} + +// Mixin for setting column-break-inside +// +// * legal values are auto, avoid, avoid-page, avoid-column +// +// Example: +// h2.inside {@include column-break-inside();} +// Which generates: +// +// h2.inside { +// -webkit-column-break-inside: auto; +// column-break-inside: auto;} +@mixin column-break-inside($value: auto){ + @include experimental(column-break-inside, $value, not(-moz), -webkit, not(-o), not(-ms), not(-khtml), official ); +} + +// All-purpose mixin for setting column breaks. +// +// * legal values for $type : before, after, inside +// * legal values for '$value' are dependent on $type +// * when $type = before, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column +// * when $type = after, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column +// * when $type = inside, legal values are auto, avoid, avoid-page, avoid-column +// +// Examples: +// h2.before {@include column-break(before, always);} +// h2.after {@include column-break(after, always); } +// h2.inside {@include column-break(inside); } +// +// Which generates: +// h2.before { +// -webkit-column-break-before: always; +// column-break-before: always;} +// +// h2.after { +// -webkit-column-break-after: always; +// column-break-after: always; } +// +// h2.inside { +// -webkit-column-break-inside: auto; +// column-break-inside: auto;} + +@mixin column-break($type: before, $value: auto){ + @include experimental("column-break-#{$type}", $value, not(-moz), -webkit, not(-o), not(-ms), not(-khtml), official ); +} diff --git a/src/supermarket/app/assets/compass/css3/_filter.scss b/src/supermarket/app/assets/compass/css3/_filter.scss new file mode 100644 index 000000000..a21bd474a --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_filter.scss @@ -0,0 +1,24 @@ +@import "shared"; +@import "../functions"; + +// Provides cross-browser support for the upcoming (?) css3 filter property. +// +// Each filter argument should adhere to the standard css3 syntax for the +// filter property. +@mixin filter ( + $filter-1, + $filter-2 : false, + $filter-3 : false, + $filter-4 : false, + $filter-5 : false, + $filter-6 : false, + $filter-7 : false, + $filter-8 : false, + $filter-9 : false, + $filter-10: false +) { + $filter : compact($filter-1, $filter-2, $filter-3, $filter-4, $filter-5, $filter-6, $filter-7, $filter-8, $filter-9, $filter-10); + @include experimental(filter, $filter, + -moz, -webkit, not(-o), not(-ms), not(-khtml), official + ); +} diff --git a/src/supermarket/app/assets/compass/css3/_flexbox.scss b/src/supermarket/app/assets/compass/css3/_flexbox.scss new file mode 100644 index 000000000..f83f28734 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_flexbox.scss @@ -0,0 +1,86 @@ +@import "../support"; +@import "shared"; + +// This is the underlying implementation for all the other mixins in this module. +// It is the only way to access prefix support for older versions of the spec. +// Deviates from canonical Compass implementation by dropping support for +// older versions of the Flexbox spec. +// +// `$properties`: map of property-value pairs that should be prefixed +@mixin flexbox($properties) { + @each $prop, $value in $properties { + @if $prop == display { + @include experimental-value(display, $value, not(-moz), -webkit, + not(-o), not(-ms), not(-khtml), official); + } @else { + @include experimental($prop, $value, not(-moz), -webkit, not(-o), + not(-ms), not(-khtml), official); + } + } +} + +// Values for $display are: flex (default), inline-flex +@mixin display-flex($display: flex) { + @include flexbox((display: $display)); +} + +// Values: row | row-reverse | column | column-reverse +@mixin flex-direction($direction) { + @include flexbox((flex-direction: $direction)); +} + +// Values: nowrap | wrap | wrap-reverse +@mixin flex-wrap($wrap) { + @include flexbox((flex-wrap: $wrap)); +} + +// Shorthand for flex-direction and flex-wrap. +@mixin flex-flow($flow) { + @include flexbox((flex-flow: $flow)); +} + +// Accepts an integer +@mixin order($order) { + @include flexbox((order: $order)); +} + +// Shorthand for flex-grow, flex-shrink and optionally flex-basis. +// Space separated, in that order. +@mixin flex($flex) { + @include flexbox((flex: $flex)); +} + +// Accepts a number. +@mixin flex-grow($flex-grow) { + @include flexbox((flex-grow: $flex-grow)); +} + +// Accepts a number. +@mixin flex-shrink($flex-shrink) { + @include flexbox((flex-shrink: $flex-shrink)); +} + +// Accepts any legal value for the width property. +@mixin flex-basis($flex-basis) { + @include flexbox((flex-basis: $flex-basis)); +} + +// Legal values: flex-start | flex-end | center | space-between | space-around +@mixin justify-content($justify-content) { + @include flexbox((justify-content: $justify-content)); +} + +// Legal values: flex-start | flex-end | center | baseline | stretch +@mixin align-items($align-items) { + @include flexbox((align-items: $align-items)); +} + +// Legal values: auto | flex-start | flex-end | center | baseline | stretch +@mixin align-self($align-self) { + @include flexbox((align-self: $align-self)); +} + +// Legal values: flex-start | flex-end | center | space-between | space-around | stretch +@mixin align-content($align-content) { + @include flexbox((align-content: $align-content)); +} diff --git a/src/supermarket/app/assets/compass/css3/_font-face.scss b/src/supermarket/app/assets/compass/css3/_font-face.scss new file mode 100644 index 000000000..bd3db3402 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_font-face.scss @@ -0,0 +1,48 @@ +@import "shared"; + +// Cross-browser support for @font-face. Supports IE, Gecko, Webkit, Opera. +// +// * $name is required, arbitrary, and what you will use in font stacks. +// * $font-files is required using font-files('relative/location', 'format'). +// for best results use this order: woff, opentype/truetype, svg +// * $eot is required by IE, and is a relative location of the eot file. +// * $weight shows if the font is bold, defaults to normal +// * $style defaults to normal, might be also italic +// * For android 2.2 Compatiblity, please ensure that your web page has +// a meta viewport tag. +// * To support iOS < 4.2, an SVG file must be provided +// +// If you need to generate other formats check out the Font Squirrel +// [font generator](http://www.fontsquirrel.com/fontface/generator) +// + +// In order to refer to a specific style of the font in your stylesheets as +// e.g. "font-style: italic;", you may add a couple of @font-face includes +// containing the respective font files for each style and specying +// respective the $style parameter. + +// Order of the includes matters, and it is: normal, bold, italic, bold+italic. + +@mixin font-face( + $name, + $font-files, + $eot: false, + $weight: false, + $style: false +) { + $iefont: unquote("#{$eot}?#iefix"); + @font-face { + font-family: quote($name); + @if $eot { + src: font-url($eot); + $font-files: font-url($iefont) unquote("format('eot')"), $font-files; + } + src: $font-files; + @if $weight { + font-weight: $weight; + } + @if $style { + font-style: $style; + } + } +} diff --git a/src/supermarket/app/assets/compass/css3/_hyphenation.scss b/src/supermarket/app/assets/compass/css3/_hyphenation.scss new file mode 100644 index 000000000..5a76586db --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_hyphenation.scss @@ -0,0 +1,77 @@ +@import "shared"; + +// Mixins to support specific CSS Text Level 3 elements +// +// +// +// Mixin for word-break properties +// http://www.w3.org/css3-text/#word-break +// * legal values for $type : normal, keep-all, break-all +// +// Example: +// p.wordBreak {@include word-break(break-all);} +// +// Which generates: +// p.wordBreak { +// -ms-word-break: break-all; +// word-break: break-all; +// word-break: break-word;} +// +@mixin word-break($value: normal){ + @if $value == break-all { + //Most browsers handle the break-all case the same... + @include experimental(word-break, $value, + not(-moz), not(-webkit), not(-o), -ms, not(-khtml), official + ); + //Webkit handles break-all differently... as break-word + @include experimental(word-break, break-word, + not(-moz), not(-webkit), not(-o), not(-ms), not(-khtml), official + ); + } + @else { + @include experimental(word-break, $value, + not(-moz), not(-webkit), not(-o), -ms, not(-khtml), official + ); + } +} + +// Mixin for the hyphens property +// +// W3C specification: http://www.w3.org/TR/css3-text/#hyphens +// * legal values for $type : auto, manual, none +// +// Example: +// p { +// @include hyphens(auto);} +// Which generates: +// p { +// -moz-hyphens: auto; +// -webkit-hyphens: auto; +// hyphens: auto;} +// +@mixin hyphens($value: auto){ + @include experimental(hyphens, $value, + -moz, -webkit, not(-o), not(-ms), not(-khtml), official + ); +} + +// Mixin for x-browser hyphenation based on @auchenberg's post: +// Removes the need for the HTML tag +// http://blog.kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/ +// +// Example: +// div {@include hyphenation;} +// +// Which generates: +// div { +// -ms-word-break: break-all; +// word-break: break-all; +// word-break: break-word; +// -moz-hyphens: auto; +// -webkit-hyphens: auto; +// hyphens: auto;} +// +@mixin hyphenation{ + @include word-break(break-all); + @include hyphens; +} diff --git a/src/supermarket/app/assets/compass/css3/_images.scss b/src/supermarket/app/assets/compass/css3/_images.scss new file mode 100644 index 000000000..07394a43e --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_images.scss @@ -0,0 +1,133 @@ +@import "shared"; +@import "../utilities/general/hacks"; +@import "../functions"; + +// Background property support for vendor prefixing within values. +@mixin background( + $background-1, + $background-2: false, + $background-3: false, + $background-4: false, + $background-5: false, + $background-6: false, + $background-7: false, + $background-8: false, + $background-9: false, + $background-10: false +) { + $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5, + $background-6, $background-7, $background-8, $background-9, $background-10); + $mult-bgs: -compass-list-size($backgrounds) > 1; + $add-pie-bg: prefixed(-pie, $backgrounds) or $mult-bgs; + @if $experimental-support-for-svg and prefixed(-svg, $backgrounds) { background: -svg($backgrounds); } + @if $support-for-original-webkit-gradients and prefixed(-owg, $backgrounds) { background: -owg($backgrounds); } + @if $experimental-support-for-webkit and prefixed(-webkit, $backgrounds) { background: -webkit($backgrounds); } + @if $experimental-support-for-mozilla and prefixed(-moz, $backgrounds) { background: -moz($backgrounds); } + @if $experimental-support-for-opera and prefixed(-o, $backgrounds) { background: -o($backgrounds); } + @if $experimental-support-for-pie and $add-pie-bg { -pie-background: $backgrounds ; } + background: $backgrounds ; +} + +@mixin background-with-css2-fallback( + $background-1, + $background-2: false, + $background-3: false, + $background-4: false, + $background-5: false, + $background-6: false, + $background-7: false, + $background-8: false, + $background-9: false, + $background-10: false +) { + $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5, + $background-6, $background-7, $background-8, $background-9, $background-10); + $mult-bgs: -compass-list-size($backgrounds) > 1; + $simple-background: if($mult-bgs or prefixed(-css2, $backgrounds), -css2(-compass-nth($backgrounds, last)), false); + @if not(blank($simple-background)) { background: $simple-background; } + @include background($background-1, $background-2, $background-3, $background-4, $background-5, + $background-6, $background-7, $background-8, $background-9, $background-10); +} + + +// Background image property support for vendor prefixing within values. +@mixin background-image( + $image-1, + $image-2: false, + $image-3: false, + $image-4: false, + $image-5: false, + $image-6: false, + $image-7: false, + $image-8: false, + $image-9: false, + $image-10: false +) { + $images: compact($image-1, $image-2, $image-3, $image-4, $image-5, $image-6, $image-7, $image-8, $image-9, $image-10); + $add-pie-bg: prefixed(-pie, $images) or -compass-list-size($images) > 1; + + @if $experimental-support-for-svg and prefixed(-svg, $images) { background-image: -svg($images); background-size: 100%; } + @if $support-for-original-webkit-gradients and prefixed(-owg, $images) { background-image: -owg($images); } + @if $experimental-support-for-webkit and prefixed(-webkit, $images) { background-image: -webkit($images); } + @if $experimental-support-for-mozilla and prefixed(-moz, $images) { background-image: -moz($images); } + @if $experimental-support-for-opera and prefixed(-o, $images) { background-image: -o($images); } + @if $experimental-support-for-pie and $add-pie-bg { @warn "PIE does not support background-image. Use @include background(#{$images}) instead." } + background-image: $images ; +} + +// Emit a IE-Specific filters that renders a simple linear gradient. +// For use in IE 6 - 8. Best practice would have you apply this via a +// conditional IE stylesheet, but if you must, you should place this before +// any background-image properties that you have specified. +// +// For the `$orientation` parameter, you can pass `vertical` or `horizontal`. +@mixin filter-gradient($start-color, $end-color, $orientation: vertical) { + @include has-layout; + $gradient-type: if($orientation == vertical, 0, 1); + @if $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 { + filter: progid:DXImageTransform.Microsoft.gradient(gradientType=#{$gradient-type}, startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}'); + } +} + + +// Border image property support for vendor prefixing properties and values. +@mixin border-image($value) { + @if $experimental-support-for-mozilla { -moz-border-image: -moz(reject(-compass-list($value), fill)); } + @if $support-for-original-webkit-gradients { -webkit-border-image: -owg(reject(-compass-list($value), fill)); } + @if $experimental-support-for-webkit { -webkit-border-image: -webkit(reject(-compass-list($value), fill)); } + @if $experimental-support-for-opera { -o-border-image: -o(reject(-compass-list($value), fill)); } + @if $experimental-support-for-svg { border-image: -svg(reject(-compass-list($value), fill)); } + border-image: $value; +} + +// List style image property support for vendor prefixing within values. +@mixin list-style-image($image) { + @if $experimental-support-for-mozilla and prefixed(-moz, $image) { list-style-image: -moz($image); } + @if $support-for-original-webkit-gradients and prefixed(-owg, $image) { list-style-image: -owg($image); } + @if $experimental-support-for-webkit and prefixed(-webkit, $image) { list-style-image: -webkit($image); } + @if $experimental-support-for-opera and prefixed(-o, $image) { list-style-image: -o($image); } + @if $experimental-support-for-svg and prefixed(-svg, $image) { list-style-image: -svg($image); } + list-style-image: $image ; +} + +// List style property support for vendor prefixing within values. +@mixin list-style($value) { + $value: -compass-list($value); + @if $experimental-support-for-mozilla and prefixed(-moz, $value) { list-style-image: -moz($value); } + @if $support-for-original-webkit-gradients and prefixed(-owg, $value) { list-style-image: -owg($value); } + @if $experimental-support-for-webkit and prefixed(-webkit, $value) { list-style-image: -webkit($value); } + @if $experimental-support-for-opera and prefixed(-o, $value) { list-style-image: -o($value); } + @if $experimental-support-for-svg and prefixed(-svg, $value) { list-style-image: -svg($value); } + list-style-image: $value ; +} + +// content property support for vendor prefixing within values. +@mixin content($value) { + $value: -compass-list($value); + @if $experimental-support-for-mozilla and prefixed(-moz, $value) { content: -moz($value); } + @if $support-for-original-webkit-gradients and prefixed(-owg, $value) { content: -owg($value); } + @if $experimental-support-for-webkit and prefixed(-webkit, $value) { content: -webkit($value); } + @if $experimental-support-for-opera and prefixed(-o, $value) { content: -o($value); } + @if $experimental-support-for-svg and prefixed(-svg, $value) { content: -svg($value); } + content: $value ; +} diff --git a/src/supermarket/app/assets/compass/css3/_inline-block.scss b/src/supermarket/app/assets/compass/css3/_inline-block.scss new file mode 100644 index 000000000..75519b131 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_inline-block.scss @@ -0,0 +1,22 @@ +@import "shared"; + +// Set `$inline-block-alignment` to `none` or `false` to disable the output +// of a vertical-align property in the inline-block mixin. +// Or set it to a legal value for `vertical-align` to change the default. +$inline-block-alignment: middle !default; + +// Provides a cross-browser method to implement `display: inline-block;` +@mixin inline-block($alignment: $inline-block-alignment) { + @if $legacy-support-for-mozilla { + display: -moz-inline-stack; + } + display: inline-block; + @if $alignment and $alignment != none { + vertical-align: $alignment; + } + @if $legacy-support-for-ie { + *vertical-align: auto; + zoom: 1; + *display: inline; + } +} diff --git a/src/supermarket/app/assets/compass/css3/_opacity.scss b/src/supermarket/app/assets/compass/css3/_opacity.scss new file mode 100644 index 000000000..fc497ffe4 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_opacity.scss @@ -0,0 +1,19 @@ +@import "shared"; + +// Provides cross-browser CSS opacity. Takes a number between 0 and 1 as the argument, e.g. 0.5 for 50% opacity. +// +// @param $opacity +// A number between 0 and 1, where 0 is transparent and 1 is opaque. + +@mixin opacity($opacity) { + @if $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 { + filter: unquote("progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})"); + } + opacity: $opacity; +} + +// Make an element completely transparent. +@mixin transparent { @include opacity(0); } + +// Make an element completely opaque. +@mixin opaque { @include opacity(1); } diff --git a/src/supermarket/app/assets/compass/css3/_pie.scss b/src/supermarket/app/assets/compass/css3/_pie.scss new file mode 100644 index 000000000..69390fd3d --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_pie.scss @@ -0,0 +1,73 @@ +$experimental-support-for-pie: true !default; + +// It is recommended that you use Sass's @extend directive to apply the behavior +// to your PIE elements. To assist you, Compass provides this variable. +// When set, it will cause the `@include pie` mixin to extend this class. +// The class name you provide should **not** include the `.`. +$pie-base-class: false !default; + +// The default approach to using PIE. +// Can be one of: +// +// * relative (default) +// * z-index +// * none +$pie-default-approach: relative !default; + +// The location of your PIE behavior file +// This should be root-relative to your web server +// relative assets don't work. It is recommended that +// you set this yourself. +$pie-behavior: stylesheet-url("PIE.htc") !default; + +// When using the z-index approach, the +// first ancestor of the PIE element at +// or before the container's opaque background +// should have a z-index set as well to ensure +// propert z-index stacking. +// +// The `$position` argument must be some non-static +// value (absolute, relative, etc.) +@mixin pie-container($z-index: 0, $position: relative) { + z-index: $z-index; + position: $position; +} + +// PIE elements must have this behavior attached to them. +// IE is broken -- it doesn't think of behavior urls as +// relative to the stylesheet. It considers them relative +// to the webpage. As a result, you cannot reliably use +// compass's relative_assets with PIE. +// +// * `$approach` - one of: relative, z-index, or none +// * `$z-index` - when using the z-index approach, this +// is the z-index that is applied. +@mixin pie-element( + $approach: $pie-default-approach, + $z-index: 0 +) { + behavior: $pie-behavior; + @if $approach == relative { + position: relative; + } + @else if $approach == z-index { + z-index: $z-index; + } +} + +// a smart mixin that knows to extend or include pie-element according +// to your stylesheet's configuration variables. +@mixin pie($base-class: $pie-base-class) { + @if $base-class { + @extend .#{$base-class}; + } + @else { + @include pie-element; + } +} + +// Watch `$n` levels of ancestors for changes to their class attribute +// So that cascading styles will work correctly on the PIE element. +@mixin pie-watch-ancestors($n) { + -pie-watch-ancestors: $n; +} diff --git a/src/supermarket/app/assets/compass/css3/_regions.scss b/src/supermarket/app/assets/compass/css3/_regions.scss new file mode 100644 index 000000000..1cd623f3a --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_regions.scss @@ -0,0 +1,22 @@ +@import "shared"; + +// Webkit, IE10 and future support for [CSS Regions](http://dev.w3.org/csswg/css3-regions/) +// +// $target is a value you use to link two regions of your css. Give the source of your content the flow-into property, and give your target container the flow-from property. +// +// For a visual explanation, see the diagrams at Chris Coyier's +// [CSS-Tricks](http://css-tricks.com/content-folding/) + +@mixin flow-into($target) { + $target: unquote($target); + @include experimental(flow-into, $target, + not(-moz), -webkit, not(-o), -ms, not(-khtml), not official + ); +} + +@mixin flow-from($target) { + $target: unquote($target); + @include experimental(flow-from, $target, + not(-moz), -webkit, not(-o), -ms, not(-khtml), not official + ); +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/css3/_shared.scss b/src/supermarket/app/assets/compass/css3/_shared.scss new file mode 100644 index 000000000..784ab213d --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_shared.scss @@ -0,0 +1,38 @@ +@import "../support"; + +// This mixin provides basic support for CSS3 properties and +// their corresponding experimental CSS2 properties when +// the implementations are identical except for the property +// prefix. +@mixin experimental($property, $value, + $moz : $experimental-support-for-mozilla, + $webkit : $experimental-support-for-webkit, + $o : $experimental-support-for-opera, + $ms : $experimental-support-for-microsoft, + $khtml : $experimental-support-for-khtml, + $official : true +) { + @if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : $value; } + @if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : $value; } + @if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; } + @if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; } + @if $o and $experimental-support-for-opera { -o-#{$property} : $value; } + @if $official { #{$property} : $value; } +} + +// Same as experimental(), but for cases when the property is the same and the value is vendorized +@mixin experimental-value($property, $value, + $moz : $experimental-support-for-mozilla, + $webkit : $experimental-support-for-webkit, + $o : $experimental-support-for-opera, + $ms : $experimental-support-for-microsoft, + $khtml : $experimental-support-for-khtml, + $official : true +) { + @if $webkit and $experimental-support-for-webkit { #{$property} : -webkit-#{$value}; } + @if $khtml and $experimental-support-for-khtml { #{$property} : -khtml-#{$value}; } + @if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; } + @if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; } + @if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; } + @if $official { #{$property} : #{$value}; } +} diff --git a/src/supermarket/app/assets/compass/css3/_text-shadow.scss b/src/supermarket/app/assets/compass/css3/_text-shadow.scss new file mode 100644 index 000000000..e60a615e2 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_text-shadow.scss @@ -0,0 +1,88 @@ +@import "shared"; +@import "../functions"; + +// These defaults make the arguments optional for this mixin +// If you like, set different defaults in your project + +$default-text-shadow-color: #aaa !default; +$default-text-shadow-h-offset: 0px !default; +$default-text-shadow-v-offset: 0px !default; +$default-text-shadow-blur: 1px !default; +$default-text-shadow-spread: false !default; + +// Provides cross-browser text shadows when one or more shadows are needed. +// Each shadow argument should adhere to the standard css3 syntax for the +// text-shadow property. +// +// Note: if any shadow has a spread parameter, this will cause the mixin +// to emit the shadow declaration twice, first without the spread, +// then with the spread included. This allows you to progressively +// enhance the browsers that do support the spread parameter. +@mixin text-shadow( + $shadow-1 : default, + $shadow-2 : false, + $shadow-3 : false, + $shadow-4 : false, + $shadow-5 : false, + $shadow-6 : false, + $shadow-7 : false, + $shadow-8 : false, + $shadow-9 : false, + $shadow-10: false +) { + @if $shadow-1 == default { + $shadow-1: compact($default-text-shadow-h-offset $default-text-shadow-v-offset $default-text-shadow-blur $default-text-shadow-spread $default-text-shadow-color); + } + $shadows-without-spread: join((),(),comma); + $shadows: join((),(),comma); + $has-spread: false; + @each $shadow in compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, + $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10) { + @if length($shadow) > 4 { + $has-spread: true; + $shadows-without-spread: append($shadows-without-spread, nth($shadow,1) nth($shadow,2) nth($shadow,3) nth($shadow,5)); + $shadows: append($shadows, $shadow); + } else { + $shadows-without-spread: append($shadows-without-spread, $shadow); + $shadows: append($shadows, $shadow); + } + } + @if $has-spread { + text-shadow: $shadows-without-spread; + } + text-shadow: $shadows; +} + +// Provides a single cross-browser CSS text shadow. +// +// Provides sensible defaults for the color, horizontal offset, vertical offset, blur, and spread +// according to the configuration defaults above. +@mixin single-text-shadow( + $hoff: false, + $voff: false, + $blur: false, + $spread: false, + $color: false +) { + // A lot of people think the color comes first. It doesn't. + @if type-of($hoff) == color { + $temp-color: $hoff; + $hoff: $voff; + $voff: $blur; + $blur: $spread; + $spread: $color; + $color: $temp-color; + } + // Can't rely on default assignment with multiple supported argument orders. + $hoff: if($hoff, $hoff, $default-text-shadow-h-offset); + $voff: if($voff, $voff, $default-text-shadow-v-offset); + $blur: if($blur, $blur, $default-text-shadow-blur ); + $spread: if($spread, $spread, $default-text-shadow-spread ); + $color: if($color, $color, $default-text-shadow-color ); + // We don't need experimental support for this property. + @if $color == none or $hoff == none { + @include text-shadow(none); + } @else { + @include text-shadow(compact($hoff $voff $blur $spread $color)); + } +} diff --git a/src/supermarket/app/assets/compass/css3/_transform-legacy.scss b/src/supermarket/app/assets/compass/css3/_transform-legacy.scss new file mode 100644 index 000000000..3af4795e1 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_transform-legacy.scss @@ -0,0 +1,87 @@ +@import "shared"; + +@warn "This version of the transform module has been deprecated and will be removed."; + +// CSS Transform and Transform-Origin + +// Apply a transform sent as a complete string. + +@mixin apply-transform($transform) { + @include experimental(transform, $transform, + -moz, -webkit, -o, not(-ms), not(-khtml), official + ); +} + +// Apply a transform-origin sent as a complete string. + +@mixin apply-origin($origin) { + @include experimental(transform-origin, $origin, + -moz, -webkit, -o, not(-ms), not(-khtml), official + ); +} + +// transform-origin requires x and y coordinates +// +// * only applies the coordinates if they are there so that it can be called by scale, rotate and skew safely + +@mixin transform-origin($originx: 50%, $originy: 50%) { + @if $originx or $originy { + @if $originy { + @include apply-origin($originx or 50% $originy); + } @else { + @include apply-origin($originx); + } + } +} + +// A full transform mixin with everything you could want +// +// * including origin adjustments if you want them +// * scale, rotate and skew require units of degrees(deg) +// * scale takes a multiplier, rotate and skew take degrees + +@mixin transform( + $scale: 1, + $rotate: 0deg, + $transx: 0, + $transy: 0, + $skewx: 0deg, + $skewy: 0deg, + $originx: false, + $originy: false +) { + $transform : scale($scale) rotate($rotate) translate($transx, $transy) skew($skewx, $skewy); + @include apply-transform($transform); + @include transform-origin($originx, $originy); +} + +// Transform Partials +// +// These work well on their own, but they don't add to each other, they override. +// Use them with extra origin args, or along side +transform-origin + +// Adjust only the scale, with optional origin coordinates + +@mixin scale($scale: 1.25, $originx: false, $originy: false) { + @include apply-transform(scale($scale)); + @include transform-origin($originx, $originy); +} + +// Adjust only the rotation, with optional origin coordinates + +@mixin rotate($rotate: 45deg, $originx: false, $originy: false) { + @include apply-transform(rotate($rotate)); + @include transform-origin($originx, $originy); +} + +// Adjust only the translation + +@mixin translate($transx: 0, $transy: 0) { + @include apply-transform(translate($transx, $transy)); +} + +// Adjust only the skew, with optional origin coordinates +@mixin skew($skewx: 0deg, $skewy: 0deg, $originx: false, $originy: false) { + @include apply-transform(skew($skewx, $skewy)); + @include transform-origin($originx, $originy); +} diff --git a/src/supermarket/app/assets/compass/css3/_transform.scss b/src/supermarket/app/assets/compass/css3/_transform.scss new file mode 100644 index 000000000..20a5ad698 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_transform.scss @@ -0,0 +1,598 @@ +@import "shared"; + +// @doc off +// Note ---------------------------------------------------------------------- +// Safari, Chrome, and Firefox all support 3D transforms. However, +// only in the most recent builds. You should also provide fallback 2d support for +// Opera and IE. IE10 is slated to have 3d enabled, but is currently unreleased. +// To make that easy, all 2D transforms include an browser-targeting toggle ($only3d) +// to switch between the two support lists. The toggle defaults to 'false' (2D), +// and also accepts 'true' (3D). Currently the lists are as follows: +// 2D: Mozilla, Webkit, Opera, Official +// 3D: Webkit, Firefox. + +// Available Transforms ------------------------------------------------------ +// - Scale (2d and 3d) +// - Rotate (2d and 3d) +// - Translate (2d and 3d) +// - Skew (2d only) + +// Transform Parameters ------------------------------------------------------ +// - Transform Origin (2d and 3d) +// - Perspective (3d) +// - Perspective Origin (3d) +// - Transform Style (3d) +// - Backface Visibility (3d) + +// Mixins -------------------------------------------------------------------- +// transform-origin +// - shortcuts: transform-origin2d, transform-origin3d +// - helpers: apply-origin +// transform +// - shortcuts: transform2d, transform3d +// - helpers: simple-transform, create-transform +// perspective +// - helpers: perspective-origin +// transform-style +// backface-visibility +// scale +// - shortcuts: scaleX, scaleY, scaleZ, scale3d +// rotate +// - shortcuts: rotateX, rotateY, rotate3d +// translate +// - shortcuts: translateX, translateY, translateZ, translate3d +// skew +// - shortcuts: skewX, skewY + +// Defaults ------------------------------------------------------------------ +// @doc on + +// The default x-origin for transforms +$default-origin-x : 50% !default; +// The default y-origin for transforms +$default-origin-y : 50% !default; +// The default z-origin for transforms +$default-origin-z : 50% !default; + + +// The default x-multiplier for scaling +$default-scale-x : 1.25 !default; +// The default y-multiplier for scaling +$default-scale-y : $default-scale-x !default; +// The default z-multiplier for scaling +$default-scale-z : $default-scale-x !default; + + +// The default angle for rotations +$default-rotate : 45deg !default; + + +// The default x-vector for the axis of 3d rotations +$default-vector-x : 1 !default; +// The default y-vector for the axis of 3d rotations +$default-vector-y : 1 !default; +// The default z-vector for the axis of 3d rotations +$default-vector-z : 1 !default; + + +// The default x-length for translations +$default-translate-x : 1em !default; +// The default y-length for translations +$default-translate-y : $default-translate-x !default; +// The default z-length for translations +$default-translate-z : $default-translate-x !default; + + +// The default x-angle for skewing +$default-skew-x : 5deg !default; +// The default y-angle for skewing +$default-skew-y : 5deg !default; + + +// **Transform-origin** +// Transform-origin sent as a complete string +// +// @include apply-origin( origin [, 3D-only ] ) +// +// where 'origin' is a space separated list containing 1-3 (x/y/z) coordinates +// in percentages, absolute (px, cm, in, em etc..) or relative +// (left, top, right, bottom, center) units +// +// @param only3d Set this to true to only apply this +// mixin where browsers have 3D support. +@mixin apply-origin($origin, $only3d) { + $only3d: $only3d or -compass-list-size(-compass-list($origin)) > 2; + @if $only3d { + @include experimental(transform-origin, $origin, + -moz, -webkit, -o, -ms, not(-khtml), official + ); + } @else { + @include experimental(transform-origin, $origin, + -moz, -webkit, -o, -ms, not(-khtml), official + ); + } +} + +// Transform-origin sent as individual arguments: +// +// @include transform-origin( [ origin-x, origin-y, origin-z, 3D-only ] ) +// +// where the 3 'origin-' arguments represent x/y/z coordinates. +// +// **NOTE:** setting z coordinates triggers 3D support list, leave false for 2D support +@mixin transform-origin( + $origin-x: $default-origin-x, + $origin-y: $default-origin-y, + $origin-z: false, + $only3d: if($origin-z, true, false) +) { + $origin: unquote(''); + @if $origin-x or $origin-y or $origin-z { + @if $origin-x { $origin: $origin-x; } @else { $origin: 50%; } + @if $origin-y { $origin: $origin $origin-y; } @else { @if $origin-z { $origin: $origin 50%; }} + @if $origin-z { $origin: $origin $origin-z; } + @include apply-origin($origin, $only3d); + } +} + + +// Transform sent as a complete string: +// +// @include transform( transforms [, 3D-only ] ) +// +// where 'transforms' is a space separated list of all the transforms to be applied. +@mixin transform( + $transform, + $only3d: false +) { + @if $only3d { + @include experimental(transform, $transform, + -moz, -webkit, -o, -ms, not(-khtml), official + ); + } @else { + @include experimental(transform, $transform, + -moz, -webkit, -o, -ms, not(-khtml), official + ); + } +} + +// Shortcut to target all browsers with 2D transform support +@mixin transform2d($trans) { + @include transform($trans, false); +} + +// Shortcut to target only browsers with 3D transform support +@mixin transform3d($trans) { + @include transform($trans, true); +} + +// @doc off +// 3D Parameters ------------------------------------------------------------- +// @doc on + +// Set the perspective of 3D transforms on the children of an element: +// +// @include perspective( perspective ) +// +// where 'perspective' is a unitless number representing the depth of the +// z-axis. The higher the perspective, the more exaggerated the foreshortening. +// values from 500 to 1000 are more-or-less "normal" - a good starting-point. +@mixin perspective($p) { + @include experimental(perspective, $p, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Set the origin position for the perspective +// +// @include perspective-origin(origin-x [origin-y]) +// +// where the two arguments represent x/y coordinates +@mixin perspective-origin($origin: 50%) { + @include experimental(perspective-origin, $origin, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Determine whether a 3D objects children also live in the given 3D space +// +// @include transform-style( [ style ] ) +// +// where `style` can be either `flat` or `preserve-3d`. +// Browsers default to `flat`, mixin defaults to `preserve-3d`. +@mixin transform-style($style: preserve-3d) { + @include experimental(transform-style, $style, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// Determine the visibility of an element when it's back is turned +// +// @include backface-visibility( [ visibility ] ) +// +// where `visibility` can be either `visible` or `hidden`. +// Browsers default to visible, mixin defaults to hidden +@mixin backface-visibility($visibility: hidden) { + @include experimental(backface-visibility, $visibility, + -moz, -webkit, -o, -ms, not(-khtml), official + ); +} + +// @doc off +// Transform Partials -------------------------------------------------------- +// These work well on their own, but they don't add to each other, they override. +// Use along with transform parameter mixins to adjust origin, perspective and style +// --------------------------------------------------------------------------- + + +// Scale --------------------------------------------------------------------- +// @doc on + +// Scale an object along the x and y axis: +// +// @include scale( [ scale-x, scale-y, perspective, 3D-only ] ) +// +// where the 'scale-' arguments are unitless multipliers of the x and y dimensions +// and perspective, which works the same as the stand-alone perspective property/mixin +// but applies to the individual element (multiplied with any parent perspective) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin scale( + $scale-x: $default-scale-x, + $scale-y: $scale-x, + $perspective: false, + $only3d: false +) { + $trans: scale($scale-x, $scale-y); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// Scale an object along the x axis +// @include scaleX( [ scale-x, perspective, 3D-only ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin scaleX( + $scale: $default-scale-x, + $perspective: false, + $only3d: false +) { + $trans: scaleX($scale); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// Scale an object along the y axis +// @include scaleY( [ scale-y, perspective, 3D-only ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin scaleY( + $scale: $default-scale-y, + $perspective: false, + $only3d: false +) { + $trans: scaleY($scale); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// Scale an object along the z axis +// @include scaleZ( [ scale-z, perspective ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin scaleZ( + $scale: $default-scale-z, + $perspective: false +) { + $trans: scaleZ($scale); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// Scale and object along all three axis +// @include scale3d( [ scale-x, scale-y, scale-z, perspective ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin scale3d( + $scale-x: $default-scale-x, + $scale-y: $default-scale-y, + $scale-z: $default-scale-z, + $perspective: false +) { + $trans: scale3d($scale-x, $scale-y, $scale-z); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// @doc off +// Rotate -------------------------------------------------------------------- +// @doc on + +// Rotate an object around the z axis (2D) +// @include rotate( [ rotation, perspective, 3D-only ] ) +// where 'rotation' is an angle set in degrees (deg) or radian (rad) units +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin rotate( + $rotate: $default-rotate, + $perspective: false, + $only3d: false +) { + $trans: rotate($rotate); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// A longcut for 'rotate' in case you forget that 'z' is implied +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin rotateZ( + $rotate: $default-rotate, + $perspective: false, + $only3d: false +) { + @include rotate($rotate, $perspective, $only3d); +} + +// Rotate an object around the x axis (3D) +// @include rotateX( [ rotation, perspective ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin rotateX( + $rotate: $default-rotate, + $perspective: false +) { + $trans: rotateX($rotate); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// Rotate an object around the y axis (3D) +// @include rotate( [ rotation, perspective ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin rotateY( + $rotate: $default-rotate, + $perspective: false +) { + $trans: rotateY($rotate); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// Rotate an object around an arbitrary axis (3D) +// @include rotate( [ vector-x, vector-y, vector-z, rotation, perspective ] ) +// where the 'vector-' arguments accept unitless numbers. +// These numbers are not important on their own, but in relation to one another +// creating an axis from your transform-origin, along the axis of Xx = Yy = Zz. +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin rotate3d( + $vector-x: $default-vector-x, + $vector-y: $default-vector-y, + $vector-z: $default-vector-z, + $rotate: $default-rotate, + $perspective: false +) { + $trans: rotate3d($vector-x, $vector-y, $vector-z, $rotate); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// @doc off +// Translate ----------------------------------------------------------------- +// @doc on + +// Move an object along the x or y axis (2D) +// @include translate( [ translate-x, translate-y, perspective, 3D-only ] ) +// where the 'translate-' arguments accept any distance in percentages or absolute (px, cm, in, em etc..) units. +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin translate( + $translate-x: $default-translate-x, + $translate-y: $default-translate-y, + $perspective: false, + $only3d: false +) { + $trans: translate($translate-x, $translate-y); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// Move an object along the x axis (2D) +// @include translate( [ translate-x, perspective, 3D-only ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin translateX( + $trans-x: $default-translate-x, + $perspective: false, + $only3d: false +) { + $trans: translateX($trans-x); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// Move an object along the y axis (2D) +// @include translate( [ translate-y, perspective, 3D-only ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin translateY( + $trans-y: $default-translate-y, + $perspective: false, + $only3d: false +) { + $trans: translateY($trans-y); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform($trans, $only3d); +} + +// Move an object along the z axis (3D) +// @include translate( [ translate-z, perspective ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin translateZ( + $trans-z: $default-translate-z, + $perspective: false +) { + $trans: translateZ($trans-z); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// Move an object along the x, y and z axis (3D) +// @include translate( [ translate-x, translate-y, translate-z, perspective ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin translate3d( + $translate-x: $default-translate-x, + $translate-y: $default-translate-y, + $translate-z: $default-translate-z, + $perspective: false +) { + $trans: translate3d($translate-x, $translate-y, $translate-z); + @if $perspective { $trans: perspective($perspective) $trans; } + @include transform3d($trans); +} + +// @doc off +// Skew ---------------------------------------------------------------------- +// @doc on + +// Skew an element: +// +// @include skew( [ skew-x, skew-y, 3D-only ] ) +// +// where the 'skew-' arguments accept css angles in degrees (deg) or radian (rad) units. +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin skew( + $skew-x: $default-skew-x, + $skew-y: $default-skew-y, + $only3d: false +) { + $trans: skew($skew-x, $skew-y); + @include transform($trans, $only3d); +} + +// Skew an element along the x axiz +// +// @include skew( [ skew-x, 3D-only ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin skewX( + $skew-x: $default-skew-x, + $only3d: false +) { + $trans: skewX($skew-x); + @include transform($trans, $only3d); +} + +// Skew an element along the y axis +// +// @include skew( [ skew-y, 3D-only ] ) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin skewY( + $skew-y: $default-skew-y, + $only3d: false +) { + $trans: skewY($skew-y); + @include transform($trans, $only3d); +} + + +// Full transform mixins +// For settings any combination of transforms as arguments +// These are complex and not highly recommended for daily use. They are mainly +// here for backward-compatibility purposes. +// +// * they include origin adjustments +// * scale takes a multiplier (unitless), rotate and skew take degrees (deg) +// +// **Note** This mixin cannot be combined with other transform mixins. +@mixin create-transform( + $perspective: false, + $scale-x: false, + $scale-y: false, + $scale-z: false, + $rotate-x: false, + $rotate-y: false, + $rotate-z: false, + $rotate3d: false, + $trans-x: false, + $trans-y: false, + $trans-z: false, + $skew-x: false, + $skew-y: false, + $origin-x: false, + $origin-y: false, + $origin-z: false, + $only3d: false +) { + $trans: unquote(""); + + // perspective + @if $perspective { $trans: perspective($perspective) ; } + + // scale + @if $scale-x and $scale-y { + @if $scale-z { $trans: $trans scale3d($scale-x, $scale-y, $scale-z); } + @else { $trans: $trans scale($scale-x, $scale-y); } + } @else { + @if $scale-x { $trans: $trans scaleX($scale-x); } + @if $scale-y { $trans: $trans scaleY($scale-y); } + @if $scale-z { $trans: $trans scaleZ($scale-z); } + } + + // rotate + @if $rotate-x { $trans: $trans rotateX($rotate-x); } + @if $rotate-y { $trans: $trans rotateY($rotate-y); } + @if $rotate-z { $trans: $trans rotateZ($rotate-z); } + @if $rotate3d { $trans: $trans rotate3d($rotate3d); } + + // translate + @if $trans-x and $trans-y { + @if $trans-z { $trans: $trans translate3d($trans-x, $trans-y, $trans-z); } + @else { $trans: $trans translate($trans-x, $trans-y); } + } @else { + @if $trans-x { $trans: $trans translateX($trans-x); } + @if $trans-y { $trans: $trans translateY($trans-y); } + @if $trans-z { $trans: $trans translateZ($trans-z); } + } + + // skew + @if $skew-x and $skew-y { $trans: $trans skew($skew-x, $skew-y); } + @else { + @if $skew-x { $trans: $trans skewX($skew-x); } + @if $skew-y { $trans: $trans skewY($skew-y); } + } + + // apply it! + @include transform($trans, $only3d); + @include transform-origin($origin-x, $origin-y, $origin-z, $only3d); +} + + +// A simplified set of options +// backwards-compatible with the previous version of the 'transform' mixin +@mixin simple-transform( + $scale: false, + $rotate: false, + $trans-x: false, + $trans-y: false, + $skew-x: false, + $skew-y: false, + $origin-x: false, + $origin-y: false +) { + @include create-transform( + false, + $scale, $scale, false, + false, false, $rotate, false, + $trans-x, $trans-y, false, + $skew-x, $skew-y, + $origin-x, $origin-y, false, + false + ); +} diff --git a/src/supermarket/app/assets/compass/css3/_transition.scss b/src/supermarket/app/assets/compass/css3/_transition.scss new file mode 100644 index 000000000..f6666eaaa --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_transition.scss @@ -0,0 +1,222 @@ +@import "shared"; +@import "../functions"; + +// CSS Transitions +// Currently only works in Webkit. +// +// * expected in CSS3, FireFox 3.6/7 and Opera Presto 2.3 +// * We'll be prepared. +// +// Including this submodule sets following defaults for the mixins: +// +// $default-transition-property : all +// $default-transition-duration : 1s +// $default-transition-function : false +// $default-transition-delay : false +// +// Override them if you like. Timing-function and delay are set to false for browser defaults (ease, 0s). + +$default-transition-property: all !default; + +$default-transition-duration: 1s !default; + +$default-transition-function: false !default; + +$default-transition-delay: false !default; + +$transitionable-prefixed-values: transform, transform-origin !default; + +// One or more properties to transition +// +// * for multiple, use a comma-delimited list +// * also accepts "all" or "none" + +@mixin transition-property($property-1: $default-transition-property, + $property-2 : false, + $property-3 : false, + $property-4 : false, + $property-5 : false, + $property-6 : false, + $property-7 : false, + $property-8 : false, + $property-9 : false, + $property-10: false +) { + @if type-of($property-1) == string { $property-1: unquote($property-1); } + $properties: compact($property-1, $property-2, $property-3, $property-4, $property-5, $property-6, $property-7, $property-8, $property-9, $property-10); + @if $experimental-support-for-webkit { -webkit-transition-property : prefixed-for-transition(-webkit, $properties); } + @if $experimental-support-for-mozilla { -moz-transition-property : prefixed-for-transition(-moz, $properties); } + @if $experimental-support-for-opera { -o-transition-property : prefixed-for-transition(-o, $properties); } + transition-property : $properties; +} + +// One or more durations in seconds +// +// * for multiple, use a comma-delimited list +// * these durations will affect the properties in the same list position + +@mixin transition-duration($duration-1: $default-transition-duration, + $duration-2 : false, + $duration-3 : false, + $duration-4 : false, + $duration-5 : false, + $duration-6 : false, + $duration-7 : false, + $duration-8 : false, + $duration-9 : false, + $duration-10: false +) { + @if type-of($duration-1) == string { $duration-1: unquote($duration-1); } + $durations: compact($duration-1, $duration-2, $duration-3, $duration-4, $duration-5, $duration-6, $duration-7, $duration-8, $duration-9, $duration-10); + @include experimental(transition-duration, $durations, + -moz, -webkit, -o, not(-ms), not(-khtml), official + ); +} + +// One or more timing functions +// +// * [ ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier(x1, y1, x2, y2)] +// * For multiple, use a comma-delimited list +// * These functions will effect the properties in the same list position + +@mixin transition-timing-function($function-1: $default-transition-function, + $function-2 : false, + $function-3 : false, + $function-4 : false, + $function-5 : false, + $function-6 : false, + $function-7 : false, + $function-8 : false, + $function-9 : false, + $function-10: false +) { + $function-1: unquote($function-1); + $functions: compact($function-1, $function-2, $function-3, $function-4, $function-5, $function-6, $function-7, $function-8, $function-9, $function-10); + @include experimental(transition-timing-function, $functions, + -moz, -webkit, -o, not(-ms), not(-khtml), official + ); +} + +// One or more transition-delays in seconds +// +// * for multiple, use a comma-delimited list +// * these delays will effect the properties in the same list position + +@mixin transition-delay($delay-1: $default-transition-delay, + $delay-2 : false, + $delay-3 : false, + $delay-4 : false, + $delay-5 : false, + $delay-6 : false, + $delay-7 : false, + $delay-8 : false, + $delay-9 : false, + $delay-10: false +) { + @if type-of($delay-1) == string { $delay-1: unquote($delay-1); } + $delays: compact($delay-1, $delay-2, $delay-3, $delay-4, $delay-5, $delay-6, $delay-7, $delay-8, $delay-9, $delay-10); + @include experimental(transition-delay, $delays, + -moz, -webkit, -o, not(-ms), not(-khtml), official + ); +} + +// Transition all-in-one shorthand + +@mixin single-transition( + $property: $default-transition-property, + $duration: $default-transition-duration, + $function: $default-transition-function, + $delay: $default-transition-delay +) { + @include transition(compact($property $duration $function $delay)); +} + +@mixin transition( + $transition-1 : default, + $transition-2 : false, + $transition-3 : false, + $transition-4 : false, + $transition-5 : false, + $transition-6 : false, + $transition-7 : false, + $transition-8 : false, + $transition-9 : false, + $transition-10: false +) { + @if $transition-1 == default { + $transition-1 : compact($default-transition-property $default-transition-duration $default-transition-function $default-transition-delay); + } + $transitions: false; + @if type-of($transition-1) == list and type-of(nth($transition-1,1)) == list { + $transitions: join($transition-1, compact($transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10), comma); + } @else { + $transitions : compact($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10); + } + $delays: comma-list(); + $has-delays: false; + $webkit-value: comma-list(); + $moz-value: comma-list(); + $o-value: comma-list(); + + // This block can be made considerably simpler at the point in time that + // we no longer need to deal with the differences in how delays are treated. + @each $transition in $transitions { + // Extract the values from the list + // (this would be cleaner if nth took a 3rd argument to provide a default value). + $property: nth($transition, 1); + $duration: false; + $timing-function: false; + $delay: false; + @if length($transition) > 1 { $duration: nth($transition, 2); } + @if length($transition) > 2 { $timing-function: nth($transition, 3); } + @if length($transition) > 3 { $delay: nth($transition, 4); $has-delays: true; } + + // If a delay is provided without a timing function + @if is-time($timing-function) and not($delay) { $delay: $timing-function; $timing-function: false; $has-delays: true; } + + // Keep a list of delays in case one is specified + $delays: append($delays, if($delay, $delay, 0s)); + + $webkit-value: append($webkit-value, compact((prefixed-for-transition(-webkit, $property) $duration $timing-function)...)); + $moz-value: append( $moz-value, compact((prefixed-for-transition( -moz, $property) $duration $timing-function $delay)...)); + $o-value: append( $o-value, compact((prefixed-for-transition( -o, $property) $duration $timing-function $delay)...)); + } + + @if $experimental-support-for-webkit { -webkit-transition : $webkit-value; + // old webkit doesn't support the delay parameter in the shorthand so we progressively enhance it. + @if $has-delays { -webkit-transition-delay : $delays; } } + @if $experimental-support-for-mozilla { -moz-transition : $moz-value; } + @if $experimental-support-for-opera { -o-transition : $o-value; } + transition : $transitions; +} + +// coerce a list to be comma delimited or make a new, empty comma delimited list. +@function comma-list($list: ()) { + @return join((), $list, comma); +} + +// Returns `$property` with the given prefix if it is found in `$transitionable-prefixed-values`. +@function prefixed-for-transition($prefix, $property) { + @if type-of($property) == list { + $new-list: comma-list(); + @each $v in $property { + $new-list: append($new-list, prefixed-for-transition($prefix, $v)); + } + @return $new-list; + } @else { + @if index($transitionable-prefixed-values, $property) { + @return #{$prefix}-#{$property}; + } @else { + @return $property; + } + } +} + +// Checks if the value given is a unit of time. +@function is-time($value) { + @if type-of($value) == number { + @return not(not(index(s ms, unit($value)))); + } @else { + @return false; + } +} diff --git a/src/supermarket/app/assets/compass/css3/_user-interface.scss b/src/supermarket/app/assets/compass/css3/_user-interface.scss new file mode 100644 index 000000000..bbb270fd8 --- /dev/null +++ b/src/supermarket/app/assets/compass/css3/_user-interface.scss @@ -0,0 +1,47 @@ +// User Interface ------------------------------------------------------------ +// This file can be expanded to handle all the user interface properties as +// they become available in browsers: +// http://www.w3.org/TR/2000/WD-css3-userint-20000216 +@import "shared"; + + +// This property controls the selection model and granularity of an element. +// +// @param $select +// [ none | text | toggle | element | elements | all | inherit ] +@mixin user-select($select) { + $select: unquote($select); + @include experimental(user-select, $select, + -moz, -webkit, not(-o), -ms, -khtml, official + ); +} + +// Style the html5 input placeholder in browsers that support it. +// +// The styles for the input placeholder are passed as mixin content +// and the selector comes from the mixin's context. +// +// For example: +// +// #{elements-of-type(text-input)} { +// @include input-placeholder { +// color: #bfbfbf; +// font-style: italic; +// } +// } +// +// if you want to apply the placeholder styles to all elements supporting +// the `input-placeholder` pseudo class (beware of performance impacts): +// +// * { +// @include input-placeholder { +// color: #bfbfbf; +// font-style: italic; +// } +// } +@mixin input-placeholder { + &:-ms-input-placeholder { @content; } + &:-moz-placeholder { @content; } + &::-moz-placeholder { @content; } + &::-webkit-input-placeholder { @content; } +} diff --git a/src/supermarket/app/assets/compass/functions/_colors.scss b/src/supermarket/app/assets/compass/functions/_colors.scss new file mode 100644 index 000000000..a3efe78ad --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_colors.scss @@ -0,0 +1,37 @@ +// +// A partial implementation of the Ruby colors functions from Compass: +// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/colors.rb +// + +// a genericized version of lighten/darken so that negative values can be used. +@function adjust-lightness($color, $amount) { + @return adjust-color($color, $lightness: $amount); +} + +// Scales a color's lightness by some percentage. +// If the amount is negative, the color is scaled darker, if positive, it is scaled lighter. +// This will never return a pure light or dark color unless the amount is 100%. +@function scale-lightness($color, $amount) { + @return scale-color($color, $lightness: $amount); +} + +// a genericized version of saturate/desaturate so that negative values can be used. +@function adjust-saturation($color, $amount) { + @return adjust-color($color, $saturation: $amount); +} + +// Scales a color's saturation by some percentage. +// If the amount is negative, the color is desaturated, if positive, it is saturated. +// This will never return a pure saturated or desaturated color unless the amount is 100%. +@function scale-saturation($color, $amount) { + @return scale-color($color, $saturation: $amount); +} + +@function shade($color, $percentage) { + @return mix(#000000, $color, $percentage); +} + +@function tint($color, $percentage) { + @return mix(#ffffff, $color, $percentage); +} + diff --git a/src/supermarket/app/assets/compass/functions/_constants.scss b/src/supermarket/app/assets/compass/functions/_constants.scss new file mode 100644 index 000000000..ea2e096e4 --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_constants.scss @@ -0,0 +1,18 @@ +// +// A partial implementation of the Ruby constants functions from Compass: +// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb +// + +@function opposite-position($from) { + @if ($from == top) { + @return bottom; + } @else if ($from == bottom) { + @return top; + } @else if ($from == left) { + @return right; + } @else if ($from == right) { + @return left; + } @else if ($from == center) { + @return center; + } +} diff --git a/src/supermarket/app/assets/compass/functions/_cross_browser_support.scss b/src/supermarket/app/assets/compass/functions/_cross_browser_support.scss new file mode 100644 index 000000000..371c97256 --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_cross_browser_support.scss @@ -0,0 +1,72 @@ +// +// A partial implementation of the Ruby cross browser support functions from Compass: +// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb +// + +@function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9; + $prefixed: false; + @each $item in $properties { + @if type-of($item) == 'string' { + $prefixed: $prefixed or str-index($item, 'url') != 1 and str-index($item, 'rgb') != 1 and str-index($item, '#') != 1; + } @else if type-of($item) == 'color' { + } @else if $item != null { + $prefixed: true; + } + } + @return $prefixed; +} + +@function prefix($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + $properties: ""; + + // Support for polymorphism. + @if type-of($property1) == 'list' { + // Passing a single array of properties. + $properties: $property1; + } @else { + // Passing multiple properties. + $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9; + } + + $props: false; + @each $item in $properties { + @if $item == null {} + @else { + @if prefixed($prefix, $item) { + $item: #{$prefix}-#{$item}; + } + @if $props { + $props: $props, $item; + } + @else { + $props: $item; + } + } + } + @return $props; +} + +@function -svg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + @return prefix('-svg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9); +} + +@function -owg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + @return prefix('-owg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9); +} + +@function -webkit($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + @return prefix('-webkit', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9); +} + +@function -moz($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + @return prefix('-moz', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9); +} + +@function -o($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + @return prefix('-o', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9); +} + +@function -pie($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) { + @return prefix('-pie', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9); +} diff --git a/src/supermarket/app/assets/compass/functions/_display.scss b/src/supermarket/app/assets/compass/functions/_display.scss new file mode 100755 index 000000000..eb096e41d --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_display.scss @@ -0,0 +1,36 @@ +// +// A partial implementation of the Ruby display functions from Compass: +// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/display.rb +// + +@function elements-of-type($type){ + @if ($type == block){ + @return address, article, aside, blockquote, center, dir, div, dd, details, dl, dt, fieldset, figcaption, figure, form, footer, frameset, h1, h2, h3, h4, h5, h6, hr, header, hgroup, isindex, main, menu, nav, noframes, noscript, ol, p, pre, section, summary, ul; + } @else if ($type == inline){ + @return a, abbr, acronym, audio, b, basefont, bdo, big, br, canvas, cite, code, command, datalist, dfn, em, embed, font, i, img, input, keygen, kbd, label, mark, meter, output, progress, q, rp, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, textarea, time, tt, u, var, video, wbr; + } @else if ($type == inline-block){ + @return img; + } @else if ($type == table){ + @return table; + } @else if ($type == list-item){ + @return li; + } @else if ($type == table-row-group){ + @return tbody; + } @else if ($type == table-header-group){ + @return thead; + } @else if ($type == table-footer-group){ + @return tfoot; + } @else if ($type == table-row){ + @return tr; + } @else if ($type == table-cell){ + @return th, td; + } @else if ($type == html5-block){ + @return article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary; + } @else if ($type == html5-inline){ + @return audio, canvas, command, datalist, embed, keygen, mark, meter, output, progress, rp, rt, ruby, time, video, wbr; + } @else if ($type == html5){ + @return article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, main, mark, menu, meter, nav, output, progress, rp, rt, ruby, section, summary, time, video, wbr; + } @else if ($type == text-input){ + @return input, textarea; + } +} diff --git a/src/supermarket/app/assets/compass/functions/_font_files.scss b/src/supermarket/app/assets/compass/functions/_font_files.scss new file mode 100644 index 000000000..1bb27a176 --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_font_files.scss @@ -0,0 +1,95 @@ +// +// A partial implementation of the Ruby fonts functions from Compass: +// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/font_files.rb +// +// and several functions from the file: +// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/urls.rb +// ----------------------------------------------------------------------------- +// Helper functions font-files and font-url for font-face mixins. +// ----------------------------------------------------------------------------- +// use mixin this way: +// +// $font-path: "/public/fonts/roboto"; +// @include font-face( +// 'Roboto', +// font_files("roboto.ttf", "truetype", "roboto.woff", "roboto.woff2"), // or +// font_files("roboto.ttf", "roboto.woff", "roboto.woff2"), +// "roboto.eot", // [$eot] +// normal, // [$weight] +// normal // [$style] +// ); +// ----------------------------------------------------------------------------- + + +@function font-url($path) { + $font-path: 'fonts' !default; + @return url("#{$font-path}/#{$path}"); +} + + +// ----------------------------------------------------------------------------- +// helper function to create a list of font files for the src attribute in @font-face. +// In the global variable $font-path, you can specify the path to the folder +// with fonts relative to style files, by default the path to the fonts is "fonts". +// +// Usage: font-files ('file-name-w-ext'[, 'format'][,'file-name-w-ext'[, 'format']]...). +// If the font format is not specified, the function will add the format corresponding to the file extension. +// +// for best results use this order: woff, opentype / truetype, svg. +// ----------------------------------------------------------------------------- +// function ported from Ruby. +// ----------------------------------------------------------------------------- +@function font-files($font-files...) { + $font-path: 'fonts' !default; + // types of font formats from module Compass::Core::SassExtensions::Functions::FontFiles. + $font-types: ( + 'woff': "woff", + 'woff2': "woff2", + 'opentype': "otf", + // 'opentype': "opentype", + 'truetype': "ttf", + // 'truetype': "truetype", + 'svg': "svg", + 'embedded-opentype': "eot" + ); + + $full: ''; + // if the font format is specified after the font file name, skip the next iteration. + $skip-next: false; + // number of font files including font format. + $font-file-length: length($font-files); + + @for $i from 1 through $font-file-length { + @if(not $skip-next) { + $font-file: nth($font-files, $i); + $font-file-next: if($i < $font-file-length, nth($font-files, $i + 1), false); + + // add font url. + $full: $full + 'url("#{$font-path}/#{$font-file}")'; + + // add the font format if it is specified after the font file name. + @if $font-file-next and map-has-key($font-types, $font-file-next) { + $full: $full + ' format("#{$font-file-next}")'; + $skip-next: true; + } @else { + // add a font format based on the font file name extension. + @each $type, $extension in $font-types { + $pos: str-index($font-file, '.' + $extension); + + @if($font-file-next == $extension) { + $full: $full + ' format("#{$type}")'; + $skip-next: true; + } @else if ($pos and (to-lower-case(str-slice($font-file, $pos + 1)) == $extension)) { + $full: $full + ' format("#{$type}")'; + } + } + } + } @else { + $skip-next: false; + } + + @if (not $skip-next and $i != $font-file-length) { $full: $full + ', ';} + } + + @return unquote($full); +} diff --git a/src/supermarket/app/assets/compass/functions/_gradient_support.scss b/src/supermarket/app/assets/compass/functions/_gradient_support.scss new file mode 100644 index 000000000..b2035b348 --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_gradient_support.scss @@ -0,0 +1,15 @@ +// +// A partial implementation of the Ruby gradient support functions from Compass: +// https://github.com/Compass/compass/blob/v0.12.2/lib/compass/sass_extensions/functions/gradient_support.rb +// + +@function color-stops($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) { + $items: $item2, $item3, $item4, $item5, $item6, $item7, $item8, $item9; + $full: $item1; + @each $item in $items { + @if $item != null { + $full: $full, $item; + } + } + @return $full; +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/functions/_lists.scss b/src/supermarket/app/assets/compass/functions/_lists.scss new file mode 100644 index 000000000..e24cc80e0 --- /dev/null +++ b/src/supermarket/app/assets/compass/functions/_lists.scss @@ -0,0 +1,90 @@ +// +// A partial implementation of the Ruby list functions from Compass: +// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/lists.rb +// + + +// compact is part of libsass + +@function -compass-nth($list, $place) { + // Yep, Sass-lists are 1-indexed. + @if $place == "first" { + $place: 1; + } + @if $place == "last" { + $place: length($list); + } + @return nth($list, $place); +} + +// compass_list can't be implemented in sass script + +@function -compass-space-list($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) { + $items: (); + // Support for polymorphism. + @if type-of($item1) == 'list' { + // Passing a single array of properties. + $items: $item1; + } @else { + $items: $item1 $item2 $item3 $item4 $item5 $item6 $item7 $item8 $item9; + } + + $full: first-value-of($items); + + @for $i from 2 through length($items) { + $item: nth($items, $i); + @if $item != null { + $full: $full $item; + } + } + + @return $full; +} + +@function -compass-list-size($list) { + @return length($list); +} + +@function -compass-slice($list, $start, $end: false) { + @if $end == false { + $end: length($list); + } + $full: nth($list, $start); + @for $i from $start + 1 through $end { + $full: $full, nth($list, $i); + } + @return $full; +} + +@function reject($list, $reject1, $reject2:null, $reject3:null, $reject4:null, $reject5:null, $reject6:null, $reject7:null, $reject8:null, $reject9:null) { + $rejects: $reject1, $reject2, $reject3, $reject4, $reject5, $reject6, $reject7, $reject8, $reject9; + + $full: false; + @each $item in $list { + @if index($rejects, $item) {} + @else { + @if $full { + $full: $full, $item; + } + @else { + $full: $item; + } + } + } + @return $full; +} + +@function first-value-of($list) { + @return nth($list, 1); +} + +@function compact($vars...) { + $separator: list-separator($vars); + $list: (); + @each $var in $vars { + @if $var { + $list: append($list, $var, $separator); + } + } + @return $list; +} diff --git a/src/supermarket/app/assets/compass/layout/_grid-background.scss b/src/supermarket/app/assets/compass/layout/_grid-background.scss new file mode 100644 index 000000000..4d3820c63 --- /dev/null +++ b/src/supermarket/app/assets/compass/layout/_grid-background.scss @@ -0,0 +1,178 @@ +@import "../css3/images"; +@import "../css3/background-size"; + +// Set the color of your columns +$grid-background-column-color : rgba(100, 100, 225, 0.25) !default; +// Set the color of your gutters +$grid-background-gutter-color : rgba(0, 0, 0, 0) !default; + +// Set the total number of columns in your grid +$grid-background-total-columns : 24 !default; +// Set the width of your columns +$grid-background-column-width : 30px !default; +// Set the width of your gutters +$grid-background-gutter-width : 10px !default; +// Set the offset, if your columns are padded in from the container edge +$grid-background-offset : 0px !default; + +// Set the color of your baseline +$grid-background-baseline-color : rgba(0, 0, 0, 0.5) !default; +// Set the height of your baseline grid +$grid-background-baseline-height : 1.5em !default; + +// toggle your columns grids on and off +$show-column-grid-backgrounds : true !default; +// toggle your vertical grids on and off +$show-baseline-grid-backgrounds : true !default; +// toggle all your grids on and off +$show-grid-backgrounds : true !default; + +// optionally force your grid-image to remain fluid +// no matter what units you used to declared your grid. +$grid-background-force-fluid : false !default; + + +// Create the gradient needed for baseline grids +@function get-baseline-gradient( + $color : $grid-background-baseline-color +) { + $gradient: linear-gradient(bottom, $color 5%, rgba($color,0) 5%); + @return $gradient; +} + +// Create the color-stops needed for horizontal grids +@function build-grid-background( + $total : $grid-background-total-columns, + $column : $grid-background-column-width, + $gutter : $grid-background-gutter-width, + $offset : $grid-background-offset, + $column-color : $grid-background-column-color, + $gutter-color : $grid-background-gutter-color +) { + $grid: compact(); + $grid: append($grid, $gutter-color $offset, comma); + @for $i from 0 to $total { + + // $a represents the start of this column, initially equal to the offset + $a: $offset; + @if $i > 0 { $a: $a + (($column + $gutter) * $i); } + + // $g represents the start of this gutter, equal to $a plus one column-width + $g: $a + $column; + + // $z represents the end of a gutter, equal to $g plus one gutter-width + $z: $g + $gutter; + + @if (unit($a) == "%") and ($i == ($total - 1)) { + $z: 100%; + } + + // and we add this column/gutter pair to our grid + $grid: join($grid, ($column-color $a, $column-color $g, $gutter-color $g, $gutter-color $z)); + } + + @return $grid; +} + +// Return the gradient needed for horizontal grids +@function get-column-gradient( + $total : $grid-background-total-columns, + $column : $grid-background-column-width, + $gutter : $grid-background-gutter-width, + $offset : $grid-background-offset, + $column-color : $grid-background-column-color, + $gutter-color : $grid-background-gutter-color, + $force-fluid : $grid-background-force-fluid +) { + $grid: unquote(""); + + // don't force fluid grids when they are already fluid. + @if unit($column) == "%" { $force-fluid: false; } + + @if $force-fluid { + $grid: get-column-fluid-grid($total,$column,$gutter,$offset,$column-color,$gutter-color); + } @else { + $grid: build-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color); + } + + // return the horizontal grid as a gradient + $gradient: linear-gradient(left, $grid); + @return $gradient; +} + +// Convert a grid from fixed units into percentages. +@function get-column-fluid-grid( + $total : $grid-background-total-columns, + $column : $grid-background-column-width, + $gutter : $grid-background-gutter-width, + $offset : $grid-background-offset, + $column-color : $grid-background-column-color, + $gutter-color : $grid-background-gutter-color +) { + $context: ($column * $total) + ($gutter * ($total - 1) + ($offset * 2)); + $offset: $offset / $context * 100%; + $column: $column / $context * 100%; + $gutter: $gutter / $context * 100%; + + // return the horizontal grid as a set of color-stops + $grid: build-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color); + @return $grid; +} + + +// Add just the baseline grid to an element's background +@mixin baseline-grid-background( + $baseline : $grid-background-baseline-height, + $color : $grid-background-baseline-color +) { + @if $show-grid-backgrounds and $show-baseline-grid-backgrounds { + @include background-image(get-baseline-gradient($color)); + @include background-size(100% $baseline); + background-position: left top; + } +} + +// Add just the horizontal grid to an element's background +@mixin column-grid-background( + $total : $grid-background-total-columns, + $column : $grid-background-column-width, + $gutter : $grid-background-gutter-width, + $offset : $grid-background-offset, + $column-color : $grid-background-column-color, + $gutter-color : $grid-background-gutter-color, + $force-fluid : $grid-background-force-fluid +) { + @if $show-grid-backgrounds and $show-column-grid-backgrounds { + @include background-image( + get-column-gradient($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid) + ); + background-position: left top; + } +} + +// Add both horizontal and baseline grids to an element's background +@mixin grid-background( + $total : $grid-background-total-columns, + $column : $grid-background-column-width, + $gutter : $grid-background-gutter-width, + $baseline : $grid-background-baseline-height, + $offset : $grid-background-offset, + $column-color : $grid-background-column-color, + $gutter-color : $grid-background-gutter-color, + $baseline-color : $grid-background-baseline-color, + $force-fluid : $grid-background-force-fluid +) { + @if $show-grid-backgrounds { + @if $show-baseline-grid-backgrounds and $show-column-grid-backgrounds { + @include background-image( + get-baseline-gradient($baseline-color), + get-column-gradient($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid) + ); + @include background-size(100% $baseline, auto); + background-position: left top; + } @else { + @include baseline-grid-background($baseline, $baseline-color); + @include column-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid); + } + } +} diff --git a/src/supermarket/app/assets/compass/layout/_sticky-footer.scss b/src/supermarket/app/assets/compass/layout/_sticky-footer.scss new file mode 100644 index 000000000..055f64163 --- /dev/null +++ b/src/supermarket/app/assets/compass/layout/_sticky-footer.scss @@ -0,0 +1,23 @@ +// Based on a [blog post by Ryan Fait](http://ryanfait.com/resources/footer-stick-to-bottom-of-page/). +// +// Must be mixed into the top level of your stylesheet. +// +// Footer element must be outside of root wrapper element. +// +// Footer must be a fixed height. + +@mixin sticky-footer($footer-height, $root-selector: unquote("#root"), $root-footer-selector: unquote("#root_footer"), $footer-selector: unquote("#footer")) { + html, body { + height: 100%; } + #{$root-selector} { + clear: both; + min-height: 100%; + height: auto !important; + height: 100%; + margin-bottom: -$footer-height; + #{$root-footer-selector} { + height: $footer-height; } } + #{$footer-selector} { + clear: both; + position: relative; + height: $footer-height; } } diff --git a/src/supermarket/app/assets/compass/layout/_stretching.scss b/src/supermarket/app/assets/compass/layout/_stretching.scss new file mode 100644 index 000000000..c123e3d15 --- /dev/null +++ b/src/supermarket/app/assets/compass/layout/_stretching.scss @@ -0,0 +1,24 @@ + +// stretch element height to specified top and bottom position + +@mixin stretch-y($offset-top:0, $offset-bottom:0) { + @include stretch($offset-top, false, $offset-bottom, false); +} + + +// stretch element width to specified left and right position + +@mixin stretch-x($offset-left:0, $offset-right:0) { + @include stretch(false, $offset-right, false, $offset-left); +} + + +// shorthand to stretch element height and width + +@mixin stretch($offset-top:0, $offset-right:0, $offset-bottom:0, $offset-left:0) { + position: absolute; + @if $offset-top { top: $offset-top; } + @if $offset-bottom { bottom: $offset-bottom; } + @if $offset-left { left: $offset-left; } + @if $offset-right { right: $offset-right; } +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/reset/_utilities-legacy.scss b/src/supermarket/app/assets/compass/reset/_utilities-legacy.scss new file mode 100644 index 000000000..8273ca339 --- /dev/null +++ b/src/supermarket/app/assets/compass/reset/_utilities-legacy.scss @@ -0,0 +1,135 @@ +// Based on [Eric Meyer's reset](http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/) +// Global reset rules. +// For more specific resets, use the reset mixins provided below +// +// *Please Note*: tables still need `cellspacing="0"` in the markup. +@mixin global-reset { + html, body, div, span, applet, object, iframe, + h1, h2, h3, h4, h5, h6, p, blockquote, pre, + a, abbr, acronym, address, big, cite, code, + del, dfn, em, font, img, ins, kbd, q, s, samp, + small, strike, strong, sub, sup, tt, var, + dl, dt, dd, ol, ul, li, + fieldset, form, label, legend, + table, caption, tbody, tfoot, thead, tr, th, td { + @include reset-box-model; + @include reset-font; } + body { + @include reset-body; } + ol, ul { + @include reset-list-style; } + table { + @include reset-table; } + caption, th, td { + @include reset-table-cell; } + q, blockquote { + @include reset-quotation; } + a img { + @include reset-image-anchor-border; } } + +// Reset all elements within some selector scope. To reset the selector itself, +// mixin the appropriate reset mixin for that element type as well. This could be +// useful if you want to style a part of your page in a dramatically different way. +// +// *Please Note*: tables still need `cellspacing="0"` in the markup. +@mixin nested-reset { + div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, + pre, a, abbr, acronym, address, code, del, dfn, em, img, + dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr { + @include reset-box-model; + @include reset-font; } + table { + @include reset-table; } + caption, th, td { + @include reset-table-cell; } + q, blockquote { + @include reset-quotation; } + a img { + @include reset-image-anchor-border; } } + +// Reset the box model measurements. +@mixin reset-box-model { + margin: 0; + padding: 0; + border: 0; + outline: 0; } + +// Reset the font and vertical alignment. +@mixin reset-font { + font: { + weight: inherit; + style: inherit; + size: 100%; + family: inherit; }; + vertical-align: baseline; } + +// Resets the outline when focus. +// For accessibility you need to apply some styling in its place. +@mixin reset-focus { + outline: 0; } + +// Reset a body element. +@mixin reset-body { + line-height: 1; + color: black; + background: white; } + +// Reset the list style of an element. +@mixin reset-list-style { + list-style: none; } + +// Reset a table +@mixin reset-table { + border-collapse: separate; + border-spacing: 0; + vertical-align: middle; } + +// Reset a table cell (`th`, `td`) +@mixin reset-table-cell { + text-align: left; + font-weight: normal; + vertical-align: middle; } + +// Reset a quotation (`q`, `blockquote`) +@mixin reset-quotation { + quotes: "" ""; + &:before, &:after { + content: ""; } } + +// Resets the border. +@mixin reset-image-anchor-border { + border: none; } + +// Unrecognized elements are displayed inline. +// This reset provides a basic reset for html5 elements +// so they are rendered correctly in browsers that don't recognize them +// and reset in browsers that have default styles for them. +@mixin reset-html5 { + #{elements-of-type(html5-block)} { + @include reset-box-model; + display: block; } } + +// Resets the display of inline and block elements to their default display +// according to their tag type. Elements that have a default display that varies across +// versions of html or browser are not handled here, but this covers the 90% use case. +// Usage Example: +// +// // Turn off the display for both of these classes +// .unregistered-only, .registered-only +// display: none +// // Now turn only one of them back on depending on some other context. +// body.registered +// +reset-display(".registered-only") +// body.unregistered +// +reset-display(".unregistered-only") +@mixin reset-display($selector: "", $important: false) { + #{append-selector(elements-of-type("inline"), $selector)} { + @if $important { + display: inline !important; } + @else { + display: inline; } } + #{append-selector(elements-of-type("block"), $selector)} { + @if $important { + display: block !important; } + @else { + display: block; } } } diff --git a/src/supermarket/app/assets/compass/reset/_utilities.scss b/src/supermarket/app/assets/compass/reset/_utilities.scss new file mode 100644 index 000000000..d173f3e57 --- /dev/null +++ b/src/supermarket/app/assets/compass/reset/_utilities.scss @@ -0,0 +1,142 @@ +// Based on [Eric Meyer's reset 2.0](http://meyerweb.com/eric/tools/css/reset/index.html) +// Global reset rules. +// For more specific resets, use the reset mixins provided below +@mixin global-reset { + html, body, div, span, applet, object, iframe, + h1, h2, h3, h4, h5, h6, p, blockquote, pre, + a, abbr, acronym, address, big, cite, code, + del, dfn, em, img, ins, kbd, q, s, samp, + small, strike, strong, sub, sup, tt, var, + b, u, i, center, + dl, dt, dd, ol, ul, li, + fieldset, form, label, legend, + table, caption, tbody, tfoot, thead, tr, th, td, + article, aside, canvas, details, embed, + figure, figcaption, footer, header, hgroup, + menu, nav, output, ruby, section, summary, + time, mark, audio, video { + @include reset-box-model; + @include reset-font; } + // Unlike Eric's original reset, we reset the html element to be compatible + // with the vertical rhythm mixins. + html { + @include reset-body; } + ol, ul { + @include reset-list-style; } + table { + @include reset-table; } + caption, th, td { + @include reset-table-cell; } + q, blockquote { + @include reset-quotation; } + a img { + @include reset-image-anchor-border; } + @include reset-html5; } + +// Reset all elements within some selector scope. To reset the selector itself, +// mixin the appropriate reset mixin for that element type as well. This could be +// useful if you want to style a part of your page in a dramatically different way. +@mixin nested-reset { + div, span, applet, object, iframe, + h1, h2, h3, h4, h5, h6, p, blockquote, pre, + a, abbr, acronym, address, big, cite, code, + del, dfn, em, img, ins, kbd, q, s, samp, + small, strike, strong, sub, sup, tt, var, + b, u, i, center, + dl, dt, dd, ol, ul, li, + fieldset, form, label, legend, + table, caption, tbody, tfoot, thead, tr, th, td, + article, aside, canvas, details, embed, + figure, figcaption, footer, header, hgroup, + menu, nav, output, ruby, section, summary, + time, mark, audio, video { + @include reset-box-model; + @include reset-font; } + table { + @include reset-table; } + caption, th, td { + @include reset-table-cell; } + q, blockquote { + @include reset-quotation; } + a img { + @include reset-image-anchor-border; } } + +// Reset the box model measurements. +@mixin reset-box-model { + margin: 0; + padding: 0; + border: 0; } + +// Reset the font and vertical alignment. +@mixin reset-font { + font: inherit; + font-size: 100%; + vertical-align: baseline; } + +// Resets the outline when focus. +// For accessibility you need to apply some styling in its place. +@mixin reset-focus { + outline: 0; } + +// Reset a body element. +@mixin reset-body { + line-height: 1; } + +// Reset the list style of an element. +@mixin reset-list-style { + list-style: none; } + +// Reset a table +@mixin reset-table { + border-collapse: collapse; + border-spacing: 0; } + +// Reset a table cell (`th`, `td`) +@mixin reset-table-cell { + text-align: left; + font-weight: normal; + vertical-align: middle; } + +// Reset a quotation (`q`, `blockquote`) +@mixin reset-quotation { + quotes: none; + &:before, &:after { + content: ""; + content: none; } } + +// Resets the border. +@mixin reset-image-anchor-border { + border: none; } + +// Unrecognized elements are displayed inline. +// This reset provides a basic reset for block html5 elements +// so they are rendered correctly in browsers that don't recognize them +// and reset in browsers that have default styles for them. +@mixin reset-html5 { + #{elements-of-type(html5-block)} { + display: block; } } + +// Resets the display of inline and block elements to their default display +// according to their tag type. Elements that have a default display that varies across +// versions of html or browser are not handled here, but this covers the 90% use case. +// Usage Example: +// +// // Turn off the display for both of these classes +// .unregistered-only, .registered-only +// display: none +// // Now turn only one of them back on depending on some other context. +// body.registered +// +reset-display(".registered-only") +// body.unregistered +// +reset-display(".unregistered-only") +@mixin reset-display($selector: "", $important: false) { + #{append-selector(elements-of-type("inline"), $selector)} { + @if $important { + display: inline !important; } + @else { + display: inline; } } + #{append-selector(elements-of-type("block"), $selector)} { + @if $important { + display: block !important; } + @else { + display: block; } } } diff --git a/src/supermarket/app/assets/compass/typography/_links.scss b/src/supermarket/app/assets/compass/typography/_links.scss new file mode 100644 index 000000000..735000e01 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/_links.scss @@ -0,0 +1,3 @@ +@import "links/hover-link"; +@import "links/link-colors"; +@import "links/unstyled-link"; diff --git a/src/supermarket/app/assets/compass/typography/_lists.scss b/src/supermarket/app/assets/compass/typography/_lists.scss new file mode 100644 index 000000000..3365f30a1 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/_lists.scss @@ -0,0 +1,4 @@ +@import "lists/horizontal-list"; +@import "lists/inline-list"; +@import "lists/inline-block-list"; +@import "lists/bullets"; diff --git a/src/supermarket/app/assets/compass/typography/_text.scss b/src/supermarket/app/assets/compass/typography/_text.scss new file mode 100644 index 000000000..885f729da --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/_text.scss @@ -0,0 +1,4 @@ +@import "text/ellipsis"; +@import "text/nowrap"; +@import "text/replacement"; +@import "text/force-wrap"; diff --git a/src/supermarket/app/assets/compass/typography/_vertical_rhythm.scss b/src/supermarket/app/assets/compass/typography/_vertical_rhythm.scss new file mode 100644 index 000000000..14efa82de --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/_vertical_rhythm.scss @@ -0,0 +1,229 @@ +@import "../layout/grid-background"; + +// The base font size. +$base-font-size: 16px !default; + +// The base line height determines the basic unit of vertical rhythm. +$base-line-height: 24px !default; + +// Set the default border style for rhythm borders. +$default-rhythm-border-style: solid !default; + +// The default font size in all browsers. +$browser-default-font-size: 16px; + +// Set to false if you want to use absolute pixels in sizing your typography. +$relative-font-sizing: true !default; + +// Allows the `adjust-font-size-to` mixin and the `lines-for-font-size` function +// to round the line height to the nearest half line height instead of the +// nearest integral line height to avoid large spacing between lines. +$round-to-nearest-half-line: false !default; + +// Ensure there is at least this many pixels +// of vertical padding above and below the text. +$min-line-padding: 2px !default; + +// $base-font-size but in your output unit of choice. +// Defaults to 1em when `$relative-font-sizing` is true. +$font-unit: if($relative-font-sizing, 1em, $base-font-size) !default; + +// The basic unit of font rhythm. +$base-rhythm-unit: $base-line-height / $base-font-size * $font-unit; + +// The leader is the amount of whitespace in a line. +// It might be useful in your calculations. +$base-leader: ($base-line-height - $base-font-size) * $font-unit / $base-font-size; + +// The half-leader is the amount of whitespace above and below a line. +// It might be useful in your calculations. +$base-half-leader: $base-leader / 2; + +// True if a number has a relative unit. +@function relative-unit($number) { + @return unit($number) == "%" or unit($number) == "em" or unit($number) == "rem" +} + +// True if a number has an absolute unit. +@function absolute-unit($number) { + @return not(relative-unit($number) or unitless($number)); +} + +@if $relative-font-sizing and not(relative-unit($font-unit)) { + @warn "$relative-font-sizing is true but $font-unit is set to #{$font-unit} which is not a relative unit."; +} + +// Establishes a font baseline for the given font-size. +@mixin establish-baseline($font-size: $base-font-size) { + // IE 6 refuses to resize fonts set in pixels and it weirdly resizes fonts + // whose root is set in ems. So we set the root font size in percentages of + // the default font size. + * html { + font-size: 100% * ($font-size / $browser-default-font-size); + } + html { + font-size: $font-size; + @include adjust-leading-to(1, if($relative-font-sizing, $font-size, $base-font-size)); + } +} + +// Resets the line-height to 1 vertical rhythm unit. +// Does not work on elements whose font-size is different from $base-font-size. +// +// @deprecated This mixin will be removed in the next release. +// Please use the `adjust-leading-to` mixin instead. +@mixin reset-baseline { + @include adjust-leading-to(1, if($relative-font-sizing, $base-font-size, $base-font-size)); +} + +// Show a background image that can be used to debug your alignments. +// Include the $img argument if you would rather use your own image than the +// Compass default gradient image. +@mixin debug-vertical-alignment($img: false) { + @if $img { + background: image-url($img); + } @else { + @include baseline-grid-background($base-rhythm-unit); + } +} + +// Adjust a block to have a different font size and line height to maintain the +// rhythm. $lines specifies how many multiples of the baseline rhythm each line +// of this font should use up. It does not have to be an integer, but it +// defaults to the smallest integer that is large enough to fit the font. +// Use $from-size to adjust from a font-size other than the base font-size. +@mixin adjust-font-size-to($to-size, $lines: lines-for-font-size($to-size), $from-size: $base-font-size) { + @if not($relative-font-sizing) and $from-size != $base-font-size { + @warn "$relative-font-sizing is false but a relative font size was passed to adjust-font-size-to"; + } + font-size: $font-unit * $to-size / $from-size; + @include adjust-leading-to($lines, if($relative-font-sizing, $to-size, $base-font-size)); +} + +// Adjust a block to have different line height to maintain the rhythm. +// $lines specifies how many multiples of the baseline rhythm each line of this +// font should use up. It does not have to be an integer, but it defaults to the +// smallest integer that is large enough to fit the font. +@mixin adjust-leading-to($lines, $font-size: $base-font-size) { + line-height: rhythm($lines, $font-size); +} + +// Calculate rhythm units. +@function rhythm( + $lines: 1, + $font-size: $base-font-size, + $offset: 0 +) { + @if not($relative-font-sizing) and $font-size != $base-font-size { + @warn "$relative-font-sizing is false but a relative font size was passed to the rhythm function"; + } + $rhythm: $font-unit * ($lines * $base-line-height - $offset) / $font-size; + // Round the pixels down to nearest integer. + @if unit($rhythm) == px { + $rhythm: floor($rhythm); + } + @return $rhythm; +} + +// Calculate the minimum multiple of rhythm units needed to contain the font-size. +@function lines-for-font-size($font-size) { + $lines: if($round-to-nearest-half-line, + ceil(2 * $font-size / $base-line-height) / 2, + ceil($font-size / $base-line-height)); + @if $lines * $base-line-height - $font-size < $min-line-padding * 2 { + $lines: $lines + if($round-to-nearest-half-line, 0.5, 1); + } + @return $lines; +} + +// Apply leading whitespace. The $property can be margin or padding. +@mixin leader($lines: 1, $font-size: $base-font-size, $property: margin) { + #{$property}-top: rhythm($lines, $font-size); +} + +// Apply leading whitespace as padding. +@mixin padding-leader($lines: 1, $font-size: $base-font-size) { + padding-top: rhythm($lines, $font-size); +} + +// Apply leading whitespace as margin. +@mixin margin-leader($lines: 1, $font-size: $base-font-size) { + margin-top: rhythm($lines, $font-size); +} + +// Apply trailing whitespace. The $property can be margin or padding. +@mixin trailer($lines: 1, $font-size: $base-font-size, $property: margin) { + #{$property}-bottom: rhythm($lines, $font-size); +} + +// Apply trailing whitespace as padding. +@mixin padding-trailer($lines: 1, $font-size: $base-font-size) { + padding-bottom: rhythm($lines, $font-size); +} + +// Apply trailing whitespace as margin. +@mixin margin-trailer($lines: 1, $font-size: $base-font-size) { + margin-bottom: rhythm($lines, $font-size); +} + +// Shorthand mixin to apply whitespace for top and bottom margins and padding. +@mixin rhythm($leader: 0, $padding-leader: 0, $padding-trailer: 0, $trailer: 0, $font-size: $base-font-size) { + @include leader($leader, $font-size); + @include padding-leader($padding-leader, $font-size); + @include padding-trailer($padding-trailer, $font-size); + @include trailer($trailer, $font-size); +} + +// Apply a border and whitespace to any side without destroying the vertical +// rhythm. The whitespace must be greater than the width of the border. +@mixin apply-side-rhythm-border($side, $width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { + @if not($relative-font-sizing) and $font-size != $base-font-size { + @warn "$relative-font-sizing is false but a relative font size was passed to apply-side-rhythm-border"; + } + border-#{$side}-style: $border-style; + border-#{$side}-width: $font-unit * $width / $font-size; + padding-#{$side}: rhythm($lines, $font-size, $offset: $width); +} + +// Apply borders and whitespace equally to all sides. +@mixin rhythm-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { + @if not($relative-font-sizing) and $font-size != $base-font-size { + @warn "$relative-font-sizing is false but a relative font size was passed to rhythm-borders"; + } + border: { + style: $border-style; + width: $font-unit * $width / $font-size; + }; + padding: rhythm($lines, $font-size, $offset: $width); +} + +// Apply a leading border. +@mixin leading-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { + @include apply-side-rhythm-border(top, $width, $lines, $font-size, $border-style); +} + +// Apply a trailing border. +@mixin trailing-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { + @include apply-side-rhythm-border(bottom, $width, $lines, $font-size, $border-style); +} + +// Apply both leading and trailing borders. +@mixin horizontal-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { + @include leading-border($width, $lines, $font-size, $border-style); + @include trailing-border($width, $lines, $font-size, $border-style); +} + +// Alias for `horizontal-borders` mixin. +@mixin h-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { + @include horizontal-borders($width, $lines, $font-size, $border-style); +} + +// Shorthand mixin to apply whitespace for top and bottom margins. +@mixin rhythm-margins( + $leader: 1, + $trailer: $leader, + $font-size: $base-font-size +) { + @include leader($leader, $font-size); + @include trailer($trailer, $font-size); +} diff --git a/src/supermarket/app/assets/compass/typography/links/_hover-link.scss b/src/supermarket/app/assets/compass/typography/links/_hover-link.scss new file mode 100644 index 000000000..8c72bc1fd --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/links/_hover-link.scss @@ -0,0 +1,5 @@ +// a link that only has an underline when you hover over it +@mixin hover-link { + text-decoration: none; + &:hover { + text-decoration: underline; } } diff --git a/src/supermarket/app/assets/compass/typography/links/_link-colors.scss b/src/supermarket/app/assets/compass/typography/links/_link-colors.scss new file mode 100644 index 000000000..5d641f781 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/links/_link-colors.scss @@ -0,0 +1,28 @@ +// Set all the colors for a link with one mixin call. +// Order of arguments is: +// +// 1. normal +// 2. hover +// 3. active +// 4. visited +// 5. focus +// +// Those states not specified will inherit. +// Mixin to an anchor link like so: +// a +// +link-colors(#00c, #0cc, #c0c, #ccc, #cc0) + +@mixin link-colors($normal, $hover: false, $active: false, $visited: false, $focus: false) { + color: $normal; + @if $visited { + &:visited { + color: $visited; } } + @if $focus { + &:focus { + color: $focus; } } + @if $hover { + &:hover { + color: $hover; } } + @if $active { + &:active { + color: $active; } } } diff --git a/src/supermarket/app/assets/compass/typography/links/_unstyled-link.scss b/src/supermarket/app/assets/compass/typography/links/_unstyled-link.scss new file mode 100644 index 000000000..e39c2d678 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/links/_unstyled-link.scss @@ -0,0 +1,7 @@ +// A link that looks and acts like the text it is contained within +@mixin unstyled-link { + color: inherit; + text-decoration: inherit; + cursor: inherit; + &:active, &:focus { + outline: none; } } diff --git a/src/supermarket/app/assets/compass/typography/lists/_bullets.scss b/src/supermarket/app/assets/compass/typography/lists/_bullets.scss new file mode 100644 index 000000000..958eefc04 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/lists/_bullets.scss @@ -0,0 +1,34 @@ +// Turn off the bullet for an element of a list +@mixin no-bullet { + list-style-image : none; + list-style-type : none; + margin-left : 0; +} + +// turns off the bullets for an entire list +@mixin no-bullets { + list-style: none; + li { @include no-bullet; } +} + +// Make a list(ul/ol) have an image bullet. +// +// The mixin should be used like this for an icon that is 5x7: +// +// ul.pretty +// +pretty-bullets("my-icon.png", 5px, 7px) +// +// Additionally, if the image dimensions are not provided, +// The image dimensions will be extracted from the image itself. +// +// ul.pretty +// +pretty-bullets("my-icon.png") +// +@mixin pretty-bullets($bullet-icon, $width: image-width($bullet-icon), $height: image-height($bullet-icon), $line-height: 18px, $padding: 14px) { + margin-left: 0; + li { + padding-left: $padding; + background: image-url($bullet-icon) no-repeat ($padding - $width) / 2 ($line-height - $height) / 2; + list-style-type: none; + } +} diff --git a/src/supermarket/app/assets/compass/typography/lists/_horizontal-list.scss b/src/supermarket/app/assets/compass/typography/lists/_horizontal-list.scss new file mode 100644 index 000000000..b66e4c040 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/lists/_horizontal-list.scss @@ -0,0 +1,61 @@ +// Horizontal list layout module. +// +// Easy mode using simple descendant li selectors: +// +// ul.nav +// +horizontal-list +// +// Advanced mode: +// If you need to target the list items using a different selector then use +// +horizontal-list-container on your ul/ol and +horizontal-list-item on your li. +// This may help when working on layouts involving nested lists. For example: +// +// ul.nav +// +horizontal-list-container +// > li +// +horizontal-list-item + +@import "bullets"; +@import "../../utilities/general/clearfix"; +@import "../../utilities/general/reset"; +@import "../../utilities/general/float"; + +// Can be mixed into any selector that target a ul or ol that is meant +// to have a horizontal layout. Used to implement +horizontal-list. +@mixin horizontal-list-container { + @include reset-box-model; + @include clearfix; } + +// Can be mixed into any li selector that is meant to participate in a horizontal layout. +// Used to implement +horizontal-list. +// +// :last-child is not fully supported +// see http://www.quirksmode.org/css/contents.html#t29 for the support matrix +// +// IE8 ignores rules that are included on the same line as :last-child +// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details +// +// Setting `$padding` to `false` disables the padding between list elements +@mixin horizontal-list-item($padding: 4px, $direction: left) { + @include no-bullet; + white-space: nowrap; + @include float($direction); + @if $padding { + padding: { + left: $padding; + right: $padding; + } + &:first-child, &.first { padding-#{$direction}: 0; } + &:last-child { padding-#{opposite-position($direction)}: 0; } + &.last { padding-#{opposite-position($direction)}: 0; } + } +} + +// A list(ol,ul) that is layed out such that the elements are floated left and won't wrap. +// This is not an inline list. +// +// Setting `$padding` to `false` disables the padding between list elements +@mixin horizontal-list($padding: 4px, $direction: left) { + @include horizontal-list-container; + li { + @include horizontal-list-item($padding, $direction); } } diff --git a/src/supermarket/app/assets/compass/typography/lists/_inline-block-list.scss b/src/supermarket/app/assets/compass/typography/lists/_inline-block-list.scss new file mode 100644 index 000000000..ea031dcdc --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/lists/_inline-block-list.scss @@ -0,0 +1,50 @@ +// Inline-Block list layout module. +// +// Easy mode using simple descendant li selectors: +// +// ul.nav { +// @import inline-block-list; +// } +// +// Advanced mode: +// If you need to target the list items using a different selector then use +// `@include inline-block-list-container` on your ul/ol and +// `@include inline-block-list-item` on your li. This may help when working +// on layouts involving nested lists. For example: +// +// ul.nav { +// @include inline-block-list-container; +// > li { +// @include inline-block-list-item; +// } +// } + +@import "bullets"; +@import "horizontal-list"; +@import "../../utilities/general/float"; +@import "../../css3/inline-block"; + +// Can be mixed into any selector that target a ul or ol that is meant +// to have an inline-block layout. Used to implement `inline-block-list`. +@mixin inline-block-list-container { + @include horizontal-list-container; } + +// Can be mixed into any li selector that is meant to participate in a horizontal layout. +// Used to implement `inline-block-list`. +@mixin inline-block-list-item($padding: false) { + @include no-bullet; + @include inline-block; + white-space: nowrap; + @if $padding { + padding: { + left: $padding; + right: $padding; + }; + } +} + +// A list(ol,ul) that is layed out such that the elements are inline-block and won't wrap. +@mixin inline-block-list($padding: false) { + @include inline-block-list-container; + li { + @include inline-block-list-item($padding); } } diff --git a/src/supermarket/app/assets/compass/typography/lists/_inline-list.scss b/src/supermarket/app/assets/compass/typography/lists/_inline-list.scss new file mode 100644 index 000000000..caff6fd67 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/lists/_inline-list.scss @@ -0,0 +1,44 @@ +// makes a list inline. + +@mixin inline-list { + list-style-type: none; + &, & li { + margin: 0px; + padding: 0px; + display: inline; + } +} + +// makes an inline list delimited with the passed string. +// Defaults to making a comma-separated list. +// +// Please make note of the browser support issues before using this mixin: +// +// use of `content` and `:after` is not fully supported in all browsers. +// See quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t15) +// +// `:last-child` is not fully supported. +// see quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t29). +// +// IE8 ignores rules that are included on the same line as :last-child +// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details + +@mixin delimited-list($separator: ", ") { + @include inline-list; + li { + &:after { content: $separator; } + &:last-child { + &:after { content: ""; } + } + &.last { + &:after { content: ""; } + } + } +} + +// See [delimited-list](#mixin-delimited-list) +// @deprecated +@mixin comma-delimited-list { + @warn "comma-delimited-list is deprecated. Please use delimited-list instead."; + @include delimited-list; +} diff --git a/src/supermarket/app/assets/compass/typography/text/_ellipsis.scss b/src/supermarket/app/assets/compass/typography/text/_ellipsis.scss new file mode 100644 index 000000000..04de9551a --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/text/_ellipsis.scss @@ -0,0 +1,25 @@ +@import "../../css3/shared"; + +// To get full firefox support, you must install the ellipsis pattern: +// +// compass install compass/ellipsis +$use-mozilla-ellipsis-binding: false !default; + +// This technique, by [Justin Maxwell](http://code404.com/), was originally +// published [here](http://mattsnider.com/css/css-string-truncation-with-ellipsis/). +// Firefox implementation by [Rikkert Koppes](http://www.rikkertkoppes.com/thoughts/2008/6/). +@mixin ellipsis($no-wrap: true) { + @if $no-wrap { white-space: nowrap; } + overflow: hidden; + @include experimental(text-overflow, ellipsis, + not(-moz), + not(-webkit), + -o, + -ms, + not(-khtml), + official + ); + @if $experimental-support-for-mozilla and $use-mozilla-ellipsis-binding { + -moz-binding: stylesheet-url(unquote("xml/ellipsis.xml#ellipsis")); + } +} diff --git a/src/supermarket/app/assets/compass/typography/text/_force-wrap.scss b/src/supermarket/app/assets/compass/typography/text/_force-wrap.scss new file mode 100644 index 000000000..8a14e8f46 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/text/_force-wrap.scss @@ -0,0 +1,12 @@ +// Prevent long urls and text from breaking layouts +// [originally from perishablepress.com](http://perishablepress.com/press/2010/06/01/wrapping-content/) +@mixin force-wrap { + white-space: pre; // CSS 2.0 + white-space: pre-wrap; // CSS 2.1 + white-space: pre-line; // CSS 3.0 + white-space: -pre-wrap; // Opera 4-6 + white-space: -o-pre-wrap; // Opera 7 + white-space: -moz-pre-wrap; // Mozilla + white-space: -hp-pre-wrap; // HP Printers + word-wrap: break-word; // IE 5+ +} diff --git a/src/supermarket/app/assets/compass/typography/text/_nowrap.scss b/src/supermarket/app/assets/compass/typography/text/_nowrap.scss new file mode 100644 index 000000000..1613dd671 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/text/_nowrap.scss @@ -0,0 +1,2 @@ +// When remembering whether or not there's a hyphen in white-space is too hard +@mixin nowrap { white-space: nowrap; } diff --git a/src/supermarket/app/assets/compass/typography/text/_replacement.scss b/src/supermarket/app/assets/compass/typography/text/_replacement.scss new file mode 100644 index 000000000..bb0e6d521 --- /dev/null +++ b/src/supermarket/app/assets/compass/typography/text/_replacement.scss @@ -0,0 +1,68 @@ +// Indicates the direction you prefer to move your text +// when hiding it. +// +// `left` is more robust, especially in older browsers. +// `right` seems have better runtime performance. +$hide-text-direction: left !default; + +// Hides html text and replaces it with an image. +// If you use this on an inline element, you will need to change the display to block or inline-block. +// Also, if the size of the image differs significantly from the font size, you'll need to set the width and/or height. +// +// Parameters: +// +// * `img` -- the relative path from the project image directory to the image, or a url literal. +// * `x` -- the x position of the background image. +// * `y` -- the y position of the background image. +@mixin replace-text($img, $x: 50%, $y: 50%) { + @include hide-text; + background: { + @if is-url($img) { + image: url($img); + } @else { + image: image-url($img); + } + repeat: no-repeat; + position: $x $y; + }; +} + +// Like the `replace-text` mixin, but also sets the width +// and height of the element according the dimensions of the image. +// +// If you set `$inline` to true, then an inline image (data uri) will be used. +@mixin replace-text-with-dimensions($img, $x: 50%, $y: 50%, $inline: false) { + @include replace-text(if($inline, inline-image($img), $img), $x, $y); + width: image-width($img); + height: image-height($img); +} + +// Hides text in an element so you can see the background. +// +// The direction indicates how the text should be moved out of view. +// +// See `$hide-text-direction` for more information and to set this globally +// for your application. +@mixin hide-text($direction: $hide-text-direction) { + @if $direction == left { + $approximate-em-value: 12px; + $wider-than-any-screen: -9999; + text-indent: $wider-than-any-screen * $approximate-em-value; + overflow: hidden; + text-align: left; + } @else { + // slightly wider than the box prevents issues with inline-block elements + text-indent: 110%; + white-space: nowrap; + overflow: hidden; + } +} + +// Hides text in an element by squishing the text into oblivion. +// Use this if you need to hide text contained in an inline element +// but still have it read by a screen reader. +@mixin squish-text { + font: 0/0 serif; + text-shadow: none; + color: transparent; +} diff --git a/src/supermarket/app/assets/compass/utilities/_color.scss b/src/supermarket/app/assets/compass/utilities/_color.scss new file mode 100644 index 000000000..0cc7fd163 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_color.scss @@ -0,0 +1 @@ +@import "color/contrast"; \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/utilities/_general.scss b/src/supermarket/app/assets/compass/utilities/_general.scss new file mode 100644 index 000000000..047e6368d --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_general.scss @@ -0,0 +1,6 @@ +@import "general/reset"; +@import "general/clearfix"; +@import "general/float"; +@import "general/tag-cloud"; +@import "general/hacks"; +@import "general/min"; diff --git a/src/supermarket/app/assets/compass/utilities/_links.scss b/src/supermarket/app/assets/compass/utilities/_links.scss new file mode 100644 index 000000000..e0e32512c --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_links.scss @@ -0,0 +1,5 @@ +@warn "This import is deprecated. Use 'compass/typography/links' instead."; + +@import "../typography/links/hover-link"; +@import "../typography/links/link-colors"; +@import "../typography/links/unstyled-link"; diff --git a/src/supermarket/app/assets/compass/utilities/_lists.scss b/src/supermarket/app/assets/compass/utilities/_lists.scss new file mode 100644 index 000000000..4833ee1ec --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_lists.scss @@ -0,0 +1,6 @@ +@warn "This import is deprecated. Use 'compass/typography/lists' instead."; + +@import "../typography/lists/horizontal-list"; +@import "../typography/lists/inline-list"; +@import "../typography/lists/inline-block-list"; +@import "../typography/lists/bullets"; diff --git a/src/supermarket/app/assets/compass/utilities/_print.scss b/src/supermarket/app/assets/compass/utilities/_print.scss new file mode 100644 index 000000000..4771e080a --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_print.scss @@ -0,0 +1,17 @@ +// Classes that are useful for controlling what gets printed. +// You must mix `+print-utilities` into your print stylesheet +// and `+print-utilities(screen)` into your screen stylesheet. +// Note: these aren't semantic. +@mixin print-utilities($media: print) { + @if $media == print { + .noprint, .no-print { display: none; } + #{elements-of-type(block)} { + &.print-only { display: block; } + } + #{elements-of-type(inline)} { + &.print-only { display: inline; } + } + } @else { + .print-only { display: none; } + } +} diff --git a/src/supermarket/app/assets/compass/utilities/_sprites.scss b/src/supermarket/app/assets/compass/utilities/_sprites.scss new file mode 100644 index 000000000..006680487 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_sprites.scss @@ -0,0 +1,2 @@ +@import "sprites/base"; +@import "sprites/sprite-img"; diff --git a/src/supermarket/app/assets/compass/utilities/_tables.scss b/src/supermarket/app/assets/compass/utilities/_tables.scss new file mode 100644 index 000000000..4af1d51b3 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_tables.scss @@ -0,0 +1,3 @@ +@import "tables/alternating-rows-and-columns"; +@import "tables/borders"; +@import "tables/scaffolding"; diff --git a/src/supermarket/app/assets/compass/utilities/_text.scss b/src/supermarket/app/assets/compass/utilities/_text.scss new file mode 100644 index 000000000..bb73c25d0 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/_text.scss @@ -0,0 +1,5 @@ +@warn "This import is deprecated. Use 'compass/typography/text' instead."; + +@import "../typography/text/ellipsis"; +@import "../typography/text/nowrap"; +@import "../typography/text/replacement"; diff --git a/src/supermarket/app/assets/compass/utilities/color/_contrast.scss b/src/supermarket/app/assets/compass/utilities/color/_contrast.scss new file mode 100644 index 000000000..fc73905e1 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/color/_contrast.scss @@ -0,0 +1,28 @@ +$contrasted-dark-default: #000 !default; +$contrasted-light-default: #fff !default; +$contrasted-lightness-threshold: 30% !default; + +// Returns the `$light` color when the `$color` is dark +// and the `$dark` color when the `$color` is light. +// The `$threshold` is a percent between `0%` and `100%` and it determines +// when the lightness of `$color` changes from "dark" to "light". +@function contrast-color( + $color, + $dark: $contrasted-dark-default, + $light: $contrasted-light-default, + $threshold: $contrasted-lightness-threshold +) { + @return if(lightness($color) < $threshold, $light, $dark) +} + +// Sets the specified background color and calculates a dark or light contrasted text color. +// The arguments are passed through to the [contrast-color function](#function-contrast-color). +@mixin contrasted( + $background-color, + $dark: $contrasted-dark-default, + $light: $contrasted-light-default, + $threshold: $contrasted-lightness-threshold +) { + background-color: $background-color; + color: contrast-color($background-color, $dark, $light, $threshold); +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/utilities/general/_clearfix.scss b/src/supermarket/app/assets/compass/utilities/general/_clearfix.scss new file mode 100644 index 000000000..73f9254c0 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_clearfix.scss @@ -0,0 +1,44 @@ +// @doc off +// Extends the bottom of the element to enclose any floats it contains. +// @doc on + +@import "hacks"; + +// This basic method is preferred for the usual case, when positioned +// content will not show outside the bounds of the container. +// +// Recommendations include using this in conjunction with a width. +// Credit: [quirksmode.org](http://www.quirksmode.org/blog/archives/2005/03/clearing_floats.html) +@mixin clearfix { + overflow: hidden; + @include has-layout; +} + +// This older method from Position Is Everything called +// [Easy Clearing](http://www.positioniseverything.net/easyclearing.html) +// has the advantage of allowing positioned elements to hang +// outside the bounds of the container at the expense of more tricky CSS. +@mixin legacy-pie-clearfix { + &:after { + content : "\0020"; + display : block; + height : 0; + clear : both; + overflow : hidden; + visibility : hidden; + } + @include has-layout; +} + +// This is an updated version of the PIE clearfix method that reduces the amount of CSS output. +// If you need to support Firefox before 3.5 you need to use `legacy-pie-clearfix` instead. +// +// Adapted from: [A new micro clearfix hack](http://nicolasgallagher.com/micro-clearfix-hack/) +@mixin pie-clearfix { + &:after { + content: ""; + display: table; + clear: both; + } + @include has-layout; +} diff --git a/src/supermarket/app/assets/compass/utilities/general/_float.scss b/src/supermarket/app/assets/compass/utilities/general/_float.scss new file mode 100644 index 000000000..914f184d7 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_float.scss @@ -0,0 +1,30 @@ +// Implementation of float:left with fix for the +// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html) +@mixin float-left { + @include float(left); } + +// Implementation of float:right with fix for the +// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html) +@mixin float-right { + @include float(right); } + +// Direction independent float mixin that fixes the +// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html) +@mixin float($side: left) { + display: inline; + float: unquote($side); } + +// Resets floated elements back to their default of `float: none` and defaults +// to `display: block` unless you pass `inline` as an argument +// +// Usage Example: +// +// body.homepage +// #footer li +// +float-left +// body.signup +// #footer li +// +reset-float +@mixin reset-float($display: block) { + float: none; + display: $display; } \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/utilities/general/_hacks.scss b/src/supermarket/app/assets/compass/utilities/general/_hacks.scss new file mode 100644 index 000000000..706265ec4 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_hacks.scss @@ -0,0 +1,46 @@ +@import "../../support"; + +// The `zoom` approach generates less CSS but does not validate. +// Set this to `block` to use the display-property to hack the +// element to gain layout. +$default-has-layout-approach: zoom !default; + +// This mixin causes an element matching the selector +// to gain the "hasLayout" property in internet explorer. +// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout). +@mixin has-layout($approach: $default-has-layout-approach) { + @if $legacy-support-for-ie { + @if $approach == zoom { + @include has-layout-zoom; + } @else if $approach == block { + @include has-layout-block; + } @else { + @warn "Unknown has-layout approach: #{$approach}"; + @include has-layout-zoom; + } + } +} + +@mixin has-layout-zoom { + @if $legacy-support-for-ie6 or $legacy-support-for-ie7 { + *zoom: 1; + } +} + +@mixin has-layout-block { + @if $legacy-support-for-ie { + // This makes ie6 get layout + display: inline-block; + // and this puts it back to block + & { display: block; } + } +} + +// A hack to supply IE6 (and below) with a different property value. +// [Read more](http://www.cssportal.com/css-hacks/#in_css-important). +@mixin bang-hack($property, $value, $ie6-value) { + @if $legacy-support-for-ie6 { + #{$property}: #{$value} !important; + #{$property}: #{$ie6-value}; + } +} diff --git a/src/supermarket/app/assets/compass/utilities/general/_min.scss b/src/supermarket/app/assets/compass/utilities/general/_min.scss new file mode 100644 index 000000000..99a676b33 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_min.scss @@ -0,0 +1,16 @@ +@import "hacks"; + +//** +// Cross browser min-height mixin. +@mixin min-height($value) { + @include hacked-minimum(height, $value); } + +//** +// Cross browser min-width mixin. +@mixin min-width($value) { + @include hacked-minimum(width, $value); } + +// @private This mixin is not meant to be used directly. +@mixin hacked-minimum($property, $value) { + min-#{$property}: $value; + @include bang-hack($property, auto, $value); } diff --git a/src/supermarket/app/assets/compass/utilities/general/_reset.scss b/src/supermarket/app/assets/compass/utilities/general/_reset.scss new file mode 100644 index 000000000..058c8a17c --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_reset.scss @@ -0,0 +1,2 @@ +// This module has moved. +@import "../../reset/utilities"; diff --git a/src/supermarket/app/assets/compass/utilities/general/_tabs.scss b/src/supermarket/app/assets/compass/utilities/general/_tabs.scss new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_tabs.scss @@ -0,0 +1 @@ + diff --git a/src/supermarket/app/assets/compass/utilities/general/_tag-cloud.scss b/src/supermarket/app/assets/compass/utilities/general/_tag-cloud.scss new file mode 100644 index 000000000..7ccae0551 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/general/_tag-cloud.scss @@ -0,0 +1,18 @@ +// Emits styles for a tag cloud +@mixin tag-cloud($base-size: 1em) { + font-size: $base-size; + line-height: 1.2 * $base-size; + .xxs, .xs, .s, .l, .xl, .xxl { + line-height: 1.2 * $base-size; } + .xxs { + font-size: $base-size / 2; } + .xs { + font-size: 2 * $base-size / 3; } + .s { + font-size: 3 * $base-size / 4; } + .l { + font-size: 4 * $base-size / 3; } + .xl { + font-size: 3 * $base-size / 2; } + .xxl { + font-size: 2 * $base-size; } } diff --git a/src/supermarket/app/assets/compass/utilities/links/_hover-link.scss b/src/supermarket/app/assets/compass/utilities/links/_hover-link.scss new file mode 100644 index 000000000..843459fa8 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/links/_hover-link.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/links/hover-link' instead."; + +@import "../../typography/links/hover-link"; diff --git a/src/supermarket/app/assets/compass/utilities/links/_link-colors.scss b/src/supermarket/app/assets/compass/utilities/links/_link-colors.scss new file mode 100644 index 000000000..fac94387f --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/links/_link-colors.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/links/link-colors' instead."; + +@import "../../typography/links/link-colors"; diff --git a/src/supermarket/app/assets/compass/utilities/links/_unstyled-link.scss b/src/supermarket/app/assets/compass/utilities/links/_unstyled-link.scss new file mode 100644 index 000000000..1c48f4684 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/links/_unstyled-link.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/links/unstyled-link' instead."; + +@import "../../typography/links/unstyled-link"; diff --git a/src/supermarket/app/assets/compass/utilities/lists/_bullets.scss b/src/supermarket/app/assets/compass/utilities/lists/_bullets.scss new file mode 100644 index 000000000..796e1cd02 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/lists/_bullets.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/lists/bullets' instead."; + +@import "../../typography/lists/bullets"; diff --git a/src/supermarket/app/assets/compass/utilities/lists/_horizontal-list.scss b/src/supermarket/app/assets/compass/utilities/lists/_horizontal-list.scss new file mode 100644 index 000000000..38ae85cc4 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/lists/_horizontal-list.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/lists/horizontal-list' instead."; + +@import "../../typography/lists/horizontal-list"; diff --git a/src/supermarket/app/assets/compass/utilities/lists/_inline-block-list.scss b/src/supermarket/app/assets/compass/utilities/lists/_inline-block-list.scss new file mode 100644 index 000000000..5d4a12985 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/lists/_inline-block-list.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/lists/inline-block-list' instead."; + +@import "../../typography/lists/inline-block-list"; diff --git a/src/supermarket/app/assets/compass/utilities/lists/_inline-list.scss b/src/supermarket/app/assets/compass/utilities/lists/_inline-list.scss new file mode 100644 index 000000000..fb1dfeb9d --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/lists/_inline-list.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/lists/inline-list' instead."; + +@import "../../typography/lists/inline-list"; diff --git a/src/supermarket/app/assets/compass/utilities/sprites/_base.scss b/src/supermarket/app/assets/compass/utilities/sprites/_base.scss new file mode 100644 index 000000000..ef8feb6b9 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/sprites/_base.scss @@ -0,0 +1,66 @@ +// Determines those states for which you want to enable magic sprite selectors +$sprite-selectors: hover, target, active !default; + +// Set the width and height of an element to the original +// dimensions of an image before it was included in the sprite. +@mixin sprite-dimensions($map, $sprite) { + height: image-height(sprite-file($map, $sprite)); + width: image-width(sprite-file($map, $sprite)); +} + +// Set the background position of the given sprite `$map` to display the +// sprite of the given `$sprite` name. You can move the image relative to its +// natural position by passing `$offset-x` and `$offset-y`. +@mixin sprite-background-position($map, $sprite, $offset-x: 0, $offset-y: 0) { + background-position: sprite-position($map, $sprite, $offset-x, $offset-y); +} + + +// Determines if you want to include magic selectors in your sprites +$disable-magic-sprite-selectors:false !default; + +// Include the position and (optionally) dimensions of this `$sprite` +// in the given sprite `$map`. The sprite url should come from either a base +// class or you can specify the `sprite-url` explicitly like this: +// +// background: $map no-repeat; +@mixin sprite($map, $sprite, $dimensions: false, $offset-x: 0, $offset-y: 0) { + @include sprite-background-position($map, $sprite, $offset-x, $offset-y); + @if $dimensions { + @include sprite-dimensions($map, $sprite); + } + @if not($disable-magic-sprite-selectors) { + @include sprite-selectors($map, $sprite, $sprite, $offset-x, $offset-y); + } +} + +// Include the selectors for the `$sprite` given the `$map` and the +// `$full-sprite-name` +// @private +@mixin sprite-selectors($map, $sprite-name, $full-sprite-name, $offset-x: 0, $offset-y: 0) { + @each $selector in $sprite-selectors { + @if sprite_has_selector($map, $sprite-name, $selector) { + &:#{$selector}, &.#{$full-sprite-name}_#{$selector}, &.#{$full-sprite-name}-#{$selector} { + @include sprite-background-position($map, "#{$sprite-name}_#{$selector}", $offset-x, $offset-y); + } + } + } +} + +// Generates a class for each space separated name in `$sprite-names`. +// The class will be of the form .-. +// +// If a base class is provided, then each class will extend it. +// +// If `$dimensions` is `true`, the sprite dimensions will specified. +@mixin sprites($map, $sprite-names, $base-class: false, $dimensions: false, $prefix: sprite-map-name($map), $offset-x: 0, $offset-y: 0) { + @each $sprite-name in $sprite-names { + @if sprite_does_not_have_parent($map, $sprite-name) { + $full-sprite-name: "#{$prefix}-#{$sprite-name}"; + .#{$full-sprite-name} { + @if $base-class { @extend #{$base-class}; } + @include sprite($map, $sprite-name, $dimensions, $offset-x, $offset-y); + } + } + } +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/utilities/sprites/_sprite-img.scss b/src/supermarket/app/assets/compass/utilities/sprites/_sprite-img.scss new file mode 100644 index 000000000..ff90c00ab --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/sprites/_sprite-img.scss @@ -0,0 +1,79 @@ +// @doc off +// Example 1: +// +// a.twitter +// +sprite-img("icons-32.png", 1) +// a.facebook +// +sprite-img("icons-32png", 2) +// +// Example 2: +// +// a +// +sprite-background("icons-32.png") +// a.twitter +// +sprite-column(1) +// a.facebook +// +sprite-row(2) +// @doc on + +$sprite-default-size: 32px !default; + +$sprite-default-margin: 0px !default; + +$sprite-image-default-width: $sprite-default-size !default; + +$sprite-image-default-height: $sprite-default-size !default; + +// Sets all the rules for a sprite from a given sprite image to show just one of the sprites. +// To reduce duplication use a sprite-bg mixin for common properties and a sprite-select mixin for positioning. +@mixin sprite-img($img, $col, $row: 1, $width: $sprite-image-default-width, $height: $sprite-image-default-height, $margin: $sprite-default-margin) { + @include sprite-background($img, $width, $height); + @include sprite-position($col, $row, $width, $height, $margin); +} + +// Sets rules common for all sprites, assumes you want a square, but allows a rectangular region. +@mixin sprite-background($img, $width: $sprite-default-size, $height: $width) { + @include sprite-background-rectangle($img, $width, $height); +} + +// Sets rules common for all sprites, assumes a rectangular region. +@mixin sprite-background-rectangle($img, $width: $sprite-image-default-width, $height: $sprite-image-default-height) { + background: image-url($img) no-repeat; + width: $width; + height: $height; + overflow: hidden; +} + +// Allows horizontal sprite positioning optimized for a single row of sprites. +@mixin sprite-column($col, $width: $sprite-image-default-width, $margin: $sprite-default-margin) { + @include sprite-position($col, 1, $width, 0px, $margin); +} + +// Allows vertical sprite positioning optimized for a single column of sprites. +@mixin sprite-row($row, $height: $sprite-image-default-height, $margin: $sprite-default-margin) { + @include sprite-position(1, $row, 0px, $height, $margin); +} + +// Allows vertical and horizontal sprite positioning from a grid of equal dimensioned sprites. +@mixin sprite-position($col, $row: 1, $width: $sprite-image-default-width, $height: $sprite-image-default-height, $margin: $sprite-default-margin) { + $x: ($col - 1) * -$width - ($col - 1) * $margin; + $y: ($row - 1) * -$height - ($row - 1) * $margin; + background-position: $x $y; +} + + + +// Similar to 'sprite-replace-text-with-dimensions' but does not autmaticly set the demensions +@mixin sprite-replace-text ($map, $sprite, $dimensions: false, $offset-x: 0, $offset-y: 0) { + @include hide-text; + @include sprite($map, $sprite, $dimensions, $offset-x, $offset-y); + background-image: $map; + background-repeat: no-repeat; +} + +// Similar to 'replace-text-with-dimensions' but with sprites +// To use, create your sprite and then pass it in the `$map` param +// The name of the image in the sprite folder should be `$img-name` +@mixin sprite-replace-text-with-dimensions ($map, $sprite, $offset-x: 0, $offset-y: 0){ + @include sprite-replace-text ($map, $sprite, true, $offset-x, $offset-y); +} \ No newline at end of file diff --git a/src/supermarket/app/assets/compass/utilities/tables/_alternating-rows-and-columns.scss b/src/supermarket/app/assets/compass/utilities/tables/_alternating-rows-and-columns.scss new file mode 100644 index 000000000..4da78e24b --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/tables/_alternating-rows-and-columns.scss @@ -0,0 +1,22 @@ +@mixin alternating-rows-and-columns($even-row-color, $odd-row-color, $dark-intersection, $header-color: white, $footer-color: white) { + th { + background-color: $header-color; + &.even, &:nth-child(2n) { + background-color: $header-color - $dark-intersection; } } + tr { + &.odd, &:nth-child(2n+1) { + td { + background-color: $odd-row-color; + &.even, &:nth-child(2n) { + background-color: $odd-row-color - $dark-intersection; } } } + } + tr.even { + td { + background-color: $even-row-color; + &.even, &:nth-child(2n) { + background-color: $even-row-color - $dark-intersection; } } } + tfoot { + th, td { + background-color: $footer-color; + &.even, &:nth-child(2n) { + background-color: $footer-color - $dark-intersection; } } } } diff --git a/src/supermarket/app/assets/compass/utilities/tables/_borders.scss b/src/supermarket/app/assets/compass/utilities/tables/_borders.scss new file mode 100644 index 000000000..120896dc9 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/tables/_borders.scss @@ -0,0 +1,33 @@ +@mixin outer-table-borders($width: 2px, $color: black) { + border: $width solid $color; + thead { + th { + border-bottom: $width solid $color; } } + tfoot { + th, td { + border-top: $width solid $color; } } + th { + &:first-child { + border-right: $width solid $color; } } } + +@mixin inner-table-borders($width: 2px, $color: black) { + th, td { + border: { + right: $width solid $color; + bottom: $width solid $color; + left-width: 0px; + top-width: 0px; }; + &:last-child, + &.last { + border-right-width: 0px; } } + +// IE8 ignores rules that are included on the same line as :last-child +// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details + + tbody, tfoot { + tr:last-child { + th, td { + border-bottom-width: 0px; } } + tr.last { + th, td { + border-bottom-width: 0px; } } } } diff --git a/src/supermarket/app/assets/compass/utilities/tables/_scaffolding.scss b/src/supermarket/app/assets/compass/utilities/tables/_scaffolding.scss new file mode 100644 index 000000000..cc19d0404 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/tables/_scaffolding.scss @@ -0,0 +1,9 @@ +@mixin table-scaffolding { + th { + text-align: center; + font-weight: bold; } + td, + th { + padding: 2px; + &.numeric { + text-align: right; } } } diff --git a/src/supermarket/app/assets/compass/utilities/text/_ellipsis.scss b/src/supermarket/app/assets/compass/utilities/text/_ellipsis.scss new file mode 100644 index 000000000..b1727547e --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/text/_ellipsis.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/text/ellipsis' instead."; + +@import "../../typography/text/ellipsis"; diff --git a/src/supermarket/app/assets/compass/utilities/text/_nowrap.scss b/src/supermarket/app/assets/compass/utilities/text/_nowrap.scss new file mode 100644 index 000000000..ca4a22f98 --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/text/_nowrap.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/text/nowrap' instead."; + +@import "../../typography/text/nowrap"; diff --git a/src/supermarket/app/assets/compass/utilities/text/_replacement.scss b/src/supermarket/app/assets/compass/utilities/text/_replacement.scss new file mode 100644 index 000000000..809c6a8bc --- /dev/null +++ b/src/supermarket/app/assets/compass/utilities/text/_replacement.scss @@ -0,0 +1,3 @@ +@warn "This import is deprecated. Use 'compass/typography/text/replacement' instead."; + +@import "../../typography/text/replacement"; diff --git a/src/supermarket/app/assets/config/manifest.js b/src/supermarket/app/assets/config/manifest.js new file mode 100644 index 000000000..e694c757a --- /dev/null +++ b/src/supermarket/app/assets/config/manifest.js @@ -0,0 +1,3 @@ + //= link_tree ../images + //= link_directory ../javascripts .js + //= link_directory ../stylesheets .css \ No newline at end of file diff --git a/src/supermarket/app/assets/stylesheets/appheader.scss b/src/supermarket/app/assets/stylesheets/appheader.scss index e82ac1945..76295f67f 100644 --- a/src/supermarket/app/assets/stylesheets/appheader.scss +++ b/src/supermarket/app/assets/stylesheets/appheader.scss @@ -1,8 +1,8 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/background-size"; -@import "compass/css3/border-radius"; -@import "compass/css3/box-shadow"; +@import "../compass/css3/background-size"; +@import "../compass/css3/border-radius"; +@import "../compass/css3/box-shadow"; // Global Header // Header wrapping element and row diff --git a/src/supermarket/app/assets/stylesheets/cookbooks/badge_icons.scss b/src/supermarket/app/assets/stylesheets/cookbooks/badge_icons.scss index 63616dcbb..f9682b4e8 100644 --- a/src/supermarket/app/assets/stylesheets/cookbooks/badge_icons.scss +++ b/src/supermarket/app/assets/stylesheets/cookbooks/badge_icons.scss @@ -1,5 +1,5 @@ @import "common"; -@import "compass/css3/box-sizing"; +@import "../../compass/css3/box-sizing"; // Styles for the various cookbook badge icons diff --git a/src/supermarket/app/assets/stylesheets/cookbooks/cookbook.scss b/src/supermarket/app/assets/stylesheets/cookbooks/cookbook.scss index df4f069f0..b4a4e12b3 100644 --- a/src/supermarket/app/assets/stylesheets/cookbooks/cookbook.scss +++ b/src/supermarket/app/assets/stylesheets/cookbooks/cookbook.scss @@ -1,8 +1,8 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/border-radius"; -@import "compass/css3/box-shadow"; -@import "compass/css3/inline-block"; +@import "../../compass/css3/border-radius"; +@import "../../compass/css3/box-shadow"; +@import "../../compass/css3/inline-block"; .cookbook_stats { list-style: none; diff --git a/src/supermarket/app/assets/stylesheets/cookbooks/platform_icons.scss b/src/supermarket/app/assets/stylesheets/cookbooks/platform_icons.scss index 1508b168a..a45b0e494 100644 --- a/src/supermarket/app/assets/stylesheets/cookbooks/platform_icons.scss +++ b/src/supermarket/app/assets/stylesheets/cookbooks/platform_icons.scss @@ -1,5 +1,5 @@ @import "common"; -@import "compass/css3/box-sizing"; +@import "../../compass/css3/box-sizing"; // Styles for the various cookbook platform icons diff --git a/src/supermarket/app/assets/stylesheets/cookbooks/search.scss b/src/supermarket/app/assets/stylesheets/cookbooks/search.scss index 7a922a854..c2f18b7a5 100644 --- a/src/supermarket/app/assets/stylesheets/cookbooks/search.scss +++ b/src/supermarket/app/assets/stylesheets/cookbooks/search.scss @@ -1,9 +1,8 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/border-radius"; -@import "compass/css3/box-shadow"; -@import "compass/css3/inline-block"; - +@import "../../compass/css3/border-radius"; +@import "../../compass/css3/box-shadow"; +@import "../../compass/css3/inline-block"; // Styles for the Cookbooks search interface .search_form { diff --git a/src/supermarket/app/assets/stylesheets/cookbooks/show.scss b/src/supermarket/app/assets/stylesheets/cookbooks/show.scss index 2947f24ec..fe43c9baf 100644 --- a/src/supermarket/app/assets/stylesheets/cookbooks/show.scss +++ b/src/supermarket/app/assets/stylesheets/cookbooks/show.scss @@ -1,7 +1,7 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/border-radius"; -@import "compass/css3/inline-block"; +@import "../../compass/css3/border-radius"; +@import "../../compass/css3/inline-block"; .cookbook_show { .deprecation-notice { diff --git a/src/supermarket/app/assets/stylesheets/dashboard.scss b/src/supermarket/app/assets/stylesheets/dashboard.scss index de8b9e6fd..058b9f7c6 100644 --- a/src/supermarket/app/assets/stylesheets/dashboard.scss +++ b/src/supermarket/app/assets/stylesheets/dashboard.scss @@ -1,6 +1,6 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/border-radius"; +@import "../compass/css3/border-radius"; .dashboard { .gravatar { diff --git a/src/supermarket/app/assets/stylesheets/default_branding.scss b/src/supermarket/app/assets/stylesheets/default_branding.scss index 678f35b88..6e271756e 100644 --- a/src/supermarket/app/assets/stylesheets/default_branding.scss +++ b/src/supermarket/app/assets/stylesheets/default_branding.scss @@ -1,3 +1,4 @@ +@import "variables"; $search_bar_background: $primary_blue; $appheader_logo_svg: 'logo-supermarket.svg'; $appheader_logo_png: 'logo-supermarket.png'; diff --git a/src/supermarket/app/assets/stylesheets/listing.scss b/src/supermarket/app/assets/stylesheets/listing.scss index e5eecc06a..66e39bfcf 100644 --- a/src/supermarket/app/assets/stylesheets/listing.scss +++ b/src/supermarket/app/assets/stylesheets/listing.scss @@ -1,6 +1,6 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/inline-block"; +@import "../compass/css3/inline-block"; .listing { list-style-type: none; diff --git a/src/supermarket/app/assets/stylesheets/profile/profile.scss b/src/supermarket/app/assets/stylesheets/profile/profile.scss index 0224939ce..312999a5d 100644 --- a/src/supermarket/app/assets/stylesheets/profile/profile.scss +++ b/src/supermarket/app/assets/stylesheets/profile/profile.scss @@ -1,5 +1,5 @@ @import "common"; -@import "compass/css3/border-radius"; +@import "../../compass/css3/border-radius"; @import "foundation/components/grid"; @import "foundation/components/block-grid"; diff --git a/src/supermarket/app/assets/stylesheets/resource.scss b/src/supermarket/app/assets/stylesheets/resource.scss index 83dcef129..182c513e2 100644 --- a/src/supermarket/app/assets/stylesheets/resource.scss +++ b/src/supermarket/app/assets/stylesheets/resource.scss @@ -1,6 +1,6 @@ @import "common"; -@import "compass/css3/inline-block"; -@import "compass/css3/border-radius"; +@import "../compass/css3/inline-block"; +@import "../compass/css3/border-radius"; .resource { .sidebar { diff --git a/src/supermarket/app/assets/stylesheets/structure.scss b/src/supermarket/app/assets/stylesheets/structure.scss index 1b9f4065d..87aa76a11 100644 --- a/src/supermarket/app/assets/stylesheets/structure.scss +++ b/src/supermarket/app/assets/stylesheets/structure.scss @@ -1,8 +1,8 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/transition"; -@import "compass/css3/border-radius"; -@import "compass/css3/inline-block"; +@import "../compass/css3/transition"; +@import "../compass/css3/border-radius"; +@import "../compass/css3/inline-block"; // Basic structural elements html, body { height: 100%; min-height: 100%; } diff --git a/src/supermarket/app/assets/stylesheets/tabs.scss b/src/supermarket/app/assets/stylesheets/tabs.scss index cc011f884..37a9d8e28 100644 --- a/src/supermarket/app/assets/stylesheets/tabs.scss +++ b/src/supermarket/app/assets/stylesheets/tabs.scss @@ -1,5 +1,5 @@ @import "common"; -@import "compass/css3/border-radius"; +@import "../compass/css3/border-radius"; // Tab structure .tabs { diff --git a/src/supermarket/app/assets/stylesheets/tools/show.scss b/src/supermarket/app/assets/stylesheets/tools/show.scss index 090c661e1..ac5b8b7db 100644 --- a/src/supermarket/app/assets/stylesheets/tools/show.scss +++ b/src/supermarket/app/assets/stylesheets/tools/show.scss @@ -1,7 +1,7 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/border-radius"; -@import "compass/css3/inline-block"; +@import "../../compass/css3/border-radius"; +@import "../../compass/css3/inline-block"; .tool_show .sidebar .other h3 { margin-bottom: 0; diff --git a/src/supermarket/app/assets/stylesheets/welcome.css.scss b/src/supermarket/app/assets/stylesheets/welcome.css.scss index 2c1cc9eed..c1dc9a3eb 100644 --- a/src/supermarket/app/assets/stylesheets/welcome.css.scss +++ b/src/supermarket/app/assets/stylesheets/welcome.css.scss @@ -1,6 +1,6 @@ @import "common"; @import "foundation/components/grid"; -@import "compass/css3/border-radius"; +@import "../compass/css3/border-radius"; .sign_up_in { padding-bottom: rem-calc(55); diff --git a/src/supermarket/app/controllers/sessions_controller.rb b/src/supermarket/app/controllers/sessions_controller.rb index 9bd1c2e4b..de59e0bfe 100644 --- a/src/supermarket/app/controllers/sessions_controller.rb +++ b/src/supermarket/app/controllers/sessions_controller.rb @@ -26,9 +26,7 @@ def create # def destroy reset_session - flash[:signout] = true - redirect_to root_path, notice: t("user.signed_out") end diff --git a/src/supermarket/app/mailers/cookbook_mailer.rb b/src/supermarket/app/mailers/cookbook_mailer.rb index a0a4734e3..69f34c20c 100644 --- a/src/supermarket/app/mailers/cookbook_mailer.rb +++ b/src/supermarket/app/mailers/cookbook_mailer.rb @@ -1,5 +1,5 @@ class CookbookMailer < ApplicationMailer - add_template_helper(CookbookVersionsHelper) + helper CookbookVersionsHelper # # Creates an email to a user that is a cookbook follower diff --git a/src/supermarket/app/models/account.rb b/src/supermarket/app/models/account.rb index 011e2f96d..549f39762 100644 --- a/src/supermarket/app/models/account.rb +++ b/src/supermarket/app/models/account.rb @@ -30,11 +30,11 @@ def self.tokens_expiring_soon(nowish) # def unique_username_and_provider if Account.exists?(provider: provider, username: username) - errors[:base] << I18n.t( + errors.add(:base, I18n.t( "account.already_connected", provider: provider.titleize, username: username - ) + )) end end end diff --git a/src/supermarket/bin/rails b/src/supermarket/bin/rails index efc037749..6fb4e4051 100755 --- a/src/supermarket/bin/rails +++ b/src/supermarket/bin/rails @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -APP_PATH = File.expand_path("../config/application", __dir__) +APP_PATH = File.expand_path('../config/application', __dir__) require_relative "../config/boot" require "rails/commands" diff --git a/src/supermarket/bin/setup b/src/supermarket/bin/setup index ebdfd0277..90700ac4f 100755 --- a/src/supermarket/bin/setup +++ b/src/supermarket/bin/setup @@ -1,36 +1,36 @@ #!/usr/bin/env ruby require "fileutils" -include FileUtils # path to your application root. -APP_ROOT = File.expand_path("..", __dir__) +APP_ROOT = File.expand_path('..', __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end -chdir APP_ROOT do - # This script is a starting point to setup your application. +FileUtils.chdir APP_ROOT do + # This script is a way to set up or update your development environment automatically. + # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. - puts "== Installing dependencies ==" - system! "gem install bundler --conservative" - system("bundle check") || system!("bundle install") + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') - # Install JavaScript dependencies if using Yarn - # system('bin/yarn') + # Install JavaScript dependencies + system! 'bin/yarn' # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') - # cp 'config/database.yml.sample', 'config/database.yml' + # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' # end puts "\n== Preparing database ==" - system! "bin/rails db:setup" + system! 'bin/rails db:prepare' puts "\n== Removing old logs and tempfiles ==" - system! "bin/rails log:clear tmp:clear" + system! 'bin/rails log:clear tmp:clear' puts "\n== Restarting application server ==" - system! "bin/rails restart" + system! 'bin/rails restart' end diff --git a/src/supermarket/bin/spring b/src/supermarket/bin/spring deleted file mode 100755 index 7909370d8..000000000 --- a/src/supermarket/bin/spring +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ruby - -# This file loads spring without using Bundler, in order to be fast -# It gets overwritten when you run the `spring binstub` command - -unless defined?(Spring) - require "rubygems" - require "bundler" - match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m) - if match - ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR) - ENV["GEM_HOME"] = "" - Gem.paths = ENV - - gem "spring", match[1] - require "spring/binstub" - end -end diff --git a/src/supermarket/bin/yarn b/src/supermarket/bin/yarn index 66a5d02be..9fab2c350 100755 --- a/src/supermarket/bin/yarn +++ b/src/supermarket/bin/yarn @@ -1,9 +1,17 @@ #!/usr/bin/env ruby -APP_ROOT = File.expand_path("..", __dir__) +APP_ROOT = File.expand_path('..', __dir__) Dir.chdir(APP_ROOT) do - exec "yarnpkg #{ARGV.join(" ")}" -rescue Errno::ENOENT - warn "Yarn executable was not detected in the system." - warn "Download Yarn at https://yarnpkg.com/en/docs/install" - exit 1 + yarn = ENV["PATH"].split(File::PATH_SEPARATOR). + select { |dir| File.expand_path(dir) != __dir__ }. + product(["yarn", "yarn.cmd", "yarn.ps1"]). + map { |dir, file| File.expand_path(file, dir) }. + find { |file| File.executable?(file) } + + if yarn + exec yarn, *ARGV + else + $stderr.puts "Yarn executable was not detected in the system." + $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" + exit 1 + end end diff --git a/src/supermarket/config/boot.rb b/src/supermarket/config/boot.rb index ebfe695f4..d69bd27dc 100644 --- a/src/supermarket/config/boot.rb +++ b/src/supermarket/config/boot.rb @@ -1,4 +1,3 @@ -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. -# require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/src/supermarket/config/cable.yml b/src/supermarket/config/cable.yml index 9250c7460..4fe3b3ddd 100644 --- a/src/supermarket/config/cable.yml +++ b/src/supermarket/config/cable.yml @@ -2,7 +2,7 @@ development: adapter: async test: - adapter: async + adapter: test production: adapter: redis diff --git a/src/supermarket/config/initializers/backtrace_silencers.rb b/src/supermarket/config/initializers/backtrace_silencers.rb index 59385cdf3..33699c309 100644 --- a/src/supermarket/config/initializers/backtrace_silencers.rb +++ b/src/supermarket/config/initializers/backtrace_silencers.rb @@ -1,7 +1,8 @@ # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } +# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code +# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". +Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] diff --git a/src/supermarket/config/initializers/filter_parameter_logging.rb b/src/supermarket/config/initializers/filter_parameter_logging.rb index 4a994e1e7..4b34a0366 100644 --- a/src/supermarket/config/initializers/filter_parameter_logging.rb +++ b/src/supermarket/config/initializers/filter_parameter_logging.rb @@ -1,4 +1,6 @@ # Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. -Rails.application.config.filter_parameters += [:password] +Rails.application.config.filter_parameters += [ + :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/src/supermarket/config/initializers/new_framework_defaults_6_1.rb b/src/supermarket/config/initializers/new_framework_defaults_6_1.rb new file mode 100644 index 000000000..9526b835a --- /dev/null +++ b/src/supermarket/config/initializers/new_framework_defaults_6_1.rb @@ -0,0 +1,67 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 6.1 upgrade. +# +# Once upgraded flip defaults one by one to migrate to the new default. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. + +# Support for inversing belongs_to -> has_many Active Record associations. +# Rails.application.config.active_record.has_many_inversing = true + +# Track Active Storage variants in the database. +# Rails.application.config.active_storage.track_variants = true + +# Apply random variation to the delay when retrying failed jobs. +# Rails.application.config.active_job.retry_jitter = 0.15 + +# Stop executing `after_enqueue`/`after_perform` callbacks if +# `before_enqueue`/`before_perform` respectively halts with `throw :abort`. +# Rails.application.config.active_job.skip_after_callbacks_if_terminated = true + +# Specify cookies SameSite protection level: either :none, :lax, or :strict. +# +# This change is not backwards compatible with earlier Rails versions. +# It's best enabled when your entire app is migrated and stable on 6.1. +# Rails.application.config.action_dispatch.cookies_same_site_protection = :lax + +# Generate CSRF tokens that are encoded in URL-safe Base64. +# +# This change is not backwards compatible with earlier Rails versions. +# It's best enabled when your entire app is migrated and stable on 6.1. +# Rails.application.config.action_controller.urlsafe_csrf_tokens = true + +# Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an +# UTC offset or a UTC time. +# ActiveSupport.utc_to_local_returns_utc_offset_times = true + +# Change the default HTTP status code to `308` when redirecting non-GET/HEAD +# requests to HTTPS in `ActionDispatch::SSL` middleware. +# Rails.application.config.action_dispatch.ssl_default_redirect_status = 308 + +# Use new connection handling API. For most applications this won't have any +# effect. For applications using multiple databases, this new API provides +# support for granular connection swapping. +# Rails.application.config.active_record.legacy_connection_handling = false + +# Make `form_with` generate non-remote forms by default. +# Rails.application.config.action_view.form_with_generates_remote_forms = false + +# Set the default queue name for the analysis job to the queue adapter default. +# Rails.application.config.active_storage.queues.analysis = nil + +# Set the default queue name for the purge job to the queue adapter default. +# Rails.application.config.active_storage.queues.purge = nil + +# Set the default queue name for the incineration job to the queue adapter default. +# Rails.application.config.action_mailbox.queues.incineration = nil + +# Set the default queue name for the routing job to the queue adapter default. +# Rails.application.config.action_mailbox.queues.routing = nil + +# Set the default queue name for the mail deliver job to the queue adapter default. +# Rails.application.config.action_mailer.deliver_later_queue_name = nil + +# Generate a `Link` header that gives a hint to modern browsers about +# preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`. +# Rails.application.config.action_view.preload_links_header = true diff --git a/src/supermarket/config/initializers/permissions_policy.rb b/src/supermarket/config/initializers/permissions_policy.rb new file mode 100644 index 000000000..00f64d71b --- /dev/null +++ b/src/supermarket/config/initializers/permissions_policy.rb @@ -0,0 +1,11 @@ +# Define an application-wide HTTP permissions policy. For further +# information see https://developers.google.com/web/updates/2018/06/feature-policy +# +# Rails.application.config.permissions_policy do |f| +# f.camera :none +# f.gyroscope :none +# f.microphone :none +# f.usb :none +# f.fullscreen :self +# f.payment :self, "https://secure.example.com" +# end diff --git a/src/supermarket/engines/fieri/.ruby-version b/src/supermarket/engines/fieri/.ruby-version index 743af5e12..a4dd9dba4 100644 --- a/src/supermarket/engines/fieri/.ruby-version +++ b/src/supermarket/engines/fieri/.ruby-version @@ -1 +1 @@ -2.6.8 +2.7.4 diff --git a/src/supermarket/engines/fieri/Gemfile.lock b/src/supermarket/engines/fieri/Gemfile.lock index 0fc1a83f1..5a0d6013a 100644 --- a/src/supermarket/engines/fieri/Gemfile.lock +++ b/src/supermarket/engines/fieri/Gemfile.lock @@ -7,64 +7,81 @@ PATH foodcritic (~> 16.3) mixlib-archive (~> 0.4) octokit (~> 4.0) - rails (>= 5.1, < 6) + rails (>= 6.1, < 7) ruby-filemagic sidekiq (~> 4.2) GEM remote: https://rubygems.org/ specs: - actioncable (5.2.6) - actionpack (= 5.2.6) + actioncable (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) + actionmailbox (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) + mail (>= 2.7.1) + actionmailer (6.1.4) + actionpack (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activesupport (= 6.1.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.6) - actionview (= 5.2.6) - activesupport (= 5.2.6) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.4) + actionview (= 6.1.4) + activesupport (= 6.1.4) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.6) - activesupport (= 5.2.6) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.1.4) + actionpack (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) + nokogiri (>= 1.8.5) + actionview (6.1.4) + activesupport (= 6.1.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.6) - activesupport (= 5.2.6) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.1.4) + activesupport (= 6.1.4) globalid (>= 0.3.6) - activemodel (5.2.6) - activesupport (= 5.2.6) - activerecord (5.2.6) - activemodel (= 5.2.6) - activesupport (= 5.2.6) - arel (>= 9.0) - activestorage (5.2.6) - actionpack (= 5.2.6) - activerecord (= 5.2.6) + activemodel (6.1.4) + activesupport (= 6.1.4) + activerecord (6.1.4) + activemodel (= 6.1.4) + activesupport (= 6.1.4) + activestorage (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activesupport (= 6.1.4) marcel (~> 1.0.0) - activesupport (5.2.6) + mini_mime (>= 1.1.0) + activesupport (6.1.4) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) - arel (9.0.0) ast (2.4.2) builder (3.2.4) chefstyle (2.0.7) rubocop (= 1.18.4) coderay (1.1.3) concurrent-ruby (1.1.9) - connection_pool (2.2.3) + connection_pool (2.2.5) cookstyle (7.15.4) rubocop (= 1.18.4) crack (0.4.5) @@ -77,21 +94,25 @@ GEM railties (>= 3.2) erubi (1.10.0) erubis (2.7.0) - faraday (1.4.2) + faraday (1.5.1) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0.1) faraday-net_http (~> 1.0) faraday-net_http_persistent (~> 1.1) + faraday-patron (~> 1.0) multipart-post (>= 1.2, < 3) ruby2_keywords (>= 0.0.4) faraday-em_http (1.0.0) faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) + faraday-httpclient (1.0.1) faraday-net_http (1.0.1) - faraday-net_http_persistent (1.1.0) - ffi-yajl (2.3.3) - libyajl2 (~> 1.2) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + ffi-yajl (2.4.0) + libyajl2 (>= 1.2) foodcritic (16.3.0) erubis ffi-yajl (~> 2.0) @@ -104,7 +125,7 @@ GEM hashdiff (1.0.1) i18n (1.8.10) concurrent-ruby (~> 1.0) - libyajl2 (1.2.0) + libyajl2 (2.1.0) loofah (2.10.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -117,7 +138,7 @@ GEM minitest (5.14.4) mixlib-archive (0.4.20) mixlib-log - mixlib-log (3.0.8) + mixlib-log (3.0.9) multipart-post (2.1.1) nio4r (2.5.7) nokogiri (1.11.7) @@ -136,36 +157,38 @@ GEM public_suffix (4.0.6) racc (1.5.2) rack (2.2.3) - rack-protection (2.0.8.1) + rack-protection (2.1.0) rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.6) - actioncable (= 5.2.6) - actionmailer (= 5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) - activemodel (= 5.2.6) - activerecord (= 5.2.6) - activestorage (= 5.2.6) - activesupport (= 5.2.6) - bundler (>= 1.3.0) - railties (= 5.2.6) + rails (6.1.4) + actioncable (= 6.1.4) + actionmailbox (= 6.1.4) + actionmailer (= 6.1.4) + actionpack (= 6.1.4) + actiontext (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activemodel (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) + bundler (>= 1.15.0) + railties (= 6.1.4) 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 (5.2.6) - actionpack (= 5.2.6) - activesupport (= 5.2.6) + railties (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) method_source - rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) + rake (>= 0.13) + thor (~> 1.0) rainbow (3.0.0) - rake (13.0.3) + rake (13.0.6) redis (3.3.5) regexp_parser (2.1.1) rexml (3.2.5) @@ -222,19 +245,19 @@ GEM sprockets (>= 3.0.0) sqlite3 (1.4.2) thor (1.1.0) - thread_safe (0.3.6) - treetop (1.6.10) + treetop (1.6.11) polyglot (~> 0.3) - tzinfo (1.2.9) - thread_safe (~> 0.1) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) unicode-display_width (2.0.0) webmock (3.13.0) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket-driver (0.7.3) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) + zeitwerk (2.4.2) PLATFORMS ruby @@ -249,4 +272,4 @@ DEPENDENCIES webmock BUNDLED WITH - 1.17.3 + 2.1.4 diff --git a/src/supermarket/engines/fieri/fieri.gemspec b/src/supermarket/engines/fieri/fieri.gemspec index 107e6c672..47a6c6d1d 100644 --- a/src/supermarket/engines/fieri/fieri.gemspec +++ b/src/supermarket/engines/fieri/fieri.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |s| s.add_dependency "foodcritic", "~> 16.3" s.add_dependency "mixlib-archive", "~> 0.4" s.add_dependency "octokit", "~> 4.0" - s.add_dependency "rails", [">= 5.1", "< 6"] + s.add_dependency "rails", [">= 6.1", "< 7"] s.add_dependency "ruby-filemagic" s.add_dependency "sidekiq", "~> 4.2" end diff --git a/src/supermarket/spec/controllers/cookbooks_controller_spec.rb b/src/supermarket/spec/controllers/cookbooks_controller_spec.rb index 2a9e6e42e..15c74264b 100644 --- a/src/supermarket/spec/controllers/cookbooks_controller_spec.rb +++ b/src/supermarket/spec/controllers/cookbooks_controller_spec.rb @@ -871,7 +871,7 @@ it "responds with JSON" do get :deprecate_search, params: { id: postgresql, q: "postgresql", format: :json } - expect(response.content_type).to eql("application/json") + expect(response.content_type).to eql("application/json; charset=utf-8") end it "assigns results" do diff --git a/src/supermarket/spec/lib/supermarket/authorization_spec.rb b/src/supermarket/spec/lib/supermarket/authorization_spec.rb index 9acfcb16e..1914f0752 100644 --- a/src/supermarket/spec/lib/supermarket/authorization_spec.rb +++ b/src/supermarket/spec/lib/supermarket/authorization_spec.rb @@ -23,6 +23,11 @@ def policy_class Class.new(ApplicationController) do include Supermarket::Authorization def current_user; end + #in latest new Pundit gem authorize is a protected method, + # so we need to call it from an instace method + def public_authorize(record, query = nil) + authorize!(record, query) + end end.new end @@ -30,15 +35,14 @@ def current_user; end describe "#authorize!" do it "raises an error if the user is not authorized" do - allow(subject).to receive(:params).and_return(action: "edit") - - expect { subject.authorize!(read_only_object) } - .to raise_error(Supermarket::Authorization::NotAuthorizedError) + allow(subject).to receive(:action_name).and_return("edit") + expect { subject.public_authorize(read_only_object).to + raise_error(Supermarket::Authorization::NotAuthorizedError)} end it "does nothing with the user is authorized" do - allow(subject).to receive(:params).and_return(action: "show") - expect { subject.authorize!(read_only_object) }.to_not raise_error + allow(subject).to receive(:action_name).and_return("show") + expect { subject.public_authorize(read_only_object) }.to_not raise_error end end end diff --git a/src/supermarket/spec/spec_helper.rb b/src/supermarket/spec/spec_helper.rb index c4866ff91..237aee6e6 100644 --- a/src/supermarket/spec/spec_helper.rb +++ b/src/supermarket/spec/spec_helper.rb @@ -25,7 +25,7 @@ # Use a quieter Poltergeist driver # This eliminates the debug warnings regarding unrecognized viewport # arguments and the like -Capybara.register_driver :quiet_ghost do |app| +Capybara.register_driver :poltergeist do |app| error_logger = Logger.new(STDERR).tap { |l| l.level = Logger::ERROR } Capybara::Poltergeist::Driver.new( @@ -40,7 +40,9 @@ ) end -Capybara.javascript_driver = :quiet_ghost +Capybara.javascript_driver = :poltergeist +Capybara::Screenshot.prune_strategy = { keep: 5 } +Capybara.server = :puma, { Silent: true } if ENV["CAPYBARA_SCREENSHOT_TO_S3"] == "true" if ENV["SCREENIE_AWS_ID"].present? && ENV["SCREENIE_AWS_SECRET"].present? @@ -136,26 +138,39 @@ config.use_transactional_fixtures = false - config.before(:suite) do - DatabaseCleaner.clean_with :truncation - end - - config.before(:each) do |example| + #=======================OLD Cleaning strategy====================== + # config.before(:suite) do + # DatabaseCleaner.clean_with :truncation + # end + + # config.before(:each) do |example| + # Rails.cache.clear + # DatabaseCleaner.strategy = if example.metadata[:js] || example.metadata[:type] == :feature + # :truncation + # else + # :transaction + # end + # DatabaseCleaner.start + # end + + # config.after(:each) do + # DatabaseCleaner.clean + # end + #================================================================ + config.before(:suite) do |example| Rails.cache.clear - DatabaseCleaner.strategy = if example.metadata[:js] || example.metadata[:type] == :feature - :truncation - else - :transaction - end - DatabaseCleaner.start + DatabaseCleaner.strategy = :deletion + DatabaseCleaner.clean_with(:deletion) end - config.after(:each) do - DatabaseCleaner.clean + config.around(:each) do |example| + DatabaseCleaner.cleaning do + example.run + end end config.before(type: :feature) do |example| - Capybara.current_driver = :quiet_ghost if example.metadata[:use_poltergeist] == true + Capybara.current_driver = :poltergeist if example.metadata[:use_poltergeist] == true end # If true, the base class of anonymous controllers will be inferred From e8ab3b830b237a5806f96762cae5d6397fd853d1 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Thu, 29 Jul 2021 17:11:04 +0530 Subject: [PATCH 09/48] Omnibus Fix --- omnibus/config/projects/supermarket.rb | 2 +- omnibus/config/software/supermarket-ctl.rb | 2 +- omnibus/config/software/supermarket.rb | 3 ++- omnibus/omnibus.rb | 2 +- src/supermarket/Gemfile | 4 ++++ 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/omnibus/config/projects/supermarket.rb b/omnibus/config/projects/supermarket.rb index edfd44396..1d7afdffc 100644 --- a/omnibus/config/projects/supermarket.rb +++ b/omnibus/config/projects/supermarket.rb @@ -29,7 +29,7 @@ build_iteration 1 override :postgresql, version: '9.3.25' -override :ruby, version: "2.6.8" +override :ruby, version: "2.7.4" override :rubygems, version: "3.1.2" # rubygems ships its own bundler which may differ from bundler defined below and then we get double bundler which makes the omnibus environment unhappy. Make sure these versions match before bumping either. override :bundler, version: "2.1.2" # this must match the BUNDLED WITH in all the repo's Gemfile.locks override :'chef-gem', version: '14.14.29' diff --git a/omnibus/config/software/supermarket-ctl.rb b/omnibus/config/software/supermarket-ctl.rb index c9c1284ff..85e965ccc 100644 --- a/omnibus/config/software/supermarket-ctl.rb +++ b/omnibus/config/software/supermarket-ctl.rb @@ -26,7 +26,7 @@ build do env = with_standard_compiler_flags(with_embedded_path) - bundle "install", env: env + #bundle "install", env: env block do erb source: "supermarket-ctl.erb", diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index 4c4ce867f..9ab953a5f 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -49,7 +49,8 @@ command "npm install yarn -g", env: env # This fails because we're installing Ruby C extensions in the wrong place! - bundle "exec rake assets:precompile", env: env.merge('RAILS_ENV' => 'production') + # bundle "exec rake assets:precompile", env: env.merge('RAILS_ENV' => 'production') + bundle "exec rake assets:precompile" sync project_dir, "#{install_dir}/embedded/service/supermarket/", exclude: %w( .cookbooks .direnv .envrc .env.* .gitignore .kitchen* diff --git a/omnibus/omnibus.rb b/omnibus/omnibus.rb index ce3e6dad3..53df12292 100644 --- a/omnibus/omnibus.rb +++ b/omnibus/omnibus.rb @@ -37,7 +37,7 @@ # Customize compiler bits # ------------------------------ -build_retries 5 +build_retries 1 fetcher_read_timeout 120 # Load additional software diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index b6c0a91b4..37185da74 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -52,6 +52,10 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" +gem 'therubyracer' +gem 'execjs' +gem 'listen' + group :doc do gem "yard", require: false end From fc140575b07a69a866f5e37db9d2470bae1ed0c9 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Thu, 29 Jul 2021 17:55:55 +0530 Subject: [PATCH 10/48] Modified the gemlock --- src/supermarket/Gemfile.lock | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 54ef75f2b..758f91717 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -352,6 +352,7 @@ GEM addressable (~> 2.0) excon http (>= 2.0, < 5.0) + libv8 (3.16.14.19) libyajl2 (2.1.0) license-acceptance (2.1.13) pastel (~> 0.7) @@ -561,6 +562,7 @@ GEM redis-store (>= 1.2, < 2) redis-store (1.6.0) redis (>= 2.2, < 5) + ref (2.0.0) regexp_parser (2.1.1) rexml (3.2.5) rinku (2.0.6) @@ -662,6 +664,9 @@ GEM syslog-logger (1.6.8) terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) + therubyracer (0.12.3) + libv8 (~> 3.16.14.15) + ref thor (1.0.1) thread_safe (0.3.6) tilt (2.0.10) @@ -776,6 +781,7 @@ DEPENDENCIES database_cleaner ddtrace dotenv + execjs factory_bot_rails faker ffi-libarchive @@ -790,6 +796,7 @@ DEPENDENCIES kaminari launchy license_finder + listen mail_view mixlib-authentication (~> 3.0) newrelic_rpm @@ -829,6 +836,7 @@ DEPENDENCIES spring spring-commands-rspec statsd-ruby + therubyracer tomlrb uglifier unicorn From ca8848c6d62109e7f19322815701a76eecfd7a27 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Thu, 29 Jul 2021 19:34:06 +0530 Subject: [PATCH 11/48] Updfated the ruby js runtime --- src/supermarket/Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 37185da74..569827ece 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -52,7 +52,7 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" -gem 'therubyracer' +gem 'mini_racer' gem 'execjs' gem 'listen' From e191dd7df4e32f0892c1d67f9c10d23cc354187a Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Thu, 29 Jul 2021 20:19:09 +0530 Subject: [PATCH 12/48] Modified the all flag --- omnibus/config/software/supermarket.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index 9ab953a5f..fc03bd673 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -37,7 +37,11 @@ env = with_standard_compiler_flags(with_embedded_path) env['PATH'] = "#{env['PATH']}:#{install_dir}/embedded/nodejs/bin" - bundle "package --all --no-install" + if Bundler.feature_flag.cache_all? + bundle "package --no-install" + else + bundle "package --all --no-install" + end bundle "install" \ " --jobs #{workers}" \ From 4f1586d78709d801168d9d59a5407d4969804c7e Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Fri, 30 Jul 2021 15:26:38 +0530 Subject: [PATCH 13/48] Updated the Gemfile.lock --- src/supermarket/Gemfile.lock | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 758f91717..9a5293120 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -352,7 +352,7 @@ GEM addressable (~> 2.0) excon http (>= 2.0, < 5.0) - libv8 (3.16.14.19) + libv8-node (15.14.0.1) libyajl2 (2.1.0) license-acceptance (2.1.13) pastel (~> 0.7) @@ -391,6 +391,8 @@ GEM rake mini_mime (1.1.0) mini_portile2 (2.5.3) + mini_racer (0.4.0) + libv8-node (~> 15.14.0.0) minitest (5.14.4) mixlib-archive (0.4.20) mixlib-log @@ -562,7 +564,6 @@ GEM redis-store (>= 1.2, < 2) redis-store (1.6.0) redis (>= 2.2, < 5) - ref (2.0.0) regexp_parser (2.1.1) rexml (3.2.5) rinku (2.0.6) @@ -664,9 +665,6 @@ GEM syslog-logger (1.6.8) terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) - therubyracer (0.12.3) - libv8 (~> 3.16.14.15) - ref thor (1.0.1) thread_safe (0.3.6) tilt (2.0.10) @@ -798,6 +796,7 @@ DEPENDENCIES license_finder listen mail_view + mini_racer mixlib-authentication (~> 3.0) newrelic_rpm nokogiri @@ -836,7 +835,6 @@ DEPENDENCIES spring spring-commands-rspec statsd-ruby - therubyracer tomlrb uglifier unicorn From f634b069bf5ac98623dec37f29b8cccc36e0bf11 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 2 Aug 2021 13:21:54 +0530 Subject: [PATCH 14/48] Fixed the omnibuc build Signed-off-by: saghoshprogress --- omnibus/config/software/supermarket.rb | 1 - omnibus/omnibus.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index fc03bd673..57a6c1c11 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -24,7 +24,6 @@ dependency "chef-gem" dependency "git" dependency "nginx" -dependency "nodejs-binary" dependency "postgresql" dependency "redis" dependency "ruby" diff --git a/omnibus/omnibus.rb b/omnibus/omnibus.rb index 53df12292..ce3e6dad3 100644 --- a/omnibus/omnibus.rb +++ b/omnibus/omnibus.rb @@ -37,7 +37,7 @@ # Customize compiler bits # ------------------------------ -build_retries 1 +build_retries 5 fetcher_read_timeout 120 # Load additional software From 4d4ef4eff008d4707360ef77724cbc16eb3ff9d0 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 3 Aug 2021 20:51:33 -0700 Subject: [PATCH 15/48] Update omnibus Signed-off-by: Tim Smith --- omnibus/Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index 106e5411c..adbd5e253 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -1,15 +1,15 @@ GIT remote: https://github.com/chef/omnibus-software.git - revision: c172afb1399eb676e86f6f8c155fe747e0312f38 + revision: a4fab5f0c2314f73fc79dfb77bde63e45588dfc0 specs: omnibus-software (4.0.0) omnibus (>= 8.0.0) GIT remote: https://github.com/chef/omnibus.git - revision: a4bf7ea04b0d3689f9b8d172535f3976d07ecc1b + revision: 62bf487e4361c856e18f89e00ece1d980558b33a specs: - omnibus (8.1.15) + omnibus (8.1.16) aws-sdk-s3 (~> 1) chef-cleanroom (~> 1.0) chef-utils (>= 15.4) @@ -100,9 +100,9 @@ GEM tty-table (~> 0.11) uuidtools (>= 2.1.5, < 3.0) chef-cleanroom (1.0.2) - chef-cli (5.3.1) + chef-cli (5.4.1) addressable (>= 2.3.5, < 2.9) - chef (>= 15.0) + chef (>= 16.0) cookbook-omnifetch (~> 0.5) diff-lcs (>= 1.0, < 1.4) ffi-yajl (>= 1.0, < 3.0) @@ -162,7 +162,7 @@ GEM faraday-excon (1.1.0) faraday-net_http (1.0.1) faraday-net_http_persistent (1.2.0) - faraday_middleware (1.0.0) + faraday_middleware (1.1.0) faraday (~> 1.0) fauxhai-ng (9.0.0) net-ssh From a71e8b3f955dc10ee31adf8b8812de62b82f5ce5 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 3 Aug 2021 20:54:01 -0700 Subject: [PATCH 16/48] Pin chef and mini_racer Signed-off-by: Tim Smith --- src/supermarket/Gemfile | 4 +-- src/supermarket/Gemfile.lock | 66 ++++++++++++++++++++++-------------- 2 files changed, 43 insertions(+), 27 deletions(-) diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 569827ece..167311598 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -13,7 +13,7 @@ gem "sidekiq", "~> 4.2" gem "sidekiq-cron" gem "aws-sdk-s3" -gem "chef", require: false +gem "chef", "~> 16.13", require: false gem "compass-rails" gem "ddtrace", require: false gem "dotenv" @@ -52,7 +52,7 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" -gem 'mini_racer' +gem 'mini_racer', "~> 0.3.1" gem 'execjs' gem 'listen' diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 9a5293120..21dc1664c 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -98,7 +98,7 @@ GEM descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) - bcrypt_pbkdf (1.1.0.rc1) + bcrypt_pbkdf (1.1.0) brakeman (5.1.1) builder (3.2.4) byebug (11.1.3) @@ -113,17 +113,21 @@ GEM capybara-screenshot (1.0.25) capybara (>= 1.0, < 4) launchy - chef (17.2.29) + chef (16.14.1) addressable - chef-config (= 17.2.29) - chef-utils (= 17.2.29) + bcrypt_pbkdf (~> 1.1) + bundler (>= 1.10) + chef-config (= 16.14.1) + chef-utils (= 16.14.1) chef-vault chef-zero (>= 14.0.11) diff-lcs (>= 1.2.4, < 1.4.0) + ed25519 (~> 1.2) erubis (~> 2.7) - ffi (>= 1.5.0) + ffi (>= 1.9.25) ffi-libarchive (~> 1.0, >= 1.0.3) ffi-yajl (~> 2.2) + highline (>= 1.6.9, < 3) iniparse (~> 1.4) inspec-core (~> 4.23) license-acceptance (>= 1.0.5, < 3) @@ -133,25 +137,30 @@ GEM mixlib-log (>= 2.0.3, < 4.0) mixlib-shellout (>= 3.1.1, < 4.0) net-sftp (>= 2.1.2, < 4.0) - ohai (~> 17.0) + net-ssh (>= 5.1, < 7) + net-ssh-multi (~> 1.2, >= 1.2.1) + ohai (~> 16.0) + pastel plist (~> 3.2) proxifier (~> 1.0) syslog-logger (~> 1.6) train-core (~> 3.2, >= 3.2.28) train-winrm (>= 0.2.5) + tty-prompt (~> 0.21) + tty-screen (~> 0.6) + tty-table (~> 0.11) uuidtools (>= 2.1.5, < 3.0) - chef-config (17.2.29) + chef-config (16.14.1) addressable - chef-utils (= 17.2.29) + chef-utils (= 16.14.1) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) tomlrb (~> 1.2) - chef-telemetry (1.0.29) + chef-telemetry (1.1.1) chef-config concurrent-ruby (~> 1.0) - chef-utils (17.2.29) - concurrent-ruby + chef-utils (16.14.1) chef-vault (4.1.0) chef-zero (15.0.7) ffi-yajl (~> 2.2) @@ -202,13 +211,14 @@ GEM msgpack descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - diff-lcs (1.4.4) + diff-lcs (1.3) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.7.6) dotenv-rails (2.7.6) dotenv (= 2.7.6) railties (>= 3.2) + ed25519 (1.2.4) equalizer (0.0.11) erubi (1.10.0) erubis (2.7.0) @@ -236,7 +246,7 @@ GEM faraday-excon (1.1.0) faraday-net_http (1.0.1) faraday-net_http_persistent (1.2.0) - faraday_middleware (1.0.0) + faraday_middleware (1.1.0) faraday (~> 1.0) ffi (1.15.3) ffi-compiler (1.0.1) @@ -284,6 +294,7 @@ GEM builder (>= 2.1.2) hashdiff (1.0.1) hashie (4.1.0) + highline (2.0.3) honeycomb-beeline (2.4.2) libhoney (~> 1.14, >= 1.14.2) html_truncator (0.4.2) @@ -304,7 +315,7 @@ GEM concurrent-ruby (~> 1.0) ice_nine (0.11.2) iniparse (1.5.0) - inspec-core (4.38.3) + inspec-core (4.38.9) addressable (~> 2.4) chef-telemetry (~> 1.0, >= 1.0.8) faraday (>= 0.9.0, < 1.5) @@ -352,7 +363,7 @@ GEM addressable (~> 2.0) excon http (>= 2.0, < 5.0) - libv8-node (15.14.0.1) + libv8 (8.4.255.0) libyajl2 (2.1.0) license-acceptance (2.1.13) pastel (~> 0.7) @@ -391,8 +402,8 @@ GEM rake mini_mime (1.1.0) mini_portile2 (2.5.3) - mini_racer (0.4.0) - libv8-node (~> 15.14.0.0) + mini_racer (0.3.1) + libv8 (~> 8.4.255) minitest (5.14.4) mixlib-archive (0.4.20) mixlib-log @@ -413,6 +424,11 @@ GEM net-sftp (3.0.0) net-ssh (>= 5.0.0, < 7.0.0) net-ssh (6.1.0) + net-ssh-gateway (2.0.0) + net-ssh (>= 4.0.0) + net-ssh-multi (1.2.1) + net-ssh (>= 2.6.5) + net-ssh-gateway (>= 1.2.0) newrelic_rpm (7.2.0) nio4r (2.5.7) nokogiri (1.11.7) @@ -431,16 +447,16 @@ GEM octokit (4.21.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) - ohai (17.1.0) - chef-config (>= 14.12, < 18) - chef-utils (>= 16.0, < 18) + ohai (16.13.0) + chef-config (>= 12.8, < 17) + chef-utils (>= 16.0, < 17) ffi (~> 1.9) ffi-yajl (~> 2.2) ipaddress mixlib-cli (>= 1.7.0) mixlib-config (>= 2.0, < 4.0) mixlib-log (>= 2.0.1, < 4.0) - mixlib-shellout (~> 3.2, >= 3.2.5) + mixlib-shellout (>= 2.0, < 4.0) plist (~> 3.1) train-core wmi-lite (~> 1.0) @@ -609,7 +625,7 @@ GEM rubocop (>= 1.7.0, < 2.0) ruby-filemagic (0.7.2) ruby-progressbar (1.11.0) - ruby2_keywords (0.0.4) + ruby2_keywords (0.0.5) rubyntlm (0.6.3) rubyzip (2.3.2) rufus-lru (1.1.0) @@ -669,7 +685,7 @@ GEM thread_safe (0.3.6) tilt (2.0.10) tomlrb (1.3.0) - train-core (3.7.4) + train-core (3.8.1) addressable (~> 2.5) ffi (!= 1.13.0) json (>= 1.8, < 3.0) @@ -773,7 +789,7 @@ DEPENDENCIES brakeman capybara capybara-screenshot - chef + chef (~> 16.13) chefstyle compass-rails database_cleaner @@ -796,7 +812,7 @@ DEPENDENCIES license_finder listen mail_view - mini_racer + mini_racer (~> 0.3.1) mixlib-authentication (~> 3.0) newrelic_rpm nokogiri From 3f90a8a59847e2699a037708aabb6bba6c795132 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Wed, 4 Aug 2021 12:43:23 +0530 Subject: [PATCH 17/48] Updated the ruby version Signed-off-by: saghoshprogress --- src/supermarket/.ruby-version | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/supermarket/.ruby-version b/src/supermarket/.ruby-version index 5d6573772..a4dd9dba4 100644 --- a/src/supermarket/.ruby-version +++ b/src/supermarket/.ruby-version @@ -1,5 +1 @@ -<<<<<<< HEAD 2.7.4 -======= -2.6.8 ->>>>>>> 0d958fd9caab38aec08dddb54eb99f6f588ff228 From 4077d12b25d58a0aa53903eaa70b0610f8e81c2e Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Wed, 4 Aug 2021 13:01:58 +0530 Subject: [PATCH 18/48] Fixed the gemfile lock conflicts Signed-off-by: saghoshprogress --- src/supermarket/Gemfile.lock | 37 ------------------------------------ 1 file changed, 37 deletions(-) diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 01d7d054a..9a5293120 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -98,11 +98,8 @@ GEM descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) -<<<<<<< HEAD -======= bcrypt_pbkdf (1.1.0.rc1) brakeman (5.1.1) ->>>>>>> 0d958fd9caab38aec08dddb54eb99f6f588ff228 builder (3.2.4) byebug (11.1.3) capybara (3.35.3) @@ -205,11 +202,7 @@ GEM msgpack descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) -<<<<<<< HEAD - diff-lcs (1.3) -======= diff-lcs (1.4.4) ->>>>>>> 0d958fd9caab38aec08dddb54eb99f6f588ff228 domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.7.6) @@ -228,7 +221,6 @@ GEM factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) -<<<<<<< HEAD faker (2.18.0) i18n (>= 1.6, < 2) faraday (1.4.3) @@ -237,11 +229,6 @@ GEM faraday-excon (~> 1.1) faraday-net_http (~> 1.0) faraday-net_http_persistent (~> 1.1) -======= - faker (1.7.3) - i18n (~> 0.5) - faraday (0.17.4) ->>>>>>> 0d958fd9caab38aec08dddb54eb99f6f588ff228 multipart-post (>= 1.2, < 3) ruby2_keywords (>= 0.0.4) faraday-em_http (1.0.0) @@ -553,11 +540,7 @@ GEM rake (>= 0.13) thor (~> 1.0) rainbow (3.0.0) -<<<<<<< HEAD raindrops (0.19.2) -======= - raindrops (0.19.0) ->>>>>>> 0d958fd9caab38aec08dddb54eb99f6f588ff228 rake (13.0.6) rb-fsevent (0.11.0) rb-inotify (0.10.1) @@ -594,12 +577,9 @@ GEM rspec-expectations (3.10.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) -<<<<<<< HEAD rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) -======= ->>>>>>> 0d958fd9caab38aec08dddb54eb99f6f588ff228 rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) @@ -612,11 +592,7 @@ GEM rspec-mocks (~> 3.10) rspec-support (~> 3.10) rspec-support (3.10.2) -<<<<<<< HEAD rubocop (1.18.3) -======= - rubocop (0.93.1) ->>>>>>> 0d958fd9caab38aec08dddb54eb99f6f588ff228 parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) @@ -640,7 +616,6 @@ GEM sass (3.4.25) sass-globbing (1.1.5) sass (>= 3.1) -<<<<<<< HEAD sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) sassc (2.4.0) @@ -651,14 +626,6 @@ GEM sprockets (> 3.0) sprockets-rails tilt -======= - sass-rails (5.0.8) - railties (>= 5.2.0) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) ->>>>>>> 0d958fd9caab38aec08dddb54eb99f6f588ff228 sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) @@ -793,12 +760,8 @@ GEM xpath (3.2.0) nokogiri (~> 1.8) yajl-ruby (1.4.1) -<<<<<<< HEAD yard (0.9.26) zeitwerk (2.4.2) -======= - yard (0.9.20) ->>>>>>> 0d958fd9caab38aec08dddb54eb99f6f588ff228 PLATFORMS ruby From ac66877f57414aec7d4aef961719e530e3cec45f Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Wed, 4 Aug 2021 13:04:00 +0530 Subject: [PATCH 19/48] Updated gemfile lock Signed-off-by: saghoshprogress --- src/supermarket/Gemfile.lock | 1 - 1 file changed, 1 deletion(-) diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 9a5293120..798c5fead 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -98,7 +98,6 @@ GEM descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) - bcrypt_pbkdf (1.1.0.rc1) brakeman (5.1.1) builder (3.2.4) byebug (11.1.3) From 0ee433dca052cd1be08a0e64ac99f2fc7aad5e3e Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Wed, 4 Aug 2021 13:32:46 +0530 Subject: [PATCH 20/48] Removed the nodejs installation Signed-off-by: saghoshprogress --- omnibus/config/software/supermarket.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index 605499323..c38bb3141 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -51,7 +51,7 @@ " --without development doc", env: env - command "npm install yarn -g", env: env + # command "npm install yarn -g", env: env # This fails because we're installing Ruby C extensions in the wrong place! # bundle "exec rake assets:precompile", env: env.merge('RAILS_ENV' => 'production') From cad9ba7b8d9b1b78d21f7cfd7b44a1d32360850c Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Wed, 4 Aug 2021 14:49:39 +0530 Subject: [PATCH 21/48] Modified the bundler version Signed-off-by: saghoshprogress --- omnibus/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index 106e5411c..7110679aa 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -424,4 +424,4 @@ DEPENDENCIES test-kitchen BUNDLED WITH - 2.2.22 + 2.1.2 From 9ebf74451939040b7ab7350a7cda30c3aab3cfe1 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Wed, 4 Aug 2021 15:13:52 +0530 Subject: [PATCH 22/48] Added Barkshelf gem Signed-off-by: saghoshprogress --- omnibus/config/software/supermarket-cookbooks.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/omnibus/config/software/supermarket-cookbooks.rb b/omnibus/config/software/supermarket-cookbooks.rb index e6b62e01e..6724cee25 100644 --- a/omnibus/config/software/supermarket-cookbooks.rb +++ b/omnibus/config/software/supermarket-cookbooks.rb @@ -22,7 +22,8 @@ build do cookbooks_path = "#{install_dir}/embedded/cookbooks" env = with_standard_compiler_flags(with_embedded_path) - + + gem "install berkshelf" command "berks vendor #{cookbooks_path}", env: env block do From afbb3d2c65c482c5784c575078583bb777b8fad8 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Thu, 5 Aug 2021 22:53:47 +0530 Subject: [PATCH 23/48] removed the nodejs --- omnibus/config/software/supermarket-cookbooks.rb | 2 ++ omnibus/config/software/supermarket.rb | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/omnibus/config/software/supermarket-cookbooks.rb b/omnibus/config/software/supermarket-cookbooks.rb index e6b62e01e..061a556a3 100644 --- a/omnibus/config/software/supermarket-cookbooks.rb +++ b/omnibus/config/software/supermarket-cookbooks.rb @@ -23,6 +23,8 @@ cookbooks_path = "#{install_dir}/embedded/cookbooks" env = with_standard_compiler_flags(with_embedded_path) + gem "install berkshelf" + command "berks vendor #{cookbooks_path}", env: env block do diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index 57a6c1c11..71203a016 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -34,7 +34,7 @@ build do env = with_standard_compiler_flags(with_embedded_path) - env['PATH'] = "#{env['PATH']}:#{install_dir}/embedded/nodejs/bin" + # env['PATH'] = "#{env['PATH']}:#{install_dir}/embedded/nodejs/bin" if Bundler.feature_flag.cache_all? bundle "package --no-install" @@ -49,7 +49,7 @@ " --without development doc", env: env - command "npm install yarn -g", env: env + # command "npm install yarn -g", env: env # This fails because we're installing Ruby C extensions in the wrong place! # bundle "exec rake assets:precompile", env: env.merge('RAILS_ENV' => 'production') From 95cf68e94ed0286d35003be8d82957d285d7258b Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Fri, 6 Aug 2021 13:51:53 +0530 Subject: [PATCH 24/48] Updated the bundler version --- omnibus/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index adbd5e253..6f37c62d2 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -424,4 +424,4 @@ DEPENDENCIES test-kitchen BUNDLED WITH - 2.2.22 + 2.1.4 From d5b917ecee0aa57105ee192697cfc509434774da Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Fri, 6 Aug 2021 14:40:55 +0530 Subject: [PATCH 25/48] Added rubyracer --- src/supermarket/Gemfile | 3 ++- src/supermarket/Gemfile.lock | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 167311598..e2ddb006f 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -52,9 +52,10 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" -gem 'mini_racer', "~> 0.3.1" +# gem 'mini_racer', "~> 0.3.1" gem 'execjs' gem 'listen' +gem 'therubyracer', platforms: :ruby group :doc do gem "yard", require: false diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 21dc1664c..ac7e649ce 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -363,7 +363,7 @@ GEM addressable (~> 2.0) excon http (>= 2.0, < 5.0) - libv8 (8.4.255.0) + libv8 (3.16.14.19) libyajl2 (2.1.0) license-acceptance (2.1.13) pastel (~> 0.7) @@ -402,8 +402,6 @@ GEM rake mini_mime (1.1.0) mini_portile2 (2.5.3) - mini_racer (0.3.1) - libv8 (~> 8.4.255) minitest (5.14.4) mixlib-archive (0.4.20) mixlib-log @@ -580,6 +578,7 @@ GEM redis-store (>= 1.2, < 2) redis-store (1.6.0) redis (>= 2.2, < 5) + ref (2.0.0) regexp_parser (2.1.1) rexml (3.2.5) rinku (2.0.6) @@ -681,6 +680,9 @@ GEM syslog-logger (1.6.8) terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) + therubyracer (0.12.3) + libv8 (~> 3.16.14.15) + ref thor (1.0.1) thread_safe (0.3.6) tilt (2.0.10) @@ -812,7 +814,6 @@ DEPENDENCIES license_finder listen mail_view - mini_racer (~> 0.3.1) mixlib-authentication (~> 3.0) newrelic_rpm nokogiri @@ -851,6 +852,7 @@ DEPENDENCIES spring spring-commands-rspec statsd-ruby + therubyracer tomlrb uglifier unicorn From f14f49e0fbbc9b2b9b5b5313cfc88d20aa0921f5 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Fri, 6 Aug 2021 15:17:14 +0530 Subject: [PATCH 26/48] Added rubyracer --- src/supermarket/Gemfile | 4 ++-- src/supermarket/Gemfile.lock | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index e2ddb006f..dfdcb0649 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -52,10 +52,10 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" -# gem 'mini_racer', "~> 0.3.1" +gem 'mini_racer', "~> 0.3.1" gem 'execjs' gem 'listen' -gem 'therubyracer', platforms: :ruby +# gem 'therubyracer', platforms: :ruby group :doc do gem "yard", require: false diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index ac7e649ce..21dc1664c 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -363,7 +363,7 @@ GEM addressable (~> 2.0) excon http (>= 2.0, < 5.0) - libv8 (3.16.14.19) + libv8 (8.4.255.0) libyajl2 (2.1.0) license-acceptance (2.1.13) pastel (~> 0.7) @@ -402,6 +402,8 @@ GEM rake mini_mime (1.1.0) mini_portile2 (2.5.3) + mini_racer (0.3.1) + libv8 (~> 8.4.255) minitest (5.14.4) mixlib-archive (0.4.20) mixlib-log @@ -578,7 +580,6 @@ GEM redis-store (>= 1.2, < 2) redis-store (1.6.0) redis (>= 2.2, < 5) - ref (2.0.0) regexp_parser (2.1.1) rexml (3.2.5) rinku (2.0.6) @@ -680,9 +681,6 @@ GEM syslog-logger (1.6.8) terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) - therubyracer (0.12.3) - libv8 (~> 3.16.14.15) - ref thor (1.0.1) thread_safe (0.3.6) tilt (2.0.10) @@ -814,6 +812,7 @@ DEPENDENCIES license_finder listen mail_view + mini_racer (~> 0.3.1) mixlib-authentication (~> 3.0) newrelic_rpm nokogiri @@ -852,7 +851,6 @@ DEPENDENCIES spring spring-commands-rspec statsd-ruby - therubyracer tomlrb uglifier unicorn From 95a7ecca9113f390b255f138a55cd91567f1bccc Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Fri, 6 Aug 2021 15:17:30 +0530 Subject: [PATCH 27/48] Added rubyracer --- omnibus/config/software/supermarket.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index 71203a016..a0ff01e5b 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -24,6 +24,7 @@ dependency "chef-gem" dependency "git" dependency "nginx" +dependency "nodejs" dependency "postgresql" dependency "redis" dependency "ruby" From 15e9a072cfe225a8d1047ee6c46e899e2b9861d3 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 9 Aug 2021 11:19:04 +0530 Subject: [PATCH 28/48] Updated for test --- omnibus/config/software/supermarket.rb | 2 +- omnibus/omnibus.rb | 2 +- src/supermarket/Gemfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index a0ff01e5b..ba02976a7 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -24,7 +24,7 @@ dependency "chef-gem" dependency "git" dependency "nginx" -dependency "nodejs" +# dependency "nodejs" dependency "postgresql" dependency "redis" dependency "ruby" diff --git a/omnibus/omnibus.rb b/omnibus/omnibus.rb index ce3e6dad3..53df12292 100644 --- a/omnibus/omnibus.rb +++ b/omnibus/omnibus.rb @@ -37,7 +37,7 @@ # Customize compiler bits # ------------------------------ -build_retries 5 +build_retries 1 fetcher_read_timeout 120 # Load additional software diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index dfdcb0649..340b04bf8 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -52,7 +52,7 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" -gem 'mini_racer', "~> 0.3.1" +gem 'mini_racer', "~> 0.3.1", platforms: :ruby gem 'execjs' gem 'listen' # gem 'therubyracer', platforms: :ruby From 4eff154bc59c77b1dca0895621c07ce0c8a4d0a7 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 9 Aug 2021 11:34:45 +0530 Subject: [PATCH 29/48] Update gem file --- src/supermarket/Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 340b04bf8..11560cb9c 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -52,8 +52,8 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" -gem 'mini_racer', "~> 0.3.1", platforms: :ruby gem 'execjs' +gem 'mini_racer', "~> 0.3.1", platforms: :ruby gem 'listen' # gem 'therubyracer', platforms: :ruby From ff127c86d56186c0330bacdb322279a93ba0bdb5 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 9 Aug 2021 11:45:44 +0530 Subject: [PATCH 30/48] Updated execjs --- src/supermarket/Gemfile | 2 +- src/supermarket/Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 11560cb9c..17b3b7274 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -52,7 +52,7 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" -gem 'execjs' +gem 'execjs', "~> 2.7.0" gem 'mini_racer', "~> 0.3.1", platforms: :ruby gem 'listen' # gem 'therubyracer', platforms: :ruby diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 21dc1664c..af17fdc9c 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -225,7 +225,7 @@ GEM et-orbi (1.2.4) tzinfo excon (0.84.0) - execjs (2.8.1) + execjs (2.7.0) factory_bot (6.2.0) activesupport (>= 5.0.0) factory_bot_rails (6.2.0) @@ -795,7 +795,7 @@ DEPENDENCIES database_cleaner ddtrace dotenv - execjs + execjs (~> 2.7.0) factory_bot_rails faker ffi-libarchive From da53ac92c5d6314dc3d9bced37d7f2bc3997a224 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 9 Aug 2021 12:39:11 +0530 Subject: [PATCH 31/48] Updated execjs --- src/supermarket/config/environments/production.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/supermarket/config/environments/production.rb b/src/supermarket/config/environments/production.rb index 4676078bd..9bc7e1cce 100644 --- a/src/supermarket/config/environments/production.rb +++ b/src/supermarket/config/environments/production.rb @@ -23,7 +23,8 @@ config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? # Compress JavaScripts and CSS. - config.assets.js_compressor = :uglifier + # config.assets.js_compressor = :uglifier + config.assets.js_compressor = Uglifier.new(harmony: true) # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. From 59f53bae84c5059e2b1f1b887ddb18960b08cee2 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 9 Aug 2021 12:45:39 +0530 Subject: [PATCH 32/48] Updated the env --- omnibus/config/software/supermarket.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index ba02976a7..cba99a4fe 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -38,9 +38,9 @@ # env['PATH'] = "#{env['PATH']}:#{install_dir}/embedded/nodejs/bin" if Bundler.feature_flag.cache_all? - bundle "package --no-install" + bundle "package --no-install", env: env else - bundle "package --all --no-install" + bundle "package --all --no-install", env: env end bundle "install" \ @@ -54,7 +54,7 @@ # This fails because we're installing Ruby C extensions in the wrong place! # bundle "exec rake assets:precompile", env: env.merge('RAILS_ENV' => 'production') - bundle "exec rake assets:precompile" + bundle "exec rake assets:precompile", env: env sync project_dir, "#{install_dir}/embedded/service/supermarket/", exclude: %w( .cookbooks .direnv .envrc .env.* .gitignore .kitchen* From 8c2c40a3d321219d4df80eb08afddc542f0602cf Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 9 Aug 2021 14:55:33 +0530 Subject: [PATCH 33/48] Modified the code for nodejs --- omnibus/config/software/supermarket.rb | 5 +++-- src/supermarket/Gemfile | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index cba99a4fe..a97349754 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -25,6 +25,7 @@ dependency "git" dependency "nginx" # dependency "nodejs" +dependency "nodejs-binary" dependency "postgresql" dependency "redis" dependency "ruby" @@ -35,7 +36,7 @@ build do env = with_standard_compiler_flags(with_embedded_path) - # env['PATH'] = "#{env['PATH']}:#{install_dir}/embedded/nodejs/bin" + env['PATH'] = "#{env['PATH']}:#{install_dir}/embedded/nodejs/bin" if Bundler.feature_flag.cache_all? bundle "package --no-install", env: env @@ -50,7 +51,7 @@ " --without development doc", env: env - # command "npm install yarn -g", env: env + command "npm install yarn -g", env: env # This fails because we're installing Ruby C extensions in the wrong place! # bundle "exec rake assets:precompile", env: env.merge('RAILS_ENV' => 'production') diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 17b3b7274..f45cf982a 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -52,8 +52,8 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" -gem 'execjs', "~> 2.7.0" -gem 'mini_racer', "~> 0.3.1", platforms: :ruby +# gem 'execjs', "~> 2.7.0" +# gem 'mini_racer', "~> 0.3.1", platforms: :ruby gem 'listen' # gem 'therubyracer', platforms: :ruby From 0fc5c8b72d5500491b8e3bbae936798415cbca2c Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 9 Aug 2021 15:52:57 +0530 Subject: [PATCH 34/48] Revert back the production.rb --- src/supermarket/config/environments/production.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/supermarket/config/environments/production.rb b/src/supermarket/config/environments/production.rb index 9bc7e1cce..4676078bd 100644 --- a/src/supermarket/config/environments/production.rb +++ b/src/supermarket/config/environments/production.rb @@ -23,8 +23,7 @@ config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? # Compress JavaScripts and CSS. - # config.assets.js_compressor = :uglifier - config.assets.js_compressor = Uglifier.new(harmony: true) + config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. From 1a30943f40af1857306eade97a61c33e67ad7fa7 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 9 Aug 2021 17:28:23 +0530 Subject: [PATCH 35/48] Updated Gem file --- omnibus/Gemfile | 1 + omnibus/Gemfile.lock | 1 + omnibus/config/software/supermarket-ctl.rb | 3 ++- src/supermarket/Gemfile | 1 + src/supermarket/Gemfile.lock | 6 +----- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/omnibus/Gemfile b/omnibus/Gemfile index f837413c3..cd7c4c9ac 100644 --- a/omnibus/Gemfile +++ b/omnibus/Gemfile @@ -10,6 +10,7 @@ gem 'omnibus-software', git: 'https://github.com/chef/omnibus-software.git' # Install artifactory. Used for publishing packages. gem 'artifactory' +gem 'inspec-core', '~> 4.38' # This development group is installed by default when you run `bundle install`, # but if you are using Omnibus in a CI-based infrastructure, you do not need # the Test Kitchen-based build lab. You can skip these unnecessary dependencies diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index 6f37c62d2..b1c7273b7 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -418,6 +418,7 @@ DEPENDENCIES berkshelf chefspec cookstyle + inspec-core (~> 4.38) kitchen-vagrant omnibus! omnibus-software! diff --git a/omnibus/config/software/supermarket-ctl.rb b/omnibus/config/software/supermarket-ctl.rb index 85e965ccc..8372f010d 100644 --- a/omnibus/config/software/supermarket-ctl.rb +++ b/omnibus/config/software/supermarket-ctl.rb @@ -20,13 +20,14 @@ dependency "omnibus-ctl" dependency "chef-gem" dependency "runit" +dependency "inspec" source path: "cookbooks/omnibus-supermarket" build do env = with_standard_compiler_flags(with_embedded_path) - #bundle "install", env: env + bundle "install", env: env block do erb source: "supermarket-ctl.erb", diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index f45cf982a..41f0c0379 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -52,6 +52,7 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" +gem 'inspec-core', '~> 4.38' # gem 'execjs', "~> 2.7.0" # gem 'mini_racer', "~> 0.3.1", platforms: :ruby gem 'listen' diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index af17fdc9c..b4ac26e03 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -363,7 +363,6 @@ GEM addressable (~> 2.0) excon http (>= 2.0, < 5.0) - libv8 (8.4.255.0) libyajl2 (2.1.0) license-acceptance (2.1.13) pastel (~> 0.7) @@ -402,8 +401,6 @@ GEM rake mini_mime (1.1.0) mini_portile2 (2.5.3) - mini_racer (0.3.1) - libv8 (~> 8.4.255) minitest (5.14.4) mixlib-archive (0.4.20) mixlib-log @@ -795,7 +792,6 @@ DEPENDENCIES database_cleaner ddtrace dotenv - execjs (~> 2.7.0) factory_bot_rails faker ffi-libarchive @@ -806,13 +802,13 @@ DEPENDENCIES guard-rubocop honeycomb-beeline html_truncator + inspec-core (~> 4.38) jbuilder kaminari launchy license_finder listen mail_view - mini_racer (~> 0.3.1) mixlib-authentication (~> 3.0) newrelic_rpm nokogiri From 629981842a797b53db3bf61d1eb4aacd81df7040 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 9 Aug 2021 18:28:50 +0530 Subject: [PATCH 36/48] Updated the Gem files --- omnibus/Gemfile | 2 +- omnibus/Gemfile.lock | 1 - omnibus/config/software/supermarket-ctl.rb | 2 +- src/supermarket/Gemfile | 2 +- src/supermarket/Gemfile.lock | 1 - 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/omnibus/Gemfile b/omnibus/Gemfile index cd7c4c9ac..0dac2114f 100644 --- a/omnibus/Gemfile +++ b/omnibus/Gemfile @@ -10,7 +10,7 @@ gem 'omnibus-software', git: 'https://github.com/chef/omnibus-software.git' # Install artifactory. Used for publishing packages. gem 'artifactory' -gem 'inspec-core', '~> 4.38' +# gem 'inspec-core', '~> 4.38' # This development group is installed by default when you run `bundle install`, # but if you are using Omnibus in a CI-based infrastructure, you do not need # the Test Kitchen-based build lab. You can skip these unnecessary dependencies diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index b1c7273b7..6f37c62d2 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -418,7 +418,6 @@ DEPENDENCIES berkshelf chefspec cookstyle - inspec-core (~> 4.38) kitchen-vagrant omnibus! omnibus-software! diff --git a/omnibus/config/software/supermarket-ctl.rb b/omnibus/config/software/supermarket-ctl.rb index 8372f010d..4fd583dc9 100644 --- a/omnibus/config/software/supermarket-ctl.rb +++ b/omnibus/config/software/supermarket-ctl.rb @@ -20,7 +20,7 @@ dependency "omnibus-ctl" dependency "chef-gem" dependency "runit" -dependency "inspec" +# dependency "inspec" source path: "cookbooks/omnibus-supermarket" diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 41f0c0379..1c8a8371c 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -52,7 +52,7 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" -gem 'inspec-core', '~> 4.38' +# gem 'inspec-core', '~> 4.38' # gem 'execjs', "~> 2.7.0" # gem 'mini_racer', "~> 0.3.1", platforms: :ruby gem 'listen' diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index b4ac26e03..7cc2679eb 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -802,7 +802,6 @@ DEPENDENCIES guard-rubocop honeycomb-beeline html_truncator - inspec-core (~> 4.38) jbuilder kaminari launchy From 26daa9988d9a93ba4f301994793c1299fc8c6061 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 9 Aug 2021 13:52:20 +0000 Subject: [PATCH 37/48] bundle install with binstubs for supermarket-ctl --- omnibus/config/software/supermarket-ctl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omnibus/config/software/supermarket-ctl.rb b/omnibus/config/software/supermarket-ctl.rb index 4fd583dc9..27a4293f4 100644 --- a/omnibus/config/software/supermarket-ctl.rb +++ b/omnibus/config/software/supermarket-ctl.rb @@ -27,7 +27,7 @@ build do env = with_standard_compiler_flags(with_embedded_path) - bundle "install", env: env + bundle "install --binstubs", env: env block do erb source: "supermarket-ctl.erb", From 693f217357e6ffc14db1501724c89cb429e54dc1 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 9 Aug 2021 21:26:25 +0530 Subject: [PATCH 38/48] Updated the gem file --- src/supermarket/Gemfile | 2 +- src/supermarket/Gemfile.lock | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 1c8a8371c..d9fe3467b 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -54,7 +54,7 @@ gem "yajl-ruby" # gem 'inspec-core', '~> 4.38' # gem 'execjs', "~> 2.7.0" -# gem 'mini_racer', "~> 0.3.1", platforms: :ruby +gem 'mini_racer', "~> 0.3.1", platforms: :ruby gem 'listen' # gem 'therubyracer', platforms: :ruby diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 7cc2679eb..88663e69b 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -363,6 +363,7 @@ GEM addressable (~> 2.0) excon http (>= 2.0, < 5.0) + libv8 (8.4.255.0) libyajl2 (2.1.0) license-acceptance (2.1.13) pastel (~> 0.7) @@ -401,6 +402,8 @@ GEM rake mini_mime (1.1.0) mini_portile2 (2.5.3) + mini_racer (0.3.1) + libv8 (~> 8.4.255) minitest (5.14.4) mixlib-archive (0.4.20) mixlib-log @@ -808,6 +811,7 @@ DEPENDENCIES license_finder listen mail_view + mini_racer (~> 0.3.1) mixlib-authentication (~> 3.0) newrelic_rpm nokogiri From 8747451497209ea657f612be93da02ef52f02484 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 9 Aug 2021 22:06:02 +0530 Subject: [PATCH 39/48] Updated the Gem file --- omnibus/cookbooks/omnibus-supermarket/Gemfile | 1 + src/supermarket/Gemfile | 2 +- src/supermarket/Gemfile.lock | 4 ---- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/omnibus/cookbooks/omnibus-supermarket/Gemfile b/omnibus/cookbooks/omnibus-supermarket/Gemfile index 9ba486f2a..d70e27b39 100644 --- a/omnibus/cookbooks/omnibus-supermarket/Gemfile +++ b/omnibus/cookbooks/omnibus-supermarket/Gemfile @@ -6,6 +6,7 @@ source 'https://rubygems.org' gem 'inspec' gem 'inspec-bin' +gem 'mini_racer', "~> 0.3.1", platforms: :ruby # gems for testing the build cookbooks # once we get the ctl omnibus def using its own gemspec this whole file can die diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index d9fe3467b..1c8a8371c 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -54,7 +54,7 @@ gem "yajl-ruby" # gem 'inspec-core', '~> 4.38' # gem 'execjs', "~> 2.7.0" -gem 'mini_racer', "~> 0.3.1", platforms: :ruby +# gem 'mini_racer', "~> 0.3.1", platforms: :ruby gem 'listen' # gem 'therubyracer', platforms: :ruby diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 88663e69b..7cc2679eb 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -363,7 +363,6 @@ GEM addressable (~> 2.0) excon http (>= 2.0, < 5.0) - libv8 (8.4.255.0) libyajl2 (2.1.0) license-acceptance (2.1.13) pastel (~> 0.7) @@ -402,8 +401,6 @@ GEM rake mini_mime (1.1.0) mini_portile2 (2.5.3) - mini_racer (0.3.1) - libv8 (~> 8.4.255) minitest (5.14.4) mixlib-archive (0.4.20) mixlib-log @@ -811,7 +808,6 @@ DEPENDENCIES license_finder listen mail_view - mini_racer (~> 0.3.1) mixlib-authentication (~> 3.0) newrelic_rpm nokogiri From d2943393581e4e1ced34b57bddaa64aa4161d742 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Mon, 9 Aug 2021 22:54:37 +0530 Subject: [PATCH 40/48] Updated the Gem files --- src/supermarket/Gemfile | 2 +- src/supermarket/Gemfile.lock | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 1c8a8371c..3e09f610b 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -56,7 +56,7 @@ gem "yajl-ruby" # gem 'execjs', "~> 2.7.0" # gem 'mini_racer', "~> 0.3.1", platforms: :ruby gem 'listen' -# gem 'therubyracer', platforms: :ruby +gem 'therubyracer', platforms: :ruby group :doc do gem "yard", require: false diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 7cc2679eb..9acd836dd 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -363,6 +363,7 @@ GEM addressable (~> 2.0) excon http (>= 2.0, < 5.0) + libv8 (3.16.14.19) libyajl2 (2.1.0) license-acceptance (2.1.13) pastel (~> 0.7) @@ -577,6 +578,7 @@ GEM redis-store (>= 1.2, < 2) redis-store (1.6.0) redis (>= 2.2, < 5) + ref (2.0.0) regexp_parser (2.1.1) rexml (3.2.5) rinku (2.0.6) @@ -678,6 +680,9 @@ GEM syslog-logger (1.6.8) terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) + therubyracer (0.12.3) + libv8 (~> 3.16.14.15) + ref thor (1.0.1) thread_safe (0.3.6) tilt (2.0.10) @@ -846,6 +851,7 @@ DEPENDENCIES spring spring-commands-rspec statsd-ruby + therubyracer tomlrb uglifier unicorn From 0d4ee5314045b97d25421b8913d3953f0212b898 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Tue, 10 Aug 2021 13:11:26 +0530 Subject: [PATCH 41/48] Updated the unsed codes --- omnibus/omnibus.rb | 2 +- src/supermarket/Gemfile | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/omnibus/omnibus.rb b/omnibus/omnibus.rb index 53df12292..ce3e6dad3 100644 --- a/omnibus/omnibus.rb +++ b/omnibus/omnibus.rb @@ -37,7 +37,7 @@ # Customize compiler bits # ------------------------------ -build_retries 1 +build_retries 5 fetcher_read_timeout 120 # Load additional software diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 3e09f610b..891c10d15 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -52,9 +52,6 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" -# gem 'inspec-core', '~> 4.38' -# gem 'execjs', "~> 2.7.0" -# gem 'mini_racer', "~> 0.3.1", platforms: :ruby gem 'listen' gem 'therubyracer', platforms: :ruby From bcadcfd17eeab3c027c5bb19109189f6f66aabfd Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Wed, 11 Aug 2021 11:23:39 +0530 Subject: [PATCH 42/48] Updated the lint error Signed-off-by: saghoshprogress --- omnibus/cookbooks/omnibus-supermarket/Gemfile | 2 +- src/supermarket/Gemfile.lock | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/omnibus/cookbooks/omnibus-supermarket/Gemfile b/omnibus/cookbooks/omnibus-supermarket/Gemfile index d70e27b39..a66686bd7 100644 --- a/omnibus/cookbooks/omnibus-supermarket/Gemfile +++ b/omnibus/cookbooks/omnibus-supermarket/Gemfile @@ -6,7 +6,7 @@ source 'https://rubygems.org' gem 'inspec' gem 'inspec-bin' -gem 'mini_racer', "~> 0.3.1", platforms: :ruby +gem 'mini_racer', '~> 0.3.1', platforms: :ruby # gems for testing the build cookbooks # once we get the ctl omnibus def using its own gemspec this whole file can die diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index d5cb67568..74de90ec3 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -217,6 +217,7 @@ GEM dotenv-rails (2.7.6) dotenv (= 2.7.6) railties (>= 3.2) + ed25519 (1.2.4) equalizer (0.0.11) erubi (1.10.0) erubis (2.7.0) @@ -399,8 +400,6 @@ GEM rake mini_mime (1.1.0) mini_portile2 (2.5.3) - mini_racer (0.4.0) - libv8-node (~> 15.14.0.0) minitest (5.14.4) mixlib-archive (0.4.20) mixlib-log @@ -453,7 +452,7 @@ GEM mixlib-cli (>= 1.7.0) mixlib-config (>= 2.0, < 4.0) mixlib-log (>= 2.0.1, < 4.0) - mixlib-shellout (~> 3.2, >= 3.2.5) + mixlib-shellout (>= 2.0, < 4.0) plist (~> 3.1) train-core wmi-lite (~> 1.0) @@ -796,7 +795,6 @@ DEPENDENCIES database_cleaner ddtrace dotenv - execjs factory_bot_rails faker ffi-libarchive @@ -813,7 +811,6 @@ DEPENDENCIES license_finder listen mail_view - mini_racer mixlib-authentication (~> 3.0) newrelic_rpm nokogiri From d99716e509540627b53a4e66b54760988470acbf Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Wed, 11 Aug 2021 11:46:07 +0530 Subject: [PATCH 43/48] removed few unnecessary code Signed-off-by: saghoshprogress --- omnibus/config/projects/supermarket.rb | 3 +-- src/supermarket/Gemfile | 2 +- src/supermarket/Gemfile.lock | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/omnibus/config/projects/supermarket.rb b/omnibus/config/projects/supermarket.rb index 1d7afdffc..7cb88c9f7 100644 --- a/omnibus/config/projects/supermarket.rb +++ b/omnibus/config/projects/supermarket.rb @@ -63,5 +63,4 @@ signing_passphrase ENV['OMNIBUS_RPM_SIGNING_PASSPHRASE'] compression_level 1 compression_type :xz -end -{"mode":"full","isActive":false} \ No newline at end of file +end \ No newline at end of file diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 891c10d15..c78478a42 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -96,4 +96,4 @@ group :development, :test do # to 1.0.0 release when added gem "and_feathers", ">= 1.0.0.pre", require: false gem "and_feathers-gzipped_tarball", ">= 1.0.0.pre", require: false -end +end \ No newline at end of file diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index 74de90ec3..9acd836dd 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -127,6 +127,7 @@ GEM ffi (>= 1.9.25) ffi-libarchive (~> 1.0, >= 1.0.3) ffi-yajl (~> 2.2) + highline (>= 1.6.9, < 3) iniparse (~> 1.4) inspec-core (~> 4.23) license-acceptance (>= 1.0.5, < 3) @@ -293,6 +294,7 @@ GEM builder (>= 2.1.2) hashdiff (1.0.1) hashie (4.1.0) + highline (2.0.3) honeycomb-beeline (2.4.2) libhoney (~> 1.14, >= 1.14.2) html_truncator (0.4.2) From 48da9ed5700c52369c8257ac23c528165c46ddd8 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Wed, 11 Aug 2021 13:37:36 +0530 Subject: [PATCH 44/48] Updated the lint errors Signed-off-by: saghoshprogress --- src/supermarket/.rubocop.yml | 3 +++ src/supermarket/Gemfile | 4 ++-- .../api/v1/cookbook_uploads_controller.rb | 5 +++-- .../api/v1/quality_metrics_controller.rb | 2 +- .../app/controllers/collaborators_controller.rb | 2 +- src/supermarket/bin/rails | 2 +- src/supermarket/bin/setup | 16 ++++++++-------- src/supermarket/bin/yarn | 12 ++++++------ src/supermarket/config/boot.rb | 2 +- .../spec/lib/supermarket/authorization_spec.rb | 9 +++++---- 10 files changed, 31 insertions(+), 26 deletions(-) diff --git a/src/supermarket/.rubocop.yml b/src/supermarket/.rubocop.yml index 8f3202d41..a15681ee7 100644 --- a/src/supermarket/.rubocop.yml +++ b/src/supermarket/.rubocop.yml @@ -26,3 +26,6 @@ Rails/SkipsModelValidations: - touch Style/SymbolArray: EnforcedStyle: brackets +Rails/HttpStatus: + Enabled: true + EnforcedStyle: numeric \ No newline at end of file diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index c78478a42..c419268e6 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -52,8 +52,8 @@ gem "validate_url" gem "virtus", "1.0.2", require: false # Pin to a version before the handling of nil in collection coercion was fixed. gem "yajl-ruby" -gem 'listen' -gem 'therubyracer', platforms: :ruby +gem "listen" +gem "therubyracer", platforms: :ruby group :doc do gem "yard", require: false diff --git a/src/supermarket/app/controllers/api/v1/cookbook_uploads_controller.rb b/src/supermarket/app/controllers/api/v1/cookbook_uploads_controller.rb index 12d4b4597..c3662c100 100644 --- a/src/supermarket/app/controllers/api/v1/cookbook_uploads_controller.rb +++ b/src/supermarket/app/controllers/api/v1/cookbook_uploads_controller.rb @@ -37,6 +37,7 @@ class VersionMustExist < RuntimeError; end # @see CookbookUpload # @see CookbookUpload::Parameters # + def create cookbook_upload = CookbookUpload.new(current_user, upload_params) @@ -65,7 +66,7 @@ def create Supermarket::Metrics.increment "cookbook.version.published" UniverseCache.flush - render :create, status: :created + render :create, status: 201 end end end @@ -214,4 +215,4 @@ def authenticate_user! ) end end -end +end \ No newline at end of file diff --git a/src/supermarket/app/controllers/api/v1/quality_metrics_controller.rb b/src/supermarket/app/controllers/api/v1/quality_metrics_controller.rb index 60eea51cf..5bd8de358 100644 --- a/src/supermarket/app/controllers/api/v1/quality_metrics_controller.rb +++ b/src/supermarket/app/controllers/api/v1/quality_metrics_controller.rb @@ -101,7 +101,7 @@ def publish_evaluation def license_evaluation response = { message: "Endpoint deprecated. License metric results are now produced by Foodcritic." } render json: response, - status: :gone + status: 410 end # diff --git a/src/supermarket/app/controllers/collaborators_controller.rb b/src/supermarket/app/controllers/collaborators_controller.rb index 1a371cab2..a30ed2658 100644 --- a/src/supermarket/app/controllers/collaborators_controller.rb +++ b/src/supermarket/app/controllers/collaborators_controller.rb @@ -60,7 +60,7 @@ def destroy respond_to do |format| format.js do remove_collaborator(@collaborator) - head :ok + head 200 end end end diff --git a/src/supermarket/bin/rails b/src/supermarket/bin/rails index 6fb4e4051..efc037749 100755 --- a/src/supermarket/bin/rails +++ b/src/supermarket/bin/rails @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -APP_PATH = File.expand_path('../config/application', __dir__) +APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" diff --git a/src/supermarket/bin/setup b/src/supermarket/bin/setup index 90700ac4f..d0b0fbd57 100755 --- a/src/supermarket/bin/setup +++ b/src/supermarket/bin/setup @@ -2,7 +2,7 @@ require "fileutils" # path to your application root. -APP_ROOT = File.expand_path('..', __dir__) +APP_ROOT = File.expand_path("..", __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") @@ -13,12 +13,12 @@ FileUtils.chdir APP_ROOT do # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. - puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' - system('bundle check') || system!('bundle install') + puts "== Installing dependencies ==" + system! "gem install bundler --conservative" + system("bundle check") || system!("bundle install") # Install JavaScript dependencies - system! 'bin/yarn' + system! "bin/yarn" # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') @@ -26,11 +26,11 @@ FileUtils.chdir APP_ROOT do # end puts "\n== Preparing database ==" - system! 'bin/rails db:prepare' + system! "bin/rails db:prepare" puts "\n== Removing old logs and tempfiles ==" - system! 'bin/rails log:clear tmp:clear' + system! "bin/rails log:clear tmp:clear" puts "\n== Restarting application server ==" - system! 'bin/rails restart' + system! "bin/rails restart" end diff --git a/src/supermarket/bin/yarn b/src/supermarket/bin/yarn index 9fab2c350..fe0837381 100755 --- a/src/supermarket/bin/yarn +++ b/src/supermarket/bin/yarn @@ -1,11 +1,11 @@ #!/usr/bin/env ruby -APP_ROOT = File.expand_path('..', __dir__) +APP_ROOT = File.expand_path("..", __dir__) Dir.chdir(APP_ROOT) do - yarn = ENV["PATH"].split(File::PATH_SEPARATOR). - select { |dir| File.expand_path(dir) != __dir__ }. - product(["yarn", "yarn.cmd", "yarn.ps1"]). - map { |dir, file| File.expand_path(file, dir) }. - find { |file| File.executable?(file) } + yarn = ENV["PATH"].split(File::PATH_SEPARATOR) + .select { |dir| File.expand_path(dir) != __dir__ } + .product(["yarn", "yarn.cmd", "yarn.ps1"]) + .map { |dir, file| File.expand_path(file, dir) } + .find { |file| File.executable?(file) } if yarn exec yarn, *ARGV diff --git a/src/supermarket/config/boot.rb b/src/supermarket/config/boot.rb index d69bd27dc..282011619 100644 --- a/src/supermarket/config/boot.rb +++ b/src/supermarket/config/boot.rb @@ -1,3 +1,3 @@ -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. diff --git a/src/supermarket/spec/lib/supermarket/authorization_spec.rb b/src/supermarket/spec/lib/supermarket/authorization_spec.rb index 1914f0752..3d6499719 100644 --- a/src/supermarket/spec/lib/supermarket/authorization_spec.rb +++ b/src/supermarket/spec/lib/supermarket/authorization_spec.rb @@ -23,11 +23,13 @@ def policy_class Class.new(ApplicationController) do include Supermarket::Authorization def current_user; end - #in latest new Pundit gem authorize is a protected method, + # in latest new Pundit gem authorize is a protected method, # so we need to call it from an instace method + def public_authorize(record, query = nil) authorize!(record, query) - end + end + end.new end @@ -36,8 +38,7 @@ def public_authorize(record, query = nil) describe "#authorize!" do it "raises an error if the user is not authorized" do allow(subject).to receive(:action_name).and_return("edit") - expect { subject.public_authorize(read_only_object).to - raise_error(Supermarket::Authorization::NotAuthorizedError)} + expect { subject.public_authorize(read_only_object).to raise_error(Supermarket::Authorization::NotAuthorizedError) } end it "does nothing with the user is authorized" do From 955cb22a6fada0f86d48d1a79a50ab41a42640a4 Mon Sep 17 00:00:00 2001 From: saghoshprogress Date: Wed, 11 Aug 2021 14:07:19 +0530 Subject: [PATCH 45/48] Updated the engile DB adaptar settings Signed-off-by: saghoshprogress --- src/supermarket/engines/fieri/spec/dummy/config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/supermarket/engines/fieri/spec/dummy/config/application.rb b/src/supermarket/engines/fieri/spec/dummy/config/application.rb index af2097c0f..6ab081a21 100644 --- a/src/supermarket/engines/fieri/spec/dummy/config/application.rb +++ b/src/supermarket/engines/fieri/spec/dummy/config/application.rb @@ -30,6 +30,6 @@ class Application < Rails::Application # Quiet SQLite3Adapter barking about booleans for this # dummy app that doesn't have any data - config.active_record.sqlite3.represent_boolean_as_integer = true + config.active_record.sqlite3.represent_boolean_as_integer = true unless config.active_record.sqlite3.blank? end end From 6aab8bc4d9d0c3d7e27db73f804c3548f68061a6 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 11 Aug 2021 07:46:40 -0700 Subject: [PATCH 46/48] Update omnibus/Gemfile Signed-off-by: Tim Smith --- omnibus/Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/omnibus/Gemfile b/omnibus/Gemfile index 0dac2114f..f837413c3 100644 --- a/omnibus/Gemfile +++ b/omnibus/Gemfile @@ -10,7 +10,6 @@ gem 'omnibus-software', git: 'https://github.com/chef/omnibus-software.git' # Install artifactory. Used for publishing packages. gem 'artifactory' -# gem 'inspec-core', '~> 4.38' # This development group is installed by default when you run `bundle install`, # but if you are using Omnibus in a CI-based infrastructure, you do not need # the Test Kitchen-based build lab. You can skip these unnecessary dependencies From 5cc29f25e4bdc6562e2078e8fc0a77bcba395df9 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 11 Aug 2021 07:47:05 -0700 Subject: [PATCH 47/48] Update omnibus/config/software/supermarket.rb Signed-off-by: Tim Smith --- omnibus/config/software/supermarket.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index b63bd11c7..66121a74e 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -50,7 +50,6 @@ " --without development doc", env: env - # command "npm install yarn -g", env: env # This fails because we're installing Ruby C extensions in the wrong place! # bundle "exec rake assets:precompile", env: env.merge('RAILS_ENV' => 'production') From f36343935e1f9e5471d3d6089028e4adfa6bc2cb Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 11 Aug 2021 07:47:14 -0700 Subject: [PATCH 48/48] Update omnibus/config/software/supermarket.rb Signed-off-by: Tim Smith --- omnibus/config/software/supermarket.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/omnibus/config/software/supermarket.rb b/omnibus/config/software/supermarket.rb index 66121a74e..edede3d5a 100644 --- a/omnibus/config/software/supermarket.rb +++ b/omnibus/config/software/supermarket.rb @@ -52,7 +52,6 @@ # This fails because we're installing Ruby C extensions in the wrong place! - # bundle "exec rake assets:precompile", env: env.merge('RAILS_ENV' => 'production') bundle "exec rake assets:precompile", env: env sync project_dir, "#{install_dir}/embedded/service/supermarket/",