plug 0.1.12 → 0.1.14
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 +9 -0
- data/app/assets/images/favicon.png +0 -0
- data/app/assets/stylesheets/plug/application.scss +2 -0
- data/app/assets/stylesheets/plug/blocks/_alert.scss +5 -0
- data/app/assets/stylesheets/plug/blocks/_task-button.scss +3 -0
- data/app/assets/stylesheets/plug/variables/_colors.scss +2 -1
- data/app/controllers/plug/features_controller.rb +16 -0
- data/app/views/layouts/plug/application.html.haml +2 -1
- data/app/views/plug/features/_task.html.haml +4 -0
- data/app/views/plug/features/index.html.haml +8 -1
- data/config/routes.rb +1 -0
- data/lib/plug/configuration.rb +2 -1
- data/lib/plug/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6555955e0bb24af43ac0baf3d82f1c59c36a2701
|
4
|
+
data.tar.gz: ecb6287ba37b466b037297ee40fb2f7123409eb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f38acfd264f4e10bf41bd3c7556b3ba23149c2b5a58f789086258320a6e3839110c08dc29499b144e33265a42390684af2f72e6317088a259d87c512a33327b
|
7
|
+
data.tar.gz: 780aebfebb76e2dfd0b20866e62765e06d6aa57e656146c560f8259ef1d5d8f3409881576da6cc55f4f42ba44c72e8a2c4f57f9560b629279d0d3616b70bfdca
|
data/README.md
CHANGED
@@ -72,6 +72,15 @@ If you have custom HTML for notice, you can pass a block.
|
|
72
72
|
<% end %>
|
73
73
|
```
|
74
74
|
|
75
|
+
#### Buttons
|
76
|
+
Add buttons to the config block to perform rake tasks from the plug dashboard
|
77
|
+
|
78
|
+
```ruby
|
79
|
+
config.buttons = [
|
80
|
+
{ label: 'Clear cache', task: 'tmp:cache:clear' }
|
81
|
+
]
|
82
|
+
```
|
83
|
+
|
75
84
|
### Running the tests
|
76
85
|
|
77
86
|
```bash
|
Binary file
|
@@ -50,6 +50,22 @@ module Plug
|
|
50
50
|
redirect_to features_url, notice: 'Feature was successfully destroyed.'
|
51
51
|
end
|
52
52
|
|
53
|
+
# POST /task
|
54
|
+
def task_execution
|
55
|
+
begin
|
56
|
+
require 'rake'
|
57
|
+
|
58
|
+
Rails.application.load_tasks
|
59
|
+
::Rake::Task[params[:task]].execute
|
60
|
+
rescue StandardError => e
|
61
|
+
flash[:alert] = e.message
|
62
|
+
else
|
63
|
+
flash[:notice] = "Task: #{params[:task]} has completed"
|
64
|
+
end
|
65
|
+
|
66
|
+
redirect_to root_path
|
67
|
+
end
|
68
|
+
|
53
69
|
private
|
54
70
|
# Use callbacks to share common setup or constraints between actions.
|
55
71
|
def set_feature
|
data/config/routes.rb
CHANGED
data/lib/plug/configuration.rb
CHANGED
data/lib/plug/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-03-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -191,13 +191,16 @@ files:
|
|
191
191
|
- README.md
|
192
192
|
- Rakefile
|
193
193
|
- app/assets/config/plug_manifest.js
|
194
|
+
- app/assets/images/favicon.png
|
194
195
|
- app/assets/javascripts/plug/application.js
|
195
196
|
- app/assets/javascripts/plug/features.js
|
196
197
|
- app/assets/stylesheets/plug/_settings.scss
|
197
198
|
- app/assets/stylesheets/plug/application.scss
|
199
|
+
- app/assets/stylesheets/plug/blocks/_alert.scss
|
198
200
|
- app/assets/stylesheets/plug/blocks/_nav.scss
|
199
201
|
- app/assets/stylesheets/plug/blocks/_notice.scss
|
200
202
|
- app/assets/stylesheets/plug/blocks/_state.scss
|
203
|
+
- app/assets/stylesheets/plug/blocks/_task-button.scss
|
201
204
|
- app/assets/stylesheets/plug/foundation_and_overrides.scss
|
202
205
|
- app/assets/stylesheets/plug/milligram.scss
|
203
206
|
- app/assets/stylesheets/plug/mixins/_bem.scss
|
@@ -214,6 +217,7 @@ files:
|
|
214
217
|
- app/models/plug/feature.rb
|
215
218
|
- app/views/layouts/plug/application.html.haml
|
216
219
|
- app/views/plug/features/_form.html.haml
|
220
|
+
- app/views/plug/features/_task.html.haml
|
217
221
|
- app/views/plug/features/edit.html.haml
|
218
222
|
- app/views/plug/features/index.html.haml
|
219
223
|
- app/views/plug/features/new.html.haml
|
@@ -250,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
254
|
version: '0'
|
251
255
|
requirements: []
|
252
256
|
rubyforge_project:
|
253
|
-
rubygems_version: 2.6.
|
257
|
+
rubygems_version: 2.6.11
|
254
258
|
signing_key:
|
255
259
|
specification_version: 4
|
256
260
|
summary: Rails engine that can plug/unplug features
|