From 11d00037b28e8a1c555d5c3df764b5b42ab5817b Mon Sep 17 00:00:00 2001 From: Gabriel Omar Cotelli Date: Thu, 9 May 2019 18:25:20 -0300 Subject: [PATCH] Updated Seaside dependencies. Use some of the facilities in Buoy --- .../BaselineOfRenoirSt.class.st | 2 +- source/RenoirSt-HTML/ZnUrl.extension.st | 6 +++--- source/RenoirSt-Seaside/WAUrl.extension.st | 15 ++++++++------- source/RenoirSt/CssComment.class.st | 6 +++--- source/RenoirSt/CssDescendantCombinator.class.st | 6 +++--- .../RenoirSt/CssExternalFontReference.class.st | 7 ++++--- source/RenoirSt/CssIdentifiedColor.class.st | 8 ++++---- source/RenoirSt/CssLinearPolynomial.class.st | 16 +++++++--------- source/RenoirSt/CssObject.class.st | 4 ++-- 9 files changed, 35 insertions(+), 35 deletions(-) diff --git a/source/BaselineOfRenoirSt/BaselineOfRenoirSt.class.st b/source/BaselineOfRenoirSt/BaselineOfRenoirSt.class.st index a7eac1c..9a9776b 100644 --- a/source/BaselineOfRenoirSt/BaselineOfRenoirSt.class.st +++ b/source/BaselineOfRenoirSt/BaselineOfRenoirSt.class.st @@ -81,6 +81,6 @@ BaselineOfRenoirSt >> setUpDependencies: spec [ project: 'Buoy-Tools' copyFrom: 'Buoy' with: [ spec loads: 'Tools' ]. spec - baseline: 'Seaside3' with: [ spec repository: 'github://SeasideSt/Seaside:v3.3.1/repository' ]; + baseline: 'Seaside3' with: [ spec repository: 'github://SeasideSt/Seaside:v3.3.3/repository' ]; project: 'Seaside3-Javascript' copyFrom: 'Seaside3' with: [ spec loads: 'Javascript' ] ] diff --git a/source/RenoirSt-HTML/ZnUrl.extension.st b/source/RenoirSt-HTML/ZnUrl.extension.st index 9e25d76..1a84aa0 100644 --- a/source/RenoirSt-HTML/ZnUrl.extension.st +++ b/source/RenoirSt-HTML/ZnUrl.extension.st @@ -10,11 +10,11 @@ ZnUrl >> cssContentOn: aStream [ { #category : #'*RenoirSt-HTML' } ZnUrl >> cssContentRelativeToStyleSheetOn: aStream [ - + aStream nextPutAll: 'url("'. self isAbsolute - ifTrue: [ self printOn: aStream ] - ifFalse: [ segments do: [ :segment | aStream nextPutAll: segment ] separatedBy: [ aStream nextPut: $/ ] ]. + then: [ self printOn: aStream ] + otherwise: [ segments do: [ :segment | aStream nextPutAll: segment ] separatedBy: [ aStream nextPut: $/ ] ]. aStream nextPutAll: '")' ] diff --git a/source/RenoirSt-Seaside/WAUrl.extension.st b/source/RenoirSt-Seaside/WAUrl.extension.st index 2ebeac1..581a68c 100644 --- a/source/RenoirSt-Seaside/WAUrl.extension.st +++ b/source/RenoirSt-Seaside/WAUrl.extension.st @@ -4,10 +4,11 @@ Extension { #name : #WAUrl } WAUrl >> cssContentOn: aStream [ aStream nextPutAll: 'url("'. - host isNil - ifTrue: [ aStream nextPut: $/. - self path do: [ :segment | aStream nextPutAll: segment ] separatedBy: [ aStream nextPut: $/ ] ] - ifFalse: [ self printOn: aStream ]. + host + ifNil: [ aStream nextPut: $/. + self path do: [ :segment | aStream nextPutAll: segment ] separatedBy: [ aStream nextPut: $/ ] + ] + ifNotNil: [ self printOn: aStream ]. aStream nextPutAll: '")' ] @@ -15,9 +16,9 @@ WAUrl >> cssContentOn: aStream [ WAUrl >> cssContentRelativeToStyleSheetOn: aStream [ aStream nextPutAll: 'url("'. - host isNil - ifTrue: [ self path do: [ :segment | aStream nextPutAll: segment ] separatedBy: [ aStream nextPut: $/ ] ] - ifFalse: [ self printOn: aStream ]. + host + ifNil: [ self path do: [ :segment | aStream nextPutAll: segment ] separatedBy: [ aStream nextPut: $/ ] ] + ifNotNil: [ self printOn: aStream ]. aStream nextPutAll: '")' ] diff --git a/source/RenoirSt/CssComment.class.st b/source/RenoirSt/CssComment.class.st index 0a55b5f..d4532e2 100644 --- a/source/RenoirSt/CssComment.class.st +++ b/source/RenoirSt/CssComment.class.st @@ -18,13 +18,13 @@ CssComment class >> for: aCommentText [ { #category : #Printing } CssComment >> cssContentOn: aStream [ - comment notEmpty - ifFalse: [ ^ self ]. - aStream nextPutAll: '/*'. + + [ aStream nextPutAll: '/*'. comment cssContentOn: aStream. aStream nextPutAll: '*/'; newLine + ] unless: comment isEmpty ] { #category : #'initialize-release' } diff --git a/source/RenoirSt/CssDescendantCombinator.class.st b/source/RenoirSt/CssDescendantCombinator.class.st index 435fdbb..d246e36 100644 --- a/source/RenoirSt/CssDescendantCombinator.class.st +++ b/source/RenoirSt/CssDescendantCombinator.class.st @@ -14,9 +14,9 @@ Class { { #category : #'Instance Creation' } CssDescendantCombinator class >> between: anAncestorSelector and: aDescendantSelector [ - ^ anAncestorSelector isImplicitUniversal - ifTrue: [ aDescendantSelector ] - ifFalse: [ self new initializeBetween: anAncestorSelector and: aDescendantSelector ] + ^ [ self new initializeBetween: anAncestorSelector and: aDescendantSelector ] + unless: anAncestorSelector isImplicitUniversal + inWhichCase: [ aDescendantSelector ] ] { #category : #Printing } diff --git a/source/RenoirSt/CssExternalFontReference.class.st b/source/RenoirSt/CssExternalFontReference.class.st index 332c6b8..d911865 100644 --- a/source/RenoirSt/CssExternalFontReference.class.st +++ b/source/RenoirSt/CssExternalFontReference.class.st @@ -33,15 +33,16 @@ CssExternalFontReference class >> svgFontLocatedAt: aUrl withId: aString [ CssExternalFontReference >> cssContentOn: aStream [ url cssContentOn: aStream. - format notEmpty - ifTrue: [ aStream + format + ifNotEmpty: [ aStream space; nextPutAll: 'format('; nextPut: $". format cssContentOn: aStream. aStream nextPut: $"; - nextPut: $) ] + nextPut: $) + ] ] { #category : #'initialize-release' } diff --git a/source/RenoirSt/CssIdentifiedColor.class.st b/source/RenoirSt/CssIdentifiedColor.class.st index 9d37154..941b183 100644 --- a/source/RenoirSt/CssIdentifiedColor.class.st +++ b/source/RenoirSt/CssIdentifiedColor.class.st @@ -24,12 +24,12 @@ CssIdentifiedColor class >> expandToExtendedHexaNotation: aString [ "If the string is specified in the 3 letters short notation, expand it to six" ^ aString size = 3 - ifTrue: [ - '<1s><1s><2s><2s><3s><3s>' + then: [ '<1s><1s><2s><2s><3s><3s>' expandMacrosWith: aString first asString with: aString second asString - with: aString third asString ] - ifFalse: [ aString ] + with: aString third asString + ] + otherwise: [ aString ] ] { #category : #'Instance Creation' } diff --git a/source/RenoirSt/CssLinearPolynomial.class.st b/source/RenoirSt/CssLinearPolynomial.class.st index b780235..3ea8da8 100644 --- a/source/RenoirSt/CssLinearPolynomial.class.st +++ b/source/RenoirSt/CssLinearPolynomial.class.st @@ -47,19 +47,17 @@ CssLinearPolynomial >> cssContentOn: aWriteStream [ CssLinearPolynomial >> cssDependentCoefficientContentOn: aWriteStream [ dependentCoefficient abs = 1 - ifTrue: [ - dependentCoefficient negative - ifTrue: [ aWriteStream nextPut: $- ] ] - ifFalse: [ dependentCoefficient cssContentOn: aWriteStream ] + then: [ dependentCoefficient negative then: [ aWriteStream nextPut: $- ] ] + otherwise: [ dependentCoefficient cssContentOn: aWriteStream ] ] { #category : #private } CssLinearPolynomial >> cssIndependentCoefficientContentOn: aWriteStream [ - independentCoefficient isZero - ifTrue: [ ^ self ]. - independentCoefficient positive - ifTrue: [ aWriteStream nextPut: $+ ]. - independentCoefficient cssContentOn: aWriteStream + + [ + independentCoefficient positive then: [ aWriteStream nextPut: $+ ]. + independentCoefficient cssContentOn: aWriteStream + ] unless: independentCoefficient isZero ] { #category : #'initialize-release' } diff --git a/source/RenoirSt/CssObject.class.st b/source/RenoirSt/CssObject.class.st index 26ea9d5..31e4a8f 100644 --- a/source/RenoirSt/CssObject.class.st +++ b/source/RenoirSt/CssObject.class.st @@ -25,8 +25,8 @@ CssObject class >> lookupValue: aNamedConstantOrValue [ "Lookup the CSS namespace and the SVG colors namespace, if no named constant is found returns the argument" ^ (aNamedConstantOrValue isCollection and: [ aNamedConstantOrValue isString not ]) - ifTrue: [ aNamedConstantOrValue collect: [ :each | self lookupValue: each ] ] - ifFalse: [ CssConstants at: aNamedConstantOrValue ifAbsent: [ self lookupColor: aNamedConstantOrValue ] ] + then: [ aNamedConstantOrValue collect: [ :each | self lookupValue: each ] ] + otherwise: [ CssConstants at: aNamedConstantOrValue ifAbsent: [ self lookupColor: aNamedConstantOrValue ] ] ] { #category : #Printing }