Name | Modified | Size |
---|---|---|
.. | ||
01_info_test.rb | 10 years ago | 2 KB |
02_environment_test.rb | 10 years ago | 3 KB |
03_client_test.rb | 10 years ago | 3 KB |
04_files_test.rb | 10 years ago | 5 KB |
05_resolve_test.rb | 10 years ago | 17 KB |
10_password_test.rb | 10 years ago | 4 KB |
11_maps_test.rb | 10 years ago | 4 KB |
12_specs_test.rb | 10 years ago | 15 KB |
13_server_test.rb | 10 years ago | 2 KB |
14_output_test.rb | 10 years ago | 4 KB |
15_track_test.rb | 10 years ago | 2 KB |
16_shelve_test.rb | 10 years ago | 3 KB |
17_streams_test.rb | 10 years ago | 4 KB |
18_handler_test.rb | 10 years ago | 4 KB |
19_spec_iterator_test.rb | 10 years ago | 3 KB |
20_unload_test.rb | 10 years ago | 3 KB |
21_progress_test.rb | 10 years ago | 5 KB |
22_ignore_test.rb | 10 years ago | 2 KB |
98_unicode_test.rb | 10 years ago | 4 KB |
testlib.rb | 10 years ago | 6 KB |
Change | User | Description | Committed |
---|---|---|---|
14719 | tjuricek | Mirroring the current state of the workshop. From this point, we will try to rebuild th...e history of p4-ruby in the workshop from this codeline. « |
10 years ago |
14705 | tjuricek | Merge branch 'master' of gfprod:p4ruby-check Conflicts: test/02_environm...ent_test.rb test/98_unicode_test.rb Imported from Git Author: Tristan Juricek <tjuricek@perforce.com> 1421272022 -0800 Committer: Tristan Juricek <tjuricek@perforce.com> 1421272022 -0800 sha1: 2a9e62acaaca876c3fd04cd3ea1c3228003885e2 push-state: complete parent-changes: cab72389a4abd47d0ec2f148592ad0f640ec1c6b=[969219]/2950fbb70d4b00f06d1bf6a5474b0451e172a358=[985877] « |
10 years ago |
14704 | tjuricek | Fix references to RUBY_VERSION which happen when the version < 2.0. Imported from Gi...t Author: Tristan Juricek <tjuricek@perforce.com> 1421271811 -0800 Committer: Tristan Juricek <tjuricek@perforce.com> 1421271852 -0800 sha1: 98e913af00b07641353e9836aa1a5d977693e0f2 push-state: complete parent-changes: 98f39e4dc235567756c22213b4c64be799554e4d=[985029] « |
10 years ago |
14694 | tjuricek | Add `enviro_file` property to `P4` object that calls SetEnviroFile and GetEnviroFile under...neath. P4RUBY-169 Imported from Git Author: Tristan Juricek <tjuricek@perforce.com> 1418331105 -0800 Committer: Tristan Juricek <tjuricek@perforce.com> 1418331105 -0800 sha1: 141f8b9f65b4c56ce5a42144d8c185285effaa12 push-state: complete parent-changes: 98f9b10c0c37b44bfc8659e7934440fe1252c4c2=[974326] « |
10 years ago |
14685 | tjuricek | First merge into main of the p4ruby-check project, used to validate the p4ruby gem (withou...t any access to source). This does require using p4util: bundle exec p4util download p4d See tools/test_p4ruby_gem.sh for the exact process used to validate the gem. Imported from Git Author: Tristan Juricek <tjuricek@perforce.com> 1415838551 -0800 Committer: Tristan Juricek <tjuricek@perforce.com> 1415838551 -0800 sha1: bc41f30d8c51a652defeee59f438d1446091ee61 push-state: complete parent-changes: 97f4a83740ecd006070c19775bd9a3abba2f9804=[946222]/1256d8281e6fbfe9f2019fd3756d0b4730beb5c5=[960938] « |
10 years ago |
14684 | Git Fusion | Git Fusion branch management Imported from Git ghost-of-change-num: 946222 &nb...sp;ghost-of-sha1: 97f4a83740ecd006070c19775bd9a3abba2f9804 ghost-precedes-sha1: bc41f30d8c51a652defeee59f438d1446091ee61 push-state: incomplete « |
10 years ago |
14682 | Git Fusion | Git Fusion branch management Imported from Git ghost-of-change-num: 960958 &nb...sp;ghost-of-sha1: 005052ae424bd69f426f7209e741ca1c8c3253c7 ghost-precedes-sha1: ad052c71a568ef12165e143a6866ad9ceffbb4a1 parent-branch: None@960958 push-state: incomplete « |
10 years ago |
14679 | tony | Fix p4ruby test run so it also includes the current directory in the library search path.... This helps us pick up the P4.so we're testing. Also fixed some minor gripes and backed out a previous change that obviously didn't work under 1.8 « |
10 years ago |
14678 | tony | Add file missed in previous change | 10 years ago |
14676 | tony | Rework P4Ruby unit tests so they they are actually units. Now the test order is irreleva...nt as all tests are standalone. Tidied up the code formatting as well and removed all the tabs from the ruby sources files. Added a modeline for vim users so consistent indentation will be used. « |
10 years ago |
14659 | tony | Add ignore file support to P4Ruby. This change adds three new methods: ... P4#ignore_file - Return current ignore file P4#ignore_file= - Set ignore file name P4#ignored? - Test if a path is ignored It also removes the check which objected to the use of Ruby 2.0 since we now support it. Now we simply check that you're not using 2.1 (still a development release). « |
11 years ago |
14658 | jmistry | Fix progress unit test Quiet sync surpressed all output, even in tagged mode, between P4D... 2012.2 and 2013.3. Updated the unit test to skip these server versions, so we only do progress test with a quiet sync on 2014.1 (and newer) servers. « |
11 years ago |
14657 | tony | Make P4Ruby build with Ruby 2.0.0 (on Mac at least). Mostly cosmetic changes: just makes... the build script handle the Ruby 2 mkmf and the changes also work with 1.8.7 and 1.9.3 so they should probably have been like this all along. Infrastructure change only - no functional change « |
11 years ago |
14653 | jmistry |
Merging p12.2 changes to main Integration only change. |
13 years ago |
14652 | jmistry | YAC to P4#run_tickets Change in format to return an array of keyed hashes. For example...: { 'Ticket' => 'D6EBA4584B635E19EA579E33EB0195DA', 'User' => 'pallen', 'Host' => 'localhost:2003' } « |
13 years ago |
14650 | jmistry | Progress indicator for P4Ruby. There is a new class P4::Progress that is set up to be s...ubclassed by a user. It has the following interface and P4Ruby expects the following class methods to be defined by the user (even if it's an empty implementation): class Progress: def init(type) end def description(description, units ) end def total( total ) end def update( position ) end def done( fail ) end end Users need to create a subclass of P4::Progress and assign an instance to P4 to enable the progress indicator: class MyProgress < P4::Progress def update(pos): # do something with the value here # other methods p4 = P4.new p4.progress = MyProgress.new New feature to be documented in the release notes. « |
13 years ago |
14649 | jmistry |
Pull 12.1 fixes to main Integration only change |
13 years ago |
14648 | jmistry | Follow-on to change 500964 Forgot to submit unit test updates. Also, instead of r...eturning nil for a directory or non-existent file, it seems more consistent to return an empty array. « |
13 years ago |
14646 | jmistry | Add test for unload/reload Unit test to ensure that unload and reload of client workspac...es works through P4Ruby. « |
13 years ago |
14645 | jmistry | Ensure iterator args are passed on Forgot to pass on any arguments that the user may ha...ve supplied to their call to 'each_<spec>'. Fixed this and also added a test for it. « |
13 years ago |
14644 | jmistry | Generic each_* methods Simple method to iterate over a particular type of spec This is a... convenient wrapper for the pattern: clients = p4.run_clients clients.each do |c| client = p4.fetch_client( c['client'] ) <do something with spec> end NOTE: It's not possible to implicitly pass a block to a delegate method, so I've implemented it here directly. Could use Proc.new.call, but it looks like there is a serious performance impact with that method. job056520 : spec iterator implementation « |
13 years ago |
14643 | jmistry | Implement P4#tickets for P4Ruby P4#tickets checks P4#ticket_file, if it's a directory o...r does not exist it just returns 'nil'. Otherwise it iterates over the file and inserts each line into an array of hashes. Each hash is a single ticket entry: key: ticket key (hostname:port=user) value: ticket value Update unit test to test new functionality. « |
13 years ago |
14641 | jmistry |
pull unit test fix from p12.1 to main. Integration only change. |
13 years ago |
14640 | jmistry |
Pull changes from p12.1 to main. Integration only change. |
13 years ago |
14637 | jmistry | Remove P4IGNORE and P4CLIENTPATH tests | 13 years ago |
14636 | jmistry | Fix binary file resolve Accessing the base_name attribute of a P4::MergeData object resul...ted in a segmentation fault when resolving binary files. This is because the base file is empty for binary files, and the Name() method invoked on it does not protect itself in case of a NULL value. User visible change, to be documented in the release notes. « |
13 years ago |
14633 | jmistry | remove md.info[ 'clientFile' ] check Difficult to test the value of this on different p...latforms, so removing it for now. The remaining checks against P4::MergeData#info should be enough to ensure that it contains the correct information. « |
13 years ago |
14632 | jmistry | Update P4Ruby spec manager to 12.1 specs. | 13 years ago |
14629 | jmistry | Implemented 'action resolve' in P4Ruby. This extends the existing P4MergeData class to... support action resolve. Users will need to test the MergeData object passed to the block to determine if the resolve is for content (P4::MergeData#content_resolve?) or action (P4::MergeData#action_resolve?). The attributes available in 'P4::MergeDatamerge' for an action resolve are: merge_action : The action chosen for the merge, can be emtpy yours_action: your action/filetype their_action: their action/filetype type: the type of merge. Can be "Branch resolve", "Filetype resolve", "Delete resolve" "Filename resolve" info: a dictionary with additional information that can vary with the resolve type. Updated unit test to test action resolve. User visible change, to be documented in the release notes for 2012.1. « |
13 years ago |
14628 | jmistry | Quit resolve if there is an exception. Follow-on from change @410702, which raised exce...ptions up to the user from P4#run_resolve. Further testing showed that if multiple resolves are scheduled and an exception is raised, then subsequent resolves would clear that. We now check if an exception has been raised by an earlier resolve and return early if there has been. Unit test has been updated with this case. User visible change to be documented in release notes. « |
13 years ago |
14625 | jmistry | Add resolve test case Before beginning work on ActionResolve, let's add a unit test for c...ontent resolves. « |
13 years ago |
14624 | jmistry | Pull p11.1 changes back to main | 13 years ago |
14622 | jmistry | Pull 10.2 changes to main Pick up missing changes in p10.2 and integrate to main. As... part of the integrate I also moved the unit tests '16_streams.rb' and '17_streaming_handler.rb' because the integration introduced collisions with the unit test names. Updated MANIFEST with new names for unit tests and also added '98_unicode.rb', which was missing from it. « |
13 years ago |
14620 | jmistry | Add P4IGNORE and P4CLIENTPATH unit tests | 13 years ago |
14613 | jmistry | Fix P4#set_env unit test Unit test incorrectly checked if the platform is Linux and skipp...ed part of the test if it was. So, this part of the test was still running on platforms that do not support P4#set_env and would raise an (expected) exception during the unit test. Now it checks if the platform is Windows or Darwin, and if it is it runs the registry setting test. « |
14 years ago |
14611 | jmistry | Support setting values in the registry through P4Ruby. The command P4.set_env( var, val )... will set a registry variably on platforms that support this action or through an exception on Unix. The command P4.set_env( var ) resets a registry variable. Updated unit test '02_environment.rb' to include registry set/check. User visible change to be documented in release notes. « |
14 years ago |
14610 | jmistry | Fix unlink error on unit tests Wrap the connect/disconnect in begin/ensure blocks to e...nsure that the client disconnect even if there are failures in a unit test. Fix unicode unit test for 1.9. When the contents of a file is stored in a String object, ruby 1.9 sets the String's encoding to the current locale. This is overridden in the test case and set to the correct value. This may need to be documented. user visible change. « |
14 years ago |
14609 | jmistry | Fix track error P4Ruby now raises a P4Exception, instead of a Ruby warning if a user trie...s to change track output after connecting. The test case has been updated to suppress this because we expect the error. Also removed debug message (accidently) left in streams test case. « |
14 years ago |
14607 | jmistry | Fix streams test case Streams test case now checks api_level, as well as server_version ... to make sure that we are using a new enough P4API. If not, the test is skipped and the following message is displayed: "Test Skipped: Streams requires a 2011.1 or later Perforce Server and P4API." « |
14 years ago |
14606 | jmistry | Fix unicode test case Set 'encoding' at the beginning of the script (using a 'magic' Ruby... comment), so that the strings are encoded correctly. The test case now passes for Ruby 1.8 and 1.9. Also changed class name from 'TC_Output' to 'TC_Track'. The old name collided with the class defined in '14_output.rb', so that test case wasn't running. Only noticed when testing with Ruby 1.9, so not sure how long that test has been skipped. « |
14 years ago |
14598 | jmistry | Output Handler test case | 14 years ago |
14597 | jmistry | Fix Streams Test For some reason, the test harness wasn't running 'test_streams_depot'.&n...bsp; Renamed method to 'test_streams' and it's now running! « |
14 years ago |
14596 | jmistry | Include 'extraTag' val in P4::Spec The tagged output of a stream spec includes an 'extr...aTag<n>' field. This change ensures that the field pointed to by 'extraTag' (such as 'firmerThanParent') is added to the P4::Spec object and it points to the correct value. Test case updated to check for 'firmerThanParent' in stream P4::Spec. The test case needs to disconnect/connect, otherwise P4.run_streams returns with the warning 'No such streams'. « |
14 years ago |
14594 | jmistry | [P4Ruby] enable streams by default Fixed S_STREAMS bit mask to 0x0040 and changed the i...nitial state S_INITIAL_STATE bit 0x0041 to enable streams by default. Added logic to set streams for API levels greater than 69 Add streams test case - tests the output of 'P4::run_depots' for different settings of 'P4::streams' and 'P4::api_level' « |
14 years ago |
14593 | Sven Erik Knop | P4Ruby implementation of OutputHandler. Also, debug is now treated as a normal attribute... and can be read. Test cases still missing. New functionality, to be documented in release notes. « |
14 years ago |
14589 | Sven Erik Knop | Pulled P4Ruby p10.2 changes back to main. | 14 years ago |
14583 | psoccard | Added support for -Ztrack | 15 years ago |
14582 | psoccard | Added server environment tests created by Tony | 15 years ago |
14580 | tony | Added P4::Message#msgid method that returns the UniqueCode of any error message - much ea...sier than matching it's output text. User-visible enhancement documented in p4rubynotes.txt « |
15 years ago |
14579 | tony | Make new class P4::Message for returning Error objects to the user. Currently handles err...ors and warnings, but could potentially be used for output too (might bloat people's code though). Essentially, if you're using a 2010.2 or later client, or if you've set your api_level to 68 or higher, the P4#errors and P4#warnings arrays will be populated with P4::Message objects instead of strings. Users of older API's, or those who set their api_level to 67 or lower in their scripts will get the old behaviour. P4::Message objects have the following methods: severity() - returns the severity generic() - returns the generic code to_s() - converts the message to a string inspect() - returns a string showing the message details. User-visible enhancement documented in p4rubynotes.txt « |
15 years ago |