kibana-rack 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af7686f0d4c9158480d553f11f5e0e69e5122678
4
- data.tar.gz: 6693ab5e5939f77b931db212a5baff5908e7be3e
3
+ metadata.gz: e8a77c4673874c623af6c587228a48f59400c531
4
+ data.tar.gz: 89f98d20b09d90e4972a84f8006bf8af42fcdc75
5
5
  SHA512:
6
- metadata.gz: fc4b3fa2fc1b04f79222ecbcdcc4f15c11d33beda2031493a8b36b88f976fb8120dafacde33d5d0090511c824ccbc5e1a271bb6e23fddd0102c1fe8f88944f1c
7
- data.tar.gz: f564f8f8471f3b530e90d1447b8d5a7ca5b783dc5ceed7352d1dfb20691fcd2d172f36134f3c3856b47ff5db808ca3f3dfbf8e2f660a61a650928972665fa02d
6
+ metadata.gz: ead603df5f794c5d3d72f173b987a796d0602b6e5479cce9983a19b918b0993fd9dd69ceab77603c5fba7eda53fcfe10531cfbaa08efec8688ce44f6ae55ecca
7
+ data.tar.gz: 7040a490372406bc06e9925b084b4c6c6f7394ffbe6c829f934849c549d200540fc1fe8e79cdfa78a54d9d75aea6016dfa33e579d93e5373acb3e46c456a71d7
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change history for kibana-rack
2
2
 
3
- ## [v0.1.2](https://github.com/tabolario/kibana-rack/releases/tag/v0.1.2)
3
+ ## [v0.1.3](https://github.com/tabolario/kibana-rack/releases/tag/v0.1.3)
4
4
 
5
5
  * [Bug] [Serve dashboard files from app/dashboards](https://github.com/tabolario/kibana-rack/issues/10)
6
6
 
@@ -1,5 +1,5 @@
1
1
  module Kibana
2
2
  module Rack
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
@@ -31,9 +31,9 @@ module Kibana
31
31
  erb :config
32
32
  end
33
33
 
34
- get(%r{/app/dashboard/(file|script)/([\w-]+)\.(js(on)?)}) do
35
- dashboard_name = params[:captures][1]
36
- dashboard_ext = params[:captures][2]
34
+ get(%r{/app/dashboards/([\w-]+)\.(js(on)?)}) do
35
+ dashboard_name = params[:captures][0]
36
+ dashboard_ext = params[:captures][1]
37
37
  dashboard_path = File.join(settings.kibana_dashboards_path, "#{dashboard_name}.#{dashboard_ext}")
38
38
 
39
39
  halt(404, { 'Content-Type' => 'application/json' }, '{"error":"Not found"}') unless File.exist?(dashboard_path)
@@ -24,7 +24,7 @@ describe Kibana::Rack::Web do
24
24
  end
25
25
 
26
26
  it 'renders JavaScript dashboards from the dashboard directory' do
27
- get '/app/dashboard/script/js_dashboard.js'
27
+ get '/app/dashboards/js_dashboard.js'
28
28
 
29
29
  expect(last_response.body).to eql(IO.read(File.join(dashboards_path, 'js_dashboard.js')))
30
30
  expect(last_response['Content-Type']).to eql('application/js')
@@ -32,7 +32,7 @@ describe Kibana::Rack::Web do
32
32
  end
33
33
 
34
34
  it 'renders JSON dashboards from the dashboard directory' do
35
- get '/app/dashboard/file/json_dashboard.json'
35
+ get '/app/dashboards/json_dashboard.json'
36
36
 
37
37
  expect(last_response.body).to eql(IO.read(File.join(dashboards_path, 'json_dashboard.json')))
38
38
  expect(last_response['Content-Type']).to eql('application/json')
@@ -41,13 +41,13 @@ describe Kibana::Rack::Web do
41
41
 
42
42
  it 'processes ERB in dashboards' do
43
43
  ENV['DASHBOARD_TITLE'] = 'My Dashboard'
44
- get '/app/dashboard/file/erb_dashboard.json'
44
+ get '/app/dashboards/erb_dashboard.json'
45
45
 
46
46
  expect(last_response.body.strip).to eql('{"title":"My Dashboard"}')
47
47
  end
48
48
 
49
49
  it 'returns 404 if a dashboard does not exist' do
50
- get '/app/dashboard/file/nonexistent.json'
50
+ get '/app/dashboards/nonexistent.json'
51
51
 
52
52
  expect(last_response.body.strip).to eql('{"error":"Not found"}')
53
53
  expect(last_response.status).to eql(404)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kibana-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Burns
metadata.gz.sig CHANGED
Binary file