Skip to content

Commit

Permalink
Fixing some tests: protocol and rpackage impacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ducasse committed Jan 18, 2024
1 parent f93190f commit d94f703
Show file tree
Hide file tree
Showing 188 changed files with 2,712 additions and 2,386 deletions.
4 changes: 2 additions & 2 deletions src/Microdown-HTMLExporter/Integer.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #Integer }
Extension { #name : 'Integer' }

{ #category : #'*Microdown-HTMLExporter' }
{ #category : '*Microdown-HTMLExporter' }
Integer >> asFileSizeString [
" From Magritte-Model.MetaGUI-SeanDeNigris.459.mcz "

Expand Down
24 changes: 13 additions & 11 deletions src/Microdown-HTMLExporter/MicCSSDownloader.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,37 @@
Helper class to download CSS resources.
"
Class {
#name : #MicCSSDownloader,
#superclass : #Object,
#name : 'MicCSSDownloader',
#superclass : 'Object',
#instVars : [
'cssProvider'
],
#category : #'Microdown-HTMLExporter-CSS'
#category : 'Microdown-HTMLExporter-CSS',
#package : 'Microdown-HTMLExporter',
#tag : 'CSS'
}

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSDownloader >> cssProvider [
"Answer the receiver's <MicCSSProvider>"

^ cssProvider
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSDownloader >> cssProvider: anObject [

cssProvider := anObject
]

{ #category : #'accessing - downloading' }
{ #category : 'accessing - downloading' }
MicCSSDownloader >> destinationPath [
"Answer a <String> with the location to download the CSS resources"

^ self cssProvider destinationPath
]

{ #category : #'accessing - downloading' }
{ #category : 'accessing - downloading' }
MicCSSDownloader >> downloadCSSFramework: cssFramework [
"Download a CSS library using information provided in cssFramework method"

Expand All @@ -42,7 +44,7 @@ MicCSSDownloader >> downloadCSSFramework: cssFramework [
self downloadCSSFrameworkFrom: cssFrwThemeUrl minCssUrl ].
]

{ #category : #'accessing - downloading' }
{ #category : 'accessing - downloading' }
MicCSSDownloader >> downloadCSSFrameworkFrom: anURLString [

| client url dest |
Expand All @@ -58,7 +60,7 @@ MicCSSDownloader >> downloadCSSFrameworkFrom: anURLString [

]

{ #category : #'accessing - downloading' }
{ #category : 'accessing - downloading' }
MicCSSDownloader >> downloadCSSFrameworks [
"Download CSS frameworks specified in the receiver's CSS provider"

Expand All @@ -68,13 +70,13 @@ MicCSSDownloader >> downloadCSSFrameworks [

]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSDownloader >> frameworks [

^ self cssProvider frameworks
]

{ #category : #'accessing - downloading' }
{ #category : 'accessing - downloading' }
MicCSSDownloader >> httpClient [
"Answer a new <ZnClient> configured HTTP client for internal use"

Expand Down
58 changes: 30 additions & 28 deletions src/Microdown-HTMLExporter/MicCSSEntity.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ A CSS entity provides:
The basePath defaults to the value in #defaultBasePath (commonly ""css/""), however, the location of css files could be changed using the setter #basePath: and a folder `String` as parameter.
"
Class {
#name : #MicCSSEntity,
#superclass : #Object,
#name : 'MicCSSEntity',
#superclass : 'Object',
#instVars : [
'name',
'cssUrl',
Expand All @@ -22,18 +22,20 @@ Class {
'destinationPath',
'basePath'
],
#category : #'Microdown-HTMLExporter-CSS'
#category : 'Microdown-HTMLExporter-CSS',
#package : 'Microdown-HTMLExporter',
#tag : 'CSS'
}

{ #category : #defaults }
{ #category : 'defaults' }
MicCSSEntity >> basePath [
"Answer a <String> with the location where the receiver will be installed"

^ basePath
ifNil: [ basePath := self defaultBasePath ]
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> cssFile [
"Answer the receiver's <MicCSSFile>"

Expand All @@ -42,13 +44,13 @@ MicCSSEntity >> cssFile [
ifNotEmpty: [ cssFile ]
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> cssFile: anObject [

cssFile := anObject
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> cssPath [
"Answer a <String> describing the location path for the receiver, including its file name"

Expand All @@ -58,109 +60,109 @@ MicCSSEntity >> cssPath [
<< self cssFile basename ]
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> cssUrl [
"Answer a <String> representing the receiver's human-readable CSS URL"

^ cssUrl
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> cssUrl: anObject [

cssUrl := anObject
]

{ #category : #defaults }
{ #category : 'defaults' }
MicCSSEntity >> defaultBasePath [
"Answer a non-empty <String> representing the location where the receiver's files will be written"

^ 'css/'
]

{ #category : #defaults }
{ #category : 'defaults' }
MicCSSEntity >> defaultDestinationPath [
"Answer a default <String> describing the location where receiver's CSS files are stored"

^ 'support/'
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> destinationPath [
"Answer a <String> representing the location used to store the receiver. This location is used as a repository of CSS entities opposed to the #basePath which is the user-location of a specific installation"

^ destinationPath
ifNil: [ destinationPath := self defaultDestinationPath ]
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> destinationPath: anObject [

destinationPath := anObject
]

{ #category : #testing }
{ #category : 'testing' }
MicCSSEntity >> hasMinifiedVersion [
"Anwswer <true> if the receiver contains a minified version"

^ self minCssUrl notEmpty
]

{ #category : #testing }
{ #category : 'testing' }
MicCSSEntity >> hasNormalVersion [
"Anwswer <true> if the receiver contains a normal (human-legible) version"

^ self cssUrl notEmpty
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> minCssFile [
"Answer the recceiver's <MicCSSFile>, or nil if absent"

^ minCssFile
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> minCssFile: anObject [

minCssFile := anObject
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> minCssUrl [
"Answer a <String> with the URL endpoint of the minified source code, or empty if it is not present"

^ minCssUrl
ifNil: [ minCssUrl := String empty ]
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> minCssUrl: anObject [

minCssUrl := anObject
]

{ #category : #'accessing - source code' }
{ #category : 'accessing - source code' }
MicCSSEntity >> minifiedSourceCode [
"Answer a <String> representing the receiver's minified CSS source version"

^ self minCssFile contents
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> name [
"Answer a <String> representing the receiver's name"

^ name
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> name: anObject [

name := anObject
]

{ #category : #'instance creation' }
{ #category : 'instance creation' }
MicCSSEntity >> newCssFile: frwSpec version: versionSymbol [
"Private - Answer a new <MicCSSFile> configured with the CSS URL specified in versionSymbol. If there is no resolvable versionSymbol in frwSpec, answer a new <MicCSSNullFile>"

Expand All @@ -171,23 +173,23 @@ MicCSSEntity >> newCssFile: frwSpec version: versionSymbol [

]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> newCssFileFor: aCssUrl [

^ MicCSSFile new
fileReference: (self destinationPath asFileReference / aCssUrl asZnUrl filename);
yourself
]

{ #category : #'instance creation' }
{ #category : 'instance creation' }
MicCSSEntity >> newCssFiles: frwSpec [
"Private - Configure receiver's CSS files using specifications in fwrSpec"

self cssFile: (self newCssFile: frwSpec version: #css).
self minCssFile: (self newCssFile: frwSpec version: #minCss)
]

{ #category : #printing }
{ #category : 'printing' }
MicCSSEntity >> printOn: aStream [

super printOn: aStream.
Expand All @@ -196,14 +198,14 @@ MicCSSEntity >> printOn: aStream [
<< self name.
]

{ #category : #'accessing - source code' }
{ #category : 'accessing - source code' }
MicCSSEntity >> sourceCode [
"Answer a <String> representing the receiver's CSS source"

^ self cssFile contents
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSEntity >> writeTo: destDirFileRef [
"Private - Write receiver's CSS resource into destDirFileRef"

Expand Down
22 changes: 12 additions & 10 deletions src/Microdown-HTMLExporter/MicCSSFile.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,31 @@
It includes behavior to facilitate the handling of CSS files, such as relative paths, copying to other folders, etc.
"
Class {
#name : #MicCSSFile,
#superclass : #Object,
#name : 'MicCSSFile',
#superclass : 'Object',
#instVars : [
'fileReference'
],
#category : #'Microdown-HTMLExporter-CSS'
#category : 'Microdown-HTMLExporter-CSS',
#package : 'Microdown-HTMLExporter',
#tag : 'CSS'
}

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSFile >> basename [
"Answer a <String> representing the receiver's file name without its path"

^ self fileReference basename
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSFile >> contents [
"Answer a <String> with the receiver's source code"

^ self fileReference contents
]

{ #category : #copying }
{ #category : 'copying' }
MicCSSFile >> copyTo: aFileReference [
"Copy the receiver into aFileReference, if the file already exists, notify, delete it and retry"

Expand All @@ -36,27 +38,27 @@ MicCSSFile >> copyTo: aFileReference [
ex retry. ]
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSFile >> fileReference [
"Answer the receiver's <FileReference> CSS"

^ fileReference
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSFile >> fileReference: anObject [

fileReference := anObject
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSFile >> fullName [
"Answer a <String> with the full path of the receiver"

^ self fileReference fullName
]

{ #category : #accessing }
{ #category : 'accessing' }
MicCSSFile >> relativePath [
"Answer a <String> representing the relative path to the receiver"

Expand Down
Loading

0 comments on commit d94f703

Please sign in to comment.