potassium 6.1.0 → 6.5.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 +103 -38
- data/.circleci/setup-rubygems.sh +3 -0
- data/.gitignore +2 -1
- data/.node-version +1 -1
- data/.rubocop.yml +530 -0
- data/CHANGELOG.md +50 -1
- data/README.md +11 -3
- data/lib/potassium/assets/.circleci/config.yml.erb +107 -40
- data/lib/potassium/assets/.pryrc +0 -6
- data/lib/potassium/assets/.rubocop.yml +13 -0
- data/lib/potassium/assets/README.yml +45 -8
- data/lib/potassium/assets/active_admin/policies/admin_user_policy.rb +2 -0
- data/lib/potassium/assets/active_admin/policies/comment_policy.rb +2 -0
- data/lib/potassium/assets/active_admin/policies/default_policy.rb +49 -0
- data/lib/potassium/assets/active_admin/policies/page_policy.rb +2 -0
- data/lib/potassium/assets/app/javascript/app.spec.js +1 -1
- data/lib/potassium/assets/app/views/shared/_gtm_body.html.erb +4 -0
- data/lib/potassium/assets/app/views/shared/_gtm_head.html.erb +7 -0
- data/lib/potassium/assets/testing/.rspec +1 -0
- data/lib/potassium/assets/testing/devise_config.rb +6 -0
- data/lib/potassium/assets/testing/factory_bot_config.rb +3 -0
- data/lib/potassium/assets/testing/faker_config.rb +1 -0
- data/lib/potassium/assets/testing/power_types_config.rb +1 -0
- data/lib/potassium/assets/testing/rails_helper.rb +130 -49
- data/lib/potassium/assets/testing/shoulda_matchers_config.rb +8 -0
- data/lib/potassium/assets/testing/simplecov_config.rb +64 -0
- data/lib/potassium/assets/testing/system_tests_config.rb +6 -0
- data/lib/potassium/cli_options.rb +19 -3
- data/lib/potassium/helpers/template-helpers.rb +4 -0
- data/lib/potassium/recipes/admin.rb +27 -17
- data/lib/potassium/recipes/api.rb +2 -0
- data/lib/potassium/recipes/background_processor.rb +43 -32
- data/lib/potassium/recipes/ci.rb +9 -39
- data/lib/potassium/recipes/coverage.rb +35 -0
- data/lib/potassium/recipes/file_storage.rb +1 -1
- data/lib/potassium/recipes/front_end.rb +26 -13
- data/lib/potassium/recipes/google_tag_manager.rb +94 -0
- data/lib/potassium/recipes/heroku.rb +43 -31
- data/lib/potassium/recipes/mailer.rb +18 -5
- data/lib/potassium/recipes/monitoring.rb +5 -0
- data/lib/potassium/recipes/pundit.rb +29 -10
- data/lib/potassium/recipes/rails.rb +0 -4
- data/lib/potassium/recipes/schedule.rb +16 -1
- data/lib/potassium/recipes/spring.rb +9 -0
- data/lib/potassium/recipes/style.rb +2 -2
- data/lib/potassium/recipes/testing.rb +75 -18
- data/lib/potassium/templates/application.rb +7 -2
- data/lib/potassium/version.rb +7 -4
- data/potassium.gemspec +3 -1
- data/spec/features/background_processor_spec.rb +7 -5
- data/spec/features/ci_spec.rb +7 -4
- data/spec/features/coverage_spec.rb +26 -0
- data/spec/features/front_end_spec.rb +18 -1
- data/spec/features/google_tag_manager_spec.rb +36 -0
- data/spec/features/heroku_spec.rb +0 -4
- data/spec/features/mailer_spec.rb +16 -0
- data/spec/features/node_spec.rb +1 -1
- data/spec/features/pundit_spec.rb +34 -0
- data/spec/features/schedule_spec.rb +11 -4
- data/spec/features/testing_spec.rb +56 -0
- data/spec/support/potassium_test_helpers.rb +2 -3
- data/tmp/.keep +0 -0
- metadata +64 -15
- data/lib/potassium/assets/Dockerfile.ci +0 -6
- data/lib/potassium/assets/active_admin/admin_user_policy.rb +0 -2
- data/lib/potassium/assets/active_admin/comment_policy.rb +0 -2
- data/lib/potassium/assets/active_admin/pundit_page_policy.rb +0 -5
- data/lib/potassium/assets/bin/cibuild.erb +0 -117
- data/lib/potassium/assets/docker-compose.ci.yml +0 -12
- data/lib/potassium/assets/sidekiq_scheduler.yml +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf3d3969e70d29a2f2c15992c48f609ad389a486560fd6a16ea3a74871328a19
|
4
|
+
data.tar.gz: c1617bc3cba761408d2cba7419fbe4c68cb265a7438ea07b8c9b637944e3271d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61cbdbbced51469867a32a83a97628f8ea4ccfb3290cc2b2e6e8a34f86e53a6e0478609326264b59324266b8db184cd449d921a9f17cc3f5a58be01eddb00e3b
|
7
|
+
data.tar.gz: '00900211ab3d5dcb75e4f45889778c752cda9f61a7e8d8cd0e264bb1ba678c50f8b9593f8bb98c3afd8b2fa554458cb639bfba202428a978976872cf45d291a5'
|
data/.circleci/config.yml
CHANGED
@@ -1,42 +1,107 @@
|
|
1
|
-
version: 2
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
version: 2.1
|
2
|
+
|
3
|
+
ruby-image: &ruby-image cimg/ruby:2.7.4-node
|
4
|
+
env-vars: &env-vars
|
5
|
+
BUNDLE_JOBS: 4
|
6
|
+
RAILS_ENV: test
|
7
|
+
RAKE_ENV: test
|
8
|
+
BUNDLE_PATH: /home/circleci/project/vendor/bundle
|
9
|
+
GEM_PATH: /home/circleci/project/vendor/bundle/ruby/2.7.0
|
7
10
|
|
11
|
+
executors:
|
12
|
+
ruby-executor:
|
8
13
|
docker:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
14
|
+
- image: *ruby-image
|
15
|
+
environment: *env-vars
|
16
|
+
|
17
|
+
commands:
|
18
|
+
setup:
|
19
|
+
description: checkout code, restore cache, install dependencies, save cache
|
20
|
+
steps:
|
21
|
+
- checkout
|
22
|
+
|
23
|
+
- restore_cache:
|
24
|
+
keys:
|
25
|
+
- potassium-vendor-bundle-{{ .Branch }}
|
26
|
+
- potassium-vendor-bundle-master
|
27
|
+
- potassium-vendor-bundle
|
28
|
+
|
29
|
+
- run:
|
30
|
+
name: Install bundle dependencies
|
31
|
+
command: |
|
32
|
+
gem install bundler:2.1.4
|
33
|
+
bundle _2.1.4_ install
|
34
|
+
|
35
|
+
- save_cache:
|
36
|
+
key: potassium-vendor-bundle-{{ .Branch }}
|
37
|
+
paths:
|
38
|
+
- vendor/bundle
|
39
|
+
|
40
|
+
jobs:
|
41
|
+
test:
|
42
|
+
parallelism: 6
|
43
|
+
executor: ruby-executor
|
44
|
+
steps:
|
45
|
+
- setup
|
15
46
|
|
47
|
+
- run:
|
48
|
+
name: Run rspec
|
49
|
+
command: |
|
50
|
+
RSPEC_JUNIT_ARGS="-r rspec_junit_formatter -f RspecJunitFormatter -o test_results/rspec.xml"
|
51
|
+
RSPEC_GENERAL_ARGS="-f progress --no-color -p 10"
|
52
|
+
SPLIT_ARGS="$(circleci tests glob spec/**/*_spec.rb | circleci tests split --split-by=timings)"
|
53
|
+
bundle exec rspec $RSPEC_GENERAL_ARGS $RSPEC_JUNIT_ARGS $SPLIT_ARGS
|
54
|
+
|
55
|
+
- store_test_results:
|
56
|
+
path: test_results
|
57
|
+
|
58
|
+
lint:
|
59
|
+
executor: ruby-executor
|
60
|
+
steps:
|
61
|
+
- setup
|
62
|
+
|
63
|
+
- run:
|
64
|
+
name: Install reviewdog
|
65
|
+
command: |
|
66
|
+
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b ./bin
|
67
|
+
|
68
|
+
- run:
|
69
|
+
name: Get files to lint
|
70
|
+
command: git diff origin/master --name-only --diff-filter=d > tmp/files_to_lint
|
71
|
+
|
72
|
+
- run:
|
73
|
+
name: Run rubocop
|
74
|
+
shell: /bin/bash
|
75
|
+
command: |
|
76
|
+
cat tmp/files_to_lint | grep -E '.+\.(rb)$' | xargs bundle exec rubocop --force-exclusion \
|
77
|
+
| ./bin/reviewdog -reporter=github-pr-review -f=rubocop
|
78
|
+
|
79
|
+
deploy:
|
80
|
+
executor: ruby-executor
|
16
81
|
steps:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
82
|
+
- setup
|
83
|
+
|
84
|
+
- run:
|
85
|
+
name: Setup rubygems
|
86
|
+
command: bash .circleci/setup-rubygems.sh
|
87
|
+
|
88
|
+
- run:
|
89
|
+
name: Publish to rubygems
|
90
|
+
command: |
|
91
|
+
gem build potassium.gemspec
|
92
|
+
version_tag=$(git describe --tags)
|
93
|
+
gem push potassium-${version_tag#v}.gem
|
94
|
+
|
95
|
+
workflows:
|
96
|
+
test_and_lint:
|
97
|
+
jobs:
|
98
|
+
- test
|
99
|
+
- lint:
|
100
|
+
context: org-global
|
101
|
+
- deploy:
|
102
|
+
context: org-global
|
103
|
+
filters:
|
104
|
+
tags:
|
105
|
+
only: /.*/
|
106
|
+
branches:
|
107
|
+
ignore: /.*/
|
data/.gitignore
CHANGED
data/.node-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
14
|