jm81-svn-fixture 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -113,11 +113,10 @@ module SvnFixture
113
113
  def checkout
114
114
  create unless ::File.exist?(@repos_path)
115
115
  @repos = ::Svn::Repos.open(@repos_path)
116
- @repos_uri = "file://" + ::File.expand_path(@repos_path)
117
116
  FileUtils.mkdir_p(@wc_path)
118
117
  @dirs_created << @wc_path
119
118
  @ctx = SvnFixture::simple_context
120
- @ctx.checkout(@repos_uri, @wc_path)
119
+ @ctx.checkout(self.uri, @wc_path)
121
120
  self
122
121
  end
123
122
 
@@ -154,6 +153,11 @@ module SvnFixture
154
153
  self.class.repositories.delete(@name)
155
154
  end
156
155
 
156
+ # URI (file://...) for accessing the Repository
157
+ def uri
158
+ "file://" + ::File.expand_path(@repos_path)
159
+ end
160
+
157
161
  private
158
162
 
159
163
  # Check if either @repos_path or @wc_path exist. Called by #initialize.
@@ -267,19 +267,6 @@ describe SvnFixture::Repository do
267
267
  @repos.revisions[2].should_receive(:commit).with(@repos)
268
268
  @repos.commit(@repos.revisions[2], 1)
269
269
  end
270
-
271
- =begin
272
- def commit(to_commit = nil)
273
- checkout unless ::File.exist?(@wc_path)
274
- to_commit = @revisions if to_commit.nil?
275
- to_commit = [to_commit] if (!to_commit.respond_to?(:each) || to_commit.kind_of?(String))
276
-
277
- to_commit.each do | rev |
278
- rev = @revisions.find{ |r| r.name == rev } unless rev.kind_of?(Revision)
279
- rev.commit(self)
280
- end
281
- end
282
- =end
283
270
  end
284
271
 
285
272
  describe '#destroy' do
@@ -334,6 +321,13 @@ describe SvnFixture::Repository do
334
321
  end
335
322
  end
336
323
 
324
+ describe '#uri' do
325
+ it 'should return the uri for accessing the Repository' do
326
+ r = @klass.new('test1', '/test/path')
327
+ r.uri.should == 'file:///test/path'
328
+ end
329
+ end
330
+
337
331
  describe '.destroy_all' do
338
332
  it 'should destroy all Repositories' do
339
333
  repos = [@klass.new('test1'), @klass.new('test2'), @klass.new('test3')]
@@ -0,0 +1,64 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{svn-fixture}
5
+ s.version = "0.1.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Jared Morgan"]
9
+ s.date = %q{2009-07-05}
10
+ s.email = %q{jmorgan@morgancreative.net}
11
+ s.extra_rdoc_files = [
12
+ "LICENSE",
13
+ "README.md"
14
+ ]
15
+ s.files = [
16
+ ".document",
17
+ ".gitignore",
18
+ "LICENSE",
19
+ "README.md",
20
+ "Rakefile",
21
+ "VERSION",
22
+ "lib/svn-fixture.rb",
23
+ "lib/svn-fixture/directory.rb",
24
+ "lib/svn-fixture/file.rb",
25
+ "lib/svn-fixture/repository.rb",
26
+ "lib/svn-fixture/revision.rb",
27
+ "spec/spec_helper.rb",
28
+ "spec/svn-fixture/config_spec.rb",
29
+ "spec/svn-fixture/directory_spec.rb",
30
+ "spec/svn-fixture/file_spec.rb",
31
+ "spec/svn-fixture/fixtures/hello_world.rb",
32
+ "spec/svn-fixture/integration_spec.rb",
33
+ "spec/svn-fixture/repository_spec.rb",
34
+ "spec/svn-fixture/revision_spec.rb",
35
+ "spec/svn-fixture_spec.rb",
36
+ "svn-fixture.gemspec"
37
+ ]
38
+ s.homepage = %q{http://github.com/jm81/svn-fixture}
39
+ s.rdoc_options = ["--charset=UTF-8"]
40
+ s.require_paths = ["lib"]
41
+ s.rubygems_version = %q{1.3.4}
42
+ s.summary = %q{TODO}
43
+ s.test_files = [
44
+ "spec/spec_helper.rb",
45
+ "spec/svn-fixture/config_spec.rb",
46
+ "spec/svn-fixture/directory_spec.rb",
47
+ "spec/svn-fixture/file_spec.rb",
48
+ "spec/svn-fixture/fixtures/hello_world.rb",
49
+ "spec/svn-fixture/integration_spec.rb",
50
+ "spec/svn-fixture/repository_spec.rb",
51
+ "spec/svn-fixture/revision_spec.rb",
52
+ "spec/svn-fixture_spec.rb"
53
+ ]
54
+
55
+ if s.respond_to? :specification_version then
56
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
57
+ s.specification_version = 3
58
+
59
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
60
+ else
61
+ end
62
+ else
63
+ end
64
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jm81-svn-fixture
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared Morgan
@@ -43,6 +43,7 @@ files:
43
43
  - spec/svn-fixture/repository_spec.rb
44
44
  - spec/svn-fixture/revision_spec.rb
45
45
  - spec/svn-fixture_spec.rb
46
+ - svn-fixture.gemspec
46
47
  has_rdoc: false
47
48
  homepage: http://github.com/jm81/svn-fixture
48
49
  post_install_message: