Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appland v2.9.5 #8

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3f4db84
Bump Solidus to 2.9
kennyadsl Jul 16, 2019
b0c376c
Bump Solidus to 2.9.0
kennyadsl Jul 16, 2019
e5261cc
Update Tab colors with its own variables
mfrecchiami Jul 17, 2019
20b5d84
Freeze preferences for backend, frontend and api in specs
kennyadsl Jul 18, 2019
74e66d5
Avoid setting a preference at each api spec run
kennyadsl Jul 18, 2019
df44e61
Bump Solidus to 2.9.1
kennyadsl Aug 7, 2019
b765a2e
Fix tab background color, too dark #3311
Ajmal Aug 30, 2019
c1eed23
Use default sass function to lighten colors
mfrecchiami Sep 11, 2019
81cd767
Add warning msg to the very-light sass function
mfrecchiami Sep 12, 2019
799ba67
Bump Solidus to 2.9.2
kennyadsl Sep 30, 2019
2615a91
Lock Sprockets to v3.x
spaghetticode Oct 11, 2019
a614cc1
Bump Solidus to 2.9.3
kennyadsl Oct 23, 2019
9372b81
Create app/assets/images on install for Sprockets 4 compatibility
aldesantis Oct 10, 2019
bdc7ec3
Revert "Remove unused method"
elia Jan 8, 2020
4faad81
Add a deprecation for EnvironmentExtension#add_class
elia Jan 8, 2020
5b23c34
Merge pull request #3471 from nebulab/elia/revert-method-removal-and-…
spaghetticode Jan 10, 2020
b6f0f6a
Bump Solidus to 2.9.4
kennyadsl Jan 14, 2020
707d89a
Reintroduce and deprecate Order#deliver_order_confirmation_email
elia Jan 23, 2020
ebb31e7
Bump Solidus to 2.9.5
kennyadsl Feb 4, 2020
dc74e38
init commit
jaredKreppein Sep 4, 2020
6713e13
travis
jaredKreppein Sep 4, 2020
aa049a3
new travis config
jaredKreppein Sep 14, 2020
23b8619
updated travis.yml and add 'appmap/railtie'
jaredKreppein Sep 18, 2020
96b5552
travis config
jaredKreppein Sep 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Turn on validation, so we can use import:
version: ~> 1.0

import:
- land-of-apps/land-of-apps:travis/ruby-imports.yml

addons:
apt:
packages:
- parallel

# script: |
# run_tests() (
# cd $1
# # Use -f doc so we get regular output and keep Travis happy
# APPMAP=true bundle exec rspec -f doc || true
# )
# export -f run_tests
# echo 'api backend core frontend' | parallel -j3 --will-cite --line-buffer -d ' ' run_tests

env:
global:
- EXTRA_APPMAPS="*/tmp/appmap/rspec"

# install selenium chrome driver instructions from
# https://github.com/yizeng/setup-selenium-webdriver-ruby-project-on-travis-ci/blob/master/.travis.yml

jobs:
include:
- stage: test
workspaces:
create:
name: appmaps
paths:
- "$EXTRA_APPMAPS"
before_script: |
install_selenium() (
gem install selenium-webdriver
wget -N https://chromedriver.storage.googleapis.com/85.0.4183.38/chromedriver_linux64.zip -P ~/Downloads
unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads
sudo mv -f ~/Downloads/chromedriver /usr/local/share/
sudo chmod +x /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
)
script: |
run_tests() (
cd $1
# Use -f doc so we get regular output and keep Travis happy
APPMAP=true bundle exec rspec -f doc || true
)
export -f run_tests
echo 'api backend core frontend' | parallel --will-cite --line-buffer -d ' ' run_tests
after_script:
- true
- stage: upload
workspaces:
use:
- appmaps
install:
- true
script:
- true
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@ source 'https://rubygems.org'
group :backend, :frontend, :core, :api do
gemspec require: false

gem 'appmap', github: 'applandinc/appmap-ruby', branch: 'master'

rails_version = ENV['RAILS_VERSION'] || '~> 5.2.0'
gem 'rails', rails_version, require: false

# Temporarily locking sprockets to v3.x
# see https://github.com/solidusio/solidus/issues/3374
# and https://github.com/rails/sprockets-rails/issues/369
gem 'sprockets', '~> 3'

platforms :ruby do
case ENV['DB']
when /mysql/
Expand Down
1 change: 1 addition & 0 deletions api/appmap.yml
4 changes: 3 additions & 1 deletion api/spec/features/checkout_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

module Spree
describe 'Api Feature Specs', type: :request do
before { Spree::Api::Config[:requires_authentication] = false }
before do
stub_spree_preferences(Spree::Api::Config, requires_authentication: false)
end
let!(:promotion) { FactoryBot.create(:promotion, :with_order_adjustment, code: 'foo', weighted_order_adjustment_amount: 10) }
let(:promotion_code) { promotion.codes.first }
let!(:store) { FactoryBot.create(:store) }
Expand Down
2 changes: 1 addition & 1 deletion api/spec/models/spree/legacy_user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module Spree

before {
user.clear_spree_api_key!
stub_spree_preferences roles_for_auto_api_key: ['hobbit']
stub_spree_preferences(roles_for_auto_api_key: ['hobbit'])
}

it { expect { subject }.to change { user.reload.spree_api_key }.from(nil) }
Expand Down
2 changes: 1 addition & 1 deletion api/spec/requests/spree/api/checkouts_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Spree
describe Api::CheckoutsController, type: :request do
before(:each) do
stub_authentication!
stub_spree_preferences track_inventory_levels: false
stub_spree_preferences(track_inventory_levels: false)
country_zone = create(:zone, name: 'CountryZone')
@state = create(:state)
@country = @state.country
Expand Down
6 changes: 1 addition & 5 deletions api/spec/requests/spree/api/products_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,7 @@ module Spree
# Regression test for https://github.com/spree/spree/issues/2140
context "with authentication_required set to false" do
before do
Spree::Api::Config.requires_authentication = false
end

after do
Spree::Api::Config.requires_authentication = true
stub_spree_preferences(Spree::Api::Config, requires_authentication: false)
end

it "can still create a product" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ module Spree
let(:attributes) { [:id, :name, :description, :price, :available_on, :slug, :meta_description, :meta_keywords, :taxon_ids, :meta_title] }

context "without authentication" do
before { Spree::Api::Config[:requires_authentication] = false }
before do
stub_spree_preferences(Spree::Api::Config, requires_authentication: false)
end

it "retrieves a list of products" do
get spree.api_products_path
Expand Down
3 changes: 2 additions & 1 deletion api/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'appmap/rspec'

if ENV["COVERAGE"]
require 'simplecov'
SimpleCov.start('rails')
Expand Down Expand Up @@ -59,7 +61,6 @@

config.before(:each) do
Rails.cache.clear
Spree::Api::Config[:requires_authentication] = true
end

config.include ActiveJob::TestHelper
Expand Down
12 changes: 12 additions & 0 deletions appmap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: solidus

packages:
- path: app/controllers
- path: app/helpers
- path: app/jobs
- path: app/mailers
- path: app/models
- path: app/subscribers
- path: config
- path: db
- path: lib
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
color: $body-color;

&.notice {
background-color: rgba(very-light($color-notice, 15), .95);
background-color: rgba(lighten($color-notice, 15), .95);
border-top-color: $color-notice;
}
&.success {
background-color: rgba(very-light($color-success, 30), .95);
background-color: rgba(lighten($color-success, 30), .95);
border-top-color: $color-success;
}
&.error {
background-color: rgba(very-light($color-error, 30), .95);
background-color: rgba(lighten($color-error, 30), .95);
border-top-color: $color-error;
}
}
Expand Down
22 changes: 11 additions & 11 deletions backend/app/assets/stylesheets/spree/backend/components/_tabs.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.tabs {
display: flex;
margin: 1em 0;
border-bottom: 1px solid $color-border;
border-bottom: 1px solid $color-tab-border;
white-space: nowrap;

&,
Expand All @@ -26,9 +26,9 @@
top: 2px;

> a {
color: $color-navbar-submenu;
color: $color-tab;
display: block;
border: 1px solid $color-border;
border: 1px solid $color-tab-border;
border-radius: 4px 4px 0 0;
line-height: 1;
}
Expand All @@ -38,19 +38,19 @@
}

&:not(.active) > a {
background: $color-tbl-thead;
background: $color-tab-bg;
}

&.active > a,
&.active:hover {
background: white;
border-bottom-color: white;
color: $color-navbar-active;
background: $color-tab-active-bg;
border-bottom-color: $color-tab-active-border;
color: $color-tab-active;
font-weight: $font-weight-bold;
}

&:not(.active):hover > a {
color: $color-navbar-active;
color: $color-tab-active;
}
}

Expand All @@ -70,7 +70,7 @@

> a {
position: relative;
background: white;
background: $color-tab-active-bg;
z-index: 1;

&:before {
Expand All @@ -81,7 +81,7 @@
}

&:hover > a {
background: white;
background: $color-tab-active-bg;
}

&:not(:hover) ul {
Expand All @@ -99,7 +99,7 @@
.tabs li.in-dropdown {
a {
display: block;
border: 1px solid $color-border;
border: 1px solid $color-tab-border;
background: white;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Make color very close to white
@function very-light($color, $adjust: 3){
@warn "The `very-light` function is deprecated. Please use the default sass `lighten` function, instead.";

@if type-of($adjust) == 'number' and $adjust > 0 {
@for $i from 0 through 100 {
@if lighten($color, $i) == white and ($i - $adjust) > $adjust {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ $color-navbar-footer-bg: $color-light !default;
$color-navbar-footer-active: $color-primary !default;
$color-icon-navbar: $color-dark-light !default;

// Basic Tabs colors
$color-tab: $color-dark-light !default;
$color-tab-bg: $color-light !default;
$color-tab-border: $color-border !default;
$color-tab-active: $color-primary !default;
$color-tab-active-bg: $color-white !default;
$color-tab-active-border: $color-white !default;

// Basic flash colors
@include bs-deprecated-variable("color-success", "brand-success");
$color-success: $color-green !default;
Expand Down Expand Up @@ -81,8 +89,8 @@ $color-style-guide-table-border: #CEE1F4;

// Table colors
$color-tbl-odd: $color-white !default;
$color-tbl-even: very-light($color-dark-light, 4) !default;
$color-tbl-thead: very-light($color-dark-light, 4) !default;
$color-tbl-even: $color-light !default;
$color-tbl-thead: $color-light !default;

// Pill colors
//
Expand All @@ -106,24 +114,24 @@ $color-pill-error: #ff967b;
$color-pill-error-text: $color-pill-text;

// Actions colors
$color-action-edit-bg: very-light($color-success, 5 ) !default;
$color-action-edit-brd: very-light($color-success, 20 ) !default;
$color-action-clone-bg: very-light($color-notice, 5 ) !default;
$color-action-clone-brd: very-light($color-notice, 15 ) !default;
$color-action-remove-bg: very-light($color-error, 5 ) !default;
$color-action-remove-brd: very-light($color-error, 10 ) !default;
$color-action-void-bg: very-light($color-error, 10 ) !default;
$color-action-void-brd: very-light($color-error, 20 ) !default;
$color-action-cancel-bg: very-light($color-notice, 10 ) !default;
$color-action-cancel-brd: very-light($color-notice, 20 ) !default;
$color-action-capture-bg: very-light($color-success, 5 ) !default;
$color-action-capture-brd: very-light($color-success, 20 ) !default;
$color-action-save-bg: very-light($color-success, 5 ) !default;
$color-action-save-brd: very-light($color-success, 20 ) !default;
$color-action-mail-bg: very-light($color-success, 5 ) !default;
$color-action-mail-brd: very-light($color-success, 20 ) !default;
$color-action-failure-bg: very-light($color-error, 10 ) !default;
$color-action-failure-brd: very-light($color-error, 20 ) !default;
$color-action-edit-bg: lighten($color-success, (5 * 5) ) !default;
$color-action-edit-brd: lighten($color-success, (20 * 5) ) !default;
$color-action-clone-bg: lighten($color-notice, (5 * 5) ) !default;
$color-action-clone-brd: lighten($color-notice, (15 * 5) ) !default;
$color-action-remove-bg: lighten($color-error, (5 * 5) ) !default;
$color-action-remove-brd: lighten($color-error, (10 * 5) ) !default;
$color-action-void-bg: lighten($color-error, (10 * 5) ) !default;
$color-action-void-brd: lighten($color-error, (20 * 5) ) !default;
$color-action-cancel-bg: lighten($color-notice, (10 * 5) ) !default;
$color-action-cancel-brd: lighten($color-notice, (20 * 5) ) !default;
$color-action-capture-bg: lighten($color-success, (5 * 5) ) !default;
$color-action-capture-brd: lighten($color-success, (20 * 5) ) !default;
$color-action-save-bg: lighten($color-success, (5 * 5) ) !default;
$color-action-save-brd: lighten($color-success, (20 * 5) ) !default;
$color-action-mail-bg: lighten($color-success, (5 * 5) ) !default;
$color-action-mail-brd: lighten($color-success, (20 * 5) ) !default;
$color-action-failure-bg: lighten($color-error, (10 * 5) ) !default;
$color-action-failure-brd: lighten($color-error, (20 * 5) ) !default;

// Available states
$states: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}

.taxon {
background-color: very-light($color-dark-light);
background-color: $color-light;
border: 1px solid $color-border;
border-radius: $border-radius;
color: $body-color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ table {
tbody {
tr {
&.deleted td {
background-color: very-light(theme-color("danger"), 6);
border-color: very-light(theme-color("danger"), 15);
background-color: lighten(theme-color("danger"), 6);
border-color: lighten(theme-color("danger"), 15);
}
}

Expand Down
1 change: 1 addition & 0 deletions backend/appmap.yml
3 changes: 1 addition & 2 deletions backend/spec/features/admin/locale_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
},
listing_orders: "Ordres"
})
Spree::Backend::Config[:locale] = "fr"
stub_spree_preferences(Spree::Backend::Config, locale: "fr")
end

after do
I18n.locale = I18n.default_locale
Spree::Backend::Config[:locale] = "en"
ActionView::Base.raise_on_missing_translations = true
end

Expand Down
2 changes: 2 additions & 0 deletions backend/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'appmap/rspec'

if ENV["COVERAGE"]
require 'simplecov'
SimpleCov.start('rails')
Expand Down
Loading