rjgit 0.3.12 → 4.0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0dca5bc43118e84987f2118cdaed8ffa6925a046
4
- data.tar.gz: 1b10011535c71b5b0fb1907f197366236012f4b1
3
+ metadata.gz: a465cfeece5013f22dc111804a3e9bc4dc4fb667
4
+ data.tar.gz: 8e6d8bcffd10eac722c5c61f5808fd10cf2091a1
5
5
  SHA512:
6
- metadata.gz: ab47f81d3760a7bf41c1c1ade1c7b78a046737f6c9bffba267fd4dcb1df2a4335fb26c94583490f15f105b1a7735fe4306b3523fb55165a624d1522de439e145
7
- data.tar.gz: d4c6c89be7f55819b6fc24dc7510916ded5c551c8d5daa122192cbf011e179050b4dd05c7fdeb9f71220d681c9fecb605c59b36c887ef63f687e506c6686d18f
6
+ metadata.gz: 0eb0dca93ef3c5e84bc5af9a4b26d25e3b81fccd5731411dc6efaccfdb8604b5d0c2f02306a6915dc8e87d2d48870d81d1d0346863b8bde0e435c7180dd1877b
7
+ data.tar.gz: 034259f6a049f41353dfdc1bb378de8bb1664661a2160f8c234136112e87217fefb4171b8fa287e5dca1b70977a66691a82435b98c6327b66c65225e7d51959b
data/README.md CHANGED
@@ -25,7 +25,9 @@ Installation
25
25
  ------------
26
26
  Install the rjgit gem with the command:
27
27
 
28
+ ```sh
28
29
  $ gem install rjgit
30
+ ```
29
31
 
30
32
  #### Dependencies for using RJGit:
31
33
  - JRuby >= 1.7.0
@@ -78,6 +80,14 @@ repo.find('959329025f67539fb82e76b02782322fad032821')
78
80
  repo.find('959329025f67539fb82e76b02782322fad032821', :commit) # Find a specific :commit, :blob, :tree, or :tag
79
81
  ```
80
82
 
83
+ ### Getting diffs
84
+ ```ruby
85
+ sha1 = repo.head.id
86
+ sha2 = repo.commits.last.id
87
+ options = {:old_rev => sha2, :new_rev => sha1, :file_path => "some/path.txt", :patch => true}
88
+ Porcelain.diff(repo, options)
89
+ ```
90
+
81
91
  ### Getting tags
82
92
  ```ruby
83
93
  tag = repo.tags['example_tag']
data/lib/rjgit.rb CHANGED
@@ -304,11 +304,11 @@ module RJGit
304
304
  commit_builder.setAuthor(person)
305
305
  commit_builder.setMessage(message)
306
306
  commit_builder.setTreeId(RJGit.tree_type(new_tree))
307
- if parents.is_a?(Array) then
308
- parents.each {|parent| commit_builder.addParentId(RJGit.commit_type(parent)) }
309
- elsif parents
310
- commit_builder.addParentId(RJGit.commit_type(parents))
311
- end
307
+ if parents.is_a?(Array) then
308
+ parents.each {|parent| commit_builder.addParentId(RJGit.commit_type(parent)) }
309
+ elsif parents
310
+ commit_builder.addParentId(RJGit.commit_type(parents))
311
+ end
312
312
  result = @treebuilder.object_inserter.insert(commit_builder)
313
313
  @treebuilder.object_inserter.flush
314
314
  result
@@ -332,7 +332,7 @@ module RJGit
332
332
  ru.setRefLogMessage("commit: #{message}", false)
333
333
  res = ru.update.to_string
334
334
 
335
- @treebuilder.object_inserter.release
335
+ # @treebuilder.object_inserter.release
336
336
  @current_tree = new_tree
337
337
  log = @treebuilder.log
338
338
  @treebuilder.init_log
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RJGit
2
- VERSION = "0.3.12"
2
+ VERSION = "4.0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rjgit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 4.0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maarten Engelen
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-05-02 00:00:00.000000000 Z
15
+ date: 2015-07-26 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: mime-types
@@ -45,7 +45,7 @@ files:
45
45
  - lib/constants.rb
46
46
  - lib/git.rb
47
47
  - lib/java/jars/jsch-0.1.49.jar
48
- - lib/java/jars/org.eclipse.jgit-3.7.1.201504261725-r.jar
48
+ - lib/java/jars/org.eclipse.jgit-4.0.1.201506240215-r.jar
49
49
  - lib/java/jars/slf4j-api-1.7.2.jar
50
50
  - lib/java/jars/slf4j-simple-1.7.12.jar
51
51
  - lib/repo.rb