ext 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +4 -1
- data/README +11 -1
- data/lib/externals/ext.rb +1 -1
- data/lib/externals/extensions/file_utils.rb +4 -0
- data/lib/externals/project.rb +0 -11
- data/lib/externals/project_types/rails.rb +1 -1
- data/test/test_checkout_with_subprojects_svn.rb +4 -4
- data/test/test_help.rb +27 -0
- metadata +32 -30
data/CHANGELOG
CHANGED
data/README
CHANGED
@@ -205,10 +205,20 @@ it's important that there is a repository field under [.] in the .externals file
|
|
205
205
|
This can be accomplished by using -b with commands like 'ext checkout' and 'ext init'
|
206
206
|
or by manually editing the .externals file.
|
207
207
|
|
208
|
+
RUNNING TESTS
|
209
|
+
-------------
|
210
|
+
|
211
|
+
Tests are ran with:
|
212
|
+
|
213
|
+
rake test
|
214
|
+
|
215
|
+
You will need git and svn installed.
|
216
|
+
If you are using Ruby 1.9 to run the tests, you will need to have the simplecov gem installed.
|
217
|
+
|
208
218
|
|
209
219
|
Copyright Information
|
210
220
|
---------------------
|
211
|
-
The externals project is copyright 2008 by Miles Georgi
|
221
|
+
The externals project is copyright 2008 by Miles Georgi
|
212
222
|
and is released under the MIT license.
|
213
223
|
|
214
224
|
The license is available in the same directory as this README
|
data/lib/externals/ext.rb
CHANGED
@@ -9,7 +9,7 @@ Dir.entries(File.join(File.dirname(__FILE__), 'extensions')).each do |extension|
|
|
9
9
|
end
|
10
10
|
|
11
11
|
module Externals
|
12
|
-
VERSION = '1.1.
|
12
|
+
VERSION = '1.1.1'
|
13
13
|
PROJECT_TYPES_DIRECTORY = File.join(File.dirname(__FILE__), '..', 'externals','project_types')
|
14
14
|
|
15
15
|
# Full commands operate on the main project as well as the externals
|
@@ -30,13 +30,16 @@ FileUtils.class_eval do
|
|
30
30
|
rm_rf_old *args
|
31
31
|
|
32
32
|
while File.exists?(args[0]) && tries < 10
|
33
|
+
# :nocov:
|
33
34
|
sleep 1
|
34
35
|
tries += 1
|
36
|
+
# :nocov:
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
38
40
|
rm.call
|
39
41
|
if tries >= 10
|
42
|
+
# :nocov:
|
40
43
|
puts "WARNING: deleted #{args[0]} didn't work, trying again"
|
41
44
|
tries = 0
|
42
45
|
rm.call
|
@@ -44,6 +47,7 @@ FileUtils.class_eval do
|
|
44
47
|
if tries >= 10
|
45
48
|
raise "Could not delete #{args[0]}"
|
46
49
|
end
|
50
|
+
# :nocov:
|
47
51
|
end
|
48
52
|
end
|
49
53
|
|
data/lib/externals/project.rb
CHANGED
@@ -117,17 +117,6 @@ module Externals
|
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
-
def parent_path
|
121
|
-
File.dirname path
|
122
|
-
end
|
123
|
-
|
124
|
-
def self.project_line? line
|
125
|
-
#Make sure it's not a comment
|
126
|
-
return false if line =~ /^\s*#/
|
127
|
-
|
128
|
-
line =~ PROJECT_LINE_REGEX
|
129
|
-
end
|
130
|
-
|
131
120
|
#test helper method
|
132
121
|
def assert_e_dne_i_ni assert, exists, doesnt = [], ignored = exists, notignored = []
|
133
122
|
ignored.each do |proj|
|
@@ -20,7 +20,7 @@ module Externals
|
|
20
20
|
application_path = File.join('config', 'application.rb')
|
21
21
|
if File.exists? application_path
|
22
22
|
open(application_path) do |f|
|
23
|
-
f.read =~
|
23
|
+
f.read =~ /<\s*Rails::Application/
|
24
24
|
end
|
25
25
|
else
|
26
26
|
boot_path = File.join('config', 'boot.rb')
|
@@ -33,7 +33,7 @@ module Externals
|
|
33
33
|
puts(ignore_text = `svn propget svn:ignore vendor`)
|
34
34
|
assert(ignore_text =~ /^rails$/)
|
35
35
|
|
36
|
-
%w(redhillonrails_core acts_as_list
|
36
|
+
%w(redhillonrails_core acts_as_list some_subproject_with_edge).each do |proj|
|
37
37
|
assert File.exists?(File.join('vendor', 'plugins', proj, 'lib'))
|
38
38
|
end
|
39
39
|
|
@@ -56,7 +56,7 @@ module Externals
|
|
56
56
|
|
57
57
|
assert File.read(File.join('modules', 'modules.txt')) =~ /line1 of/
|
58
58
|
|
59
|
-
Dir.chdir File.join('vendor', 'plugins', '
|
59
|
+
Dir.chdir File.join('vendor', 'plugins', 'some_subproject_with_edge') do
|
60
60
|
assert(`git branch -a` =~ /^\*\s*edge\s*$/)
|
61
61
|
assert(`git branch -a` !~ /^\*\s*master\s*$/)
|
62
62
|
end
|
@@ -98,7 +98,7 @@ module Externals
|
|
98
98
|
|
99
99
|
Dir.chdir "rails_app" do
|
100
100
|
#install a new project
|
101
|
-
subproject =
|
101
|
+
subproject = GitRepositoryFromBundle.new("ssl_requirement")
|
102
102
|
Ext.run "install", subproject.clean_dir
|
103
103
|
|
104
104
|
SvnProject.add_all
|
@@ -121,7 +121,7 @@ module Externals
|
|
121
121
|
def test_update_with_missing_subproject_by_revision_git
|
122
122
|
repository = RailsAppSvnRepository.new
|
123
123
|
repository.prepare
|
124
|
-
subproject =
|
124
|
+
subproject = GitRepositoryFromBundle.new("ssl_requirement")
|
125
125
|
subproject.prepare
|
126
126
|
revision = "aa2dded823f8a9b378c22ba0159971508918928a"
|
127
127
|
subproject_name = subproject.name.gsub(".git", "")
|
data/test/test_help.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib') if $0 == __FILE__
|
2
|
+
require 'ext_test_case'
|
3
|
+
require 'externals/ext'
|
4
|
+
require 'basic_git_repository'
|
5
|
+
|
6
|
+
module Externals
|
7
|
+
module Test
|
8
|
+
class TestHelp < ::Test::Unit::TestCase
|
9
|
+
include ExtTestCase
|
10
|
+
|
11
|
+
def test_help
|
12
|
+
capture = StringIO.new
|
13
|
+
begin
|
14
|
+
$stdout = capture
|
15
|
+
|
16
|
+
Ext.run "help"
|
17
|
+
ensure
|
18
|
+
$stdout = STDOUT
|
19
|
+
end
|
20
|
+
capture = capture.string
|
21
|
+
|
22
|
+
|
23
|
+
assert capture =~ /ext \[OPTIONS\] <command>/
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Miles Georgi
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-12-30 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description: |-
|
@@ -58,33 +58,34 @@ files:
|
|
58
58
|
- README
|
59
59
|
- MIT_LICENSE.txt
|
60
60
|
- CHANGELOG
|
61
|
-
- lib/externals/
|
62
|
-
- lib/externals/
|
61
|
+
- lib/externals/command.rb
|
62
|
+
- lib/externals/configuration/configuration.rb
|
63
|
+
- lib/externals/ext.rb
|
63
64
|
- lib/externals/extensions/file_utils.rb
|
64
65
|
- lib/externals/extensions/string.rb
|
66
|
+
- lib/externals/extensions/symbol.rb
|
65
67
|
- lib/externals/project.rb
|
66
|
-
- lib/externals/
|
67
|
-
- lib/externals/ext.rb
|
68
|
-
- lib/externals/scms/svn_project.rb
|
68
|
+
- lib/externals/project_types/rails.rb
|
69
69
|
- lib/externals/scms/git_project.rb
|
70
|
-
- lib/externals/
|
71
|
-
- test/
|
72
|
-
- test/
|
70
|
+
- lib/externals/scms/svn_project.rb
|
71
|
+
- test/test_checkout_git.rb
|
72
|
+
- test/test_checkout_with_subprojects_git.rb
|
73
|
+
- test/test_checkout_with_subprojects_svn.rb
|
74
|
+
- test/test_file_utils_extensions.rb
|
75
|
+
- test/test_freeze_to_revision.rb
|
76
|
+
- test/test_git_project_extract_name.rb
|
77
|
+
- test/test_help.rb
|
73
78
|
- test/test_init_git.rb
|
79
|
+
- test/test_out_of_date_git_subproject.rb
|
74
80
|
- test/test_projects.rb
|
75
|
-
- test/
|
81
|
+
- test/test_rails_detection.rb
|
82
|
+
- test/test_string_extensions.rb
|
76
83
|
- test/test_svn_branches.rb
|
77
|
-
- test/test_git_project_extract_name.rb
|
78
84
|
- test/test_touch_emptydirs.rb
|
79
|
-
- test/test_out_of_date_git_subproject.rb
|
80
85
|
- test/test_version.rb
|
81
|
-
- test/test_checkout_with_subprojects_git.rb
|
82
|
-
- test/test_checkout_with_subprojects_svn.rb
|
83
|
-
- test/test_freeze_to_revision.rb
|
84
|
-
- test/test_file_utils_extensions.rb
|
85
86
|
- test/setup/empty_plugin.svn.gz
|
86
|
-
- test/setup/redhillonrails_core.svn.gz
|
87
87
|
- test/setup/foreign_key_migrations.svn.gz
|
88
|
+
- test/setup/redhillonrails_core.svn.gz
|
88
89
|
- bin/ext
|
89
90
|
homepage: http://nopugs.com/ext-tutorial
|
90
91
|
licenses: []
|
@@ -120,20 +121,21 @@ signing_key:
|
|
120
121
|
specification_version: 3
|
121
122
|
summary: Provides an SCM agnostic way to manage subprojects with a workflow similar to the svn:externals feature of subversion. It's particularly useful for rails projects that have some plugins managed by svn and some managed by git.
|
122
123
|
test_files:
|
123
|
-
- test/
|
124
|
-
- test/
|
124
|
+
- test/test_checkout_git.rb
|
125
|
+
- test/test_checkout_with_subprojects_git.rb
|
126
|
+
- test/test_checkout_with_subprojects_svn.rb
|
127
|
+
- test/test_file_utils_extensions.rb
|
128
|
+
- test/test_freeze_to_revision.rb
|
129
|
+
- test/test_git_project_extract_name.rb
|
130
|
+
- test/test_help.rb
|
125
131
|
- test/test_init_git.rb
|
132
|
+
- test/test_out_of_date_git_subproject.rb
|
126
133
|
- test/test_projects.rb
|
127
|
-
- test/
|
134
|
+
- test/test_rails_detection.rb
|
135
|
+
- test/test_string_extensions.rb
|
128
136
|
- test/test_svn_branches.rb
|
129
|
-
- test/test_git_project_extract_name.rb
|
130
137
|
- test/test_touch_emptydirs.rb
|
131
|
-
- test/test_out_of_date_git_subproject.rb
|
132
138
|
- test/test_version.rb
|
133
|
-
- test/test_checkout_with_subprojects_git.rb
|
134
|
-
- test/test_checkout_with_subprojects_svn.rb
|
135
|
-
- test/test_freeze_to_revision.rb
|
136
|
-
- test/test_file_utils_extensions.rb
|
137
139
|
- test/setup/empty_plugin.svn.gz
|
138
|
-
- test/setup/redhillonrails_core.svn.gz
|
139
140
|
- test/setup/foreign_key_migrations.svn.gz
|
141
|
+
- test/setup/redhillonrails_core.svn.gz
|