puppetdb_foreman 0.1.1 → 0.1.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: 2be90389f7d589d0528935011494b49bc19d4898
4
- data.tar.gz: 930be56d170f4a5d2ed8583657cc701bfb077a70
3
+ metadata.gz: 8a81b111e883eae3b66330a375019b9f65227baa
4
+ data.tar.gz: 3611a9e15096142d581d8c35eef162b23050d0d1
5
5
  SHA512:
6
- metadata.gz: 05f1f3b7eeda1dde8582309bd6a985d1aad7f2bc4772046284849bd319cfb7f6cc493e5716e31b2776547f80d4d1c359c04f30452bc2ce21b7572851129fe996
7
- data.tar.gz: 39fb3e971c4f7563b61eb374d5f1ef59b064d9f47019ee682053fc0edfee3ab87aee6f21855a3f6e80f11be696fda40c5c6471ff0ab2bab663c4acbb5745d24e
6
+ metadata.gz: ca1268d68b4d4fc521f4bd6cc79efdb2bb9a3e0823067a1ad50b8c52b6dfa2268a9dd968b729b82baf6b3614b03a5cdb865d8e612e63fd4ca579aed914e6e1dc
7
+ data.tar.gz: 23f80d5b4ae21f6ecfc96630f7d36699d1ce5a11144347fe2f0e33ffab154a37fd1bbcad52bb71f6056fc0bab9f7bf96802283a878bd2cdf6f84cfc243508940
@@ -12,6 +12,13 @@ module PuppetdbForeman
12
12
  result = Net::HTTP.get_response(uri.host, puppetdb_url, uri.port)
13
13
  render :text => result.body, :layout => layout
14
14
  rescue SocketError => error
15
+ @proxy_error = "Problem connecting to host #{uri.host} on port #{uri.port}"
16
+ render :action => :error, :layout => true
17
+ rescue Errno::ECONNREFUSED => error
18
+ @proxy_error = "#{uri.host} refused our conneciton"
19
+ render :action => :error, :layout => true
20
+ rescue EOFError => error
21
+ @proxy_error = "Don't use ssl (https)"
15
22
  render :action => :error, :layout => true
16
23
  end
17
24
  end
@@ -1,19 +1,3 @@
1
- #
2
- # Copyright 2013 CERN, Switzerland
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
-
17
1
  module PuppetdbForeman
18
2
  module HostExtensions
19
3
  extend ActiveSupport::Concern
@@ -1,4 +1,4 @@
1
1
  <div class="alert alert-block alert-warning">
2
- <p><strong><%= _("Notice") %></strong> <%= _("Error Proxying PuppetDB Dashboard") %></p>
2
+ <p><strong><%= _("Notice") %></strong> <%= _("Error Proxying PuppetDB Dashboard: #{@proxy_error}") %></p>
3
3
  <p><%= _("Maybe you need to set") %> <%= link_to(_("puppetdb_dashboard_address"), settings_path(:search => 'puppetdb_dashboard_address')) %> <%= _("in Settings") %></p>
4
4
  </div>
@@ -1,18 +1,3 @@
1
- #
2
- # Copyright 2013 CERN, Switzerland
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
1
  module PuppetdbForeman
17
2
  class Engine < ::Rails::Engine
18
3
 
@@ -1,19 +1,3 @@
1
- #
2
- # Copyright 2013 CERN, Switzerland
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
16
-
17
1
  module PuppetdbForeman
18
2
  require 'puppetdb_foreman/engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
19
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppetdb_foreman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lobato Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-11 00:00:00.000000000 Z
11
+ date: 2014-11-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Disable hosts on PuppetDB after they are deleted or built in Foreman,
14
14
  and proxy the PuppetDB dashboard to Foreman. Follow https://github.com/theforeman/puppetdb_foreman
@@ -28,7 +28,7 @@ files:
28
28
  - lib/puppetdb_foreman/engine.rb
29
29
  homepage: http://www.github.com/theforeman/puppetdb_foreman
30
30
  licenses:
31
- - Apache-2.0
31
+ - GPL-3
32
32
  metadata: {}
33
33
  post_install_message:
34
34
  rdoc_options: []