Skip to content

Commit

Permalink
Remove JSON extensions package for Pharo 7 and move extension and tes…
Browse files Browse the repository at this point in the history
…ts for OrderedDictionary to Pharo-JSON package
  • Loading branch information
jbrichau committed Jun 25, 2023
1 parent f87bd49 commit eb7e6bb
Show file tree
Hide file tree
Showing 14 changed files with 68 additions and 29 deletions.
5 changes: 3 additions & 2 deletions repository/BaselineOfSeaside3.package/.filetree
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"noMethodMetaData" : true,
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ baselinejson: spec
package: 'Seaside-Tests-Pharo-JSON-Core' with: [
spec requires: #('Seaside-Tests-JSON') ] ].

spec for: #'pharo7.x' do: [
spec
package: 'Seaside-Pharo70-JSON-Extensions' with: [ spec requires: #('Seaside-JSON-Core') ];
package: 'Seaside-Pharo-JSON-Core' with: [ spec includes: #('Seaside-Pharo70-JSON-Extensions') ];
package: 'Seaside-Tests-Pharo70-JSON-Extensions'with: [ spec requires: #('Seaside-Tests-JSON') ];
package: 'Seaside-Tests-Pharo-JSON-Core' with: [ spec includes: #('Seaside-Tests-Pharo70-JSON-Extensions') ] ].

spec
for: #'gemstone'
do: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"category" : "BaselineOfSeaside3",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "BaselineOfSeaside3",
"pools" : [
],
"super" : "BaselineOf",
"type" : "normal" }
"category" : "BaselineOfSeaside3",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "BaselineOfSeaside3",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SystemOrganization addCategory: #'BaselineOfSeaside3'!
SystemOrganization addCategory: #BaselineOfSeaside3!
3 changes: 1 addition & 2 deletions repository/BaselineOfSeaside3.package/properties.json
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{
}
{ }
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*Seaside-Pharo-JSON-Core
jsonOn: aRenderer
aRenderer object: [
self keysAndValuesDo: [ :key :value |
aRenderer key: key value: value ] ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "OrderedDictionary"
}
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
SystemOrganization addCategory: #'Seaside-Pharo-JSON-Core'!
SystemOrganization addCategory: #'Seaside-Pharo-JSON-Core-Base'!
5 changes: 3 additions & 2 deletions repository/Seaside-Tests-Pharo-JSON-Core.package/.filetree
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"noMethodMetaData" : true,
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
*Seaside-Tests-Pharo-JSON-Core
testOrderedDictionary
self
assert:
((OrderedDictionary new)
at: 'foo' put: 1;
at: 'bar' put: 2;
at: 'zork' put: 3;
yourself)
equals: '{"foo": 1, "bar": 2, "zork": 3}'.
self
assert:
((OrderedDictionary new)
at: '' put: 'empty';
yourself)
equals: '{"": "empty"}'.
self should: [
self
assert:
((OrderedDictionary new)
at: 1 put: 'not-a-string';
yourself)
equals: '{1: "not-a-string"}' ]
raise: Error
whoseDescriptionIncludes: 'Only Strings can be used as keys in JSON objects.'
description: 'Throw an error when serializing dictionaries with non-String keys'.
self
assert:
((OrderedDictionary new)
at: '1abc' put: 'not-an-id';
yourself)
equals: '{"1abc": "not-an-id"}'.

self
assert:
((OrderedDictionary new)
at: 'abc1' put: 'totally sexy';
yourself)
equals: '{"abc1": "totally sexy"}'
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
{
"name" : "WAJsonStreamTest" }
"name" : "WAJsonStreamTest"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SystemOrganization addCategory: #'Seaside-Tests-Pharo-JSON-Core'!

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{
}
{ }

0 comments on commit eb7e6bb

Please sign in to comment.