capistrano-commons 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjZjZjI3MzJiODY3ODVjMTE0OGM0OTU2YTRkYTVhM2Q4ODA4NjE5NA==
4
+ ZWJjN2JhZDA4ZDUwNzI4OTYwYjAwZTYyZjQxYzcxZDVkZDdkMmQ1OA==
5
5
  data.tar.gz: !binary |-
6
- NWJhYjFkYTAzYjZmYjE2ZGEyYzQzZmJmMTFmMmNlNTA2NGQ3NTgzZg==
6
+ ODAyYmUxOTczYzRiMzdiZmVjOWQ3MTc3OGExZjA3MmUzMjcwMmE5YQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjhhYWY4ZDFmZTJhODNlNjIwNGFkMzBjODNhZjRjN2UyZjQ2ZjFlM2E4NDg5
10
- ODhkNjBlYmNkNWMyMzk3NWZlYWIzODZkNDA0NzFmNmQxYTMyZjljNDI1YWYx
11
- NGNlYTQ1YmI0N2E3NTE1YzdmY2Y4MjRkOGVmZWIxMzQ4YjUxMTk=
9
+ YzcxMjk3OTYzMjc3ZTQxZGRlZTlkNWFjZGY2ZjkwOWFlZGQxYWQ5ZmFiODRk
10
+ ZjBmMjQ5OWMyNjgxMDA3OTAyOGFlODU0NDJlNTk2YTAwNzAyMDk1MzVjZmFj
11
+ YTVhMjExZjRjMDczMzllYzlhOWE4ZGM4ZDkxZmE3ZWM2YzU2MzI=
12
12
  data.tar.gz: !binary |-
13
- MTAzMDk1MjVmNjE4Y2UxY2Y4YjI3NzE4YTVmNWMyYWM3ZDQ4ZmI2YmNlN2Jl
14
- MTRiMDA4ZmFmMTBmZjMzNGQ2NWRmMjc1MTkwNmNlNWVhOWVmOWZjYTBkMWJj
15
- YTg1NGY5YjI2MTdhNjZmM2EzN2I3N2NjN2QzYzJjMjJhODViMWU=
13
+ ZjdjNTE2OGE1MzE1MTFmMTFlNzk4MzgzMjM4M2NmM2Q2Y2Y4YjM3ZjlhZWEw
14
+ ODU2MTdjYWI0YTNlM2MxOTJhZGUyMTRiZWQ5MDRlZGJkZjhiMjUzOTFhOGY0
15
+ OTE0ODI2Njk3NDc5OTAxYWEyNzUyZGU1MGRhMmZlNTlhZjI2YWI=
@@ -1,5 +1,28 @@
1
1
  Capistrano::Configuration.instance(:must_exist).load do
2
2
 
3
+ class Array
4
+ def count_by(&block)
5
+ groups = self.group_by(&block)
6
+ groups.each { |key, group| groups[key] = group.size }
7
+ end
8
+
9
+ def counts
10
+ count_by { |o| o }
11
+ end
12
+ end
13
+
14
+ def github_commit_link(sha)
15
+ "https://github.com/#{fetch(:github_project)}/commit/#{sha}"
16
+ end
17
+
18
+ def github_pullrequest_link(pr)
19
+ "https://github.com/#{fetch(:github_project)}/pull/#{pr}"
20
+ end
21
+
22
+ def github_compare_link(a, b)
23
+ "https://github.com/#{fetch(:github_project)}/compare/#{a}...#{b}"
24
+ end
25
+
3
26
  namespace :deploy do
4
27
 
5
28
  desc "Tag the release"
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Commons
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Powles