solidus_subscriptions 1.0.0 → 1.0.1
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 +201 -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: cc3b0fcba16d886c8536c325484158200dffc72f80e1e226d1c572f8a15b1b7c
|
4
|
+
data.tar.gz: 8720f4cd130d3ac77f45b8a8ba8bfa0415dcdfdc1dc2e5350aa2649e6b34b945
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89de765c10e5490a610d5925b255b6ad002bef4e8b835f7c2e2893a6376535ee9162acf928f87f7de961bef523653ec32df8845efb128235ef15b9aa0272d845
|
7
|
+
data.tar.gz: 540d9007f27817b4941742a8cf154524f274f2572823e0afe0f5d8a5b3974eb9dcbb0bc6f20296cc690c57df098c8137a5a0bacee6848ca93f1c21ccc15ac382
|
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
|