config_server 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -26
- data/docker/Dockerfile +1 -1
- data/docker/Gemfile.lock +1 -1
- data/{docker/server.rb → exe/config_server} +4 -1
- data/lib/config_server.rb +4 -2
- data/lib/config_server/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 958907a637ed9d05897996fade187850d12a1e9e
|
4
|
+
data.tar.gz: ca005753b0049621bc2c89e9b391916cdd4d593b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b01dbc1b2fc3a02f795ce71d485b8b938bdac7f71f796a72b36c024ed5ef5679e80fd567b9ab9fb02335436ca506b7d3ea9ba0a7833e782e2c34ed95dfdf63df
|
7
|
+
data.tar.gz: 129173a592d48a4623904346bd47dd01ea29a2ce8e8748d6522f41ba7d57d4306e556c6229ff66649acd3a6cf5dcc26219d9fd3a9245936998dd469ff1c81e2d
|
data/README.md
CHANGED
@@ -32,38 +32,15 @@ file and mount it into the container:
|
|
32
32
|
|
33
33
|
$ docker run -d -p 8080:8080 -v /path/to/your/config.yml:/usr/src/app/config.yml nanit/config_server
|
34
34
|
|
35
|
-
## Option 2: Running Your
|
35
|
+
## Option 2: Running Directly On Your Machine
|
36
36
|
|
37
37
|
### 1. Install config_server Gem
|
38
38
|
|
39
|
-
Add this line to your application's Gemfile:
|
40
|
-
|
41
|
-
```ruby
|
42
|
-
gem 'config_server'
|
43
|
-
```
|
44
|
-
|
45
|
-
And then execute:
|
46
|
-
|
47
|
-
$ bundle
|
48
|
-
|
49
|
-
Or install it yourself as:
|
50
|
-
|
51
39
|
$ gem install config_server
|
52
40
|
|
53
|
-
### 2. Run
|
54
|
-
|
55
|
-
Then create the following ruby file:
|
56
|
-
```ruby
|
57
|
-
#my_configuration_server.rb
|
58
|
-
|
59
|
-
require 'config_server'
|
60
|
-
|
61
|
-
ConfigServer.start("config.yml")
|
62
|
-
```
|
63
|
-
|
64
|
-
Then run:
|
41
|
+
### 2. Run The Server
|
65
42
|
|
66
|
-
$
|
43
|
+
$ CONFIG_FILE=/path/to/config.yml config_server
|
67
44
|
|
68
45
|
## Querying The Server
|
69
46
|
|
data/docker/Dockerfile
CHANGED
data/docker/Gemfile.lock
CHANGED
data/lib/config_server.rb
CHANGED
@@ -4,7 +4,9 @@ require "rack"
|
|
4
4
|
require "rack/server"
|
5
5
|
|
6
6
|
module ConfigServer
|
7
|
-
def self.start
|
8
|
-
|
7
|
+
def self.start
|
8
|
+
port = ENV["SERVER_PORT"] || 8080
|
9
|
+
config_file = ENV["CONFIG_FILE"] || "config.yml"
|
10
|
+
Rack::Server.start(:Host => "0.0.0.0", :Port => port, :app => ConfigServer::App.new(config_file))
|
9
11
|
end
|
10
12
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: config_server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erez Rabih
|
@@ -83,7 +83,8 @@ dependencies:
|
|
83
83
|
description: A Ruby RACK server which servers YAML files directly from request path
|
84
84
|
email:
|
85
85
|
- erez.rabih@gmail.com
|
86
|
-
executables:
|
86
|
+
executables:
|
87
|
+
- config_server
|
87
88
|
extensions: []
|
88
89
|
extra_rdoc_files: []
|
89
90
|
files:
|
@@ -103,7 +104,7 @@ files:
|
|
103
104
|
- docker/Dockerfile
|
104
105
|
- docker/Gemfile
|
105
106
|
- docker/Gemfile.lock
|
106
|
-
-
|
107
|
+
- exe/config_server
|
107
108
|
- lib/config_server.rb
|
108
109
|
- lib/config_server/app.rb
|
109
110
|
- lib/config_server/version.rb
|