Skip to content

Commit 8397eb2

Browse files
authored
Remove rollup and test machinery for rails-ujs (rails#50535)
This leaves only the final compiled targets in place.
1 parent 66c1745 commit 8397eb2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+14
-4356
lines changed

.github/workflows/lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
lint:
1010
runs-on: ubuntu-latest
1111
env:
12-
BUNDLE_WITHOUT: db:job:cable:storage:ujs
12+
BUNDLE_WITHOUT: db:job:cable:storage
1313

1414
steps:
1515
- uses: actions/checkout@v4
@@ -33,7 +33,7 @@ jobs:
3333
python -m pip install --upgrade pip
3434
pip install codespell==2.1.0
3535
- name: Check spelling with codespell
36-
run: codespell --ignore-words=codespell.txt --skip="./vendor/bundle,./actionview/test/ujs/public/vendor/qunit.js,./actiontext/app/assets/javascripts/trix.js,./yarn.lock" || exit 1
36+
run: codespell --ignore-words=codespell.txt --skip="./vendor/bundle,./actiontext/app/assets/javascripts/trix.js,./yarn.lock" || exit 1
3737

3838
- run: tools/railspect changelogs .
3939
- run: tools/railspect configuration .

.github/workflows/rails-new-docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ permissions:
88
env:
99
APP_NAME: devrails
1010
APP_PATH: dev/devrails
11-
BUNDLE_WITHOUT: db:job:cable:storage:ujs
11+
BUNDLE_WITHOUT: db:job:cable:storage
1212

1313
jobs:
1414
rails-new-docker:

RELEASING_RAILS.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ for setup instructions.
8282

8383
IMPORTANT: Several gems have JavaScript components that are released as npm
8484
packages, so you must have Node.js installed, have an npm account (npmjs.com),
85-
and be a package owner for `@rails/actioncable`, `@rails/actiontext`,
86-
`@rails/activestorage`, and `@rails/ujs`. You can check this by making sure your
85+
and be a package owner for `@rails/actioncable`, `@rails/actiontext`, and
86+
`@rails/activestorage`. You can check this by making sure your
8787
npm user (`npm whoami`) is listed as an owner (`npm owner ls <pkg>`) of each
8888
package. Do not release until you're set up with npm!
8989

actionview/.eslintrc

-23
This file was deleted.

actionview/.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/lib/assets/compiled/
2-
/test/ujs/compiled/
32
/log/
43
/test/fixtures/public/absolute/
5-
/test/ujs/log/
64
/tmp/

actionview/RUNNING_UJS_TESTS.rdoc

-9
This file was deleted.

actionview/Rakefile

-48
Original file line numberDiff line numberDiff line change
@@ -30,46 +30,6 @@ namespace :test do
3030
t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION)
3131
end
3232

33-
desc "Run tests for rails-ujs"
34-
task :ujs do
35-
system("npm run lint")
36-
exit $?.exitstatus unless $?.success?
37-
38-
begin
39-
listen_host = "localhost"
40-
listen_port = "4567"
41-
42-
FileUtils.mkdir_p("log")
43-
pid = File.open("log/test.log", "w") do |f|
44-
spawn(*%W(rackup test/ujs/config.ru -o #{listen_host} -p #{listen_port} -s puma), out: f, err: f, pgroup: true)
45-
end
46-
47-
start_time = Time.now
48-
49-
loop do
50-
break if system("lsof -i :4567", 1 => File::NULL)
51-
52-
if Time.now - start_time > 5
53-
puts "Failed to start puma after 5 seconds"
54-
puts
55-
puts File.read("log/test.log")
56-
exit 1
57-
end
58-
59-
sleep 0.2
60-
end
61-
# Decode the obfuscate environment variables
62-
decoded_environment_variables = Hash[*Base64.decode64(ENV.fetch("ENCODED", "")).split(/[ =]/)]
63-
system(decoded_environment_variables, "npm", "test")
64-
status = $?.exitstatus
65-
ensure
66-
Process.kill("KILL", -pid) if pid
67-
FileUtils.rm_rf("log")
68-
end
69-
70-
exit status
71-
end
72-
7333
namespace :integration do
7434
# Active Record Integration Tests
7535
Rake::TestTask.new(:active_record) do |t|
@@ -91,14 +51,6 @@ namespace :test do
9151
end
9252
end
9353

94-
namespace :ujs do
95-
desc "Starts the test server"
96-
task :server do
97-
spawn("bundle", "exec", "rackup", "test/ujs/config.ru", "-p", "4567", "-s", "puma")
98-
system("npm", "test", "--", "--no-single-run", "--browsers", "Chrome")
99-
end
100-
end
101-
10254
task :lines do
10355
load File.expand_path("../tools/line_statistics", __dir__)
10456
files = FileList["lib/**/*.rb"]

actionview/app/javascript/MIT-LICENSE

-20
This file was deleted.

actionview/app/javascript/README.md

-61
This file was deleted.

actionview/app/javascript/rails-ujs/features/confirm.js

-33
This file was deleted.

actionview/app/javascript/rails-ujs/features/disable.js

-128
This file was deleted.

0 commit comments

Comments
 (0)