repertoire 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/History.txt +15 -0
  2. data/Manifest.txt +23 -10
  3. data/README.txt +31 -6
  4. data/Rakefile +2 -1
  5. data/lib/repertoire/compat.rb +4 -3
  6. data/lib/repertoire/{media/exceptions → exceptions}/checkout_failed.rb +0 -0
  7. data/lib/repertoire/exceptions/program_not_found.rb +1 -1
  8. data/lib/repertoire/{media/exceptions → exceptions}/repository_exists.rb +0 -0
  9. data/lib/repertoire/{media/exceptions → exceptions}/update_failed.rb +0 -0
  10. data/lib/repertoire/exceptions.rb +3 -0
  11. data/lib/repertoire/media/exceptions/unknown_media.rb +3 -1
  12. data/lib/repertoire/media/exceptions.rb +0 -3
  13. data/lib/repertoire/{extensions → media/extensions}/meta/object.rb +5 -5
  14. data/lib/repertoire/media/extensions/meta.rb +1 -0
  15. data/lib/repertoire/media/extensions.rb +1 -0
  16. data/lib/repertoire/media/media.rb +2 -115
  17. data/lib/repertoire/media/type.rb +87 -69
  18. data/lib/repertoire/media/types/git.rb +7 -7
  19. data/lib/repertoire/media/types/hg.rb +30 -0
  20. data/lib/repertoire/media/types/rsync.rb +5 -7
  21. data/lib/repertoire/media/types/svn.rb +5 -7
  22. data/lib/repertoire/media/types.rb +1 -2
  23. data/lib/repertoire/repertoire.rb +102 -6
  24. data/lib/repertoire/repository.rb +78 -18
  25. data/lib/repertoire/version.rb +2 -1
  26. data/spec/compat_spec.rb +31 -0
  27. data/{test/test_repertoire.rb → spec/helpers/repository/.hg/.keep} +0 -0
  28. data/spec/helpers/repository/dir/file.txt +1 -0
  29. data/spec/helpers/repository/dir/file2.txt +1 -0
  30. data/spec/helpers/repository/file.txt +1 -0
  31. data/spec/helpers/repository.rb +1 -0
  32. data/spec/media/media_spec.rb +79 -0
  33. data/spec/media/type_spec.rb +36 -0
  34. data/spec/media/types/git_spec.rb +17 -0
  35. data/spec/media/types/hg_spec.rb +13 -0
  36. data/spec/media/types/rsync_spec.rb +17 -0
  37. data/spec/media/types/svn_spec.rb +17 -0
  38. data/spec/repertoire_spec.rb +9 -0
  39. data/spec/repository_spec.rb +78 -0
  40. data/spec/spec_helper.rb +7 -0
  41. data/tasks/spec.rb +9 -0
  42. metadata +31 -18
  43. data/lib/repertoire/extensions/meta.rb +0 -1
  44. data/lib/repertoire/extensions/uri.rb +0 -26
  45. data/lib/repertoire/extensions.rb +0 -1
  46. data/lib/repertoire/media/types/cvs.rb +0 -31
  47. data/lib/repertoire/media/types/darcs.rb +0 -30
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repertoire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
- - Postmodern Modulus III
7
+ - Postmodern
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-25 00:00:00 -07:00
12
+ date: 2009-03-26 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,9 +20,9 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.7.0
23
+ version: 1.11.0
24
24
  version:
25
- description: R'epertoire is a Ruby library for quickly checking-out and updating code-bases from various SCMs. R'epertoire currently supports Subversion, CVS, Git and even RSync.
25
+ description: R'epertoire is a Ruby library for quickly checking-out and updating code-bases from various SCMs. R'epertoire currently supports Subversion, Git, Mercurial and even RSync.
26
26
  email:
27
27
  - postmodern.mod3@gmail.com
28
28
  executables: []
@@ -40,31 +40,44 @@ files:
40
40
  - Rakefile
41
41
  - lib/repertoire.rb
42
42
  - lib/repertoire/compat.rb
43
- - lib/repertoire/extensions.rb
44
- - lib/repertoire/extensions/meta.rb
45
- - lib/repertoire/extensions/meta/object.rb
46
- - lib/repertoire/extensions/uri.rb
47
43
  - lib/repertoire/exceptions.rb
48
44
  - lib/repertoire/exceptions/program_not_found.rb
49
45
  - lib/repertoire/exceptions/command_failed.rb
46
+ - lib/repertoire/exceptions/repository_exists.rb
47
+ - lib/repertoire/exceptions/checkout_failed.rb
48
+ - lib/repertoire/exceptions/update_failed.rb
50
49
  - lib/repertoire/media.rb
51
50
  - lib/repertoire/media/exceptions.rb
52
51
  - lib/repertoire/media/exceptions/unknown_media.rb
53
- - lib/repertoire/media/exceptions/repository_exists.rb
54
- - lib/repertoire/media/exceptions/checkout_failed.rb
55
- - lib/repertoire/media/exceptions/update_failed.rb
52
+ - lib/repertoire/media/extensions.rb
53
+ - lib/repertoire/media/extensions/meta.rb
54
+ - lib/repertoire/media/extensions/meta/object.rb
56
55
  - lib/repertoire/media/media.rb
57
56
  - lib/repertoire/media/type.rb
58
57
  - lib/repertoire/media/types.rb
59
- - lib/repertoire/media/types/cvs.rb
60
- - lib/repertoire/media/types/darcs.rb
58
+ - lib/repertoire/media/types/hg.rb
61
59
  - lib/repertoire/media/types/git.rb
62
60
  - lib/repertoire/media/types/rsync.rb
63
61
  - lib/repertoire/media/types/svn.rb
64
62
  - lib/repertoire/repository.rb
65
63
  - lib/repertoire/repertoire.rb
66
64
  - lib/repertoire/version.rb
67
- - test/test_repertoire.rb
65
+ - tasks/spec.rb
66
+ - spec/helpers/repository.rb
67
+ - spec/helpers/repository/.hg/.keep
68
+ - spec/helpers/repository/file.txt
69
+ - spec/helpers/repository/dir/file.txt
70
+ - spec/helpers/repository/dir/file2.txt
71
+ - spec/spec_helper.rb
72
+ - spec/compat_spec.rb
73
+ - spec/repository_spec.rb
74
+ - spec/media/type_spec.rb
75
+ - spec/media/media_spec.rb
76
+ - spec/media/types/hg_spec.rb
77
+ - spec/media/types/git_spec.rb
78
+ - spec/media/types/rsync_spec.rb
79
+ - spec/media/types/svn_spec.rb
80
+ - spec/repertoire_spec.rb
68
81
  has_rdoc: true
69
82
  homepage: http://repertoire.rubyforge.org/
70
83
  post_install_message:
@@ -88,9 +101,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
101
  requirements: []
89
102
 
90
103
  rubyforge_project: repertoire
91
- rubygems_version: 1.2.0
104
+ rubygems_version: 1.3.1
92
105
  signing_key:
93
106
  specification_version: 2
94
107
  summary: R'epertoire is a Ruby library for quickly checking-out and updating code-bases from various SCMs
95
- test_files:
96
- - test/test_repertoire.rb
108
+ test_files: []
109
+
@@ -1 +0,0 @@
1
- require 'repertoire/extensions/meta/object'
@@ -1,26 +0,0 @@
1
- require 'uri'
2
-
3
- module URI
4
- #
5
- # Returns the +basename+ of the specified _uri_, unless the +basename+ is
6
- # +'trunk'+ then the +basename+ of the parent directory within the _uri_
7
- # is returned.
8
- #
9
- # URI.repo_name('http://www.today.com/is/now') # => "now"
10
- #
11
- # URI.repo_name('svn://svn.repo.com/var/svn/awesome/trunk') # =>
12
- # "awesome"
13
- #
14
- def URI.repo_name(uri)
15
- uri = URI.parse(uri)
16
- name = File.basename(uri.path)
17
-
18
- if name.empty? || name==File::SEPARATOR
19
- name = uri.host
20
- elsif name=='trunk'
21
- name = File.basename(File.dirname(uri.path))
22
- end
23
-
24
- return name
25
- end
26
- end
@@ -1 +0,0 @@
1
- require 'repertoire/extensions/uri'
@@ -1,31 +0,0 @@
1
- require 'repertoire/media/type'
2
-
3
- module Repertoire
4
- module Media
5
- class CVS
6
-
7
- include Type
8
-
9
- known_as :cvs
10
-
11
- uses_schemes 'cvs'
12
- uses_directory 'CVS'
13
-
14
- #
15
- # Checks out the CVS repository located at the specified _uri_ into the
16
- # specified _path_.
17
- #
18
- def self.checkout(uri,path)
19
- sh('cvs','-d',path,'co',uri)
20
- end
21
-
22
- #
23
- # Updated the CVS repository located at the specified _path_.
24
- #
25
- def self.update(path,uri=nil)
26
- sh('cvs','up',path)
27
- end
28
-
29
- end
30
- end
31
- end
@@ -1,30 +0,0 @@
1
- require 'repertoire/media/type'
2
-
3
- module Repertoire
4
- module Media
5
- class Darcs
6
-
7
- include Type
8
-
9
- known_as :darcs
10
-
11
- uses_directory '_darcs'
12
-
13
- #
14
- # Checks out the Darcs repository located at the specified _uri_ into
15
- # the specified _path_.
16
- #
17
- def self.checkout(uri,path=nil)
18
- sh('darcs','get','--partial',uri,path)
19
- end
20
-
21
- #
22
- # Updated the Darcs repository located at the specified _path_.
23
- #
24
- def self.update(uri,path)
25
- sh('darcs','pull','-a',path)
26
- end
27
-
28
- end
29
- end
30
- end