capistrano-nc 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MTk3OGFhMzgzOTk0YWI1MmQ0OTk5MTk3Mjc5M2VjYzBmZTBhYjRhOA==
5
+ data.tar.gz: !binary |-
6
+ YzBkNTdmZDNiYTQzZjg2NDIzZDBmNTcxODljMDEyYzc4YjdhMmY0ZA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ODk5MTgxZWQ0YTVlNmQ1ZmMzYTJlMDQxNzdjNmVjNzQ0M2JmMTU5ZWMyMGM1
10
+ N2YzMWJkZjA1MmRhMDRmZGNlZDBjYzcwYWEzMGQ3ZjY2YmM1MTE2ZDc5OWYx
11
+ ODczMTRkNTJjY2YyNTA3YzkyY2M0Mjc4ZDM5NGZiMzM3OWJkOWE=
12
+ data.tar.gz: !binary |-
13
+ MTA3YjBhNzI1MTk5YTM3MTlmMDA0YzQ5YTdlOWEwYTcyZmUxZWExN2RjYzVh
14
+ NWU0NTA4Nzc0YzkzYTYwYTBhMjIxZDhmYjAxMjU1NWVhMWZhMTdlM2MxZjQz
15
+ MGIwODQ0ODk5NmIzYTQ0MzY5YjllYTIwZjdlZDgyYzg2NThkNmU=
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ ## 0.1.0
2
+
3
+ Support for Capistrano 3.
4
+
5
+ ## 0.0.2
6
+
7
+ Initial release for Capistrano 2.
data/Gemfile CHANGED
@@ -1,8 +1,3 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
-
5
- group :development, :test do
6
- gem 'rake'
7
- gem 'rspec'
8
- end
data/README.md CHANGED
@@ -8,10 +8,38 @@ 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'`. That's it!
11
+ For Capistrano 3.x:
12
+
13
+ ```ruby
14
+ # Gemfile
15
+ gem 'capistrano-nc', '~> 0.1.0'
16
+ ```
17
+
18
+ ```ruby
19
+ # Capfile
20
+ require 'capistrano-nc/nc'
21
+ ```
22
+
23
+ For Capistrano 2.x:
24
+
25
+ ```ruby
26
+ # Gemfile
27
+ gem "capistrano-nc", "~> 0.0.2"
28
+ ```
29
+
30
+ ```ruby
31
+ # config/deploy.rb
32
+ require "capistrano-nc"
33
+ ```
34
+
35
+ By default it will run the `nc:finished` task after your `deploy` or `deploy:migrations`. If this behavior doesn't suit you, you can hook `nc:finished` to any custom task by editing `deploy.rb`:
36
+
37
+ ```
38
+ after `your:task`, `nc:finished`
39
+ ```
12
40
 
13
41
  ##Contributors
14
42
 
15
- - [Kir Shatrov](https://github.com/kirs/) (Evrone)
43
+ - [Kir Shatrov](https://github.com/kirs/)
16
44
 
17
- ##Feel free for pull requests!
45
+ ##Feel free to pull request!
data/Rakefile CHANGED
@@ -1,8 +1,3 @@
1
1
  #!/usr/bin/env rake
2
2
 
3
3
  require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task :default => :spec
@@ -1,12 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |gem|
3
3
  gem.name = 'capistrano-nc'
4
- gem.version = '0.0.2'
4
+ gem.version = '0.1.0'
5
5
  gem.authors = ['Kir Shatrov']
6
6
  gem.email = ['shatrov@me.com']
7
+ gem.summary = "Capistrano 3 integration with Mountain Lion's Notification Center"
7
8
  gem.description = 'https://github.com/evrone/capistrano-nc'
8
- gem.summary = "Capistrano integration with Mountain Lion's Notification Center"
9
- gem.description = 'https://github.com/evrone/capistrano-nc'
9
+ gem.homepage = 'https://github.com/evrone/capistrano-nc'
10
+
11
+ gem.licenses = %w(MIT)
10
12
 
11
13
  gem.add_dependency 'terminal-notifier', '~> 1.4.2'
12
14
 
data/lib/capistrano-nc.rb CHANGED
@@ -1,39 +0,0 @@
1
- require 'capistrano'
2
- require 'terminal-notifier'
3
-
4
- module CapistranoNc
5
- module Capistrano
6
- def self.load_into(configuration)
7
- configuration.load do
8
-
9
- after 'deploy', 'nc:finished'
10
- after 'deploy:migrations', 'nc:finished'
11
-
12
- namespace :nc do
13
- task :finished do
14
- if available?
15
- announced_stage = fetch(:stage, 'production')
16
-
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
23
-
24
- TerminalNotifier.notify announcement, :title => "Capistrano"
25
- end
26
- end
27
- end
28
-
29
- def available?
30
- `uname`.strip == 'Darwin' && `sw_vers -productVersion`.strip >= '10.8'
31
- end
32
- end
33
- end
34
- end
35
- end
36
-
37
- if Capistrano::Configuration.instance
38
- CapistranoNc::Capistrano.load_into(Capistrano::Configuration.instance)
39
- end
@@ -0,0 +1 @@
1
+ load File.expand_path("../tasks/nc.rake", __FILE__)
@@ -0,0 +1,32 @@
1
+ require 'terminal-notifier'
2
+
3
+ module CapistranoNc
4
+ def self.nc_supported?
5
+ `uname`.strip == 'Darwin' && os_x_version >= Gem::Version.new('10.8')
6
+ end
7
+
8
+ def self.os_x_version
9
+ Gem::Version.new(`sw_vers -productVersion`.strip)
10
+ end
11
+ end
12
+
13
+ namespace :deploy do
14
+ after :finished, 'nc:finished'
15
+ end
16
+
17
+ namespace :nc do
18
+ task :finished do
19
+ if CapistranoNc.nc_supported?
20
+ announced_stage = fetch(:stage, 'production')
21
+ application = fetch(:application)
22
+ announcement = "\u2705 Successfully deployed "
23
+ announcement += if fetch(:branch, nil)
24
+ "#{application}'s #{fetch(:branch)} to #{announced_stage}"
25
+ else
26
+ "#{application} to #{announced_stage}"
27
+ end
28
+
29
+ TerminalNotifier.notify(announcement, title: "Capistrano")
30
+ end
31
+ end
32
+ end
metadata CHANGED
@@ -1,82 +1,69 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: capistrano-nc
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 2
9
- version: 0.0.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Kir Shatrov
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2012-09-29 00:00:00 +03:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2013-10-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: terminal-notifier
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
25
17
  - - ~>
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 1
29
- - 4
30
- - 2
18
+ - !ruby/object:Gem::Version
31
19
  version: 1.4.2
32
20
  type: :runtime
33
- version_requirements: *id001
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 1.4.2
34
27
  description: https://github.com/evrone/capistrano-nc
35
- email:
28
+ email:
36
29
  - shatrov@me.com
37
30
  executables: []
38
-
39
31
  extensions: []
40
-
41
32
  extra_rdoc_files: []
42
-
43
- files:
33
+ files:
44
34
  - .gitignore
35
+ - CHANGELOG.md
45
36
  - Gemfile
46
37
  - LICENSE
47
38
  - README.md
48
39
  - Rakefile
49
40
  - capistrano-nc.gemspec
50
41
  - lib/capistrano-nc.rb
51
- has_rdoc: true
52
- homepage:
53
- licenses: []
54
-
42
+ - lib/capistrano-nc/nc.rb
43
+ - lib/capistrano-nc/tasks/nc.rake
44
+ homepage: https://github.com/evrone/capistrano-nc
45
+ licenses:
46
+ - MIT
47
+ metadata: {}
55
48
  post_install_message:
56
49
  rdoc_options: []
57
-
58
- require_paths:
50
+ require_paths:
59
51
  - lib
60
- required_ruby_version: !ruby/object:Gem::Requirement
61
- requirements:
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- segments:
65
- - 0
66
- version: "0"
67
- required_rubygems_version: !ruby/object:Gem::Requirement
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- segments:
72
- - 0
73
- version: "0"
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
74
62
  requirements: []
75
-
76
63
  rubyforge_project:
77
- rubygems_version: 1.3.6
64
+ rubygems_version: 2.1.9
78
65
  signing_key:
79
- specification_version: 3
80
- summary: Capistrano integration with Mountain Lion's Notification Center
66
+ specification_version: 4
67
+ summary: Capistrano 3 integration with Mountain Lion's Notification Center
81
68
  test_files: []
82
-
69
+ has_rdoc: