workarea-browse_option 2.1.6 → 2.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36962f203f973f8b170772166b3d044e8208430a9d1e64bc188251dcd54e6a14
4
- data.tar.gz: 71bdd4b75a37c88c7ce5ab2ff212edce7a2890d4b70a22122755153326676146
3
+ metadata.gz: 28d5f9b37ef5d675069c9052300b43f5039b1a6526f280c3d2cd734333f6e0eb
4
+ data.tar.gz: 395a0ad0c22c651884cd232f2b4a18fe231ffa56d465ccb6d872016bdd76421f
5
5
  SHA512:
6
- metadata.gz: 9f2655f7fd7dbde853e5cccecb59f4d1ac724a5cbad3d8162769c7a9aaa240bd1bf1b208cd136690aadadb9e467935194b54226040cfcab119fb6af88a4a1025
7
- data.tar.gz: 15c6587978dd8b514ac0dc869892363d64c3fc9a18ba74b74ba870292643949475400e358cc1e76322c05d49d21ffe1d81de397755a92066b261b85dceb4150f
6
+ metadata.gz: 5c496a31cddfe5cfe9c71280cba7f8b541b88ce870001aa535eb541886a1ba28d79821deff3d5e9f28938eb7adf8e29fa032f79651db320b43bf852496f6f5ff
7
+ data.tar.gz: fcfd1a6212b08ef0b59c19fb3cb0efc4a86fdee3435d6dc2cb3961cc325a645e368b04c306403ea3fa37da8d4dd579f98054aee9b5f69c4c0470e8713ce4a3bd
data/.eslintrc.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "extends": "eslint:recommended",
3
+ "rules": {
4
+ "semi": ["error", "always"],
5
+ "eqeqeq": ["error", "always"]
6
+ },
7
+ "globals": {
8
+ "window": true,
9
+ "document": true,
10
+ "WORKAREA": true,
11
+ "$": true,
12
+ "jQuery": true,
13
+ "_": true,
14
+ "feature": true,
15
+ "JST": true,
16
+ "Turbolinks": true,
17
+ "I18n": true,
18
+ "Chart": true,
19
+ "Dropzone": true,
20
+ "strftime": true,
21
+ "Waypoint": true,
22
+ "wysihtml": true,
23
+ "LocalTime": true,
24
+ "describe": true,
25
+ "after": true,
26
+ "afterEach": true,
27
+ "before": true,
28
+ "beforeEach": true,
29
+ "it": true,
30
+ "expect": true,
31
+ "sinon": true,
32
+ "fixture": true,
33
+ "chai": true
34
+ }
35
+ }
@@ -0,0 +1,57 @@
1
+ name: CI
2
+ on: [push]
3
+
4
+ jobs:
5
+ static_analysis:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v1
9
+ - uses: workarea-commerce/ci/bundler-audit@v1
10
+ - uses: workarea-commerce/ci/rubocop@v1
11
+ - uses: workarea-commerce/ci/eslint@v1
12
+ with:
13
+ args: '**/*.js'
14
+
15
+ admin_tests:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v1
19
+ - uses: actions/setup-ruby@v1
20
+ with:
21
+ ruby-version: 2.6.x
22
+ - uses: workarea-commerce/ci/test@v1
23
+ with:
24
+ command: bin/rails app:workarea:test:admin
25
+
26
+ core_tests:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v1
30
+ - uses: actions/setup-ruby@v1
31
+ with:
32
+ ruby-version: 2.6.x
33
+ - uses: workarea-commerce/ci/test@v1
34
+ with:
35
+ command: bin/rails app:workarea:test:core
36
+
37
+ storefront_tests:
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - uses: actions/checkout@v1
41
+ - uses: actions/setup-ruby@v1
42
+ with:
43
+ ruby-version: 2.6.x
44
+ - uses: workarea-commerce/ci/test@v1
45
+ with:
46
+ command: bin/rails app:workarea:test:storefront
47
+
48
+ plugins_tests:
49
+ runs-on: ubuntu-latest
50
+ steps:
51
+ - uses: actions/checkout@v1
52
+ - uses: actions/setup-ruby@v1
53
+ with:
54
+ ruby-version: 2.6.x
55
+ - uses: workarea-commerce/ci/test@v1
56
+ with:
57
+ command: bin/rails app:workarea:test:plugins
data/.gitignore CHANGED
@@ -12,3 +12,4 @@ node_modules
12
12
  test/reports
13
13
  package.json
14
14
  yarn.lock
15
+ .rubocop-http*
data/.rubocop.yml ADDED
@@ -0,0 +1,3 @@
1
+ inherit_from:
2
+ - https://raw.githubusercontent.com/workarea-commerce/workarea/master/.rubocop.yml
3
+
data/.stylelintrc.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "stylelint-config-recommended-scss",
3
+ "rules": {
4
+ "block-no-empty": null,
5
+ "no-descending-specificity": null,
6
+ "property-no-unknown": [true, { "ignoreProperties": ["mso-hide"] }]
7
+ }
8
+ }
data/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ Workarea Browse Option 2.1.7 (2019-10-01)
2
+ --------------------------------------------------------------------------------
3
+
4
+ * try to fix build
5
+
6
+ Tom Scott
7
+
8
+ * Fix Deleted Featured Products
9
+
10
+ Prevent an error in admin when browsing a category with a featured
11
+ product that has since been deleted. Ensure that no `nil` records are
12
+ returned by the `#featured_products` method in the view model(s).
13
+
14
+ Fixes #1
15
+ Tom Scott
16
+
17
+
18
+
1
19
  Workarea Browse Option 2.1.6 (2019-08-21)
2
20
  --------------------------------------------------------------------------------
3
21
 
data/Gemfile CHANGED
@@ -1,12 +1,9 @@
1
1
  source 'https://rubygems.org'
2
- git_source(:github) { |repo| "git@github.com:#{repo}.git" }
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
3
 
4
4
  # Declare your gem's dependencies in browse_option.gemspec.
5
5
  # Bundler will treat runtime dependencies like base dependencies, and
6
6
  # development dependencies will be added by default to the :development group.
7
7
  gemspec
8
8
 
9
- gem 'bundler-audit'
10
- gem 'listen'
11
-
12
9
  gem 'workarea-api', '>= 4.x'
data/Rakefile CHANGED
@@ -37,10 +37,10 @@ desc "Release version #{Workarea::BrowseOption::VERSION} of the gem"
37
37
  task :release do
38
38
  host = "https://#{ENV['BUNDLE_GEMS__WEBLINC__COM']}@gems.weblinc.com"
39
39
 
40
- #Rake::Task['workarea:changelog'].execute
41
- #system 'git add CHANGELOG.md'
42
- #system 'git commit -m "Update CHANGELOG"'
43
- #system 'git push origin HEAD'
40
+ Rake::Task['workarea:changelog'].execute
41
+ system 'git add CHANGELOG.md'
42
+ system 'git commit -m "Update CHANGELOG"'
43
+ system 'git push origin HEAD'
44
44
 
45
45
  system "git tag -a v#{Workarea::BrowseOption::VERSION} -m 'Tagging #{Workarea::BrowseOption::VERSION}'"
46
46
  system 'git push --tags'
@@ -16,6 +16,8 @@ module Workarea
16
16
  tmp.browse_option => option&.optionize
17
17
  )
18
18
  end
19
+
20
+ results.compact
19
21
  end
20
22
  end
21
23
  end
@@ -1,5 +1,5 @@
1
1
  module Workarea
2
2
  module BrowseOption
3
- VERSION = '2.1.6'.freeze
3
+ VERSION = '2.1.7'.freeze
4
4
  end
5
5
  end
@@ -40,6 +40,22 @@ module Workarea
40
40
 
41
41
  assert_equal([], category.reload.product_ids)
42
42
  end
43
+
44
+ def test_delete_featured_products
45
+ product = create_product
46
+ category = create_category(product_ids: [product.id])
47
+
48
+ get admin.catalog_category_path(category)
49
+
50
+ assert(response.success?)
51
+
52
+ assert(product.destroy!)
53
+
54
+ # ActionView::Template::Error: undefined method `primary_image' for nil:NilClass
55
+ get admin.catalog_category_path(category)
56
+
57
+ assert(response.success?)
58
+ end
43
59
  end
44
60
  end
45
61
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-browse_option
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.6
4
+ version: 2.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Duffy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-21 00:00:00.000000000 Z
11
+ date: 2019-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea
@@ -39,10 +39,14 @@ extensions: []
39
39
  extra_rdoc_files: []
40
40
  files:
41
41
  - ".editorconfig"
42
+ - ".eslintrc.json"
42
43
  - ".github/ISSUE_TEMPLATE/bug_report.md"
43
44
  - ".github/ISSUE_TEMPLATE/documentation-request.md"
44
45
  - ".github/ISSUE_TEMPLATE/feature_request.md"
46
+ - ".github/workflows/ci.yml"
45
47
  - ".gitignore"
48
+ - ".rubocop.yml"
49
+ - ".stylelintrc.json"
46
50
  - CHANGELOG.md
47
51
  - CODE_OF_CONDUCT.md
48
52
  - CONTRIBUTING.md
@@ -177,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
181
  - !ruby/object:Gem::Version
178
182
  version: '0'
179
183
  requirements: []
180
- rubygems_version: 3.0.4
184
+ rubygems_version: 3.0.6
181
185
  signing_key:
182
186
  specification_version: 4
183
187
  summary: Adds browsing products by an option to the Workarea Commerce Platform