potassium 6.7.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/README.md +8 -1
- data/lib/potassium/assets/.circleci/config.yml.erb +14 -8
- data/lib/potassium/assets/.eslintrc.json +13 -7
- data/lib/potassium/assets/.rubocop.yml +62 -1
- data/lib/potassium/assets/README.yml +3 -9
- data/lib/potassium/assets/app/frontend/active_admin/jquery.js +2 -0
- data/lib/potassium/assets/app/frontend/api/__mocks__/index.mock.ts +3 -0
- data/lib/potassium/assets/app/frontend/api/index.ts +63 -0
- data/lib/potassium/assets/app/frontend/css/application.css +3 -0
- data/lib/potassium/assets/app/frontend/entrypoints/active_admin.js +7 -0
- data/lib/potassium/assets/app/frontend/entrypoints/active_admin.scss +38 -0
- data/lib/potassium/assets/app/frontend/entrypoints/application.js +12 -0
- data/lib/potassium/assets/app/{javascript → frontend}/types/vue.d.ts +1 -0
- data/lib/potassium/assets/app/{javascript → frontend}/utils/case-converter.ts +2 -2
- data/lib/potassium/assets/app/frontend/utils/csrf-token.ts +9 -0
- data/lib/potassium/assets/bin/setup.erb +1 -1
- data/lib/potassium/assets/bin/update.erb +1 -1
- data/lib/potassium/assets/config/sentry.rb.erb +2 -10
- data/lib/potassium/assets/lib/dotenv_monkeypatch.rb +19 -0
- data/lib/potassium/assets/package.json +7 -0
- data/lib/potassium/assets/tailwind.config.js +14 -0
- data/lib/potassium/assets/testing/simplecov_config.rb +9 -1
- data/lib/potassium/assets/tsconfig.config.json +8 -0
- data/lib/potassium/assets/tsconfig.json +11 -27
- data/lib/potassium/assets/vite.config.ts +46 -0
- data/lib/potassium/cli_options.rb +6 -4
- data/lib/potassium/platanus_config.rb +1 -1
- data/lib/potassium/recipes/admin.rb +42 -72
- data/lib/potassium/recipes/background_processor.rb +1 -1
- data/lib/potassium/recipes/bullet.rb +41 -0
- data/lib/potassium/recipes/ci.rb +1 -0
- data/lib/potassium/recipes/cleanup.rb +0 -1
- data/lib/potassium/recipes/coverage.rb +4 -27
- data/lib/potassium/recipes/database_container.rb +1 -1
- data/lib/potassium/recipes/error_reporting.rb +2 -2
- data/lib/potassium/recipes/front_end_vite.rb +153 -0
- data/lib/potassium/recipes/google_tag_manager.rb +19 -23
- data/lib/potassium/recipes/mjml.rb +1 -1
- data/lib/potassium/recipes/node.rb +1 -1
- data/lib/potassium/recipes/style.rb +3 -5
- data/lib/potassium/recipes/vue_admin.rb +7 -13
- data/lib/potassium/recipes/yarn.rb +1 -1
- data/lib/potassium/templates/application.rb +4 -8
- data/lib/potassium/version.rb +6 -6
- data/spec/features/api_spec.rb +2 -2
- data/spec/features/background_processor_spec.rb +2 -2
- data/spec/features/bullet_spec.rb +29 -0
- data/spec/features/ci_spec.rb +10 -4
- data/spec/features/coverage_spec.rb +7 -6
- data/spec/features/database_container_spec.rb +1 -1
- data/spec/features/database_spec.rb +1 -1
- data/spec/features/draper_spec.rb +1 -1
- data/spec/features/error_reporting_spec.rb +2 -2
- data/spec/features/file_storage_spec.rb +4 -4
- data/spec/features/google_tag_manager_spec.rb +1 -1
- data/spec/features/i18n_spec.rb +1 -1
- data/spec/features/mailer_spec.rb +1 -0
- data/spec/features/new_project_spec.rb +1 -1
- data/spec/features/power_types_spec.rb +1 -1
- data/spec/features/pundit_spec.rb +1 -1
- data/spec/features/schedule_spec.rb +1 -1
- data/spec/features/testing_spec.rb +0 -1
- data/spec/features/vue_admin_spec.rb +1 -1
- data/spec/front_end_vite_spec.rb +81 -0
- metadata +26 -18
- data/lib/potassium/assets/app/javascript/api/index.ts +0 -55
- data/lib/potassium/assets/config/webpack/rules/css.js +0 -5
- data/lib/potassium/assets/config/webpack/rules/index.js +0 -11
- data/lib/potassium/assets/config/webpack/rules/jquery.js +0 -11
- data/lib/potassium/assets/config/webpack/rules/typescript.js +0 -32
- data/lib/potassium/assets/config/webpack/rules/vue.js +0 -19
- data/lib/potassium/assets/config/webpack/webpack.config.js +0 -4
- data/lib/potassium/recipes/front_end.rb +0 -270
- data/spec/features/front_end_spec.rb +0 -76
- /data/lib/potassium/assets/app/{javascript → frontend}/components/app.spec.ts +0 -0
- /data/lib/potassium/assets/app/{javascript → frontend}/components/app.vue +0 -0
|
@@ -11,7 +11,7 @@ RSpec.describe "BackgroundProcessor" do
|
|
|
11
11
|
|
|
12
12
|
it "adds sidekiq gem to Gemfile" do
|
|
13
13
|
gemfile_content = IO.read("#{project_path}/Gemfile")
|
|
14
|
-
expect(gemfile_content).to include("
|
|
14
|
+
expect(gemfile_content).to include("sidekiq")
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
it "adds queue_adapter to application.rb" do
|
|
@@ -43,7 +43,7 @@ RSpec.describe "BackgroundProcessor" do
|
|
|
43
43
|
content = IO.read("#{project_path}/.env.development")
|
|
44
44
|
expect(content).to include("DB_POOL=25")
|
|
45
45
|
expect(content).to include('REDIS_HOST=127.0.0.1')
|
|
46
|
-
expect(content).to include('REDIS_PORT
|
|
46
|
+
expect(content).to include('REDIS_PORT=COMMAND_EXPAND(make services-port SERVICE=redis PORT=6379)')
|
|
47
47
|
expect(content).to include('REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}/1')
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require "spec_helper"
|
|
2
|
+
|
|
3
|
+
RSpec.describe "Bullet" do
|
|
4
|
+
before(:all) do
|
|
5
|
+
drop_dummy_database
|
|
6
|
+
remove_project_directory
|
|
7
|
+
create_dummy_project
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
context "with all the bullet config" do
|
|
11
|
+
let(:dev_config) { IO.read("#{project_path}/config/environments/development.rb") }
|
|
12
|
+
|
|
13
|
+
it { expect(dev_config).to include("config.after_initialize do") }
|
|
14
|
+
it { expect(dev_config).to include("Bullet.enable = true") }
|
|
15
|
+
it { expect(dev_config).to include("Bullet.alert = true") }
|
|
16
|
+
it { expect(dev_config).to include("Bullet.bullet_logger = true") }
|
|
17
|
+
it { expect(dev_config).to include("Bullet.console = true") }
|
|
18
|
+
it { expect(dev_config).to include("Bullet.rails_logger = true") }
|
|
19
|
+
it { expect(dev_config).to include("Bullet.add_footer = true") }
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
context "with bullet application job config" do
|
|
23
|
+
let(:application_job) { IO.read("#{project_path}/app/jobs/application_job.rb") }
|
|
24
|
+
|
|
25
|
+
it 'adds bullet configuration to application_job.rb' do
|
|
26
|
+
expect(application_job).to include(" include Bullet::ActiveJob if Rails.env.development?\n")
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
data/spec/features/ci_spec.rb
CHANGED
|
@@ -2,6 +2,11 @@ require "spec_helper"
|
|
|
2
2
|
require "rubocop"
|
|
3
3
|
|
|
4
4
|
RSpec.describe 'CI' do
|
|
5
|
+
let(:ci_config) do
|
|
6
|
+
yml_path = "#{project_path}/.circleci/config.yml"
|
|
7
|
+
IO.read(yml_path)
|
|
8
|
+
end
|
|
9
|
+
|
|
5
10
|
before(:all) do
|
|
6
11
|
drop_dummy_database
|
|
7
12
|
remove_project_directory
|
|
@@ -9,9 +14,10 @@ RSpec.describe 'CI' do
|
|
|
9
14
|
end
|
|
10
15
|
|
|
11
16
|
it "correctly bundles the config file" do
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
expect(ci_config).to include('cimg/ruby', 'cache', 'rspec', 'reviewdog')
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it "adds repo analyzer config" do
|
|
21
|
+
expect(ci_config).to include('bin/rake "repo_analyzer:analyze[platanus/dummy_app]"')
|
|
16
22
|
end
|
|
17
23
|
end
|
|
@@ -9,9 +9,9 @@ RSpec.describe "Coverage" do
|
|
|
9
9
|
|
|
10
10
|
it "adds simplecov related gems to Gemfile" do
|
|
11
11
|
content = IO.read("#{project_path}/Gemfile")
|
|
12
|
-
expect(content).to include("
|
|
13
|
-
expect(content).to include("
|
|
14
|
-
expect(content).to include("
|
|
12
|
+
expect(content).to include("simplecov")
|
|
13
|
+
expect(content).to include("simplecov_linter_formatter")
|
|
14
|
+
expect(content).to include("simplecov_text_formatter")
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
it "requires simplecov config file before rails" do
|
|
@@ -26,14 +26,15 @@ RSpec.describe "Coverage" do
|
|
|
26
26
|
|
|
27
27
|
context "with vue" do
|
|
28
28
|
let(:node_modules_file) { IO.read("#{project_path}/package.json") }
|
|
29
|
+
let(:vite_config) { IO.read("#{project_path}/vite.config.ts") }
|
|
29
30
|
|
|
30
31
|
before(:all) do
|
|
31
32
|
remove_project_directory
|
|
32
|
-
create_dummy_project("
|
|
33
|
+
create_dummy_project("front_end_vite" => true)
|
|
33
34
|
end
|
|
34
35
|
|
|
35
|
-
it "adds
|
|
36
|
-
expect(
|
|
36
|
+
it "adds vitest coverage configuration" do
|
|
37
|
+
expect(vite_config).to include("provider: 'c8',")
|
|
37
38
|
end
|
|
38
39
|
|
|
39
40
|
it "adds jest text formatter package" do
|
|
@@ -25,7 +25,7 @@ RSpec.describe "DatabaseContainer" do
|
|
|
25
25
|
db_port = compose_content[:services][service_name][:ports].first
|
|
26
26
|
|
|
27
27
|
expect(env_file)
|
|
28
|
-
.to include("DB_PORT
|
|
28
|
+
.to include("DB_PORT=COMMAND_EXPAND(make services-port SERVICE=#{service_name} PORT=#{db_port})")
|
|
29
29
|
expect(env_file).to include("DB_HOST=127.0.0.1")
|
|
30
30
|
expect(File.exist?("#{project_path}/Makefile")).to be true
|
|
31
31
|
expect(setup_file).to include("docker-compose up -d")
|
|
@@ -9,6 +9,6 @@ RSpec.describe "Database" do
|
|
|
9
9
|
|
|
10
10
|
it "adds the Strong Migrations gem to Gemfile" do
|
|
11
11
|
gemfile_content = IO.read("#{project_path}/Gemfile")
|
|
12
|
-
expect(gemfile_content).to include("
|
|
12
|
+
expect(gemfile_content).to include("strong_migrations")
|
|
13
13
|
end
|
|
14
14
|
end
|
|
@@ -9,7 +9,7 @@ RSpec.describe "Draper" do
|
|
|
9
9
|
|
|
10
10
|
it "adds the Draper gem to Gemfile" do
|
|
11
11
|
gemfile_content = IO.read("#{project_path}/Gemfile")
|
|
12
|
-
expect(gemfile_content).to include("
|
|
12
|
+
expect(gemfile_content).to include("draper")
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
it "adds the Draper brief to README file" do
|
|
@@ -10,13 +10,13 @@ RSpec.describe "Error Reporting" do
|
|
|
10
10
|
it "adds the Sentry gem to Gemfile" do
|
|
11
11
|
gemfile_content = IO.read("#{project_path}/Gemfile")
|
|
12
12
|
|
|
13
|
-
expect(gemfile_content).to include("
|
|
13
|
+
expect(gemfile_content).to include("sentry-rails")
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
it "creates the initializer" do
|
|
17
17
|
initializer_content = IO.read("#{project_path}/config/initializers/sentry.rb")
|
|
18
18
|
|
|
19
|
-
expect(initializer_content).to include("
|
|
19
|
+
expect(initializer_content).to include("Sentry.init")
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
it "adds the environment variable to .env.development" do
|
|
@@ -10,7 +10,7 @@ RSpec.describe "File Storage" do
|
|
|
10
10
|
|
|
11
11
|
it "adds the aws-sdk-s3 gem to Gemfile" do
|
|
12
12
|
gemfile_content = IO.read("#{project_path}/Gemfile")
|
|
13
|
-
expect(gemfile_content).to include("
|
|
13
|
+
expect(gemfile_content).to include("aws-sdk-s3")
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
it "customizes config file" do
|
|
@@ -43,9 +43,9 @@ RSpec.describe "File Storage" do
|
|
|
43
43
|
shared_examples 'common shrine setup' do
|
|
44
44
|
it "adds the aws-sdk-s3, shrine and marcel gems to Gemfile" do
|
|
45
45
|
gemfile_content = IO.read("#{project_path}/Gemfile")
|
|
46
|
-
expect(gemfile_content).to include("
|
|
47
|
-
expect(gemfile_content).to include("
|
|
48
|
-
expect(gemfile_content).to include("
|
|
46
|
+
expect(gemfile_content).to include("aws-sdk-s3")
|
|
47
|
+
expect(gemfile_content).to include("shrine")
|
|
48
|
+
expect(gemfile_content).to include("marcel")
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
it "adds brief to README file" do
|
|
@@ -31,6 +31,6 @@ RSpec.describe "Google Tag Manager" do
|
|
|
31
31
|
|
|
32
32
|
it 'add content security policy' do
|
|
33
33
|
expect(content_security_policy_file)
|
|
34
|
-
.to include("
|
|
34
|
+
.to include("https://developers.google.com/tag-manager/web/csp")
|
|
35
35
|
end
|
|
36
36
|
end
|
data/spec/features/i18n_spec.rb
CHANGED
|
@@ -10,7 +10,7 @@ RSpec.describe "I18n" do
|
|
|
10
10
|
it "adds the Clockwork gem to Gemfile" do
|
|
11
11
|
content = IO.read("#{project_path}/Gemfile")
|
|
12
12
|
|
|
13
|
-
expect(content).to include("
|
|
13
|
+
expect(content).to include("rails-i18n")
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
it "configures application.rb" do
|
|
@@ -23,7 +23,7 @@ RSpec.describe "A new project" do
|
|
|
23
23
|
gemfile = IO.read("#{project_path}/Gemfile")
|
|
24
24
|
|
|
25
25
|
expect(database_config_file).to include(%{adapter: postgresql})
|
|
26
|
-
expect(gemfile).to include %{
|
|
26
|
+
expect(gemfile).to include %{pg}
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
it "configures the correct ruby version" do
|
|
@@ -9,7 +9,7 @@ RSpec.describe "PowerTypes" do
|
|
|
9
9
|
|
|
10
10
|
it "adds the PowerTypes gem to Gemfile" do
|
|
11
11
|
gemfile_content = IO.read("#{project_path}/Gemfile")
|
|
12
|
-
expect(gemfile_content).to include("
|
|
12
|
+
expect(gemfile_content).to include("power-types")
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
it "adds the PowerTypes brief to README file" do
|
|
@@ -13,7 +13,7 @@ RSpec.describe "schedule" do
|
|
|
13
13
|
|
|
14
14
|
it "adds the sidekiq-scheduler gem to Gemfile" do
|
|
15
15
|
gemfile_content = IO.read("#{project_path}/Gemfile")
|
|
16
|
-
expect(gemfile_content).to include("
|
|
16
|
+
expect(gemfile_content).to include("sidekiq-scheduler")
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
it "adds schedule section to sidekiq config" do
|
|
@@ -31,7 +31,6 @@ RSpec.describe "Testing" do
|
|
|
31
31
|
create_dummy_project(devise: true)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
it { expect(gemfile_content).to include("gem 'rspec-rails'") }
|
|
35
34
|
it { expect(gemfile_content).to include('rspec-rails') }
|
|
36
35
|
it { expect(gemfile_content).to include('factory_bot_rails') }
|
|
37
36
|
it { expect(gemfile_content).to include('faker') }
|
|
@@ -22,7 +22,7 @@ RSpec.describe "VueAdmin" do
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
it "adds admin_component to vue components" do
|
|
25
|
-
application_pack_path = "#{project_path}/app/
|
|
25
|
+
application_pack_path = "#{project_path}/app/frontend/components/admin-component.vue"
|
|
26
26
|
expect(File).to be_file(application_pack_path)
|
|
27
27
|
end
|
|
28
28
|
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# rubocop:disable RSpec/MultipleMemoizedHelpers
|
|
2
|
+
require 'spec_helper'
|
|
3
|
+
|
|
4
|
+
RSpec.describe 'Front end' do
|
|
5
|
+
before :all do
|
|
6
|
+
drop_dummy_database
|
|
7
|
+
remove_project_directory
|
|
8
|
+
create_dummy_project('front_end_vite' => true)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def read_file(file_path)
|
|
12
|
+
IO.read("#{project_path}/#{file_path}")
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
let(:gemfile) { read_file('Gemfile') }
|
|
16
|
+
let(:application_file) { read_file('config/application.rb') }
|
|
17
|
+
let(:node_modules_file) { read_file('package.json') }
|
|
18
|
+
let(:application_js_file) { read_file('app/frontend/entrypoints/application.js') }
|
|
19
|
+
let(:layout_file) { read_file('app/views/layouts/application.html.erb') }
|
|
20
|
+
let(:csp_initializer) { read_file('config/initializers/content_security_policy.rb') }
|
|
21
|
+
let(:application_css_file) { read_file('app/frontend/css/application.css') }
|
|
22
|
+
let(:tailwind_config_file) { read_file('tailwind.config.js') }
|
|
23
|
+
let(:rails_css_file) { read_file('app/assets/stylesheets/application.css') }
|
|
24
|
+
let(:api_index_file) { read_file('app/frontend/api/index.ts') }
|
|
25
|
+
let(:case_converter_file) { read_file('app/frontend/utils/case-converter.ts') }
|
|
26
|
+
let(:csrf_token_file) { read_file('app/frontend/utils/csrf-token.ts') }
|
|
27
|
+
let(:mock_example_file) { read_file('app/frontend/api/__mocks__/index.mock.ts') }
|
|
28
|
+
|
|
29
|
+
it 'creates a project with vite' do
|
|
30
|
+
expect(gemfile).to include('vite_rails')
|
|
31
|
+
expect(layout_file.scan('vite_client_tag').length).to eq(1)
|
|
32
|
+
expect(layout_file.scan('vite_javascript_tag').length).to eq(2)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it 'creates a project with vue as frontend framework' do
|
|
36
|
+
expect(node_modules_file).to include('"vue"')
|
|
37
|
+
expect(application_js_file).to include('vue')
|
|
38
|
+
expect(application_js_file).to include("app.mount('#vue-app')")
|
|
39
|
+
expect(layout_file).to include('id="vue-app"')
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
it 'creates a vue project with client css' do
|
|
43
|
+
expect(application_js_file).to include("import '../css/application.css';")
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
it 'creates a vue project with tailwindcss' do
|
|
47
|
+
expect(node_modules_file).to include('"tailwindcss"')
|
|
48
|
+
expect(application_css_file).to include(
|
|
49
|
+
'@tailwind base;',
|
|
50
|
+
'@tailwind components;'
|
|
51
|
+
)
|
|
52
|
+
expect(tailwind_config_file).to include('module.exports')
|
|
53
|
+
expect(File.exists?(File.join(project_path, 'tailwind.config.js'))).to be(true)
|
|
54
|
+
expect(File.exists?(File.join(project_path, 'postcss.config.js'))).to be(true)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it 'updates suggested csp policy' do
|
|
58
|
+
expect(csp_initializer).to include('ViteRuby.config.host_with_port')
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
it 'includes correct packages for basic api client' do
|
|
62
|
+
expect(node_modules_file).to include('"axios"')
|
|
63
|
+
expect(node_modules_file).to include('"humps"')
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
it 'includes api client files' do
|
|
67
|
+
expect(api_index_file).to include('axios.create')
|
|
68
|
+
expect(case_converter_file).to include('humps')
|
|
69
|
+
expect(csrf_token_file).to include('meta[name=csrf-token]')
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
it 'includes mock example' do
|
|
73
|
+
expect(mock_example_file).to include('jest.fn()')
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
it 'includes the dotenv monkeypatch' do
|
|
77
|
+
expect(application_file).to include("require_relative '../lib/dotenv_monkeypatch'")
|
|
78
|
+
expect(File.exists?(File.join(project_path, 'lib/dotenv_monkeypatch.rb'))).to be(true)
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
# rubocop:enable RSpec/MultipleMemoizedHelpers
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: potassium
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 7.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- juliogarciag
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-03-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -212,14 +212,14 @@ dependencies:
|
|
|
212
212
|
requirements:
|
|
213
213
|
- - "~>"
|
|
214
214
|
- !ruby/object:Gem::Version
|
|
215
|
-
version:
|
|
215
|
+
version: 7.0.4.2
|
|
216
216
|
type: :runtime
|
|
217
217
|
prerelease: false
|
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
|
219
219
|
requirements:
|
|
220
220
|
- - "~>"
|
|
221
221
|
- !ruby/object:Gem::Version
|
|
222
|
-
version:
|
|
222
|
+
version: 7.0.4.2
|
|
223
223
|
- !ruby/object:Gem::Dependency
|
|
224
224
|
name: semantic
|
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -281,11 +281,18 @@ files:
|
|
|
281
281
|
- lib/potassium/assets/active_admin/policies/comment_policy.rb
|
|
282
282
|
- lib/potassium/assets/active_admin/policies/default_policy.rb
|
|
283
283
|
- lib/potassium/assets/active_admin/policies/page_policy.rb
|
|
284
|
-
- lib/potassium/assets/app/
|
|
285
|
-
- lib/potassium/assets/app/
|
|
286
|
-
- lib/potassium/assets/app/
|
|
287
|
-
- lib/potassium/assets/app/
|
|
288
|
-
- lib/potassium/assets/app/
|
|
284
|
+
- lib/potassium/assets/app/frontend/active_admin/jquery.js
|
|
285
|
+
- lib/potassium/assets/app/frontend/api/__mocks__/index.mock.ts
|
|
286
|
+
- lib/potassium/assets/app/frontend/api/index.ts
|
|
287
|
+
- lib/potassium/assets/app/frontend/components/app.spec.ts
|
|
288
|
+
- lib/potassium/assets/app/frontend/components/app.vue
|
|
289
|
+
- lib/potassium/assets/app/frontend/css/application.css
|
|
290
|
+
- lib/potassium/assets/app/frontend/entrypoints/active_admin.js
|
|
291
|
+
- lib/potassium/assets/app/frontend/entrypoints/active_admin.scss
|
|
292
|
+
- lib/potassium/assets/app/frontend/entrypoints/application.js
|
|
293
|
+
- lib/potassium/assets/app/frontend/types/vue.d.ts
|
|
294
|
+
- lib/potassium/assets/app/frontend/utils/case-converter.ts
|
|
295
|
+
- lib/potassium/assets/app/frontend/utils/csrf-token.ts
|
|
289
296
|
- lib/potassium/assets/app/jobs/shrine_promote_job.rb
|
|
290
297
|
- lib/potassium/assets/app/mailers/application_mailer.rb
|
|
291
298
|
- lib/potassium/assets/app/mailers/example_mailer.rb
|
|
@@ -311,14 +318,9 @@ files:
|
|
|
311
318
|
- lib/potassium/assets/config/sentry.rb.erb
|
|
312
319
|
- lib/potassium/assets/config/shrine.rb
|
|
313
320
|
- lib/potassium/assets/config/storage.yml
|
|
314
|
-
- lib/potassium/assets/config/webpack/rules/css.js
|
|
315
|
-
- lib/potassium/assets/config/webpack/rules/index.js
|
|
316
|
-
- lib/potassium/assets/config/webpack/rules/jquery.js
|
|
317
|
-
- lib/potassium/assets/config/webpack/rules/typescript.js
|
|
318
|
-
- lib/potassium/assets/config/webpack/rules/vue.js
|
|
319
|
-
- lib/potassium/assets/config/webpack/webpack.config.js
|
|
320
321
|
- lib/potassium/assets/docker-compose.yml
|
|
321
322
|
- lib/potassium/assets/es-CL.yml
|
|
323
|
+
- lib/potassium/assets/lib/dotenv_monkeypatch.rb
|
|
322
324
|
- lib/potassium/assets/lib/tasks/auto_annotate_models.rake
|
|
323
325
|
- lib/potassium/assets/package.json
|
|
324
326
|
- lib/potassium/assets/public/mails/platanus-logo.png
|
|
@@ -329,6 +331,7 @@ files:
|
|
|
329
331
|
- lib/potassium/assets/seeds/seeds.rb
|
|
330
332
|
- lib/potassium/assets/sidekiq.rb.erb
|
|
331
333
|
- lib/potassium/assets/sidekiq.yml
|
|
334
|
+
- lib/potassium/assets/tailwind.config.js
|
|
332
335
|
- lib/potassium/assets/testing/.rspec
|
|
333
336
|
- lib/potassium/assets/testing/devise_config.rb
|
|
334
337
|
- lib/potassium/assets/testing/factory_bot_config.rb
|
|
@@ -339,7 +342,9 @@ files:
|
|
|
339
342
|
- lib/potassium/assets/testing/shoulda_matchers_config.rb
|
|
340
343
|
- lib/potassium/assets/testing/simplecov_config.rb
|
|
341
344
|
- lib/potassium/assets/testing/system_tests_config.rb
|
|
345
|
+
- lib/potassium/assets/tsconfig.config.json
|
|
342
346
|
- lib/potassium/assets/tsconfig.json
|
|
347
|
+
- lib/potassium/assets/vite.config.ts
|
|
343
348
|
- lib/potassium/cli.rb
|
|
344
349
|
- lib/potassium/cli/commands/create.rb
|
|
345
350
|
- lib/potassium/cli/commands/install.rb
|
|
@@ -366,6 +371,7 @@ files:
|
|
|
366
371
|
- lib/potassium/recipes/api.rb
|
|
367
372
|
- lib/potassium/recipes/background_processor.rb
|
|
368
373
|
- lib/potassium/recipes/better_errors.rb
|
|
374
|
+
- lib/potassium/recipes/bullet.rb
|
|
369
375
|
- lib/potassium/recipes/ci.rb
|
|
370
376
|
- lib/potassium/recipes/cleanup.rb
|
|
371
377
|
- lib/potassium/recipes/coverage.rb
|
|
@@ -378,7 +384,7 @@ files:
|
|
|
378
384
|
- lib/potassium/recipes/env.rb
|
|
379
385
|
- lib/potassium/recipes/error_reporting.rb
|
|
380
386
|
- lib/potassium/recipes/file_storage.rb
|
|
381
|
-
- lib/potassium/recipes/
|
|
387
|
+
- lib/potassium/recipes/front_end_vite.rb
|
|
382
388
|
- lib/potassium/recipes/github.rb
|
|
383
389
|
- lib/potassium/recipes/google_tag_manager.rb
|
|
384
390
|
- lib/potassium/recipes/heroku.rb
|
|
@@ -417,6 +423,7 @@ files:
|
|
|
417
423
|
- spec/fakes/bin/hub
|
|
418
424
|
- spec/features/api_spec.rb
|
|
419
425
|
- spec/features/background_processor_spec.rb
|
|
426
|
+
- spec/features/bullet_spec.rb
|
|
420
427
|
- spec/features/ci_spec.rb
|
|
421
428
|
- spec/features/coverage_spec.rb
|
|
422
429
|
- spec/features/data_migrate_spec.rb
|
|
@@ -425,7 +432,6 @@ files:
|
|
|
425
432
|
- spec/features/draper_spec.rb
|
|
426
433
|
- spec/features/error_reporting_spec.rb
|
|
427
434
|
- spec/features/file_storage_spec.rb
|
|
428
|
-
- spec/features/front_end_spec.rb
|
|
429
435
|
- spec/features/github_spec.rb
|
|
430
436
|
- spec/features/google_tag_manager_spec.rb
|
|
431
437
|
- spec/features/heroku_spec.rb
|
|
@@ -439,6 +445,7 @@ files:
|
|
|
439
445
|
- spec/features/schedule_spec.rb
|
|
440
446
|
- spec/features/testing_spec.rb
|
|
441
447
|
- spec/features/vue_admin_spec.rb
|
|
448
|
+
- spec/front_end_vite_spec.rb
|
|
442
449
|
- spec/spec_helper.rb
|
|
443
450
|
- spec/support/fake_github.rb
|
|
444
451
|
- spec/support/fake_heroku.rb
|
|
@@ -474,6 +481,7 @@ test_files:
|
|
|
474
481
|
- spec/fakes/bin/hub
|
|
475
482
|
- spec/features/api_spec.rb
|
|
476
483
|
- spec/features/background_processor_spec.rb
|
|
484
|
+
- spec/features/bullet_spec.rb
|
|
477
485
|
- spec/features/ci_spec.rb
|
|
478
486
|
- spec/features/coverage_spec.rb
|
|
479
487
|
- spec/features/data_migrate_spec.rb
|
|
@@ -482,7 +490,6 @@ test_files:
|
|
|
482
490
|
- spec/features/draper_spec.rb
|
|
483
491
|
- spec/features/error_reporting_spec.rb
|
|
484
492
|
- spec/features/file_storage_spec.rb
|
|
485
|
-
- spec/features/front_end_spec.rb
|
|
486
493
|
- spec/features/github_spec.rb
|
|
487
494
|
- spec/features/google_tag_manager_spec.rb
|
|
488
495
|
- spec/features/heroku_spec.rb
|
|
@@ -496,6 +503,7 @@ test_files:
|
|
|
496
503
|
- spec/features/schedule_spec.rb
|
|
497
504
|
- spec/features/testing_spec.rb
|
|
498
505
|
- spec/features/vue_admin_spec.rb
|
|
506
|
+
- spec/front_end_vite_spec.rb
|
|
499
507
|
- spec/spec_helper.rb
|
|
500
508
|
- spec/support/fake_github.rb
|
|
501
509
|
- spec/support/fake_heroku.rb
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import axios, { type AxiosRequestTransformer, type AxiosResponseTransformer } from 'axios';
|
|
2
|
-
import convertKeys from '../utils/case-converter';
|
|
3
|
-
|
|
4
|
-
const api = axios.create({
|
|
5
|
-
transformRequest: [
|
|
6
|
-
(data: any) => convertKeys(data, 'decamelize'),
|
|
7
|
-
...(axios.defaults.transformRequest as AxiosRequestTransformer[]),
|
|
8
|
-
],
|
|
9
|
-
transformResponse: [
|
|
10
|
-
...(axios.defaults.transformResponse as AxiosResponseTransformer[]),
|
|
11
|
-
(data: any) => convertKeys(data, 'camelize'),
|
|
12
|
-
],
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export default api;
|
|
16
|
-
|
|
17
|
-
/*
|
|
18
|
-
// Example to use the api object in the path ´app/javascript/api/users.ts´
|
|
19
|
-
|
|
20
|
-
import api from './index';
|
|
21
|
-
|
|
22
|
-
export default {
|
|
23
|
-
index() {
|
|
24
|
-
const path = '/api/internal/users';
|
|
25
|
-
|
|
26
|
-
return api({
|
|
27
|
-
method: 'get',
|
|
28
|
-
url: path,
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
create(data: Partial<User>) {
|
|
32
|
-
const path = '/api/internal/users';
|
|
33
|
-
|
|
34
|
-
return api({
|
|
35
|
-
method: 'post',
|
|
36
|
-
url: path,
|
|
37
|
-
data: {
|
|
38
|
-
user: data,
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
},
|
|
42
|
-
update(data: Partial<User>) {
|
|
43
|
-
const path = `/api/internal/users/${data.id}`;
|
|
44
|
-
|
|
45
|
-
return api({
|
|
46
|
-
method: 'put',
|
|
47
|
-
url: path,
|
|
48
|
-
data: {
|
|
49
|
-
user: data,
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
*/
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const vueConfig = require('./vue');
|
|
2
|
-
const cssConfig = require('./css');
|
|
3
|
-
const jQueryConfig = require('./jquery');
|
|
4
|
-
const typescriptConfig = require('./typescript');
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
vueConfig,
|
|
8
|
-
cssConfig,
|
|
9
|
-
jQueryConfig,
|
|
10
|
-
typescriptConfig,
|
|
11
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
module: {
|
|
5
|
-
rules: [
|
|
6
|
-
{
|
|
7
|
-
test: /\.ts$/,
|
|
8
|
-
loader: 'ts-loader',
|
|
9
|
-
exclude: /node_modules/,
|
|
10
|
-
options: {
|
|
11
|
-
appendTsSuffixTo: [/\.vue$/],
|
|
12
|
-
transpileOnly: true,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
},
|
|
17
|
-
resolve: {
|
|
18
|
-
extensions: ['.ts'],
|
|
19
|
-
},
|
|
20
|
-
plugins: [
|
|
21
|
-
new ForkTsCheckerWebpackPlugin({
|
|
22
|
-
typescript: {
|
|
23
|
-
extensions: {
|
|
24
|
-
vue: {
|
|
25
|
-
enabled: true,
|
|
26
|
-
compiler: '@vue/compiler-sfc',
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
}),
|
|
31
|
-
],
|
|
32
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const { VueLoaderPlugin } = require('vue-loader')
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
module: {
|
|
5
|
-
rules: [
|
|
6
|
-
{
|
|
7
|
-
test: /\.vue$/,
|
|
8
|
-
loader: 'vue-loader'
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
plugins: [new VueLoaderPlugin()],
|
|
13
|
-
resolve: {
|
|
14
|
-
extensions: ['.vue'],
|
|
15
|
-
alias: {
|
|
16
|
-
'vue$': 'vue/dist/vue.esm-bundler.js',
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
}
|