conflict 0.1.0

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.
@@ -0,0 +1,63 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'test/unit'
19
+ require 'conflict'
20
+ include Conflict
21
+
22
+ class RoundTripRelativePathTest < Test::Unit::TestCase
23
+ include ConflictConstants
24
+
25
+ def test_relative_path
26
+
27
+ cfg = {:port=>82}
28
+ @thread = Thread.new do
29
+ Server::new(cfg).start
30
+ end
31
+
32
+ info_one = File.new(STOMP_1_INFO_PATH).to_s
33
+ info_two = File.new(STOMP_2_INFO_PATH).to_s
34
+ diff_one = File::new(STOMP_1_DIFF_PATH).to_s
35
+ diff_two = File::new(STOMP_2_DIFF_PATH).to_s
36
+
37
+ first_event = Event::new(CLIENT_ONE, "changed", STOMP_RESOURCE)
38
+ second_event = Event::new(CLIENT_TWO, "changed", STOMP_RESOURCE)
39
+
40
+ client_one = Client::new({:id=>CLIENT_ONE}.merge(cfg))
41
+ client_two = Client::new({:id=>CLIENT_TWO}.merge(cfg))
42
+
43
+ response = client_one.diff diff_one, info_one
44
+ assert_equal [], response
45
+
46
+ response = client_two.diff diff_two, info_two
47
+ assert [Conflict::Conflict::new(second_event, first_event)].eql?(response)
48
+
49
+ response = client_one.resend
50
+ assert [Conflict::Conflict::new(first_event, second_event)].eql?(response)
51
+
52
+ response = client_two.revert info_two
53
+ assert_equal [], response
54
+
55
+ response = client_one.revert info_one
56
+ assert_equal [], response
57
+
58
+ @thread.kill
59
+ @thread.join(5)
60
+
61
+ end
62
+
63
+ end
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.8.11
3
+ specification_version: 1
4
+ name: conflict
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.1.0
7
+ date: 2007-08-05 00:00:00 -08:00
8
+ summary: Notifies a developer of conflicts between his/her work and that of other developers
9
+ require_paths:
10
+ - lib
11
+ email: dbyrne@thoughtworks.com
12
+ homepage: http://sourceforge.net/projects/conflict
13
+ rubyforge_project: conflict
14
+ description:
15
+ autorequire: conflict
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: false
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ authors:
29
+ - Dennis Byrne
30
+ files:
31
+ - Rakefile
32
+ - README
33
+ - LICENSE
34
+ - lib/conflict.rb
35
+ - lib/run_conflict
36
+ - lib/conflict
37
+ - lib/conflict/domain.rb
38
+ - lib/conflict/core.rb
39
+ - lib/conflict/parsers.rb
40
+ - bin/conflict
41
+ - test/equality_test.rb
42
+ - test/event_test.rb
43
+ - test/database_test.rb
44
+ - test/data
45
+ - test/negative_test.rb
46
+ - test/parser_test.rb
47
+ - test/common.rb
48
+ - test/round_trip
49
+ - test/data/stomp
50
+ - test/data/rails.diff.txt
51
+ - test/data/apache_myfaces.diff.txt
52
+ - test/data/rails.info.txt
53
+ - test/data/a13g.diff.txt
54
+ - test/data/three
55
+ - test/data/stomp/stomp.2.diff.txt
56
+ - test/data/stomp/stomp.2.info.txt
57
+ - test/data/stomp/stomp.1.diff.txt
58
+ - test/data/stomp/stomp.1.info.txt
59
+ - test/data/three/changed.diff.txt
60
+ - test/data/three/deleted.diff.txt
61
+ - test/data/three/conflict.info.txt
62
+ - test/data/three/added.diff.txt
63
+ - test/round_trip/multi_diff_test.rb
64
+ - test/round_trip/happy_path_test.rb
65
+ - test/round_trip/expiration_test.rb
66
+ - test/round_trip/negative_test.rb
67
+ - test/round_trip/relative_path_test.rb
68
+ - test/round_trip/multiple_actions_test.rb
69
+ test_files:
70
+ - test/equality_test.rb
71
+ - test/event_test.rb
72
+ - test/database_test.rb
73
+ - test/negative_test.rb
74
+ - test/parser_test.rb
75
+ rdoc_options: []
76
+
77
+ extra_rdoc_files: []
78
+
79
+ executables:
80
+ - conflict
81
+ extensions: []
82
+
83
+ requirements:
84
+ - none
85
+ dependencies: []
86
+