hieraviz 0.2.2 → 0.2.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: ecd646feab7d0eb2b8f2e4ed17b7417bad5e1539
4
- data.tar.gz: ede3db1196637027b576e6180b972d8311f0c5b8
3
+ metadata.gz: 3980ae6dc358ca8afeed70b805ad50870f4d0249
4
+ data.tar.gz: fdc6112e6912571fda379b8c5bc8a4a36c27eadb
5
5
  SHA512:
6
- metadata.gz: e6b1383225fdd48cff661db970b4a2ae217bfb852cd11a9d7196c2e8e507ec8f3d169552dde470d8ff2ef2850b7bdaab744317a594df4c7665275c17b6fc5fbf
7
- data.tar.gz: a97c8a77ad48a4cd2ed204c8113433783e4a85f12d9fff0210381597d4899ccd5afc080a42cd15107143e39288ae94ff6baaba06aaa14cb3dd2e7c144265eb80
6
+ metadata.gz: a82521eaa89bc5d5d06bbd085b4f0fefde3a6fe9e05c3df41681368597ed738f4dcb5aed8d8b084bee66f382cb6278def6fe3371fea632abbc42282094b2d1b8
7
+ data.tar.gz: 2d6ab2c653fbcdc65b0dd241390e5b631f376563ddae72926f3ad701e0b528dd94c0bb9b0e529e6e53c37e51ed530c5362b829870de57c322ab5319c963e0dea
data/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  Hieraviz Changelog
2
2
  ========================
3
3
 
4
+ ### v0.2.3 - 2016-04-06
5
+ - fix the handling of ssl in the return link for gitlab auth
6
+
4
7
  ### v0.2.2 - 2016-04-05
5
8
  - sort branches order
6
9
  - prepare debian package
data/app/apiv1.rb CHANGED
@@ -167,7 +167,6 @@ module HieravizApp
167
167
  end
168
168
  params = request.env['rack.request.query_hash']
169
169
  if params.count > 0
170
- puts params
171
170
  params.each do |k, v|
172
171
  nodes = nodes.keep_if do |key, item|
173
172
  item[k] == v
data/app/views/_head.erb CHANGED
@@ -5,8 +5,8 @@
5
5
  </div>
6
6
 
7
7
  <div class="nav">
8
- <% if session[:access_token] && @username != '' and @base -%>
9
- <% if settings.basepaths -%>
8
+ <% if session[:access_token] && @username != '' and @base %>
9
+ <% if settings.basepaths %>
10
10
  <div class="base">
11
11
  <span class="current"><%= @base_name %></span>
12
12
  <div class="all">
@@ -15,31 +15,31 @@
15
15
  <input type="text" name="filter" />
16
16
  </form>
17
17
 
18
- <% settings.basepaths.map { |p| File.basename(p) }.each do |e| -%>
18
+ <% settings.basepaths.map { |p| File.basename(p) }.each do |e| %>
19
19
  <div class="select"><%= e %></div>
20
- <% end -%>
20
+ <% end %>
21
21
  </div>
22
22
  </div>
23
- <% end -%>
24
- <% end -%>
23
+ <% end %>
24
+ <% end %>
25
25
 
26
- <% if session[:access_token] -%>
26
+ <% if session[:access_token] %>
27
27
  <a href="<%= @base %>/nodes" class="nodes">Nodes</a>
28
28
  <a href="<%= @base %>/farms" class="farms">Farms</a>
29
29
  <a href="<%= @base %>/modules" class="modules">Modules</a>
30
30
  <a href="<%= @base %>/resources" class="resources">Resources</a>
31
- <% end -%>
31
+ <% end %>
32
32
  </div>
33
33
 
34
- <% if session[:access_token] && @username != '' -%>
34
+ <% if session[:access_token] && @username != '' %>
35
35
  <div class="auth">
36
36
  <div class="username">
37
37
  identified as <a href="<%= @base %>/user" class="link"><%= @username %></a>
38
38
  </div>
39
39
  <a href="/logout" class="link" id="logout">Logout</a>
40
40
  </div>
41
- <% else -%>
41
+ <% else %>
42
42
  <div class="auth">
43
43
  <a href="/login" class="link" id="login">Connect</a>
44
44
  </div>
45
- <% end -%>
45
+ <% end %>
@@ -7,14 +7,14 @@
7
7
  <link href="/css/main.css" rel="stylesheet" type="text/css">
8
8
  <script src="/js/fetch.js"></script>
9
9
  <script src="/js/main.js"></script>
10
- <% if settings.basepaths -%>
10
+ <% if settings.basepaths %>
11
11
  <script src="/js/base-switch.js"></script>
12
- <% end -%>
13
- <% if session['access_token'] -%>
12
+ <% end %>
13
+ <% if session['access_token'] %>
14
14
  <script>
15
15
  var session_key = "<%= session['access_token'] %>";
16
16
  </script>
17
- <% end -%>
17
+ <% end %>
18
18
  <%= yield_content :more_js %>
19
19
  </head>
20
20
  <body>
data/app/views/home.erb CHANGED
@@ -1,7 +1,7 @@
1
1
  <div class="meat text">
2
2
  Welcome to hieraviz<br>
3
3
 
4
- <% if settings.configdata['debug'] -%>
4
+ <% if settings.configdata['debug'] %>
5
5
  <%= session['access_token'] %><br>
6
6
  <pre><%= settings.store.get(session['access_token'], settings.configdata['session_renew']) if session['access_token'] %></pre>
7
7
  </div>
data/app/views/user.erb CHANGED
@@ -8,21 +8,21 @@ ready( () => {
8
8
  <% end %>
9
9
  <div class="meat text">
10
10
  <h1>User information</h1>
11
- <% if @userinfo['avatar_url'] -%>
11
+ <% if @userinfo['avatar_url'] %>
12
12
  <img src="<%= @userinfo['avatar_url'] %>" align="left" style="margin-top:.4em;margin-right:1em;" />
13
- <% end -%>
13
+ <% end %>
14
14
  <table class="info">
15
- <% @userinfo.each do |k,v| -%>
16
- <% if %w(username id created_at email).include? k -%>
15
+ <% @userinfo.each do |k,v| %>
16
+ <% if %w(username id created_at email).include? k %>
17
17
  <tr><td><%= k %></td><td><%= v %></td></tr>
18
- <% end -%>
19
- <% end -%>
18
+ <% end %>
19
+ <% end %>
20
20
  <tr><td>Session Key</td><td><%= session['access_token'] %></td></tr>
21
- <% if settings.configdata['auth_method'] == 'gitlab' -%>
21
+ <% if settings.configdata['auth_method'] == 'gitlab' %>
22
22
  <tr><td>Manage authorization</td><td>
23
23
  <a href="<%= settings.configdata['gitlab_auth']['host'] %>/profile/applications">
24
24
  <%= settings.configdata['gitlab_auth']['host'] %>/profile/applications
25
25
  </a></td></tr>
26
- <% end -%>
26
+ <% end %>
27
27
  </table>
28
28
  </div>
@@ -7,6 +7,10 @@ module Hieraviz
7
7
  uri.path = '/logged-in'
8
8
  uri.query = nil
9
9
  uri.fragment = nil
10
+ if uri.port == 443
11
+ uri.scheme = 'https'
12
+ uri.port = nil
13
+ end
10
14
  uri.to_s
11
15
  end
12
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hieraviz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - mose
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-05 00:00:00.000000000 Z
11
+ date: 2016-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -351,36 +351,36 @@ required_rubygems_version: !ruby/object:Gem::Requirement
351
351
  version: '0'
352
352
  requirements: []
353
353
  rubyforge_project:
354
- rubygems_version: 2.4.3
354
+ rubygems_version: 2.4.8
355
355
  signing_key:
356
356
  specification_version: 4
357
357
  summary: Web and API server for accessing Puppet dev and prod data.
358
358
  test_files:
359
359
  - spec/oauth2_helper.rb
360
- - spec/files/config_dummy.yml
361
- - spec/files/hiera.yml
362
- - spec/files/config.yml
363
- - spec/files/puppet2/farm_modules/farm1/manifests/init.pp
364
- - spec/files/puppet2/hiera.yml
365
- - spec/files/puppet2/enc/node1.example.com.yaml
366
- - spec/files/puppet2/params/nodes/node1.example.com.yaml
367
- - spec/files/puppet2/params/common/common.yaml
368
- - spec/files/puppet2/modules/module1/init.pp
360
+ - spec/spec_helper.rb
361
+ - spec/app/web_dummy_auth_spec.rb
362
+ - spec/app/apiv1_spec.rb
363
+ - spec/app/web_spec.rb
369
364
  - spec/files/config_gitlab.yml
370
365
  - spec/files/config_multi.yml
371
- - spec/files/puppet/farm_modules/farm1/manifests/init.pp
372
- - spec/files/puppet/hiera.yml
373
- - spec/files/puppet/enc/node1.example.com.yaml
374
- - spec/files/puppet/params/nodes/node1.example.com.yaml
366
+ - spec/files/hiera.yml
367
+ - spec/files/config_dummy.yml
368
+ - spec/files/config.yml
375
369
  - spec/files/puppet/params/common/common.yaml
370
+ - spec/files/puppet/params/nodes/node1.example.com.yaml
371
+ - spec/files/puppet/enc/node1.example.com.yaml
372
+ - spec/files/puppet/farm_modules/farm1/manifests/init.pp
376
373
  - spec/files/puppet/modules/module1/init.pp
377
- - spec/spec_helper.rb
374
+ - spec/files/puppet/hiera.yml
375
+ - spec/files/puppet2/params/common/common.yaml
376
+ - spec/files/puppet2/params/nodes/node1.example.com.yaml
377
+ - spec/files/puppet2/enc/node1.example.com.yaml
378
+ - spec/files/puppet2/farm_modules/farm1/manifests/init.pp
379
+ - spec/files/puppet2/modules/module1/init.pp
380
+ - spec/files/puppet2/hiera.yml
381
+ - spec/sinatra_helper.rb
378
382
  - spec/lib/auth_gitlab_spec.rb
383
+ - spec/lib/puppetdb_spec.rb
379
384
  - spec/lib/config_spec.rb
380
- - spec/lib/store_spec.rb
381
385
  - spec/lib/facts_spec.rb
382
- - spec/lib/puppetdb_spec.rb
383
- - spec/sinatra_helper.rb
384
- - spec/app/web_spec.rb
385
- - spec/app/web_dummy_auth_spec.rb
386
- - spec/app/apiv1_spec.rb
386
+ - spec/lib/store_spec.rb