scc_rails 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c212245e72797a1ac5d25341744a47b69093d50626bde054927457d21fe3b03f
4
- data.tar.gz: 0da94cdebeec1fb1a7ce0c888c01543029401562cfa9d56076d43468b88ad0b0
3
+ metadata.gz: 54cd5e341ee1b7f3f11f95df3a7f1938a6d1aeb4a4864fb7eff1ef211245708e
4
+ data.tar.gz: 59c76203a17738d2db7a7ec5b966217c900229878264be8fbf1022aaa37c8db3
5
5
  SHA512:
6
- metadata.gz: b739866cec15015a8a86c5b80681f94e8dfdf2443e7429e0fe19d598bbbb55be0f7d5374559ed8b6d7112be5321712c6071eed2a8b8049cb71b7e9a657c3c1f7
7
- data.tar.gz: 35edd2d3ee055a3c92cbca86e8c933eedce9a0a3dcc01b2dcc9a86dcd4554c4098de32867e73eda6af463c31e0b7be2e331d124aaa186809c9a51fe7a136d528
6
+ metadata.gz: 64d8289a87fae2dfe97456e60a1205b54e8f2b575c7445ccaa75a9e8dad11414ee4894305f658281bf46d709e09d317f9c9152aadeeae277e8f81060e9699172
7
+ data.tar.gz: 13d8a5aadf591a14b6e142f32f2590fff6ef75d1597405a4f39ed152ce6e74443b85c1833e3616fe319073f6008dfff84a50547de8da43e5d97976c1e21d2299
data/README.md CHANGED
@@ -1,8 +1,15 @@
1
1
  # SccRails
2
- Short description and motivation.
2
+
3
+ Spring cloud config client integration with rails, use scc_ruby, just use `$cloud_env`.
3
4
 
4
5
  ## Usage
5
- How to use my plugin.
6
+
7
+ ```ruby
8
+ # routes.rb
9
+ mount SccRails::Engine => '/scc'
10
+ ```
11
+
12
+ and then you can use `curl 127.0.0.1:3000/scc/refresh` to refresh `$cloud_env`
6
13
 
7
14
  ## Installation
8
15
  Add this line to your application's Gemfile:
@@ -1,6 +1,6 @@
1
1
  module SccRails
2
- class ApplicationController < ActionController::API
3
- # protect_from_forgery with: :exception
2
+ class ApplicationController < ActionController::Base
3
+ http_basic_authenticate_with name: ENV['SCC_USERNAME'], password: ENV['SCC_PASSWORD'], only: :refresh
4
4
 
5
5
  def refresh
6
6
  SccRails::Engine.reload_config
@@ -1,3 +1,3 @@
1
1
  module SccRails
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scc_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - FlowerWrong
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-27 00:00:00.000000000 Z
11
+ date: 2019-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails