chrome_devtools_rails 0.1.0 → 0.2.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/LICENSE +21 -0
- data/README.md +10 -8
- data/Rakefile +8 -6
- data/lib/chrome_devtools_rails/engine.rb +2 -0
- data/lib/chrome_devtools_rails/version.rb +1 -1
- data/lib/chrome_devtools_rails.rb +29 -0
- metadata +9 -11
- data/CHANGELOG.md +0 -14
- data/MIT-LICENSE +0 -20
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9c381d4a513a6e86b1421ef6b69b91f89890772fd3e0722ac9ab30fed11f60c6
|
|
4
|
+
data.tar.gz: 6795b53860fc2af2e34195868cd2a52cb24e44d7f8ec1b8359c94ac1777a87c2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cfa03fc5f125c04ce9e3f4796b60d244289c373f7d07e2a797e2d09fe3c532119ade82fa047dc1ba28c083ee786e7cd0285ce586faa9c4f11f0e9cfaf83eb7db
|
|
7
|
+
data.tar.gz: 512dfb00464bf454619d392c57f3affe8f8c8c2128d0c67721d5f88abf2098c2018471a8d60566d576fe070a74cb6bcc8ecdf81556476a933bc5d44dcc9425d6
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Daniel
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
|
@@ -12,6 +12,14 @@ This engine is **automatically mounted** and only active in **development mode**
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
## ⚠️ Rails 8.2+ ships this natively
|
|
16
|
+
|
|
17
|
+
As of **Rails 8.2**, Rails serves this endpoint itself through a built-in `Rails::DevToolsController` ([rails/rails#56245](https://github.com/rails/rails/pull/56245)). On Rails 8.2 or newer, uncomment the generated devtools route in `config/routes.rb` and you no longer need this gem.
|
|
18
|
+
|
|
19
|
+
This gem is still useful on **Rails 8.0 and 8.1**, which have no native support. When it detects Rails 8.2+, it keeps serving the endpoint but emits a deprecation warning so you know you can switch to the native controller and drop the dependency.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
15
23
|
## 🚀 Usage
|
|
16
24
|
|
|
17
25
|
1. Visit your Rails app on `localhost`.
|
|
@@ -41,7 +49,7 @@ No route configuration is needed — the engine mounts itself automatically in d
|
|
|
41
49
|
|
|
42
50
|
## ✅ Requirements
|
|
43
51
|
|
|
44
|
-
- Ruby ≥ 3.
|
|
52
|
+
- Ruby ≥ 3.2
|
|
45
53
|
- Rails ≥ 8.0.2
|
|
46
54
|
- Google Chrome v89+ (with DevTools workspace support)
|
|
47
55
|
|
|
@@ -51,14 +59,8 @@ No route configuration is needed — the engine mounts itself automatically in d
|
|
|
51
59
|
|
|
52
60
|
Pull requests are welcome on GitHub at [https://github.com/6temes/chrome_devtools_rails](https://github.com/6temes/chrome_devtools_rails).
|
|
53
61
|
|
|
54
|
-
Ideas for improvement:
|
|
55
|
-
|
|
56
|
-
- Add support for regenerating the UUID
|
|
57
|
-
- Configurable root path
|
|
58
|
-
- Rake task or generator to inspect the current workspace config
|
|
59
|
-
|
|
60
62
|
---
|
|
61
63
|
|
|
62
64
|
## 📄 License
|
|
63
65
|
|
|
64
|
-
This gem is open source and released under the [MIT License](https://opensource.org/licenses/MIT).
|
|
66
|
+
This gem is open source and released under the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
require "bundler/
|
|
2
|
-
|
|
3
|
-
APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
|
|
4
|
-
load "rails/tasks/engine.rake"
|
|
1
|
+
require "bundler/gem_tasks"
|
|
2
|
+
require "rake/testtask"
|
|
5
3
|
|
|
6
|
-
|
|
4
|
+
Rake::TestTask.new(:test) do |t|
|
|
5
|
+
t.libs << "test"
|
|
6
|
+
t.pattern = "test/**/*_test.rb"
|
|
7
|
+
t.verbose = false
|
|
8
|
+
end
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
task default: :test
|
|
@@ -1,2 +1,31 @@
|
|
|
1
1
|
require "chrome_devtools_rails/version"
|
|
2
2
|
require "chrome_devtools_rails/engine"
|
|
3
|
+
|
|
4
|
+
module ChromeDevtoolsRails
|
|
5
|
+
# Rails serves /.well-known/appspecific/com.chrome.devtools.json natively from
|
|
6
|
+
# this version on, via the built-in Rails::DevToolsController, which makes this
|
|
7
|
+
# gem unnecessary. See https://github.com/rails/rails/pull/56245.
|
|
8
|
+
RAILS_NATIVE_SUPPORT_VERSION = Gem::Version.new("8.2")
|
|
9
|
+
|
|
10
|
+
def self.deprecator
|
|
11
|
+
@_deprecator ||= ActiveSupport::Deprecation.new("1.0", "chrome_devtools_rails")
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def self.superseded_by_rails?
|
|
15
|
+
Rails.gem_version >= RAILS_NATIVE_SUPPORT_VERSION
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Emitted at boot once Rails ships its own endpoint, so apps know they can drop
|
|
19
|
+
# the gem. The route is still served, so nothing breaks on upgrade — this only
|
|
20
|
+
# nudges migration to the native controller.
|
|
21
|
+
def self.warn_if_superseded
|
|
22
|
+
return unless superseded_by_rails?
|
|
23
|
+
|
|
24
|
+
deprecator.warn(
|
|
25
|
+
"chrome_devtools_rails is no longer needed on Rails #{Rails.version}: Rails serves " \
|
|
26
|
+
"/.well-known/appspecific/com.chrome.devtools.json natively via Rails::DevToolsController. " \
|
|
27
|
+
"Uncomment the devtools route in config/routes.rb and remove this gem from your Gemfile. " \
|
|
28
|
+
"See https://github.com/rails/rails/pull/56245."
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
end
|
metadata
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chrome_devtools_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
7
|
+
- Daniel López Prat
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
@@ -38,8 +38,7 @@ executables: []
|
|
|
38
38
|
extensions: []
|
|
39
39
|
extra_rdoc_files: []
|
|
40
40
|
files:
|
|
41
|
-
-
|
|
42
|
-
- MIT-LICENSE
|
|
41
|
+
- LICENSE
|
|
43
42
|
- README.md
|
|
44
43
|
- Rakefile
|
|
45
44
|
- app/controllers/chrome_devtools_rails/devtools_controller.rb
|
|
@@ -50,11 +49,10 @@ homepage: https://github.com/6temes/chrome_devtools_rails
|
|
|
50
49
|
licenses:
|
|
51
50
|
- MIT
|
|
52
51
|
metadata:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
allowed_push_host: https://rubygems.org
|
|
52
|
+
bug_tracker_uri: https://github.com/6temes/chrome_devtools_rails/issues
|
|
53
|
+
changelog_uri: https://github.com/6temes/chrome_devtools_rails/releases
|
|
54
|
+
rubygems_mfa_required: 'true'
|
|
55
|
+
source_code_uri: https://github.com/6temes/chrome_devtools_rails
|
|
58
56
|
rdoc_options: []
|
|
59
57
|
require_paths:
|
|
60
58
|
- lib
|
|
@@ -62,14 +60,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
62
60
|
requirements:
|
|
63
61
|
- - ">="
|
|
64
62
|
- !ruby/object:Gem::Version
|
|
65
|
-
version: '3.
|
|
63
|
+
version: '3.2'
|
|
66
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
65
|
requirements:
|
|
68
66
|
- - ">="
|
|
69
67
|
- !ruby/object:Gem::Version
|
|
70
68
|
version: '0'
|
|
71
69
|
requirements: []
|
|
72
|
-
rubygems_version:
|
|
70
|
+
rubygems_version: 4.0.10
|
|
73
71
|
specification_version: 4
|
|
74
72
|
summary: Serve com.chrome.devtools.json for Chrome automatic workspace setup
|
|
75
73
|
test_files: []
|
data/CHANGELOG.md
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [0.1.0] - 2023-05-19
|
|
9
|
-
|
|
10
|
-
### Added
|
|
11
|
-
- Initial release
|
|
12
|
-
- Automatic workspace mapping for Chrome DevTools
|
|
13
|
-
- Serves JSON file at `/.well-known/appspecific/com.chrome.devtools.json`
|
|
14
|
-
- UUID persistence in `tmp/chrome_devtools_uuid`
|
data/MIT-LICENSE
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
Copyright Daniel Lopez 👾
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
-
a copy of this software and associated documentation files (the
|
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
-
the following conditions:
|
|
10
|
-
|
|
11
|
-
The above copyright notice and this permission notice shall be
|
|
12
|
-
included in all copies or substantial portions of the Software.
|
|
13
|
-
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|