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 +4 -4
- data/.github/workflows/continuous_integration.yml +3 -0
- data/CHANGELOG.md +4 -0
- data/CONTRIBUTING.md +8 -6
- data/README.md +1 -0
- data/Rakefile +12 -0
- data/lib/git/base.rb +6 -5
- data/lib/git/lib.rb +8 -2
- data/lib/git/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2e3c138e7f4eb164585e6d90808a0ed85e016f96a016ff52d09a7346ec3618f
|
4
|
+
data.tar.gz: 7b82caa3fb731d28ca57101b8327e76a7a22ce36436dd88e3f71f5e87152d0c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a467e84e7528a0f0cd373e07bf6725faf0c9df95e20f4c6b420e2c38d9b9a5af2919e3691af593ba3c30994bc97691c4fb7fb15fe9941d78172ade843c8bdea3
|
7
|
+
data.tar.gz: 444c1eaa95b8b3c15cbf3ac30856475468c2b1dd59521d59cd481ef936b0cd7665295218129bf5c6c949f5122689b20dc2132aadd3e81811ee82bc029fffd0d5
|
data/CHANGELOG.md
CHANGED
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
|
82
|
-
project's local working copy
|
83
|
-
|
84
|
-
### Continuous
|
85
|
-
* All tests must pass in the project's [
|
86
|
-
|
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
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
|
143
|
+
def config(name = nil, value = nil, options = {})
|
144
|
+
if name && value
|
144
145
|
# set value
|
145
|
-
lib.config_set(name, value)
|
146
|
-
elsif
|
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
|
-
|
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
|
-
|
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
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.
|
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:
|
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.
|
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
|