p4ruby 2017.1.1653916-x64-mingw32 → 2017.1.1699426-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/ext/P4/p4.cpp +26 -0
- data/ext/P4/p4clientapi.cpp +18 -1
- data/ext/P4/p4clientapi.h +3 -0
- data/ext/P4/p4error.cpp +15 -0
- data/ext/P4/p4error.h +1 -0
- data/lib/2.0/P4.so +0 -0
- data/lib/2.1/P4.so +0 -0
- data/lib/2.2/P4.so +0 -0
- data/lib/2.3/P4.so +0 -0
- data/lib/2.4/P4.so +0 -0
- data/lib/P4/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36f8bde687d65b850de2976e50f2bf71b0c95dc5
|
4
|
+
data.tar.gz: e7f3843eed5cdc4194a19a8998df2ac2dea8f0fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 433a3100da4c43f52e1b8bbbfb024d46983cb95ea83a58d6407034defe0a268f18de5e5b033ab752ba612e18cb38103b2f945759b7dd6733e6c3e319527d43a9
|
7
|
+
data.tar.gz: cb21c87b6b20f4570ff67393eed39fcdc7c600c4f5ab7907c7a7d5124fb927ce7d86f8dc7cf91bd19933fc15df7e7a14047a03a755e839b9c31b511993707d2b
|
data/README.md
CHANGED
@@ -290,6 +290,9 @@ release up to the bug fix change level.
|
|
290
290
|
|
291
291
|
New functionality in 2017.1
|
292
292
|
|
293
|
+
- (SIR#96305/ P4RUBY-214)
|
294
|
+
Add get/set trust file location to api
|
295
|
+
|
293
296
|
- (SIR#93993 / P4RUBY-206)
|
294
297
|
|
295
298
|
Add a reset() method for resetting p4 client data (messages, output, etc.)
|
data/ext/P4/p4.cpp
CHANGED
@@ -489,6 +489,21 @@ static VALUE p4_set_ticket_file( VALUE self, VALUE path )
|
|
489
489
|
return Qtrue;
|
490
490
|
}
|
491
491
|
|
492
|
+
static VALUE p4_get_trust_file( VALUE self )
|
493
|
+
{
|
494
|
+
P4ClientApi *p4;
|
495
|
+
Data_Get_Struct( self, P4ClientApi, p4 );
|
496
|
+
return P4Utils::ruby_string( p4->GetTrustFile().Text() );
|
497
|
+
}
|
498
|
+
|
499
|
+
static VALUE p4_set_trust_file( VALUE self, VALUE path )
|
500
|
+
{
|
501
|
+
P4ClientApi *p4;
|
502
|
+
Data_Get_Struct( self, P4ClientApi, p4 );
|
503
|
+
p4->SetTrustFile( StringValuePtr( path ) );
|
504
|
+
return Qtrue;
|
505
|
+
}
|
506
|
+
|
492
507
|
static VALUE p4_get_user( VALUE self )
|
493
508
|
{
|
494
509
|
P4ClientApi *p4;
|
@@ -1188,6 +1203,14 @@ static VALUE p4msg_get_text( VALUE self )
|
|
1188
1203
|
return e->GetText();
|
1189
1204
|
}
|
1190
1205
|
|
1206
|
+
static VALUE p4msg_get_dict( VALUE self )
|
1207
|
+
{
|
1208
|
+
P4Error * e = 0;
|
1209
|
+
|
1210
|
+
Data_Get_Struct( self, P4Error, e );
|
1211
|
+
return e->GetDict();
|
1212
|
+
}
|
1213
|
+
|
1191
1214
|
static VALUE p4msg_get_id( VALUE self )
|
1192
1215
|
{
|
1193
1216
|
P4Error * e = 0;
|
@@ -1263,6 +1286,8 @@ void Init_P4()
|
|
1263
1286
|
rb_define_method( cP4, "protocol", RUBY_METHOD_FUNC(p4_set_protocol), 2 );
|
1264
1287
|
rb_define_method( cP4, "ticket_file", RUBY_METHOD_FUNC(p4_get_ticket_file), 0 );
|
1265
1288
|
rb_define_method( cP4, "ticket_file=", RUBY_METHOD_FUNC(p4_set_ticket_file), 1 );
|
1289
|
+
rb_define_method( cP4, "trust_file", RUBY_METHOD_FUNC(p4_get_trust_file), 0 );
|
1290
|
+
rb_define_method( cP4, "trust_file=", RUBY_METHOD_FUNC(p4_set_trust_file), 1 );
|
1266
1291
|
rb_define_method( cP4, "user", RUBY_METHOD_FUNC(p4_get_user) , 0 );
|
1267
1292
|
rb_define_method( cP4, "user=", RUBY_METHOD_FUNC(p4_set_user) , 1 );
|
1268
1293
|
rb_define_method( cP4, "version", RUBY_METHOD_FUNC(p4_get_version) , 0 );
|
@@ -1363,6 +1388,7 @@ void Init_P4()
|
|
1363
1388
|
rb_define_method( cP4Msg, "msgid", RUBY_METHOD_FUNC(p4msg_get_id), 0);
|
1364
1389
|
rb_define_method( cP4Msg, "severity", RUBY_METHOD_FUNC(p4msg_get_severity), 0);
|
1365
1390
|
rb_define_method( cP4Msg, "generic", RUBY_METHOD_FUNC(p4msg_get_generic), 0);
|
1391
|
+
rb_define_method( cP4Msg, "dictionary", RUBY_METHOD_FUNC(p4msg_get_dict), 0);
|
1366
1392
|
rb_define_method( cP4Msg, "to_s", RUBY_METHOD_FUNC(p4msg_get_text), 0);
|
1367
1393
|
|
1368
1394
|
// P4::Progress class.
|
data/ext/P4/p4clientapi.cpp
CHANGED
@@ -94,7 +94,17 @@ P4ClientApi::P4ClientApi() : ui( &specMgr )
|
|
94
94
|
henv.GetTicketFile( ticketFile );
|
95
95
|
|
96
96
|
if( (t = enviro->Get("P4TICKETS")) )
|
97
|
-
|
97
|
+
ticketFile = t;
|
98
|
+
|
99
|
+
//
|
100
|
+
// Load the current trust file. Start with the default, and then
|
101
|
+
// override it if P4TRUST is set.
|
102
|
+
//
|
103
|
+
|
104
|
+
henv.GetTrustFile( trustFile );
|
105
|
+
|
106
|
+
if( (t = enviro->Get("P4TICKETS")) )
|
107
|
+
trustFile = t;
|
98
108
|
|
99
109
|
//
|
100
110
|
// Load the current P4CHARSET if set.
|
@@ -192,6 +202,13 @@ P4ClientApi::SetTicketFile( const char *p )
|
|
192
202
|
ticketFile = p;
|
193
203
|
}
|
194
204
|
|
205
|
+
void
|
206
|
+
P4ClientApi::SetTrustFile( const char *p )
|
207
|
+
{
|
208
|
+
client.SetTrustFile( p );
|
209
|
+
trustFile = p;
|
210
|
+
}
|
211
|
+
|
195
212
|
void
|
196
213
|
P4ClientApi::SetDebug( int d )
|
197
214
|
{
|
data/ext/P4/p4clientapi.h
CHANGED
@@ -85,6 +85,7 @@ public:
|
|
85
85
|
void SetProg( const char *p ) { prog = p; }
|
86
86
|
void SetProtocol( const char *var, const char *val );
|
87
87
|
void SetTicketFile( const char *p );
|
88
|
+
void SetTrustFile( const char *p );
|
88
89
|
void SetUser( const char *u ) { client.SetUser( u ); }
|
89
90
|
void SetVersion( const char *v ) { version = v; }
|
90
91
|
|
@@ -102,6 +103,7 @@ public:
|
|
102
103
|
const StrPtr &GetPort() { return client.GetPort(); }
|
103
104
|
const StrPtr &GetProg() { return prog; }
|
104
105
|
const StrPtr &GetTicketFile() { return ticketFile; }
|
106
|
+
const StrPtr &GetTrustFile() { return trustFile; }
|
105
107
|
const StrPtr &GetUser() { return client.GetUser(); }
|
106
108
|
const StrPtr &GetVersion() { return version; }
|
107
109
|
|
@@ -235,6 +237,7 @@ private:
|
|
235
237
|
StrBuf prog;
|
236
238
|
StrBuf version;
|
237
239
|
StrBuf ticketFile;
|
240
|
+
StrBuf trustFile;
|
238
241
|
int depth;
|
239
242
|
int debug;
|
240
243
|
int exceptionLevel;
|
data/ext/P4/p4error.cpp
CHANGED
@@ -88,6 +88,21 @@ P4Error::GetText()
|
|
88
88
|
return P4Utils::ruby_string( t.Text(), t.Length() );
|
89
89
|
}
|
90
90
|
|
91
|
+
VALUE
|
92
|
+
P4Error::GetDict()
|
93
|
+
{
|
94
|
+
VALUE dictHash = rb_hash_new();
|
95
|
+
StrDict* pDict = error.GetDict();
|
96
|
+
StrRef key, val;
|
97
|
+
// suppress -Wpointer-arith
|
98
|
+
for (int i=0;pDict->GetVar(i,key,val) != 0;i++) {
|
99
|
+
rb_hash_aset( dictHash,
|
100
|
+
P4Utils::ruby_string(key.Text(), key.Length()),
|
101
|
+
P4Utils::ruby_string(val.Text(), val.Length()));
|
102
|
+
}
|
103
|
+
return dictHash;
|
104
|
+
}
|
105
|
+
|
91
106
|
VALUE
|
92
107
|
P4Error::Inspect()
|
93
108
|
{
|
data/ext/P4/p4error.h
CHANGED
data/lib/2.0/P4.so
CHANGED
Binary file
|
data/lib/2.1/P4.so
CHANGED
Binary file
|
data/lib/2.2/P4.so
CHANGED
Binary file
|
data/lib/2.3/P4.so
CHANGED
Binary file
|
data/lib/2.4/P4.so
CHANGED
Binary file
|
data/lib/P4/version.rb
CHANGED
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: 2017.1.
|
4
|
+
version: 2017.1.1699426
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Perforce Software, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby extensions to the C++ Perforce API.
|
14
14
|
email: support@perforce.com
|