bones-git 1.2.5 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/bones/app/git.rb +1 -2
- data/lib/bones/plugins/git.rb +22 -5
- data/version.txt +1 -1
- metadata +8 -8
data/History.txt
CHANGED
data/lib/bones/app/git.rb
CHANGED
data/lib/bones/plugins/git.rb
CHANGED
@@ -5,11 +5,13 @@ module Bones::Plugins::Git
|
|
5
5
|
include ::Bones::Helpers
|
6
6
|
extend self
|
7
7
|
|
8
|
-
def
|
8
|
+
def initialize_git
|
9
9
|
have?(:git) {
|
10
10
|
Dir.entries(Dir.pwd).include?('.git') and
|
11
11
|
quiet { system("git --version") }
|
12
12
|
}
|
13
|
+
|
14
|
+
Bones::Plugins::Gem.extend GemOverrides if have? :git
|
13
15
|
end
|
14
16
|
|
15
17
|
def define_tasks
|
@@ -23,12 +25,12 @@ module Bones::Plugins::Git
|
|
23
25
|
|
24
26
|
desc 'Show tags from the git repository'
|
25
27
|
task :tags => 'git:prereqs' do |t|
|
26
|
-
puts Git.open('.').tags.map {|
|
28
|
+
puts Git.open('.').tags.map {|tg| tg.name}.reverse
|
27
29
|
end
|
28
30
|
|
29
31
|
desc 'Show all log messages since the last release'
|
30
32
|
task :changes => 'git:prereqs' do |t|
|
31
|
-
tag = Git.open('.').tags.map {|
|
33
|
+
tag = Git.open('.').tags.map {|tg| tg.name}.last
|
32
34
|
range = tag ? "#{tag}..HEAD" : ''
|
33
35
|
system "git log --oneline #{range}"
|
34
36
|
end
|
@@ -62,7 +64,7 @@ module Bones::Plugins::Git
|
|
62
64
|
git = Git.open '.'
|
63
65
|
tag = "%s-%s" % [config.name, v]
|
64
66
|
|
65
|
-
unless git.tags.map {|
|
67
|
+
unless git.tags.map {|tg| tg.name}.include? tag
|
66
68
|
puts "Tag '#{tag}' does not exist."
|
67
69
|
break
|
68
70
|
end
|
@@ -95,5 +97,20 @@ module Bones::Plugins::Git
|
|
95
97
|
task 'gem:release' => 'git:create_tag'
|
96
98
|
end
|
97
99
|
|
98
|
-
|
100
|
+
# Override the `manifest` method in the Gem plugin so that the list of
|
101
|
+
# filese to package is provided from git and its include / exclude rules.
|
102
|
+
#
|
103
|
+
module GemOverrides
|
104
|
+
|
105
|
+
# This method uses the `git ls-files` command to list the files that
|
106
|
+
# should be included in the packaging process for the project.
|
107
|
+
#
|
108
|
+
# Returns an array of filenames as Strings.
|
109
|
+
#
|
110
|
+
def manifest
|
111
|
+
%x{git ls-files}.split
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
end # Bones::Plugins::Git
|
99
116
|
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bones-git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-05 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bones
|
16
|
-
requirement: &
|
16
|
+
requirement: &2158986240 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.6'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2158986240
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: git
|
27
|
-
requirement: &
|
27
|
+
requirement: &2158985660 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.2.5
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2158985660
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bones
|
38
|
-
requirement: &
|
38
|
+
requirement: &2158985080 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 3.7.2
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2158985080
|
47
47
|
description: ! 'The git package for Mr Bones provides tasks to incorporate git actions
|
48
48
|
into
|
49
49
|
|