shakapacker 6.0.0.rc.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +7 -0
  2. data/.eslintignore +4 -0
  3. data/.eslintrc.js +14 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +20 -0
  5. data/.github/ISSUE_TEMPLATE/feature-request.md +18 -0
  6. data/.github/workflows/jest.yml +30 -0
  7. data/.github/workflows/js-lint.yml +31 -0
  8. data/.github/workflows/rubocop.yml +39 -0
  9. data/.github/workflows/ruby.yml +48 -0
  10. data/.gitignore +13 -0
  11. data/.node-version +1 -0
  12. data/.rubocop.yml +229 -0
  13. data/CHANGELOG.md +32 -0
  14. data/CONTRIBUTING.md +62 -0
  15. data/Gemfile +13 -0
  16. data/Gemfile.lock +183 -0
  17. data/MIT-LICENSE +20 -0
  18. data/README.md +666 -0
  19. data/Rakefile +11 -0
  20. data/config/README.md +3 -0
  21. data/config/webpacker.yml +1 -0
  22. data/docs/customizing_babel_config.md +59 -0
  23. data/docs/deployment.md +116 -0
  24. data/docs/developing_webpacker.md +29 -0
  25. data/docs/troubleshooting.md +212 -0
  26. data/docs/v6_upgrade.md +158 -0
  27. data/gemfiles/Gemfile-rails-edge +12 -0
  28. data/gemfiles/Gemfile-rails.5.2.x +9 -0
  29. data/gemfiles/Gemfile-rails.6.0.x +9 -0
  30. data/gemfiles/Gemfile-rails.6.1.x +12 -0
  31. data/lib/install/application.js +15 -0
  32. data/lib/install/bin/webpacker +15 -0
  33. data/lib/install/bin/webpacker-dev-server +18 -0
  34. data/lib/install/bin/yarn +18 -0
  35. data/lib/install/binstubs.rb +4 -0
  36. data/lib/install/config/webpack/webpack.config.js +5 -0
  37. data/lib/install/config/webpacker.yml +64 -0
  38. data/lib/install/package.json +15 -0
  39. data/lib/install/template.rb +100 -0
  40. data/lib/shakapacker/utils/git_utils.rb +23 -0
  41. data/lib/shakapacker/utils/version_syntax_converter.rb +24 -0
  42. data/lib/tasks/webpacker/binstubs.rake +15 -0
  43. data/lib/tasks/webpacker/check_binstubs.rake +12 -0
  44. data/lib/tasks/webpacker/check_node.rake +31 -0
  45. data/lib/tasks/webpacker/check_yarn.rake +33 -0
  46. data/lib/tasks/webpacker/clean.rake +25 -0
  47. data/lib/tasks/webpacker/clobber.rake +20 -0
  48. data/lib/tasks/webpacker/compile.rake +45 -0
  49. data/lib/tasks/webpacker/info.rake +21 -0
  50. data/lib/tasks/webpacker/install.rake +17 -0
  51. data/lib/tasks/webpacker/verify_config.rake +14 -0
  52. data/lib/tasks/webpacker/verify_install.rake +4 -0
  53. data/lib/tasks/webpacker/yarn_install.rake +18 -0
  54. data/lib/tasks/webpacker.rake +19 -0
  55. data/lib/tasks/yarn.rake +38 -0
  56. data/lib/webpacker/commands.rb +79 -0
  57. data/lib/webpacker/compiler.rb +130 -0
  58. data/lib/webpacker/configuration.rb +111 -0
  59. data/lib/webpacker/dev_server.rb +72 -0
  60. data/lib/webpacker/dev_server_proxy.rb +33 -0
  61. data/lib/webpacker/dev_server_runner.rb +96 -0
  62. data/lib/webpacker/env.rb +43 -0
  63. data/lib/webpacker/helper.rb +161 -0
  64. data/lib/webpacker/instance.rb +41 -0
  65. data/lib/webpacker/manifest.rb +120 -0
  66. data/lib/webpacker/railtie.rb +63 -0
  67. data/lib/webpacker/runner.rb +23 -0
  68. data/lib/webpacker/version.rb +4 -0
  69. data/lib/webpacker/webpack_runner.rb +58 -0
  70. data/lib/webpacker.rb +46 -0
  71. data/package/__tests__/config.js +34 -0
  72. data/package/__tests__/dev_server.js +45 -0
  73. data/package/__tests__/development.js +35 -0
  74. data/package/__tests__/env.js +58 -0
  75. data/package/__tests__/index.js +9 -0
  76. data/package/__tests__/production.js +29 -0
  77. data/package/__tests__/staging.js +30 -0
  78. data/package/__tests__/test.js +25 -0
  79. data/package/babel/preset.js +41 -0
  80. data/package/config.js +32 -0
  81. data/package/configPath.js +3 -0
  82. data/package/dev_server.js +20 -0
  83. data/package/env.js +27 -0
  84. data/package/environments/__tests__/base.js +69 -0
  85. data/package/environments/base.js +116 -0
  86. data/package/environments/development.js +55 -0
  87. data/package/environments/production.js +79 -0
  88. data/package/environments/test.js +3 -0
  89. data/package/index.js +33 -0
  90. data/package/inliningCss.js +7 -0
  91. data/package/rules/babel.js +30 -0
  92. data/package/rules/coffee.js +6 -0
  93. data/package/rules/css.js +3 -0
  94. data/package/rules/erb.js +15 -0
  95. data/package/rules/file.js +23 -0
  96. data/package/rules/index.js +18 -0
  97. data/package/rules/less.js +22 -0
  98. data/package/rules/raw.js +5 -0
  99. data/package/rules/sass.js +16 -0
  100. data/package/rules/stylus.js +26 -0
  101. data/package/utils/get_style_rule.js +37 -0
  102. data/package/utils/helpers.js +51 -0
  103. data/package.json +71 -0
  104. data/rakelib/release.rake +57 -0
  105. data/test/command_test.rb +109 -0
  106. data/test/compiler_test.rb +68 -0
  107. data/test/configuration_test.rb +78 -0
  108. data/test/dev_server_runner_test.rb +81 -0
  109. data/test/dev_server_test.rb +47 -0
  110. data/test/engine_rake_tasks_test.rb +39 -0
  111. data/test/env_test.rb +23 -0
  112. data/test/helper_test.rb +159 -0
  113. data/test/manifest_test.rb +89 -0
  114. data/test/mounted_app/Rakefile +4 -0
  115. data/test/mounted_app/test/dummy/Rakefile +3 -0
  116. data/test/mounted_app/test/dummy/bin/rails +3 -0
  117. data/test/mounted_app/test/dummy/bin/rake +3 -0
  118. data/test/mounted_app/test/dummy/config/application.rb +10 -0
  119. data/test/mounted_app/test/dummy/config/environment.rb +3 -0
  120. data/test/mounted_app/test/dummy/config/webpacker.yml +75 -0
  121. data/test/mounted_app/test/dummy/config.ru +5 -0
  122. data/test/mounted_app/test/dummy/package.json +7 -0
  123. data/test/rake_tasks_test.rb +71 -0
  124. data/test/test_app/Rakefile +3 -0
  125. data/test/test_app/app/packs/entrypoints/application.js +10 -0
  126. data/test/test_app/app/packs/entrypoints/multi_entry.css +4 -0
  127. data/test/test_app/app/packs/entrypoints/multi_entry.js +4 -0
  128. data/test/test_app/bin/webpacker +14 -0
  129. data/test/test_app/bin/webpacker-dev-server +14 -0
  130. data/test/test_app/config/application.rb +11 -0
  131. data/test/test_app/config/environment.rb +4 -0
  132. data/test/test_app/config/initializers/inspect_autoload_paths.rb +1 -0
  133. data/test/test_app/config/webpack/webpack.config.js +0 -0
  134. data/test/test_app/config/webpacker.yml +77 -0
  135. data/test/test_app/config/webpacker_other_location.yml +79 -0
  136. data/test/test_app/config/webpacker_public_root.yml +18 -0
  137. data/test/test_app/config.ru +5 -0
  138. data/test/test_app/package.json +13 -0
  139. data/test/test_app/public/packs/manifest.json +50 -0
  140. data/test/test_app/some.config.js +0 -0
  141. data/test/test_app/yarn.lock +11 -0
  142. data/test/test_helper.rb +33 -0
  143. data/test/webpack_runner_test.rb +57 -0
  144. data/test/webpacker_test.rb +34 -0
  145. data/webpacker.gemspec +31 -0
  146. data/yarn.lock +4029 -0
  147. metadata +331 -0
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ ENV["RAILS_ENV"] ||= "development"
4
+ ENV["NODE_ENV"] ||= ENV["RAILS_ENV"]
5
+
6
+ require "pathname"
7
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
8
+ Pathname.new(__FILE__).realpath)
9
+
10
+ require "bundler/setup"
11
+
12
+ require "webpacker"
13
+ require "webpacker/webpack_runner"
14
+ Webpacker::WebpackRunner.run(ARGV)
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ ENV["RAILS_ENV"] ||= "development"
4
+ ENV["NODE_ENV"] ||= ENV["RAILS_ENV"]
5
+
6
+ require "pathname"
7
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
8
+ Pathname.new(__FILE__).realpath)
9
+
10
+ require "bundler/setup"
11
+
12
+ require "webpacker"
13
+ require "webpacker/dev_server_runner"
14
+ Webpacker::DevServerRunner.run(ARGV)
@@ -0,0 +1,11 @@
1
+ require "action_controller/railtie"
2
+ require "action_view/railtie"
3
+ require "webpacker"
4
+
5
+ module TestApp
6
+ class Application < ::Rails::Application
7
+ config.secret_key_base = "abcdef"
8
+ config.eager_load = true
9
+ config.active_support.test_order = :sorted
10
+ end
11
+ end
@@ -0,0 +1,4 @@
1
+ require_relative "application"
2
+
3
+ Rails.backtrace_cleaner.remove_silencers!
4
+ Rails.application.initialize!
@@ -0,0 +1 @@
1
+ $test_app_autoload_paths_in_initializer = ActiveSupport::Dependencies.autoload_paths
File without changes
@@ -0,0 +1,77 @@
1
+ # Note: You must restart bin/webpacker-dev-server for changes to take effect
2
+
3
+ default: &default
4
+ source_path: app/packs
5
+ source_entry_path: entrypoints
6
+ public_root_path: public
7
+ public_output_path: packs
8
+ cache_path: tmp/webpacker
9
+ webpack_compile_output: false
10
+
11
+ # Additional paths webpack should look up modules
12
+ # ['app/assets', 'engine/foo/app/assets']
13
+ additional_paths:
14
+ - app/assets
15
+ - /etc/yarn
16
+ - some.config.js
17
+ - app/elm
18
+
19
+ # Reload manifest.json on all requests so we reload latest compiled packs
20
+ cache_manifest: false
21
+
22
+ static_assets_extensions:
23
+ - .jpg
24
+ - .jpeg
25
+ - .png
26
+ - .gif
27
+ - .tiff
28
+ - .ico
29
+ - .svg
30
+
31
+ extensions:
32
+ - .mjs
33
+ - .js
34
+
35
+ development:
36
+ <<: *default
37
+ compile: true
38
+
39
+ # Reference: https://webpack.js.org/configuration/dev-server/
40
+ dev_server:
41
+ https: false
42
+ host: localhost
43
+ port: 3035
44
+ public: localhost:3035
45
+ hmr: false
46
+ overlay: true
47
+ disable_host_check: true
48
+ use_local_ip: false
49
+ pretty: false
50
+
51
+ test:
52
+ <<: *default
53
+ compile: true
54
+
55
+ # Compile test packs to a separate directory
56
+ public_output_path: packs-test
57
+
58
+ production:
59
+ <<: *default
60
+
61
+ # Production depends on precompilation of packs prior to booting for performance.
62
+ compile: false
63
+
64
+ # Cache manifest.json for performance
65
+ cache_manifest: true
66
+
67
+ staging:
68
+ <<: *default
69
+
70
+ # Production depends on precompilation of packs prior to booting for performance.
71
+ compile: false
72
+
73
+ # Cache manifest.json for performance
74
+ cache_manifest: true
75
+
76
+ # Compile staging packs to a separate directory
77
+ public_output_path: packs-staging
@@ -0,0 +1,79 @@
1
+ # Note: You must restart bin/webpacker-dev-server for changes to take effect
2
+
3
+ default: &default
4
+ source_path: app/packs
5
+ source_entry_path: entrypoints
6
+ public_root_path: public
7
+ public_output_path: packs
8
+ cache_path: tmp/cache/webpacker
9
+ webpack_compile_output: false
10
+
11
+ # Additional paths webpack should look up modules
12
+ # ['app/assets', 'engine/foo/app/assets']
13
+ additional_paths:
14
+ - app/assets
15
+ - /etc/yarn
16
+ - some.config.js
17
+ - app/elm
18
+
19
+ # Reload manifest.json on all requests so we reload latest compiled packs
20
+ cache_manifest: false
21
+
22
+ static_assets_extensions:
23
+ - .jpg
24
+ - .jpeg
25
+ - .png
26
+ - .gif
27
+ - .tiff
28
+ - .ico
29
+ - .svg
30
+
31
+ extensions:
32
+ - .mjs
33
+ - .js
34
+
35
+ development:
36
+ <<: *default
37
+ compile: true
38
+
39
+ # Reference: https://webpack.js.org/configuration/dev-server/
40
+ dev_server:
41
+ https: false
42
+ host: localhost
43
+ port: 3035
44
+ public: localhost:3035
45
+ hmr: false
46
+ # Inline should be set to true if using HMR
47
+ inline: true
48
+ overlay: true
49
+ disable_host_check: true
50
+ use_local_ip: false
51
+ pretty: false
52
+
53
+ test:
54
+ <<: *default
55
+ compile: true
56
+
57
+ # Compile test packs to a separate directory
58
+ public_output_path: packs-test
59
+
60
+ production:
61
+ <<: *default
62
+
63
+ # Production depends on precompilation of packs prior to booting for performance.
64
+ compile: false
65
+
66
+ # Cache manifest.json for performance
67
+ cache_manifest: true
68
+
69
+ staging:
70
+ <<: *default
71
+
72
+ # Production depends on precompilation of packs prior to booting for performance.
73
+ compile: false
74
+
75
+ # Cache manifest.json for performance
76
+ cache_manifest: true
77
+
78
+ # Compile staging packs to a separate directory
79
+ public_output_path: packs-staging
@@ -0,0 +1,18 @@
1
+ # Note: You must restart bin/webpacker-dev-server for changes to take effect
2
+
3
+ default: &default
4
+ public_root_path: ../public
5
+
6
+ development:
7
+ <<: *default
8
+ compile: true
9
+
10
+ test:
11
+ <<: *default
12
+ compile: true
13
+ public_output_path: packs-test
14
+
15
+ production:
16
+ <<: *default
17
+ compile: false
18
+ cache_manifest: true
@@ -0,0 +1,5 @@
1
+ # This file allows the `Rails.root` to be correctly determined.
2
+
3
+ require_relative "config/environment"
4
+
5
+ run Rails.application
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "test_app",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "license": "MIT",
6
+ "private": true,
7
+ "dependencies": {
8
+ "left-pad": "^1.2.0"
9
+ },
10
+ "devDependencies": {
11
+ "right-pad": "^1.0.1"
12
+ }
13
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "bootstrap.css": "/packs/bootstrap-c38deda30895059837cf.css",
3
+ "application.css": "/packs/application-dd6b1cd38bfa093df600.css",
4
+ "bootstrap.js": "/packs/bootstrap-300631c4f0e0f9c865bc.js",
5
+ "application.js": "/packs/application-k344a6d59eef8632c9d1.js",
6
+ "application.png": "/packs/application-k344a6d59eef8632c9d1.png",
7
+ "fonts/fa-regular-400.woff2": "/packs/fonts/fa-regular-400-944fb546bd7018b07190a32244f67dc9.woff2",
8
+ "static/image.jpg": "/packs/static/image-c38deda30895059837cf.jpg",
9
+ "static/image-2x.jpg": "/packs/static/image-2x-7cca48e6cae66ec07b8e.jpg",
10
+ "static/nested/image.jpg": "/packs/static/nested/image-c38deda30895059837cf.jpg",
11
+ "static/mb-icon.png": "/packs/static/mb-icon-c38deda30895059837cf.png",
12
+ "static/nested/mb-icon.png": "/packs/static/nested/mb-icon-c38deda30895059837cf.png",
13
+ "entrypoints": {
14
+ "application": {
15
+ "assets": {
16
+ "js": [
17
+ "/packs/vendors~application~bootstrap-c20632e7baf2c81200d3.chunk.js",
18
+ "/packs/vendors~application-e55f2aae30c07fb6d82a.chunk.js",
19
+ "/packs/application-k344a6d59eef8632c9d1.js"
20
+ ],
21
+ "css": [
22
+ "/packs/1-c20632e7baf2c81200d3.chunk.css",
23
+ "/packs/application-k344a6d59eef8632c9d1.chunk.css"
24
+ ]
25
+ }
26
+ },
27
+ "bootstrap": {
28
+ "assets": {
29
+ "js": [
30
+ "/packs/bootstrap-300631c4f0e0f9c865bc.js"
31
+ ]
32
+ }
33
+ },
34
+ "hello_stimulus": {
35
+ "assets": {
36
+ "css": [
37
+ "/packs/1-c20632e7baf2c81200d3.chunk.css",
38
+ "/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css"
39
+ ]
40
+ }
41
+ },
42
+ "print/application": {
43
+ "assets": {
44
+ "css": [
45
+ "/packs/print/application-983b6c164a47f7ed49cd.css"
46
+ ]
47
+ }
48
+ }
49
+ }
50
+ }
File without changes
@@ -0,0 +1,11 @@
1
+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+ # yarn lockfile v1
3
+
4
+
5
+ left-pad@^1.2.0:
6
+ version "1.2.0"
7
+ resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee"
8
+
9
+ right-pad@^1.0.1:
10
+ version "1.0.1"
11
+ resolved "https://registry.yarnpkg.com/right-pad/-/right-pad-1.0.1.tgz#8ca08c2cbb5b55e74dafa96bf7fd1a27d568c8d0"
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+ require "minitest/autorun"
3
+ require "rails"
4
+ require "rails/test_help"
5
+ require "byebug"
6
+
7
+ require_relative "test_app/config/environment"
8
+
9
+ Rails.env = "production"
10
+
11
+ Webpacker.instance = ::Webpacker::Instance.new
12
+
13
+ class Webpacker::Test < Minitest::Test
14
+ private
15
+ def reloaded_config
16
+ Webpacker.instance.instance_variable_set(:@env, nil)
17
+ Webpacker.instance.instance_variable_set(:@config, nil)
18
+ Webpacker.instance.instance_variable_set(:@dev_server, nil)
19
+ Webpacker.env
20
+ Webpacker.config
21
+ Webpacker.dev_server
22
+ end
23
+
24
+ def with_rails_env(env)
25
+ original = Rails.env
26
+ Rails.env = ActiveSupport::StringInquirer.new(env)
27
+ reloaded_config
28
+ yield
29
+ ensure
30
+ Rails.env = ActiveSupport::StringInquirer.new(original)
31
+ reloaded_config
32
+ end
33
+ end
@@ -0,0 +1,57 @@
1
+ require "test_helper"
2
+ require "webpacker/webpack_runner"
3
+
4
+ class WebpackRunnerTest < Webpacker::Test
5
+ def setup
6
+ @original_node_env, ENV["NODE_ENV"] = ENV["NODE_ENV"], "development"
7
+ @original_rails_env, ENV["RAILS_ENV"] = ENV["RAILS_ENV"], "development"
8
+ end
9
+
10
+ def teardown
11
+ ENV["NODE_ENV"] = @original_node_env
12
+ ENV["RAILS_ENV"] = @original_rails_env
13
+ end
14
+
15
+ def test_run_cmd_via_node_modules
16
+ cmd = ["#{test_app_path}/node_modules/.bin/webpack", "--config", "#{test_app_path}/config/webpack/webpack.config.js"]
17
+
18
+ verify_command(cmd, use_node_modules: true)
19
+ end
20
+
21
+ def test_run_cmd_via_yarn
22
+ cmd = ["yarn", "webpack", "--config", "#{test_app_path}/config/webpack/webpack.config.js"]
23
+
24
+ verify_command(cmd, use_node_modules: false)
25
+ end
26
+
27
+ def test_run_cmd_argv
28
+ cmd = ["#{test_app_path}/node_modules/.bin/webpack", "--config", "#{test_app_path}/config/webpack/webpack.config.js", "--watch"]
29
+
30
+ verify_command(cmd, argv: ["--watch"])
31
+ end
32
+
33
+ private
34
+ def test_app_path
35
+ File.expand_path("test_app", __dir__)
36
+ end
37
+
38
+ def verify_command(cmd, use_node_modules: true, argv: [])
39
+ cwd = Dir.pwd
40
+ Dir.chdir(test_app_path)
41
+
42
+ klass = Webpacker::WebpackRunner
43
+ instance = klass.new(argv)
44
+ mock = Minitest::Mock.new
45
+ mock.expect(:call, nil, [Webpacker::Compiler.env, *cmd])
46
+
47
+ klass.stub(:new, instance) do
48
+ instance.stub(:node_modules_bin_exist?, use_node_modules) do
49
+ Kernel.stub(:exec, mock) { klass.run(argv) }
50
+ end
51
+ end
52
+
53
+ mock.verify
54
+ ensure
55
+ Dir.chdir(cwd)
56
+ end
57
+ end
@@ -0,0 +1,34 @@
1
+ require "test_helper"
2
+
3
+ class WebpackerTest < Webpacker::Test
4
+ def test_config_params
5
+ assert_equal Rails.env, Webpacker.config.env
6
+ assert_equal Webpacker.instance.root_path, Webpacker.config.root_path
7
+ assert_equal Webpacker.instance.config_path, Webpacker.config.config_path
8
+
9
+ with_rails_env("test") do
10
+ assert_equal "test", Webpacker.config.env
11
+ end
12
+ end
13
+
14
+ def test_inline_css_no_dev_server
15
+ assert !Webpacker.inlining_css?
16
+ end
17
+
18
+ def test_inline_css_with_hmr
19
+ dev_server = Webpacker::DevServer.new({})
20
+ def dev_server.host; "localhost"; end
21
+ def dev_server.port; "3035"; end
22
+ def dev_server.pretty?; false; end
23
+ def dev_server.https?; true; end
24
+ def dev_server.hmr?; true; end
25
+ def dev_server.running?; true; end
26
+ Webpacker.instance.stub(:dev_server, dev_server) do
27
+ assert Webpacker.inlining_css?
28
+ end
29
+ end
30
+
31
+ def test_app_autoload_paths_cleanup
32
+ assert_empty $test_app_autoload_paths_in_initializer
33
+ end
34
+ end
data/webpacker.gemspec ADDED
@@ -0,0 +1,31 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+ require "webpacker/version"
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "shakapacker"
6
+ s.version = Webpacker::VERSION
7
+ s.authors = [ "David Heinemeier Hansson", "Gaurav Tiwari", "Justin Gordon" ]
8
+ s.email = [ "david@basecamp.com", "gaurav@gauravtiwari.co.uk", "justin@shakacode.com" ]
9
+ s.summary = "Use webpack to manage app-like JavaScript modules in Rails"
10
+ s.homepage = "https://github.com/shakacode/shakapacker"
11
+ s.license = "MIT"
12
+
13
+ npm_version = Webpacker::VERSION.gsub(".rc", "-rc")
14
+ s.metadata = {
15
+ "source_code_uri" => "https://github.com/shakacode/shakapacker/tree/v#{npm_version}",
16
+ }
17
+
18
+ s.required_ruby_version = ">= 2.7.0"
19
+
20
+ s.add_dependency "activesupport", ">= 5.2"
21
+ s.add_dependency "railties", ">= 5.2"
22
+ s.add_dependency "rack-proxy", ">= 0.6.1"
23
+ s.add_dependency "semantic_range", ">= 2.3.0"
24
+
25
+ s.add_development_dependency "bundler", ">= 1.3.0"
26
+ s.add_development_dependency "rubocop"
27
+ s.add_development_dependency "rubocop-performance"
28
+
29
+ s.files = `git ls-files`.split("\n")
30
+ s.test_files = `git ls-files -- test/*`.split("\n")
31
+ end