Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update merging examples #797

Merged
merged 4 commits into from Jan 31, 2019
Merged

Update merging examples #797

merged 4 commits into from Jan 31, 2019

Conversation

jpmckinney
Copy link
Member

@jpmckinney jpmckinney commented Dec 20, 2018

Related to bug in documentation reported in CRM issue 3580.

I corrected the release package uri's, which were all the same, which makes no sense, as non-identical, contemporaneous packages shouldn't have the same uri.

The other differences are that the record packages from the old script:

  • added a fragment identifier to package uri's
  • had a different id for the compiled release
  • omitted the version, license and publicationPolicy
  • didn't version the following as a whole: party roles, tender submissionMethod

Since the old script also didn't preserve order, to compare the new and old files, I ran:

curl -O https://raw.githubusercontent.com/open-contracting/standard/1.1-dev/standard/docs/en/examples/merging/merged.json
curl -O https://raw.githubusercontent.com/open-contracting/standard/1.1-dev/standard/docs/en/examples/merging/versioned.json

And then in Ruby:

require 'json'
require 'hashdiff'

def load(path)
  JSON.load(File.read(path))
end

['merged', 'versioned'].each do |basename|
  basename = "#{basename}.json"
  a = load(basename)
  b = load("standard/docs/en/examples/merging/#{basename}")
  puts basename
  HashDiff.diff(a, b).each do |diff|
    p diff
  end
  puts
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant