visage-app 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -8,3 +8,5 @@ webrat*
8
8
  lib/visage-app/config/profiles.yaml
9
9
  _site
10
10
  features/data/config/*/*.yaml
11
+ vendor
12
+ .bundle
@@ -1,3 +1,8 @@
1
+ 2.0.5 - 2012/03/30
2
+ - Fix a bug where metrics occasionally won't appear in the builder interface.
3
+ Thanks to Jesse Reynolds for the patch!
4
+ - Add documentation on how to do a release, for when I get hit by a bus.
5
+
1
6
  2.0.4 - 2012/03/27
2
7
  - Add extra input validation in the builder, so invalid data can't be entered
3
8
  into `profiles.yaml`, per [issue 92](https://github.com/auxesis/visage/issues/92)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- visage-app (2.0.4)
4
+ visage-app (2.0.5)
5
5
  errand (= 0.7.3)
6
6
  haml (= 3.1.4)
7
7
  sinatra (= 1.3.2)
data/README.md CHANGED
@@ -224,6 +224,15 @@ To create and install a new gem from the current source tree:
224
224
  rake install
225
225
  ```
226
226
 
227
+ Releasing
228
+ ---------
229
+
230
+ # Bump the version in lib/visage-app/version.rb
231
+ # Add an entry to CHANGELOG.md
232
+ # `git commit` everything.
233
+ # Build the gem with `rake build`
234
+ # Push the gem to RubyGems.org with `rake push`
235
+
227
236
  Licencing
228
237
  ---------
229
238
 
@@ -17,7 +17,7 @@ module Visage
17
17
  def hosts(opts={})
18
18
  hosts = opts[:hosts]
19
19
  case hosts
20
- when String && /,/
20
+ when String
21
21
  glob = "{#{hosts}}"
22
22
  when Array
23
23
  glob = "{#{opts[:hosts].join(',')}}"
@@ -41,14 +41,21 @@ module Visage
41
41
  metric_glob = "*/*"
42
42
  end
43
43
 
44
- selected_hosts.map { |host|
44
+ dametrics = selected_hosts.map { |host|
45
45
  Dir.glob("#{rrddir}/#{host}/#{metric_glob}.rrd").map {|filename|
46
46
  filename[/#{rrddir}\/#{host}\/(.*)\.rrd/, 1]
47
47
  }
48
- }.reduce(:&)
48
+ }
49
+ if (dametrics.length) == 1
50
+ dametrics.first
51
+ else
52
+ dametrics.reduce(:&)
53
+ end
54
+
49
55
  #else
50
56
  # Dir.glob("#{rrddir}/#{host_glob}/#{glob}.rrd").map {|e| e.split('/')[-2..-1].join('/').gsub(/\.rrd$/, '')}.sort.uniq
51
57
  #end
58
+
52
59
  end
53
60
 
54
61
  end
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  module Visage
4
- VERSION = "2.0.4"
4
+ VERSION = "2.0.5"
5
5
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 0
8
- - 4
9
- version: 2.0.4
8
+ - 5
9
+ version: 2.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Lindsay Holmwood
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-03-26 00:00:00 +11:00
17
+ date: 2012-03-30 00:00:00 +11:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency