Skip to content

Commit

Permalink
Merge pull request #1140 from SeasideSt/develop
Browse files Browse the repository at this point in the history
Merge develop in master
  • Loading branch information
Johan Brichau authored Jun 28, 2019
2 parents 6f66152 + 78bd6ef commit 506db6a
Show file tree
Hide file tree
Showing 25 changed files with 113 additions and 49 deletions.
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
baselines
baselinesecurity: spec
spec
for: #pharo
do: [ spec package: 'Cryptography' with: [ spec repository: 'github://pharo-contributions/Cryptography:0.3.2/source' ].
spec
for: #squeakCommon
do: [ spec
package: 'Seaside-Security'
with: [ spec
requires: #('Seaside-Core' 'Cryptography');
includes: #('Seaside-Pharo-Security') ];
package: 'Seaside-Pharo-Security';
package: 'Seaside-Tests-Security' with: [ spec requires: #('Seaside-Security') ].
spec
package: 'Seaside-Tests-Security' with: [ spec requires: #('Seaside-Security') ];
package: 'Seaside-Tests-Security' with: [ spec includes: #('Seaside-Tests-Pharo-Security') ];
package: 'Seaside-Tests-Pharo-Security' ].
spec
for: #squeak
do: [ spec package: 'Cryptography' with: [ spec repository: 'http://www.squeaksource.com/Cryptography' ].
package: 'Seaside-Tests-Pharo-Security'.

spec
package: 'Seaside-Security'
with: [ spec
requires: #('Seaside-Core' 'Cryptography');
includes: #('Seaside-Pharo-Security') ];
package: 'Seaside-Pharo-Security';
package: 'Seaside-Tests-Security' with: [ spec requires: #('Seaside-Security') ].
spec
package: 'Seaside-Tests-Security' with: [ spec includes: #('Seaside-Tests-Pharo-Security') ];
package: 'Seaside-Tests-Pharo-Security' ].
spec
for: #squeakCommon
do: [ spec
group: 'Security' with: #('Seaside-Security');
group: 'Security Tests' with: #('Seaside-Tests-Security') ]
group: 'Security Tests' with: #('Seaside-Tests-Security') ].

spec for: #pharo do: [ spec package: 'Cryptography' with: [ spec repository: 'github://pharo-contributions/Cryptography:0.3.2/source' ] ].

spec for: #squeak do: [ spec package: 'Cryptography' with: [ spec repository: 'http://www.squeaksource.com/Cryptography' ] ]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
doits
startWelcomeSeasideAdaptorInPharo
WAAdmin defaultServerManager adaptors
(Smalltalk globals at: #WAAdmin) defaultServerManager adaptors
ifEmpty: [ (Smalltalk globals includesKey: #ZnZincServerAdaptor)
ifTrue: [ (Smalltalk globals at: #ZnZincServerAdaptor) startOn: 8080 ] ]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
doits
startWelcomeSeasideAdaptorInSqueak
WAAdmin defaultServerManager adaptors
(Smalltalk globals at: #WAAdmin) defaultServerManager adaptors
ifEmpty: [ (Smalltalk globals includesKey: #WAWebServerAdaptor)
ifTrue: [ ((Smalltalk globals at: #WAWebServerAdaptor) port: 8080)
codec: ((Smalltalk globals at: #GRCodec) forEncoding: 'utf-8');
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
target
targetBlank
"Load the URL into a new browsing context. This is usually a tab, but users can configure browsers to use new windows instead.
WARNING:
Use with parcimonie. It goes against web development best practices to force the user to open the link in a new tab. Usually your should let the user decide how he wants to open a link.
Linking to another page using target=""_blank"" will run the new page on the same process as your page. If the new page is executing expensive JS, your page's performance may suffer. To avoid this use rel=""noopener""."

self target: '_blank'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target
targetParent
"Load the URL into the parent browsing context of the current one. If there is no parent, this behaves the same way as _self."

self target: '_parent'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target
targetSelf
"Load the URL into the same browsing context as the current one. This is the default behavior."

self target: '_self'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target
targetTop
" Load the URL into the top-level browsing context (that is, the «highest» browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this behaves the same way as _self."

self target: '_top'
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
rendering
render: anObject
"Render anObject and return the contents of the resulting Document as a String.
anObject must understand #renderOn:. Commonly anObject will be a one-argument
block, which will be evaluated with the appropriate renderer."

^ String streamContents: [ :stream |
| context document renderer |
document := self documentClass on: stream codec: self codec.
document scriptGenerator: self scriptGeneratorClass new.
context := WARenderContext new.
context document: document.
context actionUrl: self actionUrl; resourceUrl: self resourceUrl.
renderer := self rendererClass context: context.

self openDocument: document context: context.
renderer render: anObject; flush.
self closeDocument: document ]
self
render: anObject
on: stream ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
rendering
render: anObject on: aStream
"Render anObject and return the contents of the resulting Document as a String.
anObject must understand #renderOn:. Commonly anObject will be a one-argument
block, which will be evaluated with the appropriate renderer."
| context document renderer |
document := self documentClass on: aStream codec: self codec.
document scriptGenerator: self scriptGeneratorClass new.
context := WARenderContext new.
context document: document.
context actionUrl: self actionUrl; resourceUrl: self resourceUrl.
renderer := self rendererClass context: context.

self openDocument: document context: context.
renderer render: anObject; flush.
self closeDocument: document
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tests
testTargetBlank
self
assert: [ :html |
html anchor
callback: [ ];
targetBlank;
with: 'foo' ]
gives: '<a target="_blank" href="/?1">foo</a>'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tests
testTargetParent
self
assert: [ :html |
html anchor
callback: [ ];
targetParent;
with: 'foo' ]
gives: '<a target="_parent" href="/?1">foo</a>'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tests
testTargetSelf
self
assert: [ :html |
html anchor
callback: [ ];
targetSelf;
with: 'foo' ]
gives: '<a target="_self" href="/?1">foo</a>'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tests
testTargetTop
self
assert: [ :html |
html anchor
callback: [ ];
targetTop;
with: 'foo' ]
gives: '<a target="_top" href="/?1">foo</a>'
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "",
"super" : "WAAbstractCanvasBrushTest",
"category" : "Seaside-Tests-Canvas",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "WAAnchorTagTest",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tests
testRenderOnCustomStream
| actual |
actual := String streamContents: [ :stream |
WAHtmlCanvas builder
render: [ :html |
html unorderedList: [
html listItem: 'an item' ] ]
on: stream ].
self assert: actual = '<ul><li>an item</li></ul>'
4 changes: 0 additions & 4 deletions repository/Seaside-Tests-HTML5.package/.filetree

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions repository/Seaside-Tests-HTML5.package/properties.json

This file was deleted.

0 comments on commit 506db6a

Please sign in to comment.