runtime_config 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58dcecc281bda9d8d52d275e0e1fc5f4df94ac14
4
- data.tar.gz: fc338520a97a7331942645e19a864ff3e4c5f51e
3
+ metadata.gz: 699802127c351514965bc667b6c3db81f5f6f2d8
4
+ data.tar.gz: 4c8886a67d23d18f434a774694b49fc5c104fc40
5
5
  SHA512:
6
- metadata.gz: 89d4ef80414aa18f57efd1b51129a9765419945fec1ec1de4bdac5b49c3b1658dc9f0c793ffadfd599e0da754fdf5a0f06c245838507eb0a5abf85a6a669b6db
7
- data.tar.gz: 9acb0d7089ed1117e161d38b0a0fabca65a0ada2865bac0c5c09e11959bb1a8292b6dc7b20a009c78ff538ddd2cd3de7b6ebc33a9baabca1e9bae13f048c4260
6
+ metadata.gz: 313ad189575b492403fbcad8fe12176688b9b4893a3e4427f22a1271ebde70759b9657964b33ecf0b5c78ba0537feb5cddeb9a8e1b2c32f0584071bec3f4b52a
7
+ data.tar.gz: 70652d5625a5b37725bd02b0f9161abdaef03f43c6d2f6886bea96ba5c5e428929b8cdadb10eff9447b59c821ae882233d9153a23daef3cb3ed61690d3f1214f
data/README.md CHANGED
@@ -1,17 +1,12 @@
1
- # Runtime Conf Tool [![Gem Version](https://badge.fury.io/rb/runtime_config.svg)](https://badge.fury.io/rb/runtime_config)
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 this to your `Gemfile`:
8
-
9
- `gem 'runtime_config'`
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
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'runtime_config/conf_param'
4
+
4
5
  require 'runtime_config/middleware'
@@ -1,7 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
- <title>Runtime Conf Tool</title>
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 Conf Tool</a></h3>
17
+ <h3><a href="<%= @options[:path] %>">Runtime Config</a></h3>
18
18
  </div>
19
19
  </div>
20
20
  <div class="row">
@@ -2,7 +2,7 @@
2
2
 
3
3
  module RuntimeConfig
4
4
  class ConfParam
5
- attr_reader :exec, :conf, :opt, :parent
5
+ attr_reader :conf, :exec, :opt, :parent
6
6
 
7
7
  def initialize(opt, parent, conf, exec = nil)
8
8
  @opt = opt
@@ -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'}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RuntimeConfig
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'.freeze
5
5
  end
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.0
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-16 00:00:00.000000000 Z
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: '0'
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: