ext 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,6 +1,7 @@
1
1
  1/3/2010 Version 1.6 released
2
2
  - Fixes a problem that can occur if ext is symlinked (thanks to Olmo Maldonado)
3
3
  - Added --version command line option
4
+ - Fixes a problem with parsing project names from git repository URLs
4
5
 
5
6
  12/20/2009
6
7
  - Fix for a bug when a subproject frozen to a revision is missing during
data/README CHANGED
@@ -1,22 +1,22 @@
1
1
  Externals is a project that allows you to use the workflow normally made
2
2
  possible by svn:externals in an SCM independent manner.
3
3
 
4
- Please report bugs to either http://rubyforge.org/projects/ext or
4
+ Please report bugs to either http://rubyforge.org/projects/ext or
5
5
  http://ext.lighthouseapp.com
6
6
 
7
7
  I was inspired to create this project because I had several projects that had
8
- a mix of plugins managed by git and by svn. Git's submodule feature is
9
- not exactly like svn:externals. Basically, I don't like how you have to manually
10
- checkout a branch, and I don't like git status not propagating through the
8
+ a mix of plugins managed by git and by svn. Git's submodule feature is
9
+ not exactly like svn:externals. Basically, I don't like how you have to manually
10
+ checkout a branch, and I don't like git status not propagating through the
11
11
  submodules. Also, the branch tip doesn't automatically move with git-submodule.
12
- Subversion always checks out the branch tip for subprojects when performing a
12
+ Subversion always checks out the branch tip for subprojects when performing a
13
13
  checkout or update.
14
14
 
15
- Externals is designed such that adding support for a new SCM, or new project
15
+ Externals is designed such that adding support for a new SCM, or new project
16
16
  types is easy.
17
17
 
18
- The externals executable is called ext. Commands come in a long form and a
19
- short form. The longer form applies the action to the main project. The short
18
+ The externals executable is called ext. Commands come in a long form and a
19
+ short form. The longer form applies the action to the main project. The short
20
20
  forms apply the action to all sub projects.
21
21
 
22
22
  The commands and usage are as follows (from 'ext help'):
@@ -31,18 +31,19 @@ ext [OPTIONS] <command> [repository] [-b <branch>] [path]
31
31
  -b, --branch BRANCH The branch you want the subproject to checkout when doing 'ext install'
32
32
  -f, --force_removal When doing an uninstall of a subproject, remove it's files and subfolders, too.
33
33
  -w, --workdir DIR The working directory to execute commands from. Use this if for some reason you
34
- cannot execute ext from the main project's directory (or if it's just inconvenient, such as in a script
35
- or in a Capistrano task)
34
+ cannot execute ext from the main project's directory (or if it's just inconvenient,
35
+ such as in a script or in a Capistrano task)
36
36
  --help does the same as 'ext help' If you use this with a command
37
- it will ignore the command and run help instead.
38
-
37
+ it will ignore the command and run help instead.
38
+ --version Displays the version number of externals and then exits.
39
+ Same as 'ext version'
39
40
 
40
41
 
41
42
  Commands that apply to the main project or the .externals file:
42
43
  freeze, help, init, install, touch_emptydirs, uninstall, update_ignore, upgrade_externals_file
43
44
 
44
45
  freeze Usage: ext freeze project [REVISION]
45
-
46
+
46
47
  Locks a subproject into a specific revision/branch. If no
47
48
  revision is supplied, the current revision/branch of the
48
49
  project will be used. You can specify the project by name
@@ -84,28 +85,30 @@ update_ignore Adds all paths to subprojects that are
84
85
  upgrade_externals_fileConverts the old format that stored
85
86
  as [main][svn][git] to [<path1>][<path2>]...
86
87
 
88
+ version Displays the version number of externals and exits.
89
+
87
90
 
88
91
 
89
92
  Commands that apply to the main project and all subprojects:
90
93
  checkout, export, status, update
91
94
 
92
95
  checkout Usage: ext checkout <repository>
93
-
96
+
94
97
  Checks out <repository>, and checks out any subprojects
95
98
  registered in <repository>'s .externals file.
96
99
 
97
100
  export Usage: ext export <repository>
98
-
101
+
99
102
  Like checkout except this command fetches as little
100
103
  history as possible.
101
104
 
102
105
  status Usage: ext status
103
-
106
+
104
107
  Prints out the status of the main project, followed by
105
108
  the status of each subproject.
106
109
 
107
110
  update Usage: ext update
108
-
111
+
109
112
  Brings the main project, and all subprojects, up to the
110
113
  latest version.
111
114
 
@@ -124,7 +127,7 @@ st Like status, but skips the main project.
124
127
  up Like update, but skips the main project.
125
128
 
126
129
  The externals project is copyright 2008 by Miles Georgi, nopugs.com, azimux.com
127
- and is released under the MIT license.
130
+ and is released under the MIT license.
128
131
 
129
132
  The license is available in the same directory as this README
130
133
  file and is named MIT_LICENSE.txt
data/lib/externals/ext.rb CHANGED
@@ -10,7 +10,7 @@ module Externals
10
10
  #exit status
11
11
  OBSOLETE_EXTERNALS_FILE = 15
12
12
 
13
- VERSION = '0.1.6'
13
+ VERSION = '0.1.7'
14
14
  PROJECT_TYPES_DIRECTORY = File.join(File.dirname(__FILE__), '..', 'externals','project_types')
15
15
 
16
16
  # Full commands operate on the main project as well as the externals
@@ -172,7 +172,7 @@ module Externals
172
172
  end
173
173
 
174
174
  def extract_name s
175
- if s =~ /\/([\w_-]+)(?:\.git)?$/
175
+ if s =~ /([^\/:]+?)(?:\.git|\.bundle)?$/
176
176
  $1
177
177
  end
178
178
  end
@@ -0,0 +1,18 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '..', 'lib') if $0 == __FILE__
2
+ require 'externals/test_case'
3
+ require 'externals/ext'
4
+ require 'stringio'
5
+
6
+ module Externals
7
+ class TestGitProjectExtractName < TestCase
8
+ include ExtTestCase
9
+
10
+ def test_extract_name
11
+ project = Externals::GitProject.new({})
12
+ assert_equal "test", project.extract_name("git://domain.com/test.git")
13
+ assert_equal "test", project.extract_name("git@domain.com:test.git")
14
+ assert_equal "test", project.extract_name("test.git")
15
+ assert_equal "test", project.extract_name("test")
16
+ end
17
+ end
18
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
@@ -98,6 +98,7 @@ summary: Provides an SCM agnostic way to manage subprojects with a workflow simi
98
98
  test_files:
99
99
  - test/test_rails_detection.rb
100
100
  - test/test_string_extensions.rb
101
+ - test/test_git_project_extract_name.rb
101
102
  - test/test_version.rb
102
103
  - test/test_init_git.rb
103
104
  - test/test_upgrade_externals_file.rb