cf_light_api 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sinatra/cf_light_api.rb +11 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bcd3166f605b10f0496e667048307fb34ce2cb7
|
4
|
+
data.tar.gz: b0c320842105320be24776c457e45b43247cb935
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ff4ea5b937391e1d671316f1baeffb63ba99f8f2405b9634d55c5e4a388dab6405f8e06ac9463dd7dc5ec2529e7a1cfe1d63d76ed56180e3ce4d4cb02f6a314
|
7
|
+
data.tar.gz: 18bdd4b0ea8563b7ee1916bcc8f398cd5f1f6e9c7cdaaa1c73916802459f7ee1ae2b21bdc1cc22b035fd657f2c47a9eb7431d6b96f8caffccc64ce4fda925591
|
data/lib/sinatra/cf_light_api.rb
CHANGED
@@ -1,10 +1,19 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
1
3
|
module Sinatra
|
2
4
|
module CfLightAPI
|
3
5
|
|
4
6
|
def self.registered(app)
|
5
|
-
app.get '/v1/apps
|
7
|
+
app.get '/v1/apps/?:org?' do
|
8
|
+
all_apps = JSON.parse(REDIS.get("#{ENV['REDIS_KEY_PREFIX']}:apps"))
|
9
|
+
|
6
10
|
content_type :json
|
7
|
-
|
11
|
+
|
12
|
+
if params[:org]
|
13
|
+
return all_apps.select{|an_app| an_app['org'] == params[:org]}.to_json
|
14
|
+
end
|
15
|
+
|
16
|
+
return all_apps.to_json
|
8
17
|
end
|
9
18
|
|
10
19
|
app.get '/v1/orgs/?' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cf_light_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Springer Platform Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cfoundry
|