solidus_subscriptions 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +57 -9
- data/.github/dependabot.yml +7 -0
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +217 -169
- data/Gemfile +14 -1
- data/README.md +17 -7
- data/app/controllers/solidus_subscriptions/api/v1/subscriptions_controller.rb +24 -0
- data/app/controllers/spree/admin/subscriptions_controller.rb +32 -4
- data/app/decorators/models/solidus_subscriptions/spree/wallet_payment_source/report_default_change_to_subscriptions.rb +2 -2
- data/app/jobs/solidus_subscriptions/create_subscription_job.rb +11 -0
- data/app/jobs/solidus_subscriptions/process_installment_job.rb +1 -1
- data/app/models/solidus_subscriptions/subscription.rb +75 -31
- data/app/subscribers/solidus_subscriptions/churn_buster_subscriber.rb +1 -0
- data/app/subscribers/solidus_subscriptions/event_storage_subscriber.rb +1 -0
- data/app/subscribers/solidus_subscriptions/order_subscriber.rb +16 -0
- data/app/views/spree/admin/shared/_subscription_actions.html.erb +27 -8
- data/app/views/spree/admin/shared/_subscription_sidebar.html.erb +2 -0
- data/app/views/spree/admin/subscriptions/_state_pill.html.erb +3 -2
- data/app/views/spree/admin/subscriptions/index.html.erb +50 -13
- data/bin/sandbox +1 -6
- data/config/locales/en.yml +16 -0
- data/config/routes.rb +9 -3
- data/db/migrate/20210905145955_add_paused_to_subscriptions.rb +5 -0
- data/lib/decorators/api/controllers/solidus_subscriptions/spree/api/line_items_controller/create_subscription_line_items.rb +14 -0
- data/lib/generators/solidus_subscriptions/install/install_generator.rb +16 -0
- data/lib/generators/solidus_subscriptions/install/templates/app/controllers/concerns/create_subscription.rb +17 -0
- data/lib/generators/solidus_subscriptions/install/templates/app/views/cart_line_items/_subscription_fields.html.erb +30 -0
- data/lib/generators/solidus_subscriptions/install/templates/initializer.rb +3 -1
- data/lib/solidus_subscriptions/configuration.rb +29 -6
- data/lib/solidus_subscriptions/dispatcher/payment_failed_dispatcher.rb +2 -2
- data/lib/solidus_subscriptions/dispatcher/success_dispatcher.rb +2 -2
- data/lib/solidus_subscriptions/engine.rb +28 -0
- data/lib/solidus_subscriptions/permission_sets/default_customer.rb +1 -1
- data/lib/solidus_subscriptions/processing_error_handlers/rails_logger.rb +25 -0
- data/lib/solidus_subscriptions/subscription_generator.rb +6 -0
- data/lib/solidus_subscriptions/version.rb +1 -1
- data/solidus_subscriptions.gemspec +6 -6
- data/spec/controllers/spree/api/line_items_controller_spec.rb +63 -28
- data/spec/controllers/spree/api/users_controller_spec.rb +3 -0
- data/spec/decorators/controllers/solidus_subscriptions/spree/orders_controller/create_subscription_line_items_spec.rb +4 -4
- data/spec/decorators/models/solidus_subscriptions/spree/variant/auto_delete_from_subscriptions_spec.rb +2 -2
- data/spec/features/admin/subscriptions_spec.rb +13 -3
- data/spec/jobs/solidus_subscriptions/create_subscription_job_spec.rb +20 -0
- data/spec/jobs/solidus_subscriptions/process_installment_job_spec.rb +17 -0
- data/spec/lib/solidus_subscriptions/dispatcher/payment_failed_dispatcher_spec.rb +3 -3
- data/spec/lib/solidus_subscriptions/dispatcher/success_dispatcher_spec.rb +3 -3
- data/spec/lib/solidus_subscriptions/subscription_generator_spec.rb +1 -1
- data/spec/models/solidus_subscriptions/installment_spec.rb +1 -1
- data/spec/models/solidus_subscriptions/subscription_spec.rb +893 -16
- data/spec/models/spree/wallet_payment_source_spec.rb +3 -3
- data/spec/requests/api/v1/subscriptions_spec.rb +229 -0
- data/spec/subscribers/solidus_subscriptions/churn_buster_subscriber_spec.rb +8 -8
- data/spec/subscribers/solidus_subscriptions/order_subscriber_spec.rb +13 -0
- metadata +24 -17
- data/app/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions.rb +0 -25
- data/config/initializers/subscribers.rb +0 -9
- data/spec/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions_spec.rb +0 -32
- /data/{app → lib}/views/spree/frontend/products/_subscription_line_item_fields.html.erb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 176e3bcbc5f8a548a7abe50cd9473826f8f1ed8568ca1c7b9a1022973f1cb411
|
4
|
+
data.tar.gz: 0bdc71ef625e95f3db4d2761e5d271bab73e407f8e63e2e622834545d337a515
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 752593af5c23c878e6a157a5f638b3487e43ea0ad6da01ab71ed55748a435d7f4fa9ca4ff189eef7d9bec3f5b54db31b6e19c9fa2b7a4f7db29ebb1c4ffa5411
|
7
|
+
data.tar.gz: 722ce81aa277cae99e82084f54b91419baa7bd82890a1991600c668fbb171e7aff1652cfdecde59ad573fdab5d9102dab67514cfbf00b787a1a628040ab5b5ee
|
data/.circleci/config.yml
CHANGED
@@ -8,14 +8,48 @@ orbs:
|
|
8
8
|
solidusio_extensions: solidusio/extensions@volatile
|
9
9
|
|
10
10
|
jobs:
|
11
|
+
run-specs-with-mysql:
|
12
|
+
executor:
|
13
|
+
name: solidusio_extensions/mysql
|
14
|
+
ruby_version: <<parameters.ruby_version>>
|
15
|
+
steps:
|
16
|
+
- checkout
|
17
|
+
- solidusio_extensions/run-tests-solidus-older
|
18
|
+
- solidusio_extensions/run-tests-solidus-current
|
19
|
+
- solidusio_extensions/run-tests-solidus-master
|
20
|
+
- solidusio_extensions/store-test-results
|
21
|
+
parameters:
|
22
|
+
ruby_version:
|
23
|
+
type: string
|
24
|
+
default: '2.7'
|
11
25
|
run-specs-with-postgres:
|
12
|
-
executor:
|
26
|
+
executor:
|
27
|
+
name: solidusio_extensions/postgres
|
28
|
+
ruby_version: <<parameters.ruby_version>>
|
13
29
|
steps:
|
14
|
-
-
|
15
|
-
|
16
|
-
|
30
|
+
- checkout
|
31
|
+
- solidusio_extensions/run-tests-solidus-older
|
32
|
+
- solidusio_extensions/run-tests-solidus-current
|
33
|
+
- solidusio_extensions/run-tests-solidus-master
|
34
|
+
- solidusio_extensions/store-test-results
|
35
|
+
parameters:
|
36
|
+
ruby_version:
|
37
|
+
type: string
|
38
|
+
default: '3.0'
|
39
|
+
run-specs-with-sqlite:
|
40
|
+
executor:
|
41
|
+
name: solidusio_extensions/sqlite
|
42
|
+
ruby_version: <<parameters.ruby_version>>
|
17
43
|
steps:
|
18
|
-
-
|
44
|
+
- checkout
|
45
|
+
- solidusio_extensions/run-tests-solidus-older
|
46
|
+
- solidusio_extensions/run-tests-solidus-current
|
47
|
+
- solidusio_extensions/run-tests-solidus-master
|
48
|
+
- solidusio_extensions/store-test-results
|
49
|
+
parameters:
|
50
|
+
ruby_version:
|
51
|
+
type: string
|
52
|
+
default: '3.1'
|
19
53
|
lint-code:
|
20
54
|
executor: solidusio_extensions/sqlite-memory
|
21
55
|
steps:
|
@@ -24,8 +58,15 @@ jobs:
|
|
24
58
|
workflows:
|
25
59
|
"Run specs on supported Solidus versions":
|
26
60
|
jobs:
|
27
|
-
- run-specs-with-
|
28
|
-
|
61
|
+
- run-specs-with-mysql:
|
62
|
+
ruby_version: '2.7'
|
63
|
+
name: run-specs-with-mysql-ruby-2.7
|
64
|
+
- run-specs-with-postgres:
|
65
|
+
ruby_version: '3.0'
|
66
|
+
name: run-specs-with-postgres-ruby-3.0
|
67
|
+
- run-specs-with-sqlite:
|
68
|
+
ruby_version: '3.1'
|
69
|
+
name: run-specs-with-sqlite-ruby-3.1
|
29
70
|
- lint-code
|
30
71
|
|
31
72
|
"Weekly run specs against master":
|
@@ -37,5 +78,12 @@ workflows:
|
|
37
78
|
only:
|
38
79
|
- master
|
39
80
|
jobs:
|
40
|
-
- run-specs-with-
|
41
|
-
|
81
|
+
- run-specs-with-mysql:
|
82
|
+
ruby_version: '2.7'
|
83
|
+
name: run-specs-with-mysql-ruby-2.7
|
84
|
+
- run-specs-with-postgres:
|
85
|
+
ruby_version: '3.0'
|
86
|
+
name: run-specs-with-postgres-ruby-3.0
|
87
|
+
- run-specs-with-sqlite:
|
88
|
+
ruby_version: '3.1'
|
89
|
+
name: run-specs-with-sqlite-ruby-3.1
|