the_mechanic_2 0.1.2 → 0.1.3
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/README.md +7 -5
- data/lib/the_mechanic_2/engine.rb +0 -6
- data/lib/the_mechanic_2/version.rb +1 -1
- data/lib/the_mechanic_2.rb +21 -1
- metadata +8 -8
- /data/{app/controllers → lib}/the_mechanic_2/application_controller.rb +0 -0
- /data/{app/models → lib}/the_mechanic_2/benchmark_request.rb +0 -0
- /data/{app/models → lib}/the_mechanic_2/benchmark_result.rb +0 -0
- /data/{app/services → lib}/the_mechanic_2/benchmark_service.rb +0 -0
- /data/{app/controllers → lib}/the_mechanic_2/benchmarks_controller.rb +0 -0
- /data/{app/services → lib}/the_mechanic_2/rails_runner_service.rb +0 -0
- /data/{app/services → lib}/the_mechanic_2/security_service.rb +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2b9109c0e78fc245bf7018ef7ff8ab9bb888a01f335cf7f796b2fef85c90906f
|
|
4
|
+
data.tar.gz: d564bcf5697b8203ceffd3404986644a6bc6a091ba58d45ab315cca09f9780cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c203198d1c7a511b9f3e6eae8561269655ce851eba56e223df4a3018f85489cc14b03b4c8993ebc0b23f0ef64f61c916cc55857aa4a925c3950266088c0dfe92
|
|
7
|
+
data.tar.gz: 710254dbad65bba58b12c87b69b0c5faff451dda1dd8bc7c31f8940f5efcf0cfb75f4a2bbb5ddc12698ce05ef84478882ad2a3ed178506c747ba1642b5ce3161
|
data/README.md
CHANGED
|
@@ -17,9 +17,9 @@ A Rails Engine for benchmarking Ruby code with full access to your application's
|
|
|
17
17
|
Add this line to your application's Gemfile:
|
|
18
18
|
|
|
19
19
|
```ruby
|
|
20
|
-
gem 'the_mechanic_2'
|
|
21
|
-
# or from
|
|
22
|
-
gem 'the_mechanic_2', git: 'https://github.com/
|
|
20
|
+
gem 'the_mechanic_2'
|
|
21
|
+
# or from GitHub
|
|
22
|
+
gem 'the_mechanic_2', git: 'https://github.com/randyv128/the_mechanic_2'
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Then execute:
|
|
@@ -36,7 +36,7 @@ Add this to your `config/routes.rb`:
|
|
|
36
36
|
|
|
37
37
|
```ruby
|
|
38
38
|
Rails.application.routes.draw do
|
|
39
|
-
mount TheMechanic2::Engine => '/
|
|
39
|
+
mount TheMechanic2::Engine => '/mechanic'
|
|
40
40
|
|
|
41
41
|
# Your other routes...
|
|
42
42
|
end
|
|
@@ -50,10 +50,12 @@ rails server
|
|
|
50
50
|
|
|
51
51
|
### 3. Access The Mechanic
|
|
52
52
|
|
|
53
|
-
Navigate to: `http://localhost:3000/
|
|
53
|
+
Navigate to: `http://localhost:3000/mechanic`
|
|
54
54
|
|
|
55
55
|
That's it! No additional setup required.
|
|
56
56
|
|
|
57
|
+
> **Note:** The engine works with Rails 6.0+ and uses `eager_load_paths` for proper autoloading compatibility.
|
|
58
|
+
|
|
57
59
|
## Example Usage
|
|
58
60
|
|
|
59
61
|
### Basic Comparison
|
|
@@ -8,11 +8,5 @@ module TheMechanic2
|
|
|
8
8
|
g.fixture_replacement :factory_bot
|
|
9
9
|
g.factory_bot dir: 'spec/factories'
|
|
10
10
|
end
|
|
11
|
-
|
|
12
|
-
# Rails will automatically load from these paths
|
|
13
|
-
# Just ensure they're in the engine's load path
|
|
14
|
-
config.eager_load_paths << root.join('app', 'controllers')
|
|
15
|
-
config.eager_load_paths << root.join('app', 'services')
|
|
16
|
-
config.eager_load_paths << root.join('app', 'models')
|
|
17
11
|
end
|
|
18
12
|
end
|
data/lib/the_mechanic_2.rb
CHANGED
|
@@ -3,5 +3,25 @@ require "the_mechanic_2/configuration"
|
|
|
3
3
|
require "the_mechanic_2/engine"
|
|
4
4
|
|
|
5
5
|
module TheMechanic2
|
|
6
|
-
#
|
|
6
|
+
# Explicitly autoload all classes to work with both eager_load and autoload
|
|
7
|
+
autoload :ApplicationController, 'the_mechanic_2/application_controller'
|
|
8
|
+
autoload :BenchmarksController, 'the_mechanic_2/benchmarks_controller'
|
|
9
|
+
|
|
10
|
+
autoload :BenchmarkService, 'the_mechanic_2/benchmark_service'
|
|
11
|
+
autoload :RailsRunnerService, 'the_mechanic_2/rails_runner_service'
|
|
12
|
+
autoload :SecurityService, 'the_mechanic_2/security_service'
|
|
13
|
+
|
|
14
|
+
autoload :BenchmarkRequest, 'the_mechanic_2/benchmark_request'
|
|
15
|
+
autoload :BenchmarkResult, 'the_mechanic_2/benchmark_result'
|
|
16
|
+
|
|
17
|
+
class << self
|
|
18
|
+
attr_accessor :configuration
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.configure
|
|
22
|
+
self.configuration ||= Configuration.new
|
|
23
|
+
yield(configuration)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
self.configuration = Configuration.new
|
|
7
27
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: the_mechanic_2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- mrpandapants
|
|
@@ -108,24 +108,24 @@ files:
|
|
|
108
108
|
- Rakefile
|
|
109
109
|
- app/assets/javascripts/the_mechanic_2/application.js
|
|
110
110
|
- app/assets/stylesheets/the_mechanic_2/application.css
|
|
111
|
-
- app/controllers/the_mechanic_2/application_controller.rb
|
|
112
|
-
- app/controllers/the_mechanic_2/benchmarks_controller.rb
|
|
113
111
|
- app/helpers/the_mechanic_2/application_helper.rb
|
|
114
112
|
- app/jobs/the_mechanic_2/application_job.rb
|
|
115
113
|
- app/mailers/the_mechanic_2/application_mailer.rb
|
|
116
114
|
- app/models/the_mechanic_2/application_record.rb
|
|
117
|
-
- app/models/the_mechanic_2/benchmark_request.rb
|
|
118
|
-
- app/models/the_mechanic_2/benchmark_result.rb
|
|
119
|
-
- app/services/the_mechanic_2/benchmark_service.rb
|
|
120
|
-
- app/services/the_mechanic_2/rails_runner_service.rb
|
|
121
|
-
- app/services/the_mechanic_2/security_service.rb
|
|
122
115
|
- app/views/layouts/the_mechanic_2/application.html.erb
|
|
123
116
|
- app/views/the_mechanic_2/benchmarks/index.html.erb
|
|
124
117
|
- config/routes.rb
|
|
125
118
|
- lib/tasks/the_mechanic_tasks.rake
|
|
126
119
|
- lib/the_mechanic_2.rb
|
|
120
|
+
- lib/the_mechanic_2/application_controller.rb
|
|
121
|
+
- lib/the_mechanic_2/benchmark_request.rb
|
|
122
|
+
- lib/the_mechanic_2/benchmark_result.rb
|
|
123
|
+
- lib/the_mechanic_2/benchmark_service.rb
|
|
124
|
+
- lib/the_mechanic_2/benchmarks_controller.rb
|
|
127
125
|
- lib/the_mechanic_2/configuration.rb
|
|
128
126
|
- lib/the_mechanic_2/engine.rb
|
|
127
|
+
- lib/the_mechanic_2/rails_runner_service.rb
|
|
128
|
+
- lib/the_mechanic_2/security_service.rb
|
|
129
129
|
- lib/the_mechanic_2/version.rb
|
|
130
130
|
homepage: https://github.com/randyv128/the_mechanic_2
|
|
131
131
|
licenses:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|