ext 1.0.3 → 1.0.4

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.
Files changed (43) hide show
  1. data/CHANGELOG +7 -0
  2. data/README +2 -0
  3. data/Rakefile +1 -74
  4. data/bin/ext +0 -0
  5. data/lib/externals/ext.rb +25 -9
  6. data/lib/externals/extensions/file_utils.rb +40 -0
  7. data/lib/externals/extensions/string.rb +1 -1
  8. data/lib/externals/project.rb +3 -0
  9. data/lib/externals/scms/git_project.rb +3 -4
  10. data/lib/externals/scms/svn_project.rb +10 -12
  11. data/lib/externals/test/basic_git_repository.rb +41 -0
  12. data/lib/externals/test/engines.rb +11 -0
  13. data/lib/externals/test/engines_with_branch1.rb +36 -0
  14. data/lib/externals/test/fake_rails_repository.rb +112 -0
  15. data/lib/externals/test/git_repository_from_internet.rb +19 -0
  16. data/lib/externals/test/modules_svn_branches_repository.rb +72 -0
  17. data/lib/externals/test/modules_svn_repository.rb +41 -0
  18. data/lib/externals/test/rails_app_git_branches.rb +100 -0
  19. data/lib/externals/test/rails_app_git_repository.rb +55 -0
  20. data/lib/externals/test/rails_app_svn_branches.rb +132 -0
  21. data/lib/externals/test/rails_app_svn_repository.rb +106 -0
  22. data/lib/externals/test/rails_app_unmanaged.rb +25 -0
  23. data/lib/externals/test/repository.rb +188 -0
  24. data/lib/externals/test/svn_repository_from_dump.rb +27 -0
  25. data/lib/externals/test/svn_repository_helper.rb +10 -0
  26. data/lib/externals/test_case.rb +16 -307
  27. data/test/setup/empty_plugin.svn.gz +0 -0
  28. data/test/setup/foreign_key_migrations.svn.gz +0 -0
  29. data/test/setup/redhillonrails_core.svn.gz +0 -0
  30. data/test/test_checkout_git.rb +16 -25
  31. data/test/test_checkout_with_subprojects_git.rb +109 -193
  32. data/test/test_checkout_with_subprojects_svn.rb +239 -294
  33. data/test/test_file_utils_extensions.rb +29 -0
  34. data/test/test_freeze_to_revision.rb +46 -85
  35. data/test/test_git_project_extract_name.rb +10 -8
  36. data/test/test_init_git.rb +19 -29
  37. data/test/test_projects.rb +87 -93
  38. data/test/test_rails_detection.rb +12 -17
  39. data/test/test_string_extensions.rb +32 -30
  40. data/test/test_svn_branches.rb +227 -383
  41. data/test/test_touch_emptydirs.rb +39 -34
  42. data/test/test_version.rb +18 -16
  43. metadata +47 -23
@@ -4,51 +4,56 @@ require 'externals/test_case'
4
4
  require 'externals/ext'
5
5
 
6
6
  module Externals
7
- class TestTouchEmptydirs < TestCase
8
- include ExtTestCase
9
-
10
- def setup
11
- Dir.chdir File.join(root_dir, 'test') do
12
- `mkdir workdir`
13
-
14
- Dir.chdir 'workdir' do
15
- `mkdir notempty1`
16
- Dir.chdir 'notempty1' do
17
- `mkdir notempty2`
18
- `mkdir empty1`
19
- Dir.chdir 'notempty2' do
20
- `mkdir empty2`
21
- `mkdir notempty3`
22
- Dir.chdir 'notempty3' do
23
- File.open('readme.txt', 'w') do |f|
24
- f.write "some text\n"
7
+ module Test
8
+ class TestTouchEmptydirs < TestCase
9
+ include ExtTestCase
10
+
11
+ def setup
12
+ teardown
13
+
14
+ Dir.chdir File.join(root_dir, 'test') do
15
+ mkdir "workdir"
16
+
17
+ Dir.chdir 'workdir' do
18
+ mkdir "notempty1"
19
+ Dir.chdir 'notempty1' do
20
+ mkdir "notempty2"
21
+ mkdir "empty1"
22
+ Dir.chdir 'notempty2' do
23
+ mkdir "empty2"
24
+ mkdir "notempty3"
25
+ Dir.chdir 'notempty3' do
26
+ File.open('readme.txt', 'w') do |f|
27
+ f.write "some text\n"
28
+ end
25
29
  end
26
30
  end
27
31
  end
28
32
  end
29
33
  end
30
34
  end
31
- end
32
35
 
33
- def teardown
34
- Dir.chdir File.join(root_dir, 'test') do
35
- `rm -rf workdir`
36
+ def teardown
37
+ Dir.chdir File.join(root_dir, 'test') do
38
+ rm_rf "workdir"
39
+ end
36
40
  end
37
- end
38
-
39
- def test_touch_emptydirs
40
- Dir.chdir File.join(root_dir, 'test') do
41
- assert !File.exists?(File.join('.emptydir'))
42
- Dir.chdir 'workdir' do
43
- Ext.run "touch_emptydirs"
41
+
42
+ def test_touch_emptydirs
43
+ Dir.chdir File.join(root_dir, 'test') do
44
44
  assert !File.exists?(File.join('.emptydir'))
45
- assert !File.exists?(File.join('notempty1', '.emptydir'))
46
- assert File.exists?(File.join('notempty1', 'empty1', '.emptydir'))
47
- assert !File.exists?(File.join('notempty1', 'notempty2', '.emptydir'))
48
- assert File.exists?(File.join('notempty1', 'notempty2', 'empty2', '.emptydir'))
49
- assert !File.exists?(File.join('notempty1', 'notempty2', 'notempty3', '.emptydir'))
45
+ Dir.chdir 'workdir' do
46
+ Ext.run "touch_emptydirs"
47
+ assert !File.exists?(File.join('.emptydir'))
48
+ assert !File.exists?(File.join('notempty1', '.emptydir'))
49
+ assert File.exists?(File.join('notempty1', 'empty1', '.emptydir'))
50
+ assert !File.exists?(File.join('notempty1', 'notempty2', '.emptydir'))
51
+ assert File.exists?(File.join('notempty1', 'notempty2', 'empty2', '.emptydir'))
52
+ assert !File.exists?(File.join('notempty1', 'notempty2', 'notempty3', '.emptydir'))
53
+ end
50
54
  end
51
55
  end
56
+
52
57
  end
53
58
  end
54
59
  end
@@ -4,27 +4,29 @@ require 'externals/ext'
4
4
  require 'stringio'
5
5
 
6
6
  module Externals
7
- class TestVersion < TestCase
8
- include ExtTestCase
7
+ module Test
8
+ class TestVersion < TestCase
9
+ include ExtTestCase
9
10
 
10
- def test_version
11
- version_regex = /(?:[^\.\d]|^)(\d+\.\d+\.\d+)(?:[^\.\d]|$)/
11
+ def test_version
12
+ version_regex = /(?:[^\.\d]|^)(\d+\.\d+\.\d+)(?:[^\.\d]|$)/
12
13
 
13
- assert Externals::VERSION =~ version_regex
14
+ assert Externals::VERSION =~ version_regex
14
15
 
15
- ["version", "--version"].each do |options|
16
- out = StringIO.new
17
- old_stdout = $stdout
16
+ ["version", "--version"].each do |options|
17
+ out = StringIO.new
18
+ old_stdout = $stdout
18
19
 
19
- begin
20
- $stdout = out
21
- Ext.run options
22
- ensure
23
- $stdout = old_stdout
24
- end
20
+ begin
21
+ $stdout = out
22
+ Ext.run options
23
+ ensure
24
+ $stdout = old_stdout
25
+ end
25
26
 
26
- assert(out.string =~ version_regex)
27
- assert_equal $1, Externals::VERSION.strip
27
+ assert(out.string =~ version_regex)
28
+ assert_equal $1, Externals::VERSION.strip
29
+ end
28
30
  end
29
31
  end
30
32
  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: 17
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 3
10
- version: 1.0.3
9
+ - 4
10
+ version: 1.0.4
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: 2011-09-28 00:00:00 -07:00
18
+ date: 2011-10-10 00:00:00 -07:00
19
19
  default_executable: ext
20
20
  dependencies: []
21
21
 
@@ -59,28 +59,48 @@ files:
59
59
  - README
60
60
  - MIT_LICENSE.txt
61
61
  - CHANGELOG
62
- - lib/externals/command.rb
63
- - lib/externals/configuration/configuration.rb
64
62
  - lib/externals/ext.rb
63
+ - lib/externals/configuration/configuration.rb
64
+ - lib/externals/test_case.rb
65
+ - lib/externals/test/rails_app_svn_branches.rb
66
+ - lib/externals/test/basic_git_repository.rb
67
+ - lib/externals/test/modules_svn_repository.rb
68
+ - lib/externals/test/engines.rb
69
+ - lib/externals/test/rails_app_svn_repository.rb
70
+ - lib/externals/test/engines_with_branch1.rb
71
+ - lib/externals/test/rails_app_unmanaged.rb
72
+ - lib/externals/test/repository.rb
73
+ - lib/externals/test/rails_app_git_branches.rb
74
+ - lib/externals/test/modules_svn_branches_repository.rb
75
+ - lib/externals/test/fake_rails_repository.rb
76
+ - lib/externals/test/svn_repository_helper.rb
77
+ - lib/externals/test/svn_repository_from_dump.rb
78
+ - lib/externals/test/git_repository_from_internet.rb
79
+ - lib/externals/test/rails_app_git_repository.rb
80
+ - lib/externals/project_types/rails.rb
81
+ - lib/externals/extensions/file_utils.rb
65
82
  - lib/externals/extensions/string.rb
66
83
  - lib/externals/extensions/symbol.rb
67
84
  - lib/externals/project.rb
68
- - lib/externals/project_types/rails.rb
69
- - lib/externals/scms/git_project.rb
70
85
  - lib/externals/scms/svn_project.rb
71
- - lib/externals/test_case.rb
72
- - test/test_checkout_git.rb
86
+ - lib/externals/scms/git_project.rb
87
+ - lib/externals/command.rb
88
+ - test/test_svn_branches.rb
73
89
  - test/test_checkout_with_subprojects_git.rb
74
- - test/test_checkout_with_subprojects_svn.rb
75
- - test/test_freeze_to_revision.rb
90
+ - test/test_touch_emptydirs.rb
91
+ - test/test_version.rb
76
92
  - test/test_git_project_extract_name.rb
93
+ - test/test_freeze_to_revision.rb
94
+ - test/test_checkout_with_subprojects_svn.rb
95
+ - test/test_checkout_git.rb
96
+ - test/test_rails_detection.rb
77
97
  - test/test_init_git.rb
98
+ - test/test_file_utils_extensions.rb
78
99
  - test/test_projects.rb
79
- - test/test_rails_detection.rb
80
100
  - test/test_string_extensions.rb
81
- - test/test_svn_branches.rb
82
- - test/test_touch_emptydirs.rb
83
- - test/test_version.rb
101
+ - test/setup/foreign_key_migrations.svn.gz
102
+ - test/setup/empty_plugin.svn.gz
103
+ - test/setup/redhillonrails_core.svn.gz
84
104
  - bin/ext
85
105
  has_rdoc: true
86
106
  homepage: http://nopugs.com/ext-tutorial
@@ -117,15 +137,19 @@ signing_key:
117
137
  specification_version: 3
118
138
  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.
119
139
  test_files:
120
- - test/test_checkout_git.rb
140
+ - test/test_svn_branches.rb
121
141
  - test/test_checkout_with_subprojects_git.rb
122
- - test/test_checkout_with_subprojects_svn.rb
123
- - test/test_freeze_to_revision.rb
142
+ - test/test_touch_emptydirs.rb
143
+ - test/test_version.rb
124
144
  - test/test_git_project_extract_name.rb
145
+ - test/test_freeze_to_revision.rb
146
+ - test/test_checkout_with_subprojects_svn.rb
147
+ - test/test_checkout_git.rb
148
+ - test/test_rails_detection.rb
125
149
  - test/test_init_git.rb
150
+ - test/test_file_utils_extensions.rb
126
151
  - test/test_projects.rb
127
- - test/test_rails_detection.rb
128
152
  - test/test_string_extensions.rb
129
- - test/test_svn_branches.rb
130
- - test/test_touch_emptydirs.rb
131
- - test/test_version.rb
153
+ - test/setup/foreign_key_migrations.svn.gz
154
+ - test/setup/empty_plugin.svn.gz
155
+ - test/setup/redhillonrails_core.svn.gz