kaui 0.7.1 → 0.7.2

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
  SHA1:
3
- metadata.gz: 69a715b46b207b1b61efdab90449e98406488d87
4
- data.tar.gz: eba301b72bc6957f3b6d6342ea07ba89f5d8c8c1
3
+ metadata.gz: fcfdad169627618fcedf7f8d57019705ddbd1fad
4
+ data.tar.gz: ffb855fc7166ec29ff766a78b20bee6dc374011e
5
5
  SHA512:
6
- metadata.gz: b5ec35de209aef18aeb38a4d13267b782a8aab0bfac3f2aca76c6dc0c9f8654286b191fd497bf1df3f9a8847838cae908d588c0ce8b7a14f4931adc23157aebc
7
- data.tar.gz: 1a3ae67d11058beaa7b49f401e7763a4e0e31996e178393f36ff4a833f4fbff77ec57c583cd09beb84b29862741a1b53687b12044eff5cb34b5fcd46c3d39024
6
+ metadata.gz: 22c1fc01244a91e541c9037d314d0047e074ec2746931614094c8eb8b0ea4f09cb37b619255204a191c59c1dbf89bdf79d62e46d23c66f987f3de4120bd45343
7
+ data.tar.gz: 775ec5703c332ca338732047d06b77e3be2cf964b5efbb50fd4d3b6eb272cd2d1aa719cc0f281cb326bb21e568f7db887208c30637a0a8dbba688c617be6853c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kaui (0.7.1)
4
+ kaui (0.7.2)
5
5
  cancan (~> 1.6.10)
6
6
  carmen-rails (~> 1.0.0)
7
7
  d3_rails (~> 3.2.8)
data/README.md CHANGED
@@ -7,10 +7,8 @@ Getting started
7
7
  Running Kaui
8
8
  ------------
9
9
 
10
- You can run Kaui locally using the sandbox script:
10
+ You can run Kaui locally by using the sandbox script:
11
11
 
12
- # Point to your killbill installation
13
- export KILLBILL_URL="http://killbill.company.com:8080"
14
12
  # Run the sandbox script
15
13
  bundle exec script/sandbox
16
14
  # Start the Rails app
@@ -24,19 +22,18 @@ Mounting Kaui into your own Rails app
24
22
  The Kaui gem comes with a `kaui` script to mount it in your existing Rails app.
25
23
 
26
24
  Kaui expects the container app to define the <tt>current_user</tt> method, which returns the
27
- name of the logged-in user. This is used by Killbill for auditing purposes.
25
+ name of the logged-in user. This is used by Kill Bill for auditing purposes.
28
26
 
29
- Finally, Killbill server needs to be running for Kaui to fetch its information. Set the `KILLBILL_URL`
30
- variable to point to your existing Killbill installation (e.g. http://killbill.company.com:8080).
27
+ Finally, a Kill Bill server needs to be running for Kaui to fetch its information (see the Configuration section below).
31
28
  The default login credentials are admin/password. Users, Credentials, Roles and Permissions are
32
29
  passed through to Kill Bill. It uses Basic Auth by default, but the backend is pluggable (LDAP,
33
30
  ActiveDirectory, etc.).
34
31
 
35
32
 
36
- Multi-Tenancy
33
+ Configuration
37
34
  -------------
38
35
 
39
- If you are using Kaui against a single tenant, specify your api key and secret in ```config/initializers/killbill_client.rb```:
36
+ Specify your Kill Bill server url, api key and secret in ```config/initializers/killbill_client.rb```:
40
37
 
41
38
  ```
42
39
  KillBillClient.url = 'http://127.0.0.1:8080/'
@@ -28,7 +28,6 @@ module Kaui
28
28
 
29
29
  # Verify the Kill Bill session hasn't timed-out
30
30
  def authenticated_with_killbill?(api_key=KillBillClient.api_key, api_secret=KillBillClient.api_secret)
31
- KillBillClient.url = Kaui.killbill_finder.call
32
31
  subject = KillBillClient::Model::Security.find_subject :session_id => kb_session_id,
33
32
  :api_key => api_key,
34
33
  :api_secret => api_secret
@@ -40,7 +39,6 @@ module Kaui
40
39
  private
41
40
 
42
41
  def self.do_find_permissions(options = {})
43
- KillBillClient.url = Kaui.killbill_finder.call
44
42
  KillBillClient::Model::Security.find_permissions options
45
43
  end
46
44
  end
@@ -1,10 +1,10 @@
1
1
  <header class='hero-unit'>
2
2
  <h1>Welcome to Kaui!</h1>
3
- <p class='lead'>Online documentation can be found at <a href='http://killbilling.org/' target='_blank'>http://kill-bill.org/</a></p>
3
+ <p class='lead'>Online documentation can be found at <a href='http://kill-bill.org/' target='_blank'>http://kill-bill.org/</a></p>
4
4
 
5
5
  <p>About your application&rsquo;s environment:
6
6
  <ul>
7
- <li>Kill Bill url: <%= Kaui.killbill_finder.call %></li>
7
+ <li>Kill Bill url: <%= KillBillClient.url %></li>
8
8
  </ul>
9
9
  </p>
10
10
  </header>
data/lib/kaui/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kaui
2
- VERSION = '0.7.1'
2
+ VERSION = '0.7.2'
3
3
  end
data/lib/kaui.rb CHANGED
@@ -4,16 +4,13 @@
4
4
  require "kaui/engine"
5
5
 
6
6
  module Kaui
7
- mattr_accessor :killbill_finder
8
7
  mattr_accessor :account_home_path
9
8
  mattr_accessor :bundle_home_path
10
9
  mattr_accessor :invoice_home_path
11
10
  mattr_accessor :bundle_key_display_string
12
11
  mattr_accessor :creditcard_plugin_name
13
12
  mattr_accessor :layout
14
- mattr_accessor :killbill_url
15
13
 
16
- self.killbill_finder = lambda { self.config[:killbill_url] }
17
14
  self.account_home_path = lambda {|account_id| Kaui::Engine.routes.url_helpers.account_path(account_id) }
18
15
  self.bundle_home_path = lambda {|bundle_id| Kaui::Engine.routes.url_helpers.bundle_path(:id => bundle_id) }
19
16
  self.invoice_home_path = lambda {|invoice_id| Kaui::Engine.routes.url_helpers.invoice_path(:id => invoice_id) }
@@ -24,11 +21,8 @@ module Kaui
24
21
  # TODO
25
22
  {
26
23
  :layout => layout || 'kaui/layouts/kaui_application',
27
- :killbill_url => killbill_url || ENV['KILLBILL_URL'] || 'http://127.0.0.1:8080'
28
24
  }
29
25
  end
30
-
31
- KillBillClient.url = Kaui.killbill_finder.call
32
26
  end
33
27
 
34
28
  # ruby-1.8 compatibility
@@ -1,8 +1,6 @@
1
1
  Dummy::Application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb
3
3
 
4
- config.killbill_url = ENV["KILLBILL_URL"] || "http://127.0.0.1:8080"
5
-
6
4
  # In the development environment your application's code is reloaded on
7
5
  # every request. This slows down response time but is perfect for development
8
6
  # since you don't have to restart the web server when you make code changes.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Killbill core team