Skip to content

Commit ff2f09f

Browse files
Merge branch 'develop' into gabriel-cardoso-patch-1
2 parents 7d5690a + f2cfb48 commit ff2f09f

25 files changed

+240
-204
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
*.gem
12
*.kpf
23
*.sw?
34
.DS_Store
45
coverage
5-
rdoc
66
pkg
7-
7+
rdoc
8+
Gemfile.lock

.jrubyrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cext.enabled=true

.travis.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
language: ruby
2+
rvm:
3+
- 1.8.7
4+
- 1.9.2
5+
- 1.9.3
6+
- 2.0.0
7+
- jruby-18mode
8+
- jruby-19mode
9+
- jruby-head
10+
- rbx-18mode
11+
- rbx-19mode
12+
- ree
13+
- ruby-head

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec :name => 'git'

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,20 @@ like:
3939

4040
Here are a bunch of examples of how to use the Ruby/Git package.
4141

42-
First you have to remember to require rubygems if it's not. Then include the 'git' gem.
42+
Ruby < 1.9 will require rubygems to be loaded.
4343

4444
```ruby
45-
4645
require 'rubygems'
47-
require 'git'
46+
```
4847

48+
Require the 'git' gem.
49+
```ruby
50+
require 'git'
4951
```
5052

5153
Here are the operations that need read permission only.
5254

5355
```ruby
54-
5556
g = Git.open(working_dir, :log => Logger.new(STDOUT))
5657

5758
g.index
@@ -124,13 +125,11 @@ Here are the operations that need read permission only.
124125
g.config # returns whole config hash
125126

126127
g.tag # returns array of Git::Tag objects
127-
128128
```
129129

130130
And here are the operations that will need to write to your git repository.
131131

132132
```ruby
133-
134133
g = Git.init
135134
Git.init('project')
136135
Git.init('/home/schacon/proj',
@@ -199,13 +198,11 @@ And here are the operations that will need to write to your git repository.
199198

200199
g.push
201200
g.push(g.remote('name'))
202-
203201
```
204202

205203
Some examples of more low-level index and tree operations
206204

207205
```ruby
208-
209206
g.with_temp_index do
210207

211208
g.read_tree(tree3) # calls self.index.read_tree
@@ -242,10 +239,8 @@ Some examples of more low-level index and tree operations
242239
# do file work
243240
g.commit # commits to index
244241
end
245-
246242
```
247243

248-
249244
## License
250245

251246
licensed under MIT License Copyright (c) 2008 Scott Chacon. See LICENSE for further details.

Rakefile

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,9 @@
1+
require 'rdoc/task'
12
require 'rubygems'
23

3-
begin
4-
require 'jeweler'
5-
Jeweler::Tasks.new do |gem|
6-
gem.name = "git"
7-
gem.summary = %Q{Ruby/Git is a Ruby library that can be used to create, read and manipulate Git repositories by wrapping system calls to the git binary}
8-
gem.email = "schacon@gmail.com"
9-
gem.homepage = "http://github.com/schacon/ruby-git"
10-
gem.authors = "Scott Chacon"
11-
gem.rubyforge_project = "git"
12-
gem.files = FileList["lib/**/*.rb"]
13-
gem.test_files = FileList["test/*.rb"]
14-
gem.extra_rdoc_files = ["README"]
15-
gem.requirements << 'git 1.6.0.0, or greater'
16-
17-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
18-
end
19-
20-
Jeweler::RubyforgeTasks.new
21-
rescue LoadError
22-
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
23-
end
4+
require "#{File.expand_path(File.dirname(__FILE__))}/lib/git/version"
245

6+
task :default => :test
257

268
desc "Upload Docs"
279
task :upload_docs do |t|
@@ -34,17 +16,9 @@ task :test do |t|
3416
require File.dirname(__FILE__) + '/tests/all_tests.rb'
3517
end
3618

37-
require 'rake/rdoctask'
3819
Rake::RDocTask.new do |rdoc|
39-
if File.exist?('VERSION.yml')
40-
config = YAML.load(File.read('VERSION.yml'))
41-
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
42-
else
43-
version = ""
44-
end
45-
4620
rdoc.rdoc_dir = 'rdoc'
47-
rdoc.title = "ruby-git #{version}"
21+
rdoc.title = "ruby-git #{Git::VERSION}"
4822
rdoc.rdoc_files.include('README*')
4923
rdoc.rdoc_files.include('lib/**/*.rb')
5024
end

git.gemspec

Lines changed: 40 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,47 @@
1-
# Generated by jeweler
2-
# DO NOT EDIT THIS FILE
3-
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4-
# -*- encoding: utf-8 -*-
1+
require 'date'
2+
3+
require "#{File.expand_path(File.dirname(__FILE__))}/lib/git/version"
54

65
Gem::Specification.new do |s|
7-
s.name = %q{git}
8-
s.version = "1.2.5"
6+
s.authors = ['Scott Chacon']
7+
s.date = Date.today.to_s
8+
s.email = 'schacon@gmail.com'
9+
s.homepage = 'http://github.com/schacon/ruby-git'
10+
s.license = 'MIT'
11+
s.name = 'git'
12+
s.summary = 'Ruby/Git is a Ruby library that can be used to create, read and manipulate Git repositories by wrapping system calls to the git binary.'
13+
s.version = Git::VERSION
914

1015
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11-
s.authors = ["Scott Chacon"]
12-
s.date = %q{2009-10-17}
13-
s.email = %q{schacon@gmail.com}
14-
s.extra_rdoc_files = [
15-
"README"
16-
]
17-
s.files = [
18-
"lib/git.rb",
19-
"lib/git/author.rb",
20-
"lib/git/base.rb",
21-
"lib/git/branch.rb",
22-
"lib/git/branches.rb",
23-
"lib/git/diff.rb",
24-
"lib/git/index.rb",
25-
"lib/git/lib.rb",
26-
"lib/git/log.rb",
27-
"lib/git/object.rb",
28-
"lib/git/path.rb",
29-
"lib/git/remote.rb",
30-
"lib/git/repository.rb",
31-
"lib/git/stash.rb",
32-
"lib/git/stashes.rb",
33-
"lib/git/status.rb",
34-
"lib/git/working_directory.rb"
35-
]
36-
s.homepage = %q{http://github.com/schacon/ruby-git}
37-
s.rdoc_options = ["--charset=UTF-8"]
38-
s.require_paths = ["lib"]
39-
s.requirements = ["git 1.6.0.0, or greater"]
40-
s.rubyforge_project = %q{git}
41-
s.rubygems_version = %q{1.3.5}
42-
s.summary = %q{Ruby/Git is a Ruby library that can be used to create, read and manipulate Git repositories by wrapping system calls to the git binary}
16+
s.require_paths = ['lib']
17+
s.requirements = ['git 1.6.0.0, or greater']
4318

44-
if s.respond_to? :specification_version then
45-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
46-
s.specification_version = 3
19+
s.add_development_dependency 'rake'
20+
s.add_development_dependency 'rdoc'
21+
s.add_development_dependency 'test-unit'
22+
23+
s.extra_rdoc_files = ['README.md']
24+
s.rdoc_options = ['--charset=UTF-8']
4725

48-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
49-
else
50-
end
51-
else
52-
end
26+
s.files = [
27+
'LICENSE',
28+
'lib/git.rb',
29+
'lib/git/author.rb',
30+
'lib/git/base.rb',
31+
'lib/git/branch.rb',
32+
'lib/git/branches.rb',
33+
'lib/git/diff.rb',
34+
'lib/git/index.rb',
35+
'lib/git/lib.rb',
36+
'lib/git/log.rb',
37+
'lib/git/object.rb',
38+
'lib/git/path.rb',
39+
'lib/git/remote.rb',
40+
'lib/git/repository.rb',
41+
'lib/git/stash.rb',
42+
'lib/git/stashes.rb',
43+
'lib/git/status.rb',
44+
'lib/git/version.rb',
45+
'lib/git/working_directory.rb'
46+
]
5347
end

0 commit comments

Comments
 (0)