rugged 0.25.0b4 → 0.25.0b5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ea4cb60e3267817cda5b2578e0527e5d9310e53
4
- data.tar.gz: 9831198a4fc9084f713416f1cad54b4e795f6a89
3
+ metadata.gz: 05da8fbc24bdfb988ec9ca4c6bce210839abef82
4
+ data.tar.gz: f4ccfe173a149fe48eb41931853d9f13e8cd98db
5
5
  SHA512:
6
- metadata.gz: aeff15bd39959a72b1e0a300d2ee6e87f8e657dfef76aea51815cae86020140f9401f604187cd581894be00e09c35d17bda907c7ad4051dcff2700c8164389a1
7
- data.tar.gz: 7cfb2950f9ebf716375fb8f522fc6b22c443f869adb689dcf8662ffe000522612c21b6b9a8ec5e502b44c51e57f17b6523d82a986084ac4e280ce8a0a80a0c47
6
+ metadata.gz: fded37e739a17e90541e079ef3c1b8fdf0cdfa6e306c5e630e56ef50c49d04a464692f42660571761ad6c1631a46310d95d9e64df8ce1ced1d1a3c7f1e1c61db
7
+ data.tar.gz: 06f8d28a06747f7e10f7b349ebd58b64e6f077cffdc97fe89785229d456bed9a15facad35df6507da70ead6f351b000cf4060cd98ef1583fb1e392b1a1ee2dd2
@@ -960,19 +960,19 @@ void rugged_parse_merge_file_options(git_merge_file_options *opts, VALUE rb_opti
960
960
 
961
961
  rb_value = rb_hash_aref(rb_options, CSTR2SYM("ancestor_label"));
962
962
  if (!NIL_P(rb_value)) {
963
- Check_Type(rb_value, T_FIXNUM);
963
+ Check_Type(rb_value, T_STRING);
964
964
  opts->ancestor_label = StringValueCStr(rb_value);
965
965
  }
966
966
 
967
967
  rb_value = rb_hash_aref(rb_options, CSTR2SYM("our_label"));
968
968
  if (!NIL_P(rb_value)) {
969
- Check_Type(rb_value, T_FIXNUM);
969
+ Check_Type(rb_value, T_STRING);
970
970
  opts->our_label = StringValueCStr(rb_value);
971
971
  }
972
972
 
973
973
  rb_value = rb_hash_aref(rb_options, CSTR2SYM("their_label"));
974
974
  if (!NIL_P(rb_value)) {
975
- Check_Type(rb_value, T_FIXNUM);
975
+ Check_Type(rb_value, T_STRING);
976
976
  opts->their_label = StringValueCStr(rb_value);
977
977
  }
978
978
 
@@ -190,6 +190,36 @@ static VALUE rb_git_diff_patch_lines(VALUE self)
190
190
  return INT2FIX(context + adds + dels);
191
191
  }
192
192
 
193
+ static VALUE rb_git_diff_patch_bytesize(int argc, VALUE *argv, VALUE self)
194
+ {
195
+ git_patch *patch;
196
+ size_t bytesize;
197
+ VALUE rb_options;
198
+ int options[3];
199
+ Data_Get_Struct(self, git_patch, patch);
200
+
201
+ memset(options, 0, sizeof(options));
202
+
203
+ rb_scan_args(argc, argv, "0:", &rb_options);
204
+ if (!NIL_P(rb_options)) {
205
+ if (RTEST(rb_hash_aref(rb_options, CSTR2SYM("include_context")))) {
206
+ options[0] = 1;
207
+ }
208
+
209
+ if (RTEST(rb_hash_aref(rb_options, CSTR2SYM("include_hunk_headers")))) {
210
+ options[1] = 1;
211
+ }
212
+
213
+ if (RTEST(rb_hash_aref(rb_options, CSTR2SYM("include_file_headers")))) {
214
+ options[2] = 1;
215
+ }
216
+ }
217
+
218
+ bytesize = git_patch_size(patch, options[0], options[1], options[2]);
219
+
220
+ return INT2FIX(bytesize);
221
+ }
222
+
193
223
  static int patch_print_cb(
194
224
  const git_diff_delta *delta,
195
225
  const git_diff_hunk *hunk,
@@ -235,6 +265,7 @@ void Init_rugged_patch(void)
235
265
 
236
266
  rb_define_method(rb_cRuggedPatch, "stat", rb_git_diff_patch_stat, 0);
237
267
  rb_define_method(rb_cRuggedPatch, "lines", rb_git_diff_patch_lines, 0);
268
+ rb_define_method(rb_cRuggedPatch, "bytesize", rb_git_diff_patch_bytesize, -1);
238
269
 
239
270
  rb_define_method(rb_cRuggedPatch, "delta", rb_git_diff_patch_delta, 0);
240
271
 
@@ -140,7 +140,7 @@ module Rugged
140
140
 
141
141
  # All the tags in the repository.
142
142
  #
143
- # Returns an TagCollection containing all the tags.
143
+ # Returns a TagCollection containing all the tags.
144
144
  def tags
145
145
  @tags ||= TagCollection.new(self)
146
146
  end
@@ -155,14 +155,14 @@ module Rugged
155
155
 
156
156
  # All the branches in the repository
157
157
  #
158
- # Returns an BranchCollection containing Rugged::Branch objects
158
+ # Returns a BranchCollection containing Rugged::Branch objects
159
159
  def branches
160
160
  @branches ||= BranchCollection.new(self)
161
161
  end
162
162
 
163
163
  # All the submodules in the repository
164
164
  #
165
- # Returns an SubmoduleCollection containing Rugged::Submodule objects
165
+ # Returns a SubmoduleCollection containing Rugged::Submodule objects
166
166
  def submodules
167
167
  @submodules ||= SubmoduleCollection.new(self)
168
168
  end
@@ -1,3 +1,3 @@
1
1
  module Rugged
2
- Version = VERSION = '0.25.0b4'
2
+ Version = VERSION = '0.25.0b5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rugged
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0b4
4
+ version: 0.25.0b5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon
@@ -9,50 +9,50 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-06-02 00:00:00.000000000 Z
12
+ date: 2016-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 0.9.0
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: 0.9.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: pry
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: minitest
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ~>
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '3.0'
48
+ version: '5.0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ~>
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '3.0'
55
+ version: '5.0'
56
56
  description: |
57
57
  Rugged is a Ruby bindings to the libgit2 linkable C Git library. This is
58
58
  for testing and using the libgit2 library in a language that is awesome.
@@ -62,30 +62,9 @@ extensions:
62
62
  - ext/rugged/extconf.rb
63
63
  extra_rdoc_files: []
64
64
  files:
65
- - README.md
66
65
  - LICENSE
67
- - lib/rugged/attributes.rb
68
- - lib/rugged/blob.rb
69
- - lib/rugged/branch.rb
70
- - lib/rugged/commit.rb
71
- - lib/rugged/console.rb
72
- - lib/rugged/credentials.rb
73
- - lib/rugged/diff/delta.rb
74
- - lib/rugged/diff/hunk.rb
75
- - lib/rugged/diff/line.rb
76
- - lib/rugged/diff.rb
77
- - lib/rugged/index.rb
78
- - lib/rugged/object.rb
79
- - lib/rugged/patch.rb
80
- - lib/rugged/reference.rb
81
- - lib/rugged/remote.rb
82
- - lib/rugged/repository.rb
83
- - lib/rugged/submodule_collection.rb
84
- - lib/rugged/tag.rb
85
- - lib/rugged/tree.rb
86
- - lib/rugged/version.rb
87
- - lib/rugged/walker.rb
88
- - lib/rugged.rb
66
+ - README.md
67
+ - ext/rugged/extconf.rb
89
68
  - ext/rugged/rugged.c
90
69
  - ext/rugged/rugged.h
91
70
  - ext/rugged/rugged_backend.c
@@ -118,12 +97,71 @@ files:
118
97
  - ext/rugged/rugged_tag.c
119
98
  - ext/rugged/rugged_tag_collection.c
120
99
  - ext/rugged/rugged_tree.c
100
+ - lib/rugged.rb
101
+ - lib/rugged/attributes.rb
102
+ - lib/rugged/blob.rb
103
+ - lib/rugged/branch.rb
104
+ - lib/rugged/commit.rb
105
+ - lib/rugged/console.rb
106
+ - lib/rugged/credentials.rb
107
+ - lib/rugged/diff.rb
108
+ - lib/rugged/diff/delta.rb
109
+ - lib/rugged/diff/hunk.rb
110
+ - lib/rugged/diff/line.rb
111
+ - lib/rugged/index.rb
112
+ - lib/rugged/object.rb
113
+ - lib/rugged/patch.rb
114
+ - lib/rugged/reference.rb
115
+ - lib/rugged/remote.rb
116
+ - lib/rugged/repository.rb
117
+ - lib/rugged/submodule_collection.rb
118
+ - lib/rugged/tag.rb
119
+ - lib/rugged/tree.rb
120
+ - lib/rugged/version.rb
121
+ - lib/rugged/walker.rb
122
+ - vendor/libgit2/AUTHORS
123
+ - vendor/libgit2/CMakeLists.txt
124
+ - vendor/libgit2/COPYING
121
125
  - vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
122
126
  - vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake
123
127
  - vendor/libgit2/cmake/Modules/FindGSSAPI.cmake
124
128
  - vendor/libgit2/cmake/Modules/FindHTTP_Parser.cmake
125
129
  - vendor/libgit2/cmake/Modules/FindIconv.cmake
126
130
  - vendor/libgit2/cmake/Modules/FindSecurity.cmake
131
+ - vendor/libgit2/deps/http-parser/LICENSE-MIT
132
+ - vendor/libgit2/deps/http-parser/http_parser.c
133
+ - vendor/libgit2/deps/http-parser/http_parser.h
134
+ - vendor/libgit2/deps/regex/config.h
135
+ - vendor/libgit2/deps/regex/regcomp.c
136
+ - vendor/libgit2/deps/regex/regex.c
137
+ - vendor/libgit2/deps/regex/regex.h
138
+ - vendor/libgit2/deps/regex/regex_internal.c
139
+ - vendor/libgit2/deps/regex/regex_internal.h
140
+ - vendor/libgit2/deps/regex/regexec.c
141
+ - vendor/libgit2/deps/winhttp/urlmon.h
142
+ - vendor/libgit2/deps/winhttp/winhttp.def
143
+ - vendor/libgit2/deps/winhttp/winhttp.h
144
+ - vendor/libgit2/deps/winhttp/winhttp64.def
145
+ - vendor/libgit2/deps/zlib/adler32.c
146
+ - vendor/libgit2/deps/zlib/crc32.c
147
+ - vendor/libgit2/deps/zlib/crc32.h
148
+ - vendor/libgit2/deps/zlib/deflate.c
149
+ - vendor/libgit2/deps/zlib/deflate.h
150
+ - vendor/libgit2/deps/zlib/infback.c
151
+ - vendor/libgit2/deps/zlib/inffast.c
152
+ - vendor/libgit2/deps/zlib/inffast.h
153
+ - vendor/libgit2/deps/zlib/inffixed.h
154
+ - vendor/libgit2/deps/zlib/inflate.c
155
+ - vendor/libgit2/deps/zlib/inflate.h
156
+ - vendor/libgit2/deps/zlib/inftrees.c
157
+ - vendor/libgit2/deps/zlib/inftrees.h
158
+ - vendor/libgit2/deps/zlib/trees.c
159
+ - vendor/libgit2/deps/zlib/trees.h
160
+ - vendor/libgit2/deps/zlib/zconf.h
161
+ - vendor/libgit2/deps/zlib/zlib.h
162
+ - vendor/libgit2/deps/zlib/zutil.c
163
+ - vendor/libgit2/deps/zlib/zutil.h
164
+ - vendor/libgit2/include/git2.h
127
165
  - vendor/libgit2/include/git2/annotated_commit.h
128
166
  - vendor/libgit2/include/git2/attr.h
129
167
  - vendor/libgit2/include/git2/blame.h
@@ -201,7 +239,7 @@ files:
201
239
  - vendor/libgit2/include/git2/tree.h
202
240
  - vendor/libgit2/include/git2/types.h
203
241
  - vendor/libgit2/include/git2/version.h
204
- - vendor/libgit2/include/git2.h
242
+ - vendor/libgit2/libgit2.pc.in
205
243
  - vendor/libgit2/src/annotated_commit.c
206
244
  - vendor/libgit2/src/annotated_commit.h
207
245
  - vendor/libgit2/src/array.h
@@ -280,14 +318,14 @@ files:
280
318
  - vendor/libgit2/src/global.c
281
319
  - vendor/libgit2/src/global.h
282
320
  - vendor/libgit2/src/graph.c
321
+ - vendor/libgit2/src/hash.c
322
+ - vendor/libgit2/src/hash.h
283
323
  - vendor/libgit2/src/hash/hash_common_crypto.h
284
324
  - vendor/libgit2/src/hash/hash_generic.c
285
325
  - vendor/libgit2/src/hash/hash_generic.h
286
326
  - vendor/libgit2/src/hash/hash_openssl.h
287
327
  - vendor/libgit2/src/hash/hash_win32.c
288
328
  - vendor/libgit2/src/hash/hash_win32.h
289
- - vendor/libgit2/src/hash.c
290
- - vendor/libgit2/src/hash.h
291
329
  - vendor/libgit2/src/hashsig.c
292
330
  - vendor/libgit2/src/ident.c
293
331
  - vendor/libgit2/src/idxmap.h
@@ -480,44 +518,6 @@ files:
480
518
  - vendor/libgit2/src/xdiff/xutils.h
481
519
  - vendor/libgit2/src/zstream.c
482
520
  - vendor/libgit2/src/zstream.h
483
- - vendor/libgit2/deps/http-parser/http_parser.c
484
- - vendor/libgit2/deps/http-parser/http_parser.h
485
- - vendor/libgit2/deps/http-parser/LICENSE-MIT
486
- - vendor/libgit2/deps/regex/config.h
487
- - vendor/libgit2/deps/regex/regcomp.c
488
- - vendor/libgit2/deps/regex/regex.c
489
- - vendor/libgit2/deps/regex/regex.h
490
- - vendor/libgit2/deps/regex/regex_internal.c
491
- - vendor/libgit2/deps/regex/regex_internal.h
492
- - vendor/libgit2/deps/regex/regexec.c
493
- - vendor/libgit2/deps/winhttp/urlmon.h
494
- - vendor/libgit2/deps/winhttp/winhttp.def
495
- - vendor/libgit2/deps/winhttp/winhttp.h
496
- - vendor/libgit2/deps/winhttp/winhttp64.def
497
- - vendor/libgit2/deps/zlib/adler32.c
498
- - vendor/libgit2/deps/zlib/crc32.c
499
- - vendor/libgit2/deps/zlib/crc32.h
500
- - vendor/libgit2/deps/zlib/deflate.c
501
- - vendor/libgit2/deps/zlib/deflate.h
502
- - vendor/libgit2/deps/zlib/infback.c
503
- - vendor/libgit2/deps/zlib/inffast.c
504
- - vendor/libgit2/deps/zlib/inffast.h
505
- - vendor/libgit2/deps/zlib/inffixed.h
506
- - vendor/libgit2/deps/zlib/inflate.c
507
- - vendor/libgit2/deps/zlib/inflate.h
508
- - vendor/libgit2/deps/zlib/inftrees.c
509
- - vendor/libgit2/deps/zlib/inftrees.h
510
- - vendor/libgit2/deps/zlib/trees.c
511
- - vendor/libgit2/deps/zlib/trees.h
512
- - vendor/libgit2/deps/zlib/zconf.h
513
- - vendor/libgit2/deps/zlib/zlib.h
514
- - vendor/libgit2/deps/zlib/zutil.c
515
- - vendor/libgit2/deps/zlib/zutil.h
516
- - vendor/libgit2/CMakeLists.txt
517
- - vendor/libgit2/AUTHORS
518
- - vendor/libgit2/COPYING
519
- - vendor/libgit2/libgit2.pc.in
520
- - ext/rugged/extconf.rb
521
521
  homepage: https://github.com/libgit2/rugged
522
522
  licenses:
523
523
  - MIT
@@ -528,17 +528,17 @@ require_paths:
528
528
  - lib
529
529
  required_ruby_version: !ruby/object:Gem::Requirement
530
530
  requirements:
531
- - - '>='
531
+ - - ">="
532
532
  - !ruby/object:Gem::Version
533
533
  version: 1.9.3
534
534
  required_rubygems_version: !ruby/object:Gem::Requirement
535
535
  requirements:
536
- - - '>'
536
+ - - ">"
537
537
  - !ruby/object:Gem::Version
538
538
  version: 1.3.1
539
539
  requirements: []
540
540
  rubyforge_project:
541
- rubygems_version: 2.0.14.1
541
+ rubygems_version: 2.6.3
542
542
  signing_key:
543
543
  specification_version: 4
544
544
  summary: Rugged is a Ruby binding to the libgit2 linkable library