p4ruby 2022.1.2405581-x86-mingw32 → 2023.1.2446234-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/ext/P4/extconf.rb +22 -59
- data/ext/P4/p4.cpp +5 -0
- data/ext/P4/specmgr.cpp +3 -1
- data/lib/2.7/P4.so +0 -0
- data/lib/3.0/P4.so +0 -0
- data/lib/3.1/P4.so +0 -0
- data/lib/3.2/P4.so +0 -0
- data/lib/P4/version.rb +1 -1
- data/lib/P4.so +0 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93476d1677d08da773f6c10848a66ed91d3fb9876900a6f4bef0841307881f27
|
4
|
+
data.tar.gz: 322886938525c877baed786224b0a4b9d0188fff721400c801f5a2191fbb90e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84515e52a09923e5cd3c66b419f1ad669c4b6d1057c77e3d5ef7714e87aae2cc040a29cd25155c3670837dcf5346a06d316d1c6ea25f7829a2e4fbb0cda42a63
|
7
|
+
data.tar.gz: c967d685e344d24de91c1b2e8667a044d9989559b71f924f7762d0823a42ba4b1d6664a895ae8360ebf47dd2a9288f29faebeb39f654cb6f2c790bea8246b915
|
data/LICENSE.txt
CHANGED
@@ -32,7 +32,7 @@ this program.
|
|
32
32
|
|
33
33
|
P4/P4API License
|
34
34
|
-----------------------
|
35
|
-
Copyright (c) 1995-
|
35
|
+
Copyright (c) 1995-2023, Perforce Software, Inc.
|
36
36
|
All rights reserved.
|
37
37
|
|
38
38
|
Redistribution and use in source and binary forms, with or without
|
data/ext/P4/extconf.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
$:.push File.expand_path("../../../lib", __FILE__)
|
4
4
|
|
5
5
|
require 'mkmf'
|
6
|
-
require 'net/ftp'
|
7
6
|
require 'P4/version'
|
8
7
|
require 'rbconfig'
|
9
8
|
require 'openssl'
|
9
|
+
require 'net/http'
|
10
10
|
|
11
11
|
# Set this to the main version directory we look up in ftp.perforce.com for the P4API
|
12
12
|
# This is ignored if you specify the version on the command line.
|
@@ -266,9 +266,9 @@ class P4ApiVersion
|
|
266
266
|
# subdirectory. Look there if we can't find it in the API root
|
267
267
|
#
|
268
268
|
ver_file = dir + "/Version"
|
269
|
-
unless File.
|
269
|
+
unless File.exist?(ver_file)
|
270
270
|
ver_file = dir + "/sample/Version"
|
271
|
-
return nil unless File.
|
271
|
+
return nil unless File.exist?(ver_file)
|
272
272
|
end
|
273
273
|
|
274
274
|
re = Regexp.new('^RELEASE = (\d+)\s+(\d+)\s+(\w*\S*)\s*;')
|
@@ -390,7 +390,7 @@ def resolve_p4api_dir
|
|
390
390
|
end
|
391
391
|
|
392
392
|
if !p4api_dir && !with_config('p4api-dir') && enable_config('p4api-download', true)
|
393
|
-
|
393
|
+
download_api_via_https
|
394
394
|
unzip_file
|
395
395
|
p4api_dir = downloaded_p4api_dir
|
396
396
|
dir_config('p4api', "#{p4api_dir}/include", "#{p4api_dir}/lib")
|
@@ -468,7 +468,7 @@ def platform_dir_name
|
|
468
468
|
"bin.#{p4_platform_label}"
|
469
469
|
end
|
470
470
|
|
471
|
-
def
|
471
|
+
def download_dir(version)
|
472
472
|
"perforce/#{version}/#{platform_dir_name}"
|
473
473
|
end
|
474
474
|
|
@@ -484,7 +484,9 @@ def filename
|
|
484
484
|
filename = 'p4api-openssl1.1.1.zip'
|
485
485
|
when /1.0/
|
486
486
|
filename = 'p4api-openssl1.0.2.zip'
|
487
|
-
|
487
|
+
when /3.0/
|
488
|
+
filename = 'p4api-openssl3.zip'
|
489
|
+
end
|
488
490
|
end
|
489
491
|
elsif RbConfig::CONFIG['target_os'].downcase =~ /darwin19|darwin[2-9][0-9]/
|
490
492
|
filename = 'p4api-openssl1.1.1.tgz'
|
@@ -496,69 +498,30 @@ def filename
|
|
496
498
|
filename = 'p4api-glibc2.3-openssl1.1.1.tgz'
|
497
499
|
when /1.0/
|
498
500
|
filename = 'p4api-glibc2.3-openssl1.0.2.tgz'
|
501
|
+
when /3.0/
|
502
|
+
filename = 'p4api-glibc2.3-openssl3.tgz'
|
499
503
|
end
|
500
504
|
end
|
501
505
|
end
|
502
506
|
return filename
|
503
507
|
end
|
504
508
|
|
505
|
-
|
506
|
-
|
507
|
-
ftp.ls(dir.to_s).map { |entry|
|
508
|
-
if match = entry.match(regex)
|
509
|
-
yield match
|
510
|
-
else
|
511
|
-
nil
|
512
|
-
end
|
513
|
-
}.reject { |entry|
|
514
|
-
entry.nil?
|
515
|
-
}
|
516
|
-
end
|
517
|
-
|
518
|
-
def find_latest_with_p4api(ftp, versions)
|
519
|
-
versions.reverse_each { |v|
|
520
|
-
begin
|
521
|
-
remote_files_matching(ftp, "r#{v}/#{platform_dir_name}/", /p4api/) do
|
522
|
-
return v
|
523
|
-
end
|
524
|
-
rescue
|
525
|
-
next
|
526
|
-
end
|
527
|
-
}
|
528
|
-
end
|
529
|
-
|
530
|
-
def find_latest_version_dir(ftp)
|
531
|
-
ftp.chdir('perforce')
|
532
|
-
|
533
|
-
# Capture all versions
|
534
|
-
versions = remote_files_matching(ftp, '.', /r(1\d\.\d)/) { |m| m.captures.first }.sort
|
535
|
-
|
536
|
-
version = find_latest_with_p4api(ftp, versions)
|
537
|
-
|
538
|
-
ftp.chdir('..')
|
539
|
-
|
540
|
-
"r#{version}"
|
541
|
-
end
|
542
|
-
|
543
|
-
# Downloads the C++ P4API via FTP to the local directory, then 'initializes' it
|
509
|
+
#############################################
|
510
|
+
# Downloads the C++ P4API via HTTPS to the local directory, then 'initializes' it
|
544
511
|
# by unpacking it.
|
545
|
-
def
|
546
|
-
ftp = Net::FTP.new('ftp.perforce.com')
|
547
|
-
ftp.passive=true
|
548
|
-
ftp.login
|
549
|
-
|
550
|
-
# At one point, we allowed the gem build to just find the most recent p4api build.
|
551
|
-
# P4Ruby probably shouldn't do that by default.
|
552
|
-
#version_dir = find_latest_version_dir(ftp)
|
512
|
+
def download_api_via_https
|
553
513
|
|
554
|
-
|
555
|
-
|
514
|
+
uri=URI('https://ftp.perforce.com:443')
|
515
|
+
dir = download_dir(p4api_version_dir)
|
556
516
|
|
557
|
-
puts "
|
558
|
-
ftp.getbinaryfile(filename)
|
517
|
+
puts "Downloading #{filename} from #{dir} on https://ftp.perforce.com"
|
559
518
|
|
560
|
-
|
561
|
-
|
519
|
+
Net::HTTP.start(uri.host, uri.port, :use_ssl =>true) do |http|
|
520
|
+
resp = http.get("/" + dir + "/" + filename)
|
521
|
+
open(filename, "wb") do |file|
|
522
|
+
file.write(resp.body)
|
523
|
+
end
|
524
|
+
end
|
562
525
|
end
|
563
526
|
|
564
527
|
def unzip_file
|
data/ext/P4/p4.cpp
CHANGED
@@ -1502,6 +1502,11 @@ void Init_P4()
|
|
1502
1502
|
|
1503
1503
|
// P4::Progress class.
|
1504
1504
|
cP4Prog = rb_define_class_under( cP4, "Progress", rb_cObject );
|
1505
|
+
|
1506
|
+
rb_undef_alloc_func(cP4);
|
1507
|
+
rb_undef_alloc_func(cP4MD);
|
1508
|
+
rb_undef_alloc_func(cP4Map);
|
1509
|
+
rb_undef_alloc_func(cP4Msg);
|
1505
1510
|
|
1506
1511
|
};
|
1507
1512
|
|
data/ext/P4/specmgr.cpp
CHANGED
@@ -92,7 +92,8 @@ struct defaultspec {
|
|
92
92
|
"AltRoots;code:308;type:llist;len:64;;"
|
93
93
|
"Options;code:309;type:line;len:64;val:"
|
94
94
|
"noallwrite/allwrite,noclobber/clobber,nocompress/compress,"
|
95
|
-
"unlocked/locked,nomodtime/modtime,normdir/rmdir
|
95
|
+
"unlocked/locked,nomodtime/modtime,normdir/rmdir,"
|
96
|
+
"noaltsync/altsync;;"
|
96
97
|
"SubmitOptions;code:313;type:select;fmt:L;len:25;val:"
|
97
98
|
"submitunchanged/submitunchanged+reopen/revertunchanged/"
|
98
99
|
"revertunchanged+reopen/leaveunchanged/leaveunchanged+reopen;;"
|
@@ -128,6 +129,7 @@ struct defaultspec {
|
|
128
129
|
"MaxScanRows;code:403;type:word;len:12;;"
|
129
130
|
"MaxLockTime;code:407;type:word;len:12;;"
|
130
131
|
"MaxOpenFiles;code:413;type:word;len:12;;"
|
132
|
+
"MaxMemory;code:NNN;type:word;len:12;;"
|
131
133
|
"Timeout;code:406;type:word;len:12;;"
|
132
134
|
"PasswordTimeout;code:409;type:word;len:12;;"
|
133
135
|
"LdapConfig;code:410;type:line;len:128;;"
|
data/lib/2.7/P4.so
CHANGED
Binary file
|
data/lib/3.0/P4.so
CHANGED
Binary file
|
data/lib/3.1/P4.so
CHANGED
Binary file
|
data/lib/3.2/P4.so
ADDED
Binary file
|
data/lib/P4/version.rb
CHANGED
data/lib/P4.so
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: p4ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2023.1.2446234
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Perforce Software, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby extensions to the C++ Perforce API.
|
14
14
|
email: support@perforce.com
|
@@ -46,6 +46,7 @@ files:
|
|
46
46
|
- lib/2.7/P4.so
|
47
47
|
- lib/3.0/P4.so
|
48
48
|
- lib/3.1/P4.so
|
49
|
+
- lib/3.2/P4.so
|
49
50
|
- lib/P4.rb
|
50
51
|
- lib/P4.so
|
51
52
|
- lib/P4/version.rb
|
@@ -69,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
70
|
- !ruby/object:Gem::Version
|
70
71
|
version: '0'
|
71
72
|
requirements: []
|
72
|
-
rubygems_version: 3.
|
73
|
+
rubygems_version: 3.4.10
|
73
74
|
signing_key:
|
74
75
|
specification_version: 4
|
75
76
|
summary: Ruby extensions to the C++ Perforce API
|