lita-puppet 0.6.0 → 0.6.1

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: 19f5faac942550056a8e622b8772e076899582b4
4
- data.tar.gz: 9dbf11d646540f12618c38ddd9a81e58a8f4284c
3
+ metadata.gz: 24922d792c78cac0dbc47d19319680e6d4aa8e65
4
+ data.tar.gz: af23e3bb3dce2e5a053356a8ae03128b5d18b426
5
5
  SHA512:
6
- metadata.gz: d6fb934ddce658daf2c9e554d06a5e29ad7582420cd1f272ca11afeb60cf3e73c53c96a5d5dda1f5af8dd4a505f2e23f36c78f2d132a13af1d8b0163b3984714
7
- data.tar.gz: a4f7ca178ec3245a5300765a139e69d4fab76f0abc4b2cbf1775c7ec5f38436db05141495c5ca8685e4e640ac95dd0451b3a39ef1e3666d64c3db5ef03e464b3
6
+ metadata.gz: 3fa73002df79c370f7d4717d99a5b8784ab3a1fd4435e7ebf7e9d36f91e52aea1d2220dd50869ca3ad6d3d2089256f96b0525a2f3560f5a63dce0d0d398e3bee
7
+ data.tar.gz: 969b0634bc6f682a5118b16a7c08c904deff71f2d640632964ae079c2ca61fccb5c2335baf599942a885a8d1c1df37276d6cc0dd22db83b38afb04e46b7bc7a7
data/README.md CHANGED
@@ -59,7 +59,7 @@ This is also available as:
59
59
  pp catalog <certname> profiles
60
60
  pp node <certname> profiles
61
61
 
62
- Where `<certname>` is the SSL certificate name used for Puppet. This is usually the FQDN for the host.
62
+ Where `<certname>` is the SSL certificate name used for Puppet. This is usually the FQDN for the host. This query assumes you use the roles and profiles paradigm with the classes namespaced as `profile::example` and `role::example` etc..
63
63
 
64
64
  #### Query PuppetDB for the nodes associated with a class
65
65
  puppet class nodes <class>
@@ -158,8 +158,9 @@ module Lita
158
158
  end
159
159
 
160
160
  response.reply("#{username}, let me see what I can find in PuppetDB for you.")
161
-
162
- puppet_classes = class_nodes(url, puppet_class)
161
+
162
+ search = class_camel(puppet_class)
163
+ puppet_classes = class_nodes(url, search)
163
164
  if puppet_classes.empty?
164
165
  response.reply("There are no nodes with #{puppet_class} class, are you sure its a valid class?")
165
166
  return false
data/lib/utils/text.rb CHANGED
@@ -12,6 +12,11 @@ module Utils
12
12
  text.gsub(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]/, '')
13
13
  end
14
14
 
15
+ # camel case puppet classes
16
+ def class_camel(text)
17
+ text.split('::').map(&:capitalize).join('::')
18
+ end
19
+
15
20
  # Format some text as code
16
21
  # Note that this is HipChat specific for the moment
17
22
  # TODO: Make this *not* HipChat specific
@@ -19,4 +24,5 @@ module Utils
19
24
  "/code " + sanitze_for_chat(text)
20
25
  end
21
26
  end
27
+
22
28
  end
data/lita-puppet.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-puppet"
3
- spec.version = "0.6.0"
3
+ spec.version = "0.6.1"
4
4
  spec.authors = ["Daniel Schaaff", "Jonathan Gnagy"].sort
5
5
  spec.email = ["jgnagy@knuedge.com"]
6
6
  spec.description = "Some basic Puppet interactions for Lita"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Schaaff
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-10-28 00:00:00.000000000 Z
12
+ date: 2016-11-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: lita