-
Notifications
You must be signed in to change notification settings - Fork 20
/
quaa.rb
63 lines (42 loc) · 1.43 KB
/
quaa.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
class Quaa < Formula
desc "Quickly run Cloud Foundry UAA inside Apache Tomcat"
homepage "https://github.com/starkandwayne/quaa"
v = "v1.0.4" # CI Managed
url "https://github.com/starkandwayne/quick-uaa-local/archive/#{v}.tar.gz"
version v
sha256 "bef7ecc603ef40aaf92b4eb31070853ea7e3968149e57b0ecda6ae6faee228d1" # CI Managed
head do
url "https://github.com/starkandwayne/quick-uaa-local.git", using: :git
end
depends_on "openjdk"
depends_on "cloudfoundry/tap/bosh-cli" => "5.2.2"
depends_on "starkandwayne/cf/uaa-cli" => "0.0.1"
def install
bosh_bin = File.join(Formula["cloudfoundry/tap/bosh-cli"].opt_bin, "bosh")
uaa_bin = File.join(Formula["starkandwayne/cf/uaa-cli"].opt_bin, "uaa")
(share/"manifests").install Dir["*", ".versions"]
quaa = <<-SHELL
#!/bin/bash
export BOSH_BIN=#{bosh_bin}
export UAA_BIN=#{uaa_bin}
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/..
#{(share/"manifests/bin/quaa")} "$@"
SHELL
bin.mkpath
(bin/"quaa").binwrite(quaa)
puts <<-README
To run an in-memory UAA:
quaa up
To run the UAA backed by your local existing PostgreSQL database:
quaa up --postgresql
The UAA will be running at http://localhost:8080
In another terminal, you can target & authorize the new "uaa" CLI:
quaa auth-client
Example "uaa" commands to try:
uaa clients
uaa users
uaa groups
README
end
end