rake-ui 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -4
- data/app/controllers/rake_ui/application_controller.rb +3 -1
- data/app/models/rake_ui/rake_task_log.rb +7 -7
- data/lib/rake-ui/version.rb +1 -1
- data/lib/rake-ui.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd7aaae9a795ec46917f67bc68117f375f0c6fa4e22bc6e320fe082a8f633a37
|
4
|
+
data.tar.gz: cbf32b74d4a96a8156278a0e36c71f9f76672396a4a15031e094f8886ea5b4d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1509e6793d3f88ec54ed69a4f5cbce635dc0212b48bc657a56562fa8494a8c870c75d086287ee0786804eb14ab118d140e8a2ab4101ccf0f147e07224947e540
|
7
|
+
data.tar.gz: c8baa27913c7c15ba812e3f4d4832783003fa47eb47c16c90603d9107083c1258a2b6f14562ab6f3208502c91fec767cd90258c589bc033071a5bc1ad12c4762
|
data/README.md
CHANGED
@@ -1,13 +1,23 @@
|
|
1
1
|
# RakeUi
|
2
2
|
Rake UI is a Rails engine that enables the discovery and execution rake tasks in a UI.
|
3
3
|
|
4
|
+
![Example](./README_example.gif)
|
5
|
+
|
6
|
+
## Routes
|
7
|
+
|
8
|
+
NOTE: Relative to mountpoint in application
|
9
|
+
|
10
|
+
- GET /rake_tasks(.html/.json) - list all available rake tasks
|
11
|
+
- GET /rake_tasks/:id(.html/.json) - list info a single tasks
|
12
|
+
- POST /rake_tasks/:id/execute - execute a rake task
|
13
|
+
- GET /rake_task_logs(.html/.json) - list rake task history
|
14
|
+
- GET /rake_task_logs/:id(.html/.json) - list a single rake task history
|
15
|
+
|
4
16
|
## Installation
|
5
17
|
Add this line to your application's Gemfile:
|
6
18
|
|
7
19
|
```ruby
|
8
|
-
|
9
|
-
gem 'rake-ui'
|
10
|
-
end
|
20
|
+
gem 'rake-ui'
|
11
21
|
```
|
12
22
|
|
13
23
|
And then execute:
|
@@ -34,7 +44,13 @@ end
|
|
34
44
|
|
35
45
|
This tool is built to enable developer productivity in development. It exposes rake tasks through a UI.
|
36
46
|
|
37
|
-
This tool will currently not work in production because we add a guard in the root controller to respond not found if the environment is development or test.
|
47
|
+
This tool will currently not work in production because we add a guard in the root controller to respond not found if the environment is development or test. You may override this guard clause with the following configuration.
|
48
|
+
|
49
|
+
```rb
|
50
|
+
RakeUi.configuration do |config|
|
51
|
+
config.allow_production = true
|
52
|
+
end
|
53
|
+
```
|
38
54
|
|
39
55
|
We recommend adding guards in your route to ensure that the proper authentication is in place to ensure that users are authenticated so that if this were ever to be rendered in production, you would be covered. The best way for that is [router constraints](https://guides.rubyonrails.org/routing.html#specifying-constraints)
|
40
56
|
|
@@ -7,7 +7,9 @@ module RakeUi
|
|
7
7
|
private
|
8
8
|
|
9
9
|
def black_hole_production
|
10
|
-
|
10
|
+
return if Rails.env.test? || Rails.env.development? || RakeUi.configuration.allow_production
|
11
|
+
|
12
|
+
raise ActionController::RoutingError, "Not Found"
|
11
13
|
end
|
12
14
|
end
|
13
15
|
end
|
@@ -53,13 +53,13 @@ module RakeUi
|
|
53
53
|
end
|
54
54
|
|
55
55
|
new(id: id,
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
56
|
+
name: name,
|
57
|
+
args: args,
|
58
|
+
environment: environment,
|
59
|
+
rake_command: rake_command,
|
60
|
+
rake_definition_file: rake_definition_file,
|
61
|
+
log_file_name: log_file_name,
|
62
|
+
log_file_full_path: log_file_full_path)
|
63
63
|
end
|
64
64
|
|
65
65
|
def self.all
|
data/lib/rake-ui/version.rb
CHANGED
data/lib/rake-ui.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austin Story
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|