runtime_config 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -9
- data/lib/runtime_config.rb +1 -0
- data/lib/runtime_config/conf.html.erb +2 -2
- data/lib/runtime_config/conf_param.rb +1 -1
- data/lib/runtime_config/middleware.rb +0 -6
- data/lib/runtime_config/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 699802127c351514965bc667b6c3db81f5f6f2d8
|
4
|
+
data.tar.gz: 4c8886a67d23d18f434a774694b49fc5c104fc40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 313ad189575b492403fbcad8fe12176688b9b4893a3e4427f22a1271ebde70759b9657964b33ecf0b5c78ba0537feb5cddeb9a8e1b2c32f0584071bec3f4b52a
|
7
|
+
data.tar.gz: 70652d5625a5b37725bd02b0f9161abdaef03f43c6d2f6886bea96ba5c5e428929b8cdadb10eff9447b59c821ae882233d9153a23daef3cb3ed61690d3f1214f
|
data/README.md
CHANGED
@@ -1,17 +1,12 @@
|
|
1
|
-
# Runtime
|
1
|
+
# Runtime Config for Rails [![Gem Version](https://badge.fury.io/rb/runtime_config.svg)](https://badge.fury.io/rb/runtime_config)
|
2
2
|
|
3
3
|
A middleware to change configuration parameters at runtime for Rails 5.
|
4
4
|
|
5
5
|
## Installation and Usage
|
6
6
|
|
7
|
-
- Add
|
8
|
-
|
9
|
-
`
|
10
|
-
|
11
|
-
- Add to `config/environments/development.rb` (_path_ option is not mandatory, '/dev' is the default value):
|
12
|
-
|
13
|
-
`config.middleware.use RuntimeConfig::Middleware, path: '/some_path'`
|
14
|
-
|
7
|
+
- Add to `Gemfile`: `gem 'runtime_config'`
|
8
|
+
- Add to `config/environments/development.rb`: `config.middleware.use RuntimeConfig::Middleware`
|
9
|
+
- Optionally specify a path, ex. `config.middleware.use RuntimeConfig::Middleware, path: '/some_path'`
|
15
10
|
- Open the path (or the one set in the option): **/dev**
|
16
11
|
|
17
12
|
## Features
|
data/lib/runtime_config.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<!doctype html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
<title>Runtime
|
4
|
+
<title>Runtime Config</title>
|
5
5
|
<link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css">
|
6
6
|
<style>
|
7
7
|
.button { height: 2.2rem; line-height: 2.2rem; }
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<div class="container">
|
15
15
|
<div class="row">
|
16
16
|
<div class="column">
|
17
|
-
<h3><a href="<%= @options[:path] %>">Runtime
|
17
|
+
<h3><a href="<%= @options[:path] %>">Runtime Config</a></h3>
|
18
18
|
</div>
|
19
19
|
</div>
|
20
20
|
<div class="row">
|
@@ -45,12 +45,6 @@ module RuntimeConfig
|
|
45
45
|
Rake::Task['dev:cache'].invoke
|
46
46
|
@actions.push 'Invoked dev:cache'
|
47
47
|
end
|
48
|
-
# if req.params.include? 'assets_logs' # NOTE: not working
|
49
|
-
# # Rails.configuration.assets.quiet = false
|
50
|
-
# params_save(@params[:assets_logs], req.params['assets_logs'] == '1')
|
51
|
-
# @actions.push "assets_logs: #{req.params['assets_logs'] == '1'}"
|
52
|
-
# restart = true
|
53
|
-
# end
|
54
48
|
if req.params.include? 'catch_errors'
|
55
49
|
params_save(@params[:catch_errors], req.params['catch_errors'] == '1')
|
56
50
|
@actions.push "catch_errors: #{req.params['catch_errors'] == '1'}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runtime_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattia Roccoberton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -55,13 +55,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
55
55
|
requirements:
|
56
56
|
- - ">="
|
57
57
|
- !ruby/object:Gem::Version
|
58
|
-
version:
|
58
|
+
version: 2.2.2
|
59
59
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '0'
|
64
|
-
requirements:
|
64
|
+
requirements:
|
65
|
+
- none
|
65
66
|
rubyforge_project:
|
66
67
|
rubygems_version: 2.5.2.3
|
67
68
|
signing_key:
|