vclog 1.9.1 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.ruby +6 -12
- data/{HISTORY.rdoc → History.md} +34 -13
- data/License.txt +28 -0
- data/{README.rdoc → README.md} +18 -20
- data/bin/vclog-news +6 -0
- data/lib/vclog.yml +6 -12
- data/lib/vclog/cli/news.rb +29 -0
- data/lib/vclog/config.rb +151 -0
- data/lib/vclog/heuristics.rb +33 -1
- data/lib/vclog/history_file.rb +5 -0
- data/lib/vclog/repo.rb +20 -40
- data/lib/vclog/report.rb +30 -17
- data/man/man1/index.txt +1 -0
- data/man/man1/vclog-autotag.1.html +2 -2
- data/man/man1/vclog-bump.1.html +2 -2
- data/man/man1/vclog-news.1 +25 -0
- data/man/man1/vclog-news.1.html +112 -0
- data/man/man1/vclog-news.1.ronn +25 -0
- data/man/man1/vclog-version.1.html +2 -2
- data/man/man1/vclog.1.html +2 -2
- data/spec/feature_git_changes.rb +58 -0
- data/spec/feature_git_history.rb +58 -0
- data/spec/feature_hg_changes.rb +58 -0
- data/spec/feature_hg_history.rb +58 -0
- data/spec/featurettes/repo_creation.rb +64 -0
- data/spec/featurettes/shellout.rb +16 -0
- data/test/case_metadata.rb +10 -0
- metadata +41 -60
- data/COPYING.rdoc +0 -32
- data/features/git.feature +0 -86
- data/features/hg.feature +0 -86
- data/features/step_definitions/history_steps.rb +0 -29
- data/features/step_definitions/repo_steps.rb +0 -72
- data/features/support/ae.rb +0 -1
- data/features/support/aruba.rb +0 -5
- data/features/support/loadpath.rb +0 -2
- data/features/support/repo.rb +0 -19
- data/features/svn.feature +0 -86
- data/test/unit/case_metadata.rb +0 -11
- data/test/unit/helper.rb +0 -4
data/.ruby
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
source:
|
3
|
-
-
|
3
|
+
- meta
|
4
4
|
authors:
|
5
5
|
- name: Trans
|
6
6
|
email: transfire@gmail.com
|
@@ -8,14 +8,11 @@ copyrights:
|
|
8
8
|
- holder: Rubyworks
|
9
9
|
year: '2009'
|
10
10
|
license: BSD-2-Clause
|
11
|
-
replacements: []
|
12
|
-
alternatives: []
|
13
11
|
requirements:
|
14
12
|
- name: facets
|
15
13
|
version: 2.4+
|
16
14
|
- name: ansi
|
17
15
|
version: 1.2+
|
18
|
-
- name: confection
|
19
16
|
- name: rdoc
|
20
17
|
- name: xml-simple
|
21
18
|
- name: detroit
|
@@ -26,19 +23,16 @@ requirements:
|
|
26
23
|
groups:
|
27
24
|
- test
|
28
25
|
development: true
|
29
|
-
- name:
|
26
|
+
- name: lime
|
30
27
|
groups:
|
31
28
|
- test
|
32
29
|
development: true
|
33
|
-
- name:
|
34
|
-
groups:
|
35
|
-
- test
|
36
|
-
development: true
|
37
|
-
- name: aruba
|
30
|
+
- name: ae
|
38
31
|
groups:
|
39
32
|
- test
|
40
33
|
development: true
|
41
34
|
dependencies: []
|
35
|
+
alternatives: []
|
42
36
|
conflicts: []
|
43
37
|
repositories:
|
44
38
|
- uri: git://github.com/rubyworks/vclog.git
|
@@ -54,8 +48,8 @@ revision: 0
|
|
54
48
|
created: '2006-05-09'
|
55
49
|
summary: Cross-VCS/SCM ChangeLog Generator
|
56
50
|
title: VCLog
|
57
|
-
version: 1.9.
|
51
|
+
version: 1.9.2
|
58
52
|
name: vclog
|
59
53
|
description: VCLog is a cross-VCS/SCM ChangeLog generator.
|
60
54
|
organization: Rubyworks
|
61
|
-
date: '
|
55
|
+
date: '2012-03-03'
|
data/{HISTORY.rdoc → History.md}
RENAMED
@@ -1,6 +1,23 @@
|
|
1
|
-
|
1
|
+
# RELEASE HISTORY
|
2
2
|
|
3
|
-
|
3
|
+
## 1.9.2 / 2012-03-03
|
4
|
+
|
5
|
+
Adds `vclog-news` command to output the lastest release entry in a project History file.
|
6
|
+
Also attempts to fix issue #14 in which template is not being found --will at least
|
7
|
+
report more useful error message if it happens in the future. Also, improved handling
|
8
|
+
of configuration. You can now use `.vclog`, `config/vclog` or `.config/vclog`
|
9
|
+
by defatult, or add `vclog: path/to/config/file` entry to `.map` file is you wish
|
10
|
+
to use unconventional location.
|
11
|
+
|
12
|
+
Changes:
|
13
|
+
|
14
|
+
* Add news command to get latest release history.
|
15
|
+
* Improve configuration file handling.
|
16
|
+
* Improve Report code to avoid missing templates.
|
17
|
+
* Switch to Lime for spec testing, instead of Cucumber.
|
18
|
+
|
19
|
+
|
20
|
+
## 1.9.1 / 2011-12-13
|
4
21
|
|
5
22
|
Fixes a couple of issues found with the last release.
|
6
23
|
|
@@ -10,7 +27,7 @@ Changes:
|
|
10
27
|
* Fix tag id in git tag parser.
|
11
28
|
|
12
29
|
|
13
|
-
|
30
|
+
## 1.9.0 / 2011-12-12
|
14
31
|
|
15
32
|
This is a BIG release and much has changed, so be sure to read the following
|
16
33
|
carefully if you've used VClog before.
|
@@ -80,7 +97,7 @@ Changes:
|
|
80
97
|
* Add autotag feature to ensure release history tags exits.
|
81
98
|
|
82
99
|
|
83
|
-
|
100
|
+
## 1.7.0 / 2010-06-27
|
84
101
|
|
85
102
|
In this release the heuristics interface has changed such that the block is passed the commit message and the matchdata, instead of the previous matchdata splat. The rule can alos return either the sybolic label or a two element array of label and new message, which allows the rule to "massage" the message as needed. This release also improves the git log parser to be much more robust.
|
86
103
|
|
@@ -90,7 +107,7 @@ Changes:
|
|
90
107
|
* Improve git log parser, which should handle all possible cases now.
|
91
108
|
|
92
109
|
|
93
|
-
|
110
|
+
## 1.6.1 / 2010-06-23
|
94
111
|
|
95
112
|
This release repairs the Atom feed format and adds an RSS feed format. Both formats are nearly conformant with strict validations --only a couple minor issues remain to iron out (such as embedded feed url). Ragardless, they should work fine with feed readers (which are not as strict).
|
96
113
|
|
@@ -102,7 +119,7 @@ Changes:
|
|
102
119
|
* Add title to HTML Change Log format.
|
103
120
|
|
104
121
|
|
105
|
-
|
122
|
+
## 1.6.0 / 2010-06-22
|
106
123
|
|
107
124
|
Previous versions utilized a system of "commit tagging" to identify types of commits. This proved less than optimal --it was unconventional, but worse it was easy to forget to put the proper label in the message. The new version of VClog uses a customizable heuristics systems instead. Rather than be limited to a strict syntax structure, you can write matching rules in .config/vclog/rules.rb that determine the commit type, and set descriptive labels for each type. This makes it very easy to get excellent History output. Also in this release the command-line interface has changed to use subcommands. And the default output format is now an ANSI-color GNU-like format. Use `-f gnu` to get the old default format.
|
108
125
|
|
@@ -114,7 +131,7 @@ Changes:
|
|
114
131
|
* Command-line interface uses subcommands
|
115
132
|
|
116
133
|
|
117
|
-
|
134
|
+
## 1.5.0 / 2010-05-29
|
118
135
|
|
119
136
|
This release adds support for Mercurial repositories and Atom newsfeed output format. The commandline inteface has change such that <code>--foramt</code>/<code>-f</code> is used to select the format instead of using the previous per-format options, e.g. use <code>-f xml</code> instead of <code>--xml</code>. This release also includes some subtantial changes under-the-hood --the first of a two part code refactoring process.
|
120
137
|
|
@@ -130,7 +147,7 @@ Changes:
|
|
130
147
|
* Select format using -f option.
|
131
148
|
|
132
149
|
|
133
|
-
|
150
|
+
## 1.4.0 / 2010-05-26
|
134
151
|
|
135
152
|
This release includes some basic improvments and a few bug fixes. The primary change you might encounter is the need to use -e or --extra in order to see the detailed Changes list in the Release History. Also changed 'git-log' to 'git log', as it seems the latest versions of git does not support the many executables any longer. SVN support requires xmlsimple library. Note also that SVN support is lack luster at this time becuase it hits the server every time an 'svn log' command is issued which is done once for each tag when a history is generated (any one know a better way?).
|
136
153
|
|
@@ -148,7 +165,7 @@ Changes:
|
|
148
165
|
* Change 'git-log' to 'git log'.
|
149
166
|
|
150
167
|
|
151
|
-
|
168
|
+
## 1.3.0 / 2010-02-08
|
152
169
|
|
153
170
|
For the an end-user the only significant change is the support of 'label:' notation for commit labels. I have found that I am much more apt to use them if they come first in the commit message and that some developers already use the 'label:' notation to specify 'system module' effected --a useful system of labeling.
|
154
171
|
|
@@ -168,7 +185,7 @@ Changes:
|
|
168
185
|
* Corrected error for --current and --bump commands.
|
169
186
|
|
170
187
|
|
171
|
-
|
188
|
+
## 1.2.0 / 2009-10-26
|
172
189
|
|
173
190
|
Version 1.2 overhuals the internals so that History output is based on scm tags, not on a pre-existing history file. This is really the proper way to go about it and those who use it will, I think, be happily surprised at how it promotes good practices for the maintenance of History files. This overhaul led to substantial changes in the command-line interface.
|
174
191
|
|
@@ -180,7 +197,7 @@ Changes:
|
|
180
197
|
* Changed command-line interface.
|
181
198
|
|
182
199
|
|
183
|
-
|
200
|
+
## 1.1.0 / 2009-10-23
|
184
201
|
|
185
202
|
This release adds yaml and json formats an improves
|
186
203
|
the command.
|
@@ -197,20 +214,24 @@ Changes:
|
|
197
214
|
* Use OptionParser instead of GetoptLong.
|
198
215
|
|
199
216
|
|
200
|
-
|
217
|
+
## 1.0.0 / 2009-10-13
|
201
218
|
|
202
219
|
This is the first "production" release of VCLog.
|
203
220
|
|
221
|
+
Changes:
|
222
|
+
|
204
223
|
* 2 Major Enhancements
|
205
224
|
|
206
225
|
* Improved command line interface.
|
207
226
|
* Added output option to save changelog.
|
208
227
|
|
209
228
|
|
210
|
-
|
229
|
+
## 0.1.0 / 2009-08-17
|
211
230
|
|
212
231
|
This is the initial version of vclog.
|
213
232
|
|
233
|
+
Changes:
|
234
|
+
|
214
235
|
* 1 Major Enhancement
|
215
236
|
|
216
237
|
* Happy Birthday
|
data/License.txt
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
(BSD-2-Clause License)
|
2
|
+
|
3
|
+
VCLog - Mult-platform VCS Logging Tool
|
4
|
+
http://rubyworks.github.com/vclog
|
5
|
+
|
6
|
+
Copyright (c) 2008 Rubyworks. All rights reserved.
|
7
|
+
|
8
|
+
Redistribution and use in source and binary forms, with or without
|
9
|
+
modification, are permitted provided that the following conditions are met:
|
10
|
+
|
11
|
+
1. Redistributions of source code must retain the above copyright notice,
|
12
|
+
this list of conditions and the following disclaimer.
|
13
|
+
|
14
|
+
2. Redistributions in binary form must reproduce the above copyright
|
15
|
+
notice, this list of conditions and the following disclaimer in the
|
16
|
+
documentation and/or other materials provided with the distribution.
|
17
|
+
|
18
|
+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
19
|
+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
20
|
+
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
21
|
+
COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
22
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
23
|
+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
24
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
25
|
+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
26
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
27
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28
|
+
|
data/{README.rdoc → README.md}
RENAMED
@@ -1,22 +1,22 @@
|
|
1
|
-
|
1
|
+
# VCLog
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
[Website](http://rubyworks.github.com/vclog) /
|
4
|
+
[Source Code](http://github.com/rubyworks/vclog) /
|
5
|
+
[Report Issue](http://github.com/rubyworks/vclog/issues) /
|
6
|
+
[Mailing List](http://googlegroups.com/group/rubyworks-mailinglist)
|
7
7
|
|
8
|
-
|
8
|
+
[![Build Status](https://secure.travis-ci.org/rubyworks/vclog.png)](http://travis-ci.org/rubyworks/vclog)
|
9
9
|
|
10
10
|
|
11
|
-
|
11
|
+
## Description
|
12
12
|
|
13
13
|
VCLog is a versatile cross-VCS/SCM changelog generator.
|
14
14
|
It currently supports Git, Hg and (limited) Subversion.
|
15
15
|
|
16
16
|
|
17
|
-
|
17
|
+
## Instruction
|
18
18
|
|
19
|
-
|
19
|
+
### Creating Changelogs
|
20
20
|
|
21
21
|
The default output is an ANSI colored GNU-like changelog.
|
22
22
|
From a repository's root directory try:
|
@@ -31,7 +31,7 @@ To generate an a different format use -f:
|
|
31
31
|
|
32
32
|
$ vclog -f xml
|
33
33
|
|
34
|
-
|
34
|
+
### Creating Release Histories
|
35
35
|
|
36
36
|
To get a release history specify `-r`, `--release` or `--history` option.
|
37
37
|
|
@@ -46,7 +46,7 @@ the tag is used.
|
|
46
46
|
|
47
47
|
See 'vclog help' for more options.
|
48
48
|
|
49
|
-
|
49
|
+
### Bumping Versions
|
50
50
|
|
51
51
|
VCLog can also be used to intelligently bump versions. To see the current
|
52
52
|
tag version:
|
@@ -64,7 +64,7 @@ commit with a level greater than 1 will bump the major number, while any
|
|
64
64
|
commit with a level of 0 or 1 will bump the minor number. All lower
|
65
65
|
level only bump the patch level.
|
66
66
|
|
67
|
-
|
67
|
+
### Writing Heuristics
|
68
68
|
|
69
69
|
You can configure custom log heuristics for your project. VCLog uses
|
70
70
|
the {confection gem}[http://rubyworks.github.com/confection] to
|
@@ -106,7 +106,9 @@ method.
|
|
106
106
|
colors :blue, :cyan, :green, :yellow, :red
|
107
107
|
|
108
108
|
|
109
|
-
|
109
|
+
## Limitations
|
110
|
+
|
111
|
+
### Subversion
|
110
112
|
|
111
113
|
Because Subversion is a centralized version control system, it contacts
|
112
114
|
the server every time 'svn log' is run. For this reason, having vclog
|
@@ -116,15 +118,11 @@ access by the server for making too many rapid requests. I have no
|
|
116
118
|
idea how to remedy this issue. If you have any ideas please let me know.
|
117
119
|
|
118
120
|
|
119
|
-
|
120
|
-
|
121
|
-
Please see HISTORY file.
|
122
|
-
|
123
|
-
|
124
|
-
== COPYRIGHTS
|
121
|
+
## License
|
125
122
|
|
126
123
|
Copyright (c) 2008 Rubyworks
|
127
124
|
|
128
125
|
VCLog is distributable in accordance with the terms of the *FreeBSD* license.
|
129
126
|
|
130
|
-
See
|
127
|
+
See License.txt for details.
|
128
|
+
|
data/bin/vclog-news
ADDED
data/lib/vclog.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
source:
|
3
|
-
-
|
3
|
+
- meta
|
4
4
|
authors:
|
5
5
|
- name: Trans
|
6
6
|
email: transfire@gmail.com
|
@@ -8,14 +8,11 @@ copyrights:
|
|
8
8
|
- holder: Rubyworks
|
9
9
|
year: '2009'
|
10
10
|
license: BSD-2-Clause
|
11
|
-
replacements: []
|
12
|
-
alternatives: []
|
13
11
|
requirements:
|
14
12
|
- name: facets
|
15
13
|
version: 2.4+
|
16
14
|
- name: ansi
|
17
15
|
version: 1.2+
|
18
|
-
- name: confection
|
19
16
|
- name: rdoc
|
20
17
|
- name: xml-simple
|
21
18
|
- name: detroit
|
@@ -26,19 +23,16 @@ requirements:
|
|
26
23
|
groups:
|
27
24
|
- test
|
28
25
|
development: true
|
29
|
-
- name:
|
26
|
+
- name: lime
|
30
27
|
groups:
|
31
28
|
- test
|
32
29
|
development: true
|
33
|
-
- name:
|
34
|
-
groups:
|
35
|
-
- test
|
36
|
-
development: true
|
37
|
-
- name: aruba
|
30
|
+
- name: ae
|
38
31
|
groups:
|
39
32
|
- test
|
40
33
|
development: true
|
41
34
|
dependencies: []
|
35
|
+
alternatives: []
|
42
36
|
conflicts: []
|
43
37
|
repositories:
|
44
38
|
- uri: git://github.com/rubyworks/vclog.git
|
@@ -54,8 +48,8 @@ revision: 0
|
|
54
48
|
created: '2006-05-09'
|
55
49
|
summary: Cross-VCS/SCM ChangeLog Generator
|
56
50
|
title: VCLog
|
57
|
-
version: 1.9.
|
51
|
+
version: 1.9.2
|
58
52
|
name: vclog
|
59
53
|
description: VCLog is a cross-VCS/SCM ChangeLog generator.
|
60
54
|
organization: Rubyworks
|
61
|
-
date: '
|
55
|
+
date: '2012-03-03'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'vclog/cli/abstract'
|
2
|
+
|
3
|
+
module VCLog::CLI
|
4
|
+
|
5
|
+
#
|
6
|
+
class News < Abstract
|
7
|
+
|
8
|
+
#
|
9
|
+
def self.terms
|
10
|
+
['news']
|
11
|
+
end
|
12
|
+
|
13
|
+
#
|
14
|
+
def parser
|
15
|
+
super do |opt|
|
16
|
+
opt.banner = "Usage: vclog-news"
|
17
|
+
opt.separator(" ")
|
18
|
+
opt.separator("Display first release note from history file.")
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
#
|
23
|
+
def execute
|
24
|
+
puts repo.history_file.news #(version)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
data/lib/vclog/config.rb
ADDED
@@ -0,0 +1,151 @@
|
|
1
|
+
require 'vclog/heuristics'
|
2
|
+
|
3
|
+
module VCLog
|
4
|
+
|
5
|
+
# Encapsulates configuration settings for running vclog.
|
6
|
+
#
|
7
|
+
class Config
|
8
|
+
|
9
|
+
#
|
10
|
+
# If not in a default location a `.map` entry can be used to
|
11
|
+
# tell vclog where the config file it located.
|
12
|
+
#
|
13
|
+
# @example
|
14
|
+
# ---
|
15
|
+
# vclog: task/vclog.rb
|
16
|
+
#
|
17
|
+
MAP_FILE = ".map"
|
18
|
+
|
19
|
+
#
|
20
|
+
# Default vclog config file glob looks for these possible matches in order:
|
21
|
+
#
|
22
|
+
# * .vclog
|
23
|
+
# * .config/vclog
|
24
|
+
# * config/vclog
|
25
|
+
# * .dot/vclog
|
26
|
+
# * dot/vclog
|
27
|
+
#
|
28
|
+
# File may have optional `.rb` extension.
|
29
|
+
#
|
30
|
+
DEFAULT_GLOB = '{.,.config/,config/.dot/,dot/}vclog{,.rb}'
|
31
|
+
|
32
|
+
#
|
33
|
+
#
|
34
|
+
#
|
35
|
+
def initialize(options={})
|
36
|
+
@root = options[:root] || lookup_root
|
37
|
+
@level = options[:level] || 0
|
38
|
+
@force = options[:force] || false
|
39
|
+
@version = options[:version]
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Project's root directory.
|
44
|
+
#
|
45
|
+
attr :root
|
46
|
+
|
47
|
+
#
|
48
|
+
# Default change level.
|
49
|
+
#
|
50
|
+
def level
|
51
|
+
heuristics.level
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Force mode active?
|
56
|
+
#
|
57
|
+
def force?
|
58
|
+
@force
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Indicates the version of HEAD.
|
63
|
+
#
|
64
|
+
def version
|
65
|
+
@version
|
66
|
+
end
|
67
|
+
|
68
|
+
#
|
69
|
+
# Load heuristics.
|
70
|
+
#
|
71
|
+
def heuristics
|
72
|
+
@heuristics ||= (
|
73
|
+
if file
|
74
|
+
Heuristics.load(file)
|
75
|
+
else
|
76
|
+
Heuristics.new
|
77
|
+
end
|
78
|
+
)
|
79
|
+
end
|
80
|
+
|
81
|
+
#
|
82
|
+
# Which version control system?
|
83
|
+
#
|
84
|
+
def vcs_type
|
85
|
+
@vcs_type ||= (
|
86
|
+
dir = nil
|
87
|
+
Dir.chdir(root) do
|
88
|
+
dir = Dir.glob("{.git,.hg,.svn,_darcs}").first
|
89
|
+
end
|
90
|
+
dir[1..-1] if dir
|
91
|
+
)
|
92
|
+
end
|
93
|
+
|
94
|
+
#
|
95
|
+
# The vclog config file.
|
96
|
+
#
|
97
|
+
def file
|
98
|
+
if glob = file_map['vclog']
|
99
|
+
Dir.glob(glob).first
|
100
|
+
else
|
101
|
+
Dir.glob(DEFAULT_GLOB).first
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
#
|
106
|
+
# Project's map file, if present.
|
107
|
+
#
|
108
|
+
def map_file
|
109
|
+
file = File.join(root, MAP_FILE)
|
110
|
+
return file if File.exist?(file)
|
111
|
+
return nil
|
112
|
+
end
|
113
|
+
|
114
|
+
#
|
115
|
+
# Load the map file.
|
116
|
+
#
|
117
|
+
def file_map
|
118
|
+
@file_map ||= (
|
119
|
+
map_file ? YAML.load_file(map_file) : {}
|
120
|
+
)
|
121
|
+
end
|
122
|
+
|
123
|
+
#
|
124
|
+
# Find project root. This searches up from the current working
|
125
|
+
# directory for a .map configuration file or source control
|
126
|
+
# manager directory.
|
127
|
+
#
|
128
|
+
# .ruby/
|
129
|
+
# .map
|
130
|
+
# .git/
|
131
|
+
# .hg/
|
132
|
+
# .svn/
|
133
|
+
# _darcs/
|
134
|
+
#
|
135
|
+
# If all else fails the current directory is returned.
|
136
|
+
#
|
137
|
+
def lookup_root
|
138
|
+
root = nil
|
139
|
+
Dir.ascend(Dir.pwd) do |path|
|
140
|
+
check = Dir[ROOT_GLOB].first
|
141
|
+
if check
|
142
|
+
root = path
|
143
|
+
break
|
144
|
+
end
|
145
|
+
end
|
146
|
+
root || Dir.pwd
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
150
|
+
|
151
|
+
end
|