pact-xml 0.0.1.alpha

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,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MGE5NTNiZDVlMDJiOTczNmI1MzZlZTgxNTE2ZDM1N2UzMzI4MDM4NQ==
5
+ data.tar.gz: !binary |-
6
+ M2U2NTBmYmZiNmQ2ZTBiN2VjZjA1ZDhlM2U2YjU2NjA1NmYwMDBkZg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ NjVlOGI0MDE0OTNiNzEwMjk5NzE1NWVkZTI0MGI2MjcwOTk3OGM4MWIwODUx
10
+ ODY5ZWJhYTQ5ZTExZmQ5MGM4Zjk4ZTI4ZWI5YjhiMWYyZTRjYzU5MjMwNjFk
11
+ OTA2MzhkZDM5NDA2YjRhZTZkNmI3ZTc3NjZmZmY3ZmQ3ZWE4YTg=
12
+ data.tar.gz: !binary |-
13
+ MjA5NTE5MmM1MGMxYWEwN2M1OTQzYjkyNjdlMmM4MTU5NjY4YzVjNzQ1MjE5
14
+ MWZlODFiZjUwNTVhOTc3MGRkMmMzOTc2ODc5NGVmZDE5N2I1MTc1ODc4N2Rm
15
+ ZjRlMzY2NDM2ODdkNDJkZThkYzI0YjZiZTc4MjExOWVlNjk1ZGQ=
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in pact-xml.gemspec
4
+ gemspec
@@ -0,0 +1,31 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ pact-xml (0.0.1.alpha)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.2.5)
10
+ rake (10.3.2)
11
+ rspec (3.0.0)
12
+ rspec-core (~> 3.0.0)
13
+ rspec-expectations (~> 3.0.0)
14
+ rspec-mocks (~> 3.0.0)
15
+ rspec-core (3.0.2)
16
+ rspec-support (~> 3.0.0)
17
+ rspec-expectations (3.0.2)
18
+ diff-lcs (>= 1.2.0, < 2.0)
19
+ rspec-support (~> 3.0.0)
20
+ rspec-mocks (3.0.2)
21
+ rspec-support (~> 3.0.0)
22
+ rspec-support (3.0.2)
23
+
24
+ PLATFORMS
25
+ ruby
26
+
27
+ DEPENDENCIES
28
+ bundler (~> 1.6)
29
+ pact-xml!
30
+ rake
31
+ rspec (~> 3.0)
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Beth
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,41 @@
1
+ # Pact::Xml
2
+
3
+ Provides XML support for the Pact gem.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'pact-xml'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install pact-xml
18
+
19
+ ## Usage
20
+
21
+ ```ruby
22
+ require 'pact'
23
+ require 'pact/xml'
24
+
25
+ Pact.configure do | config |
26
+
27
+ # Maybe do this automatically?
28
+ config.register_body_differ /xml/, Pact::XML::Differ
29
+ config.diff_formatter = Pact::XML::DiffFormatter
30
+
31
+ end
32
+
33
+ ```
34
+
35
+ ## Contributing
36
+
37
+ 1. Fork it ( https://github.com/[my-github-username]/pact-xml/fork )
38
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
39
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
40
+ 4. Push to the branch (`git push origin my-new-feature`)
41
+ 5. Create a new Pull Request
@@ -0,0 +1,7 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'rspec/core/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task :default => :spec
@@ -0,0 +1,9 @@
1
+ require "pact/xml/version"
2
+ require "pact/xml/differ"
3
+ require "pact/xml/diff_formatter"
4
+
5
+ module Pact
6
+ module XML
7
+
8
+ end
9
+ end
@@ -0,0 +1,26 @@
1
+ module Pact
2
+ module XML
3
+
4
+ class DiffFormatter
5
+
6
+ def initialize diff, options = {}
7
+ @diff = diff
8
+ @colour = options.fetch(:colour, false)
9
+ end
10
+
11
+ def self.call diff, options = {colour: Pact.configuration.color_enabled}
12
+ new(diff, options).call
13
+ end
14
+
15
+ def call
16
+ # diff formatting code here
17
+ end
18
+
19
+ private
20
+
21
+
22
+
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,23 @@
1
+ module Pact
2
+ module XML
3
+
4
+ class Differ
5
+
6
+ def initialize expected, actual, options = {}
7
+ @expected = expected
8
+ @actual = actual
9
+ @options = options
10
+ end
11
+
12
+ def self.call expected, actual, options = {}
13
+ new(expected, actual, options).call
14
+ end
15
+
16
+ def call
17
+ # diffing code here
18
+ end
19
+
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,5 @@
1
+ module Pact
2
+ module XML
3
+ VERSION = "0.0.1.alpha"
4
+ end
5
+ end
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'pact/xml/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "pact-xml"
8
+ spec.version = Pact::XML::VERSION
9
+ spec.authors = ["Beth Skurrie"]
10
+ spec.email = ["beth@bethesque.com"]
11
+ spec.summary = %q{Provides XML support for the Pact gem}
12
+ spec.homepage = ""
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_development_dependency "bundler", "~> 1.6"
21
+ spec.add_development_dependency "rake"
22
+ spec.add_development_dependency "rspec", "~> 3.0"
23
+ end
@@ -0,0 +1,25 @@
1
+ require 'spec_helper'
2
+ require 'pact/xml/diff_formatter'
3
+
4
+ module Pact
5
+ module XML
6
+
7
+ describe DiffFormatter do
8
+
9
+ describe ".call" do
10
+
11
+ context "when color_enabled is true" do
12
+ it "formats the diff nicely with color"
13
+
14
+ end
15
+
16
+ context "when color_enabled is false" do
17
+ it "formats the diff nicely without color"
18
+ end
19
+
20
+ end
21
+
22
+ end
23
+
24
+ end
25
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+ require 'pact/xml/differ'
3
+
4
+ module Pact
5
+ module XML
6
+
7
+ describe Differ do
8
+
9
+ describe ".call" do
10
+
11
+ it "returns the diff between two XML documents"
12
+
13
+ end
14
+
15
+ end
16
+
17
+ end
18
+ end
File without changes
metadata ADDED
@@ -0,0 +1,103 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pact-xml
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1.alpha
5
+ platform: ruby
6
+ authors:
7
+ - Beth Skurrie
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-06-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ description:
56
+ email:
57
+ - beth@bethesque.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - .rspec
63
+ - Gemfile
64
+ - Gemfile.lock
65
+ - LICENSE.txt
66
+ - README.md
67
+ - Rakefile
68
+ - lib/pact/xml.rb
69
+ - lib/pact/xml/diff_formatter.rb
70
+ - lib/pact/xml/differ.rb
71
+ - lib/pact/xml/version.rb
72
+ - pact-xml.gemspec
73
+ - spec/lib/pact/xml/diff_formatter_spec.rb
74
+ - spec/lib/pact/xml/differ_spec.rb
75
+ - spec/spec_helper.rb
76
+ homepage: ''
77
+ licenses:
78
+ - MIT
79
+ metadata: {}
80
+ post_install_message:
81
+ rdoc_options: []
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ! '>'
92
+ - !ruby/object:Gem::Version
93
+ version: 1.3.1
94
+ requirements: []
95
+ rubyforge_project:
96
+ rubygems_version: 2.1.11
97
+ signing_key:
98
+ specification_version: 4
99
+ summary: Provides XML support for the Pact gem
100
+ test_files:
101
+ - spec/lib/pact/xml/diff_formatter_spec.rb
102
+ - spec/lib/pact/xml/differ_spec.rb
103
+ - spec/spec_helper.rb