git 1.8.1 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of git might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4baf98bc2847ece4cb13a4f558b1654facb3c8add9ce58eebb024a139f880742
4
- data.tar.gz: 9c1448896ab666dbe25c38484074fc81814a53fdb6b5e8eac599f58ebdde713b
3
+ metadata.gz: b2e3c138e7f4eb164585e6d90808a0ed85e016f96a016ff52d09a7346ec3618f
4
+ data.tar.gz: 7b82caa3fb731d28ca57101b8327e76a7a22ce36436dd88e3f71f5e87152d0c5
5
5
  SHA512:
6
- metadata.gz: a71409e92d3c79d2c41c2dc693eb031dda63e1d50ddbfcc90c3fea04c30c25341d40a086934f4582f3207fba9a20240c1061ad79a007cdcae19969c9a662c341
7
- data.tar.gz: 78c864391d9dcc90f238d78cd616e65c7ccc0fddd2ae7d0a206e31f5d5726d4945ceecdb201680c9630bc7123b88696b744ae8a5f0a9094f743ac0473106c4dc
6
+ metadata.gz: a467e84e7528a0f0cd373e07bf6725faf0c9df95e20f4c6b420e2c38d9b9a5af2919e3691af593ba3c30994bc97691c4fb7fb15fe9941d78172ade843c8bdea3
7
+ data.tar.gz: 444c1eaa95b8b3c15cbf3ac30856475468c2b1dd59521d59cd481ef936b0cd7665295218129bf5c6c949f5122689b20dc2132aadd3e81811ee82bc029fffd0d5
@@ -40,3 +40,6 @@ jobs:
40
40
 
41
41
  - name: Run Build
42
42
  run: bundle exec rake default
43
+
44
+ - name: Test Gem
45
+ run: bundle exec rake test:gem
data/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@
5
5
 
6
6
  # Change Log
7
7
 
8
+ ## 1.9.0
9
+
10
+ See https://github.com/ruby-git/ruby-git/releases/tag/v1.9.0
11
+
8
12
  ## 1.8.1
9
13
 
10
14
  See https://github.com/ruby-git/ruby-git/releases/tag/v1.8.1
data/CONTRIBUTING.md CHANGED
@@ -78,12 +78,14 @@ In order to ensure high quality, all pull requests must meet these requirements:
78
78
 
79
79
  ### Unit tests
80
80
  * All changes must be accompanied by new or modified unit tests
81
- * The entire test suite must pass when `bundle exec rake test` is run from the
82
- project's local working copy
83
-
84
- ### Continuous Integration
85
- * All tests must pass in the project's [Travis CI](https://travis-ci.org/ruby-git/ruby-git)
86
- build before the pull request will be merged
81
+ * The entire test suite must pass when `bundle exec rake default` is run from the
82
+ project's local working copy.
83
+
84
+ ### Continuous integration
85
+ * All tests must pass in the project's [GitHub Continuous Integration build](https://github.com/ruby-git/ruby-git/actions?query=workflow%3ACI)
86
+ before the pull request will be merged.
87
+ * The [Continuous Integration workflow](https://github.com/ruby-git/ruby-git/blob/master/.github/workflows/continuous_integration.yml)
88
+ runs both `bundle exec rake default` and `bundle exec rake test:gem` from the project's [Rakefile](https://github.com/ruby-git/ruby-git/blob/master/Rakefile).
87
89
 
88
90
  ### Documentation
89
91
  * New and updated public methods must have [YARD](https://yardoc.org/)
data/README.md CHANGED
@@ -146,6 +146,7 @@ g.revparse('v2.5:Makefile')
146
146
 
147
147
  g.branches # returns Git::Branch objects
148
148
  g.branches.local
149
+ g.current_branch
149
150
  g.branches.remote
150
151
  g.branches[:master].gcommit
151
152
  g.branches['origin/master'].gcommit
data/Rakefile CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'bundler/gem_tasks'
2
+ require 'English'
2
3
 
3
4
  require "#{File.expand_path(File.dirname(__FILE__))}/lib/git/version"
4
5
 
@@ -41,4 +42,15 @@ unless RUBY_PLATFORM == 'java'
41
42
  # default_tasks << :yardstick
42
43
  end
43
44
 
45
+ default_tasks << :build
46
+
44
47
  task default: default_tasks
48
+
49
+ desc 'Build and install the git gem and run a sanity check'
50
+ task :'test:gem' => :install do
51
+ output = `ruby -e "require 'git'; g = Git.open('.'); puts g.log.size"`.chomp
52
+ raise 'Gem test failed' unless $CHILD_STATUS.success?
53
+ raise 'Expected gem test to return an integer' unless output =~ /^\d+$/
54
+
55
+ puts 'Gem Test Succeeded'
56
+ end
data/lib/git/base.rb CHANGED
@@ -137,13 +137,14 @@ module Git
137
137
 
138
138
  #g.config('user.name', 'Scott Chacon') # sets value
139
139
  #g.config('user.email', 'email@email.com') # sets value
140
+ #g.config('user.email', 'email@email.com', file: 'path/to/custom/config) # sets value in file
140
141
  #g.config('user.name') # returns 'Scott Chacon'
141
142
  #g.config # returns whole config hash
142
- def config(name = nil, value = nil)
143
- if(name && value)
143
+ def config(name = nil, value = nil, options = {})
144
+ if name && value
144
145
  # set value
145
- lib.config_set(name, value)
146
- elsif (name)
146
+ lib.config_set(name, value, options)
147
+ elsif name
147
148
  # return value
148
149
  lib.config_get(name)
149
150
  else
@@ -387,7 +388,7 @@ module Git
387
388
  # @git.pull('upstream', 'develope') # pulls from upstream/develop
388
389
  #
389
390
  def pull(remote='origin', branch='master')
390
- self.lib.pull(remote, branch)
391
+ self.lib.pull(remote, branch)
391
392
  end
392
393
 
393
394
  # returns an array of Git:Remote objects
data/lib/git/lib.rb CHANGED
@@ -583,8 +583,12 @@ module Git
583
583
 
584
584
  ## WRITE COMMANDS ##
585
585
 
586
- def config_set(name, value)
587
- command('config', name, value)
586
+ def config_set(name, value, options = {})
587
+ if options[:file].to_s.empty?
588
+ command('config', name, value)
589
+ else
590
+ command('config', '--file', options[:file], name, value)
591
+ end
588
592
  end
589
593
 
590
594
  def global_config_set(name, value)
@@ -642,6 +646,7 @@ module Git
642
646
  # :date
643
647
  # :no_verify
644
648
  # :allow_empty_message
649
+ # :gpg_sign
645
650
  #
646
651
  # @param [String] message the commit message to be used
647
652
  # @param [Hash] opts the commit options to be used
@@ -655,6 +660,7 @@ module Git
655
660
  arr_opts << "--date=#{opts[:date]}" if opts[:date].is_a? String
656
661
  arr_opts << '--no-verify' if opts[:no_verify]
657
662
  arr_opts << '--allow-empty-message' if opts[:allow_empty_message]
663
+ arr_opts << '--gpg-sign' if opts[:gpg_sign] == true || "--gpg-sign=#{opts[:gpg_sign]}" if opts[:gpg_sign]
658
664
 
659
665
  command('commit', arr_opts)
660
666
  end
data/lib/git/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  # The current gem version
3
3
  # @return [String] the current gem version.
4
- VERSION='1.8.1'
4
+ VERSION='1.9.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon and others
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-31 00:00:00.000000000 Z
11
+ date: 2021-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rchardet
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
179
  version: '0'
180
180
  requirements:
181
181
  - git 1.6.0.0, or greater
182
- rubygems_version: 3.1.4
182
+ rubygems_version: 3.2.15
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: An API to create, read, and manipulate Git repositories