workarea-gift_cards 3.4.9 → 3.4.10

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
- SHA256:
3
- metadata.gz: aa37a378f39896cbf645c5f1e685063a9fb0d841094e513bb09c2a0045cdb153
4
- data.tar.gz: 6f18732444f3eee6ab068378de1e79200cbde8f79eb2d95cad2b1d94be08e29c
2
+ SHA1:
3
+ metadata.gz: e5ce7f4c60c63f9f96b8683527e9fbbbf375af62
4
+ data.tar.gz: b93a65061af79af2a91e2fd0449a687a3b8f5250
5
5
  SHA512:
6
- metadata.gz: 83e84100e694ecde878b6e4fbd31d6b8c6c47072f855c8753cb5df35b4b111daed844a9ca2910abd888bf4f779a8f736ae28c3526fcf9894ee63236b04a2e2bc
7
- data.tar.gz: b1d4735c284e9688c14d5061ffc9bd0da2bc7d5e629fb0b64929f80e6aae81d4f81028ec10a98de9c8688974d9b254bed05394d69d0bc8a3c831ebbc71631403
6
+ metadata.gz: 2eddb8f458fb6ffe22ccb1e476557639de20a89d83d959e9956b420063e58bf32d9293308bf03eb176bd28e4d05df37ef0e3e8e4393ea8e971ccd4c48e3392b9
7
+ data.tar.gz: 2cc8d19326e64c599e56e2e0ee172803b46887d17ce673fe3d29995a24fc33d3a3210a5036ecf41c1236d35e570085c5376da16e7a3bb04c57a67689ccd3b5b5
@@ -0,0 +1,55 @@
1
+ name: CI
2
+ on: [push]
3
+ env:
4
+ BUNDLE_GEMS__WEBLINC__COM: ${{ secrets.BUNDLE_GEMS__WEBLINC__COM }}
5
+ jobs:
6
+ static_analysis:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v1
10
+ - uses: workarea-commerce/ci/bundler-audit@ruby-2.4
11
+ - uses: workarea-commerce/ci/rubocop@ruby-2.4
12
+
13
+ admin_tests:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v1
17
+ - uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: 2.4.x
20
+ - uses: workarea-commerce/ci/test@v1
21
+ with:
22
+ command: bin/rails app:workarea:test:admin
23
+
24
+ core_tests:
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@v1
28
+ - uses: actions/setup-ruby@v1
29
+ with:
30
+ ruby-version: 2.4.x
31
+ - uses: workarea-commerce/ci/test@v1
32
+ with:
33
+ command: bin/rails app:workarea:test:core
34
+
35
+ storefront_tests:
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: actions/checkout@v1
39
+ - uses: actions/setup-ruby@v1
40
+ with:
41
+ ruby-version: 2.4.x
42
+ - uses: workarea-commerce/ci/test@v1
43
+ with:
44
+ command: bin/rails app:workarea:test:storefront
45
+
46
+ plugins_tests:
47
+ runs-on: ubuntu-latest
48
+ steps:
49
+ - uses: actions/checkout@v1
50
+ - uses: actions/setup-ruby@v1
51
+ with:
52
+ ruby-version: 2.4.x
53
+ - uses: workarea-commerce/ci/test@v1
54
+ with:
55
+ command: bin/rails app:workarea:test:plugins
data/.rubocop.yml ADDED
@@ -0,0 +1,197 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.4
3
+ # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
4
+ # to ignore them, so only the ones explicitly set in this file are enabled.
5
+ DisabledByDefault: true
6
+
7
+ # Prefer &&/|| over and/or.
8
+ Style/AndOr:
9
+ Enabled: true
10
+ Exclude:
11
+ - 'testing/lib/workarea/performance_test.rb'
12
+ - 'admin/app/controllers/workarea/admin/help_authorization.rb'
13
+ - 'admin/app/controllers/workarea/admin/users_controller.rb'
14
+ - 'core/app/controllers/workarea/authorization.rb'
15
+ - 'core/app/models/workarea/analytics/time_series.rb'
16
+ - 'core/app/models/workarea/payment/operation.rb'
17
+ - 'core/lib/workarea/validators/ip_address_validator.rb'
18
+ - 'script/rename'
19
+ - 'storefront/app/controllers/workarea/storefront/checkout/place_order_controller.rb'
20
+ - 'storefront/app/controllers/workarea/storefront/current_checkout.rb'
21
+ - 'storefront/app/controllers/workarea/storefront/searches_controller.rb'
22
+ - 'storefront/app/controllers/workarea/storefront/users/orders_controller.rb'
23
+ - 'storefront/app/controllers/workarea/storefront/users/passwords_controller.rb'
24
+
25
+ # Align `when` with `case`.
26
+ Layout/CaseIndentation:
27
+ Enabled: true
28
+ Exclude:
29
+ - 'admin/app/helpers/workarea/admin/dashboard_helper.rb'
30
+
31
+ # Align comments with method definitions.
32
+ Layout/CommentIndentation:
33
+ Enabled: true
34
+
35
+ Layout/EmptyLineAfterMagicComment:
36
+ Enabled: true
37
+
38
+ # In a regular class definition, no empty lines around the body.
39
+ Layout/EmptyLinesAroundClassBody:
40
+ Enabled: true
41
+ Exclude:
42
+ - 'admin/app/controllers/workarea/admin/release_sessions_controller.rb'
43
+ - 'admin/app/view_models/workarea/admin/release_calendar_view_model.rb'
44
+ - 'admin/lib/workarea/mailer_previews/admin/comment_mailer_preview.rb'
45
+ - 'admin/test/integration/workarea/admin/content_blocks_integration_test.rb'
46
+ - 'admin/test/view_models/workarea/admin/content_view_model_test.rb'
47
+ - 'core/app/models/workarea/checkout/steps/addresses.rb'
48
+ - 'core/app/models/workarea/pricing/discount/buy_some_get_some/product_application.rb'
49
+ - 'core/app/queries/workarea/metadata/catalog_category.rb'
50
+ - 'core/app/queries/workarea/metadata/content_page.rb'
51
+ - 'core/app/queries/workarea/search/facet.rb'
52
+ - 'core/app/queries/workarea/search/range_filter.rb'
53
+ - 'core/config/initializers/13_rack_attack.rb'
54
+ - 'core/lib/generators/workarea/override/override_generator.rb'
55
+ - 'core/lib/workarea/elasticsearch/query_cache.rb'
56
+ - 'core/lib/workarea/monitoring/elasticsearch_check.rb'
57
+ - 'core/lib/workarea/monitoring/mongoid_check.rb'
58
+ - 'core/lib/workarea/monitoring/sidekiq_queue_size_check.rb'
59
+ - 'core/lib/workarea/validators/email_validator.rb'
60
+ - 'core/test/lib/workarea/mail_interceptor_test.rb'
61
+ - 'core/test/models/workarea/commentable_test.rb'
62
+ - 'core/test/models/workarea/search/settings_test.rb'
63
+ - 'core/test/models/workarea/shipping/rate_lookup_test.rb'
64
+ - 'core/test/queries/workarea/find_pipeline_asset_test.rb'
65
+ - 'core/test/queries/workarea/product_primary_image_url_test.rb'
66
+ - 'core/test/queries/workarea/search/filter_test.rb'
67
+ - 'core/test/workers/workarea/bulk_index_admin_test.rb'
68
+ - 'core/test/workers/workarea/bulk_index_products_test.rb'
69
+ - 'core/vendor/active_shipping/lib/active_shipping/carriers/australia_post.rb'
70
+ - 'core/vendor/active_shipping/lib/active_shipping/carriers/canada_post_pws.rb'
71
+ - 'core/vendor/active_shipping/lib/active_shipping/carriers/usps_returns.rb'
72
+ - 'core/vendor/active_shipping/lib/active_shipping/delivery_date_estimates_response.rb'
73
+ - 'core/vendor/active_shipping/lib/active_shipping/rate_response.rb'
74
+ - 'core/vendor/active_shipping/test/remote/australia_post_test.rb'
75
+ - 'core/vendor/active_shipping/test/remote/usps_returns_test.rb'
76
+ - 'core/vendor/active_shipping/test/unit/carriers/australia_post_test.rb'
77
+ - 'core/vendor/active_shipping/test/unit/carriers/canada_post_pws_test.rb'
78
+ - 'core/vendor/active_shipping/test/unit/carriers/usps_returns_test.rb'
79
+ - 'storefront/app/view_models/workarea/storefront/content_blocks/product_list_view_model.rb'
80
+ - 'storefront/app/view_models/workarea/storefront/product_view_model.rb'
81
+ - 'storefront/lib/workarea/mailer_previews/storefront/order_mailer_preview.rb'
82
+ - 'storefront/test/performance/workarea/storefront/categories_performance_test.rb'
83
+ - 'storefront/test/performance/workarea/storefront/search_performance_test.rb'
84
+ - 'storefront/test/view_models/workarea/storefront/user_activity_view_model_test.rb'
85
+
86
+ # In a regular method definition, no empty lines around the body.
87
+ Layout/EmptyLinesAroundMethodBody:
88
+ Enabled: true
89
+
90
+ # In a regular module definition, no empty lines around the body.
91
+ Layout/EmptyLinesAroundModuleBody:
92
+ Enabled: true
93
+ Exclude:
94
+ - 'core/lib/workarea/ext/mongoid/timestamps_timeless.rb'
95
+ - 'storefront/app/view_models/workarea/storefront/search_customization_content.rb'
96
+ - 'testing/lib/workarea/testing/warning_suppressor.rb'
97
+
98
+ # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
99
+ Style/HashSyntax:
100
+ Enabled: true
101
+
102
+ Layout/SpaceAfterColon:
103
+ Enabled: true
104
+ Exclude:
105
+ - 'testing/lib/workarea/testing/factories/content.rb'
106
+ - 'testing/lib/workarea/testing/factories/pricing.rb'
107
+
108
+ Layout/SpaceAfterComma:
109
+ Enabled: true
110
+ Exclude:
111
+ - 'admin/app/controllers/workarea/admin/shipping_services_controller.rb'
112
+ - 'admin/test/helpers/workarea/admin/application_helper_test.rb'
113
+ - 'core/app/models/workarea/payment/credit_card.rb'
114
+ - 'core/app/models/workarea/pricing/request.rb'
115
+ - 'core/spec/lib/workarea/swappable_list_spec.rb'
116
+ - 'core/test/models/workarea/inventory_test.rb'
117
+ - 'core/test/queries/workarea/search/range_facet_test.rb'
118
+ - 'storefront/test/view_models/workarea/storefront/package_view_model_test.rb'
119
+
120
+ Layout/SpaceAroundEqualsInParameterDefault:
121
+ Enabled: true
122
+ Exclude:
123
+ - 'admin/app/helpers/workarea/admin/content_block_icon_helper.rb'
124
+ - 'core/app/helpers/workarea/content_assets_helper.rb'
125
+ - 'core/lib/workarea/elasticsearch/query_cache.rb'
126
+ - 'testing/lib/workarea/system_test.rb'
127
+ - 'testing/lib/workarea/testing/locale_routing_fixes.rb'
128
+
129
+
130
+ Layout/SpaceAroundKeyword:
131
+ Enabled: true
132
+
133
+ Layout/SpaceAroundOperators:
134
+ Enabled: true
135
+ Exclude:
136
+ - 'admin/app/controllers/workarea/admin/content_emails_controller.rb'
137
+ - 'admin/app/controllers/workarea/admin/users_controller.rb'
138
+ - 'core/app/helpers/workarea/content_assets_helper.rb'
139
+ - 'core/vendor/active_shipping/lib/active_shipping/carriers/canada_post_pws.rb'
140
+ - 'core/vendor/active_shipping/lib/active_shipping/carriers/fedex.rb'
141
+ - 'core/vendor/active_shipping/lib/active_shipping/carriers/stamps.rb'
142
+
143
+ Layout/SpaceBeforeFirstArg:
144
+ Enabled: true
145
+
146
+ # Defining a method with parameters needs parentheses.
147
+ Style/MethodDefParentheses:
148
+ Enabled: true
149
+
150
+ # Use `foo {}` not `foo{}`.
151
+ Layout/SpaceBeforeBlockBraces:
152
+ Enabled: true
153
+ Exclude:
154
+ - 'admin/app/view_models/workarea/admin/release_calendar_view_model.rb'
155
+
156
+ # Use `foo { bar }` not `foo {bar}`.
157
+ Layout/SpaceInsideBlockBraces:
158
+ Enabled: true
159
+
160
+ # Use `{ a: 1 }` not `{a:1}`.
161
+ Layout/SpaceInsideHashLiteralBraces:
162
+ Enabled: true
163
+ Exclude:
164
+ - 'admin/test/integration/workarea/admin/pricing_sku_prices_integration_test.rb'
165
+ - 'admin/test/integration/workarea/admin/shipping_service_integration_test.rb'
166
+ - 'admin/test/integration/workarea/admin/tax_categories_integration_test.rb'
167
+ - 'admin/test/view_models/workarea/admin/changeset_view_model_test.rb'
168
+ - 'core/app/models/workarea/release/changeset.rb'
169
+ - 'core/app/queries/workarea/search/product_rules.rb'
170
+ - 'core/app/queries/workarea/search/term_filter.rb'
171
+ - 'core/lib/workarea/configuration.rb'
172
+ - 'core/spec/models/workarea/order_spec.rb'
173
+ - 'core/test/models/workarea/application_document_test.rb'
174
+ - 'core/test/models/workarea/fulfillment_test.rb'
175
+ - 'core/test/queries/workarea/search/product_rules_test.rb'
176
+ - 'core/test/workers/workarea/generate_content_metadata_test.rb'
177
+
178
+ Layout/SpaceInsideParens:
179
+ Enabled: true
180
+ Exclude:
181
+ - 'core/app/models/workarea/inventory/collection.rb'
182
+ - 'core/app/models/workarea/pricing/calculators/item_calculator.rb'
183
+ - 'core/spec/models/workarea/order/queries_spec.rb'
184
+
185
+ # Detect hard tabs, no hard tabs.
186
+ Layout/Tab:
187
+ Enabled: true
188
+ Exclude:
189
+ - 'core/vendor/active_shipping/lib/active_shipping/carriers/canada_post.rb'
190
+
191
+ # No trailing whitespace.
192
+ Layout/TrailingWhitespace:
193
+ Enabled: true
194
+
195
+ # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
196
+ Lint/RequireParentheses:
197
+ Enabled: true
data/CHANGELOG.md CHANGED
@@ -1,3 +1,40 @@
1
+ Workarea Gift Cards 3.4.10 (2020-02-04)
2
+ --------------------------------------------------------------------------------
3
+
4
+ * Fix the Gemfile
5
+
6
+ Tom Scott
7
+
8
+ * Remove ESLint from Gift Cards build
9
+
10
+ Tom Scott
11
+
12
+ * Fix rubocop config for 2.4
13
+
14
+ Tom Scott
15
+
16
+ * Use the same ruby version on static analysis as we use in tests
17
+
18
+ Tom Scott
19
+
20
+ * Use the same env var everywhere
21
+
22
+ Tom Scott
23
+
24
+ * Backport Missing `:via` Param
25
+
26
+ The `:via` param was not included on the gift card template, causing a
27
+ test in base to fail and subsequently block other plugin development
28
+ that depends on this gem. This change is from a later version of
29
+ Workarea, but was not backported to earlier versions. Additionally, this
30
+ commit adds the test workflow and ensures the correct version of
31
+ Workarea is being loaded to ensure accurate testing.
32
+
33
+ GIFTCARDS-7
34
+ Tom Scott
35
+
36
+
37
+
1
38
  Workarea Gift Cards 3.4.9 (2020-01-21)
2
39
  --------------------------------------------------------------------------------
3
40
 
data/Gemfile CHANGED
@@ -3,5 +3,7 @@ git_source(:github) { |repo| "git@github.com:#{repo}.git" }
3
3
 
4
4
  gemspec
5
5
 
6
- gem 'workarea-api', '>= 4.1.x'
7
- gem 'workarea', github: 'workarea-commerce/workarea', branch: 'v3.5-stable'
6
+ source 'https://gems.weblinc.com' do
7
+ gem 'workarea', '~> 3.3.0'
8
+ gem 'workarea-api', '~> 4.3.0'
9
+ end
@@ -16,6 +16,7 @@
16
16
 
17
17
  = form_tag cart_items_path, method: 'post', class: 'product-details__add-to-cart-form', data: { dialog_form: { dialogOptions: { closeAll: true, initModules: true } }, analytics: add_to_cart_analytics_data(product).to_json } do
18
18
  = hidden_field_tag :product_id, product.id, id: dom_id(product, 'product_id')
19
+ = hidden_field_tag :via, params[:via], id: dom_id(product, 'via')
19
20
 
20
21
  - if product.sku_options.one?
21
22
  = hidden_field_tag :sku, product.sku_options.first.second
@@ -1,5 +1,5 @@
1
1
  module Workarea
2
2
  module GiftCards
3
- VERSION = '3.4.9'.freeze
3
+ VERSION = '3.4.10'.freeze
4
4
  end
5
5
  end
@@ -1,3 +1,3 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- Rails.application.config.session_store :cookie_store, key: '_dummy_session'
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session', expire_after: 2.weeks
@@ -5,6 +5,10 @@ module Workarea
5
5
  class GiftCardIntegrationTest < Workarea::IntegrationTest
6
6
  setup :tax, :product, :shipping_service, :gift_card
7
7
 
8
+ def next_year
9
+ 1.year.from_now.year
10
+ end
11
+
8
12
  def tax
9
13
  @tax ||= create_tax_category(
10
14
  name: 'Sales Tax',
@@ -17,5 +17,5 @@ Gem::Specification.new do |s|
17
17
 
18
18
  s.required_ruby_version = '>= 2.3.0'
19
19
 
20
- s.add_dependency 'workarea', '~> 3.x', '>= 3.3.x'
20
+ s.add_dependency 'workarea', '~> 3.3.0'
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-gift_cards
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.9
4
+ version: 3.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - bcrouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-22 00:00:00.000000000 Z
11
+ date: 2020-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea
@@ -16,20 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.x
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 3.3.x
19
+ version: 3.3.0
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: 3.x
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 3.3.x
26
+ version: 3.3.0
33
27
  description: Adds built-in gift cards to the Workarea commerce platform.
34
28
  email:
35
29
  - bcrouse@weblinc.com
@@ -43,7 +37,9 @@ files:
43
37
  - ".github/ISSUE_TEMPLATE/bug_report.md"
44
38
  - ".github/ISSUE_TEMPLATE/documentation-request.md"
45
39
  - ".github/ISSUE_TEMPLATE/feature_request.md"
40
+ - ".github/workflows/ci.yml"
46
41
  - ".gitignore"
42
+ - ".rubocop.yml"
47
43
  - ".scss-lint.yml"
48
44
  - ".yardopts"
49
45
  - CHANGELOG.md
@@ -220,7 +216,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
216
  - !ruby/object:Gem::Version
221
217
  version: '0'
222
218
  requirements: []
223
- rubygems_version: 3.0.3
219
+ rubyforge_project:
220
+ rubygems_version: 2.6.14.4
224
221
  signing_key:
225
222
  specification_version: 4
226
223
  summary: Gift Cards plugin for the Workarea commerce platform