scm 0.1.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
data/spec/git_spec.rb ADDED
@@ -0,0 +1,26 @@
1
+ require 'spec_helper'
2
+ require 'scm/git'
3
+
4
+ describe Git do
5
+ describe "create" do
6
+ it "should create the directory, if it does not exist" do
7
+ repo = Git.create(directory('create_new_git_repo'))
8
+
9
+ repo.path.should be_directory
10
+ end
11
+
12
+ it "should create a git repository" do
13
+ repo = Git.create(mkdir('init_git_repo'))
14
+
15
+ repo.path.join('.git').should be_directory
16
+ end
17
+
18
+ it "should allow creating a bare git repository" do
19
+ repo = Git.create(mkdir('init_bare_git_repo'))
20
+
21
+ repo.path.entries.map(&:to_s).should be =~ %w[
22
+ branches config description HEAD hooks info objects refs
23
+ ]
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,19 @@
1
+ require 'tmpdir'
2
+ require 'fileutils'
3
+
4
+ module Helpers
5
+ module SCM
6
+ ROOT_DIR = File.join(Dir.tmpdir,'scm')
7
+
8
+ def directory(name)
9
+ File.join(ROOT_DIR,name)
10
+ end
11
+
12
+ def mkdir(name)
13
+ path = directory(name)
14
+
15
+ FileUtils.mkdir_p(path)
16
+ return path
17
+ end
18
+ end
19
+ end
data/spec/scm_spec.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+ require 'scm'
3
+
4
+ describe SCM do
5
+ it "should have a VERSION constant" do
6
+ subject.const_get('VERSION').should_not be_empty
7
+ end
8
+ end
@@ -0,0 +1,13 @@
1
+ require 'rspec'
2
+ require 'helpers/scm'
3
+
4
+ require 'scm/version'
5
+ include SCM
6
+
7
+ RSpec.configure do |rspec|
8
+ rspec.include Helpers::SCM
9
+
10
+ rspec.after(:suite) do
11
+ FileUtils.rm_rf(Helpers::SCM::ROOT_DIR)
12
+ end
13
+ end
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: scm
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0.pre1
5
+ prerelease: 6
6
+ platform: ruby
7
+ authors:
8
+ - Postmodern
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-08-18 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: ore-tasks
16
+ requirement: &18110220 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '0.4'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *18110220
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec
27
+ requirement: &18109620 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: '2.4'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *18109620
36
+ - !ruby/object:Gem::Dependency
37
+ name: yard
38
+ requirement: &18109100 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 0.7.0
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *18109100
47
+ description: SCM is a simple Ruby library for interacting with common SCMs, such as
48
+ Git, Mercurial (Hg) and SubVersion (SVN).
49
+ email: postmodern.mod3@gmail.com
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - .document
55
+ - .gitignore
56
+ - .rspec
57
+ - .yardopts
58
+ - ChangeLog.md
59
+ - LICENSE.txt
60
+ - README.md
61
+ - Rakefile
62
+ - gemspec.yml
63
+ - lib/scm.rb
64
+ - lib/scm/commits/commit.rb
65
+ - lib/scm/commits/git.rb
66
+ - lib/scm/commits/hg.rb
67
+ - lib/scm/commits/svn.rb
68
+ - lib/scm/git.rb
69
+ - lib/scm/hg.rb
70
+ - lib/scm/repository.rb
71
+ - lib/scm/scm.rb
72
+ - lib/scm/svn.rb
73
+ - lib/scm/util.rb
74
+ - lib/scm/version.rb
75
+ - scm.gemspec
76
+ - spec/git_spec.rb
77
+ - spec/helpers/scm.rb
78
+ - spec/scm_spec.rb
79
+ - spec/spec_helper.rb
80
+ homepage: http://github.com/postmodern/scm
81
+ licenses:
82
+ - MIT
83
+ post_install_message:
84
+ rdoc_options: []
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - ! '>='
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ requirements: []
100
+ rubyforge_project:
101
+ rubygems_version: 1.8.8
102
+ signing_key:
103
+ specification_version: 3
104
+ summary: Ruby interface to common SCMs
105
+ test_files:
106
+ - spec/git_spec.rb
107
+ - spec/scm_spec.rb