Skip to content

Commit

Permalink
Update docs and rowan spec
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Jun 26, 2024
1 parent 9644167 commit e94126d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 70 deletions.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ To learn about the project, [install it](how-to/how-to-load-in-pharo.md) and
take a look at the reference documentation:

- **Errors** [Exceptions modelling HTTP errors](reference/Errors.md)
- **IETF related abstractions**: [ETags, web links, language tags and ranges](reference/IETF.md)
- **IETF related abstractions**: [ETags and web links](reference/IETF.md)
- **Resilience operators**: [Building blocks for resilient applications](reference/Resilience.md)
- **Zinc extensions**: Useful [extensions](reference/Zinc.md) to Zinc objects

Expand Down
62 changes: 0 additions & 62 deletions docs/reference/IETF.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,68 +79,6 @@ are provided as configuration methods:
`ZnResponse` instances allow adding one or more links via `addLink:` receiving
a `WebLink` instance or access the link collection by sending `links`.

## Language Tags and Ranges

Language Tags are represented by instances of `LanguageTag`. A language tag is
used to label the language used by some information content.

These tags can also be used to specify the user's preferences when selecting
information content or to label additional attributes of content and associated
resources.

Sometimes language tags are used to indicate additional language attributes of
the content.

Language tags can be created by providing a subtags list or by parsing its
string representation:

```smalltalk
LanguageTag from: #('en' 'Latn' 'US').
LanguageTag fromString: 'en-us'.
'en-us' asLanguageTag.
```

Its instances can respond the language code (`languageCode`) and provide
methods to access its script and region in case they are defined:

```smalltalk
tag withScriptDo: [:script | ].
tag withRegionDo: [:region| ].
```

This implementation does not do anything special with the other optional
subtags that can be defined; nor supports extended languages and regions in UN
M.49 codes.

Language ranges are represented by instances of `LanguageRange`. A language
range has the same syntax as a language-tag, or is the single character `"*"`.

A language range matches a language tag if it exactly equals the tag, or if it
exactly equals a prefix of the tag such that the first character following the
prefix is `"-"`.

The special range `"*"` matches any tag. A protocol that uses
language ranges may specify additional rules about the semantics of
`"*"`; for instance, `HTTP/1.1` specifies that the range `"*"` matches only
languages not matched by any other range within an `"Accept-Language:"` header.

Language ranges can be created by sending the message `any`, providing a list
of subtags, or parsing its string representation:

```smalltalk
LanguageRange any.
LanguageRange from: #('en').
LanguageRange fromString: '*'.
LanguageRange fromString: 'es-AR'.
```

`LanguageRange` instances are capable of matching corresponding language tags.
For example:

```smalltalk
(LanguageRange fromString: 'es') matches: 'es-AR' asLanguageTag "==> true"
```

**References:**

- [RFC 5646](https://www.rfc-editor.org/rfc/rfc5646.html)
Expand Down
2 changes: 2 additions & 0 deletions rowan/components/Deployment.ston
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ RwSimpleProjectLoadComponentV2 {
],
#componentNames : [ ],
#packageNames : [
'Hyperspace-Buoy-Extensions',
'Hyperspace-Model',
'Hyperspace-Extensions',
'Hyperspace-GS64-Extensions'
Expand All @@ -13,6 +14,7 @@ RwSimpleProjectLoadComponentV2 {
'gemstone' : {
'allusers' : {
#packageNameToPlatformPropertiesMap : {
'Hyperspace-Buoy-Extensions' : { 'symbolDictName' : 'Buoy' },
'Hyperspace-Model' : { 'symbolDictName' : 'Hyperspace' },
'Hyperspace-Extensions' : { 'symbolDictName' : 'Zinc' },
'Hyperspace-GS64-Extensions' : { 'symbolDictName' : 'Globals' }
Expand Down
2 changes: 1 addition & 1 deletion source/BaselineOfHyperspace/BaselineOfHyperspace.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ BaselineOfHyperspace >> projectClass [
BaselineOfHyperspace >> setUpDependencies: spec [

spec
baseline: 'Buoy' with: [ spec repository: 'github://ba-st/Buoy:v7' ];
baseline: 'Buoy' with: [ spec repository: 'github://ba-st/Buoy:v8' ];
project: 'Buoy-Deployment' copyFrom: 'Buoy' with: [ spec loads: 'Deployment' ];
project: 'Buoy-SUnit' copyFrom: 'Buoy' with: [ spec loads: 'Dependent-SUnit-Extensions' ];
project: 'Buoy-Tools' copyFrom: 'Buoy' with: [ spec loads: 'Tools' ].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ CharacterCollection >> asEntityTag [
^ EntityTag fromString: self
]

{ #category : #'*Hyperspace-GS64-Extensions' }
CharacterCollection >> asLanguageTag [

^ LanguageTag fromString: self
]

{ #category : #'*Hyperspace-GS64-Extensions' }
CharacterCollection >> asMediaType [

Expand Down

0 comments on commit e94126d

Please sign in to comment.