capistrano-nc 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -8,7 +8,7 @@ capistrano-nc integrates Capistrano and Mountain Lion's Notification Center.
8
8
  Installation
9
9
  ------------
10
10
 
11
- Just put it in your Gemfile (`gem 'capistrano-nc'`) and
11
+ Just put it in your Gemfile: `gem 'capistrano-nc'`. That's it!
12
12
 
13
13
  ##Contributors
14
14
 
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |gem|
3
3
  gem.name = 'capistrano-nc'
4
- gem.version = '0.0.1'
4
+ gem.version = '0.0.2'
5
5
  gem.authors = ['Kir Shatrov']
6
6
  gem.email = ['shatrov@me.com']
7
7
  gem.description = 'https://github.com/evrone/capistrano-nc'
data/lib/capistrano-nc.rb CHANGED
@@ -11,18 +11,24 @@ module CapistranoNc
11
11
 
12
12
  namespace :nc do
13
13
  task :finished do
14
- announced_stage = fetch(:stage, 'production')
14
+ if available?
15
+ announced_stage = fetch(:stage, 'production')
15
16
 
16
- announcement = "\u2705 Successfully deployed "
17
- announcement += if fetch(:branch, nil)
18
- "#{application}'s #{branch} to #{announced_stage}"
19
- else
20
- "#{application} to #{announced_stage}"
21
- end
17
+ announcement = "\u2705 Successfully deployed "
18
+ announcement += if fetch(:branch, nil)
19
+ "#{application}'s #{branch} to #{announced_stage}"
20
+ else
21
+ "#{application} to #{announced_stage}"
22
+ end
22
23
 
23
- TerminalNotifier.notify announcement, :title => "Capistrano"
24
+ TerminalNotifier.notify announcement, :title => "Capistrano"
25
+ end
24
26
  end
25
27
  end
28
+
29
+ def available?
30
+ `uname`.strip == 'Darwin' && `sw_vers -productVersion`.strip >= '10.8'
31
+ end
26
32
  end
27
33
  end
28
34
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kir Shatrov