Skip to content

Commit

Permalink
Merge pull request #23 from gcotelli/pharo11
Browse files Browse the repository at this point in the history
Add Pharo 11 to build matrix
  • Loading branch information
astares authored May 22, 2023
2 parents 993d912 + bad61db commit 5774572
Show file tree
Hide file tree
Showing 15 changed files with 316 additions and 129 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.st linguist-language=Smalltalk
*.st eol=lf
*.st text diff
23 changes: 23 additions & 0 deletions .github/workflows/loading-groups.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Baseline Groups

on: [push,pull_request,workflow_dispatch]

jobs:
group-loading:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ]
load-spec: [ deployment, tests, tools, development ]
name: ${{ matrix.smalltalk }} + ${{ matrix.load-spec }}
steps:
- uses: actions/checkout@v3
- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
- name: Load group in image
run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalkci/loading.${{ matrix.load-spec }}.ston
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 15
14 changes: 14 additions & 0 deletions .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Markdown Lint
on: [push,pull_request,workflow_dispatch]
jobs:
remark-lint:
name: runner / markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: markdownlint
uses: reviewdog/action-markdownlint@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_on_error: true
reporter: github-pr-review
27 changes: 27 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Unit Tests

on: [push,pull_request,workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ]
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v3
- name: Set up Smalltalk CI
uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
- name: Load Image and Run Tests
run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalkci/unit-tests.ston
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 15
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
name: Unit-Tests-${{matrix.smalltalk}}
13 changes: 13 additions & 0 deletions .smalltalkci/loading.deployment.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'Teapot',
#directory : '../source',
#load : [ 'Deployment' ],
#platforms : [ #pharo ]
}
],
#testing : {
#failOnZeroTests : false
}
}
16 changes: 16 additions & 0 deletions .smalltalkci/loading.development.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'Teapot',
#directory : '../source',
#load : [ 'Development' ],
#platforms : [ #pharo ]
}
],
#testing : {
#coverage : {
#packages : [ 'Teapot*' ],
#format: #lcov
}
}
}
11 changes: 6 additions & 5 deletions .smalltalk.ston → .smalltalkci/loading.tests.ston
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'Teapot',
#directory : 'source',
#directory : '../source',
#load : [ 'Tests' ],
#platforms : [ #pharo ]
}
],
#platforms : [ #pharo ]
}
],
#testing : {
#coverage : {
#packages : [ 'Teapot-Core' ]
#packages : [ 'Teapot*' ],
#format: #lcov
}
}
}
13 changes: 13 additions & 0 deletions .smalltalkci/loading.tools.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'Teapot',
#directory : '../source',
#load : [ 'Tools' ],
#platforms : [ #pharo ]
}
],
#testing : {
#failOnZeroTests : false
}
}
16 changes: 16 additions & 0 deletions .smalltalkci/unit-tests.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'Teapot',
#directory : '../source',
#load : [ 'Tests' ],
#platforms : [ #pharo ]
}
],
#testing : {
#coverage : {
#packages : [ 'Teapot*' ],
#format: #lcov
}
}
}
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

31 changes: 21 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
Contributing
============
# Contributing

There's several ways to contribute to the project: reporting bugs, sending feedback, proposing ideas for new features, fixing or adding documentation, promoting the project, or even contributing code.
There are several ways to contribute to the project: reporting bugs, sending
feedback, proposing ideas for new features, fixing or adding documentation,
promoting the project, or even contributing code.

## Reporting issues

You can report issues [here](https://github.com/zeroflag/Teapot/issues/new)

## Contributing Code

- This project is MIT licensed, so any code contribution MUST be under the same license.
- This project uses [Semantic Versioning](http://semver.org/), so keep it in mind when you make backwards-incompatible changes. If some backwards incompatible change is made the major version MUST be increased.
- The source code is hosted in this repository using the Tonel format in the `source` folder.
- The master branch contains the latest changes and should always be in a releasable state.
- This project uses [Semantic Versioning](http://semver.org/), so keep it in
mind when you make backwards-incompatible changes. If some backwards incompatible
change is made the major version MUST be increased.
- The source code is hosted in this repository using the Tonel format in the
`source` folder.
- The master branch contains the latest changes and should always be in a
releasable state.
- Feel free to send pull requests or fork the project.
- Code contributions without test cases have a lower probability of being merged into the main branch.
- Code contributions without test cases have a lower probability of being merged
into the main branch.

### Using Iceberg

1. Download a [Pharo Image and VM](https://get.pharo.org/64)
2. Clone the project or your fork using Iceberg
3. Open the Working Copy and using the contextual menu select `Metacello -> Install baseline...`
3. Open the Working Copy and using the contextual menu select
`Metacello -> Install baseline...`
4. Input `Development`
5. This will load the base code and the test cases
6. Create a new branch to host your code changes
Expand All @@ -29,5 +38,7 @@ You can report issues [here](https://github.com/zeroflag/Teapot/issues/new)

## Contributing documentation

The project documentation is maintained in this repository in the `docs` folder and licensed under CC BY-SA 4.0. To contribute some documentation or improve the existing, feel free to create a branch or fork this repository, make your changes and send a pull request.

The project documentation is maintained in this repository in the `docs` folder
and licensed under CC BY-SA 4.0. To contribute some documentation or improve the
existing, feel free to create a branch or fork this repository, make your changes
and send a pull request.
41 changes: 28 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,57 @@
# Teapot

Teapot is micro web framework for [Pharo Smalltalk](https://pharo.org) on top of the [Zinc HTTP components](https://github.com/svenvc/zinc), that focuses on simplicity and ease of use. It's around 600 lines of code, not counting the tests.
Teapot is micro web framework for [Pharo Smalltalk](https://pharo.org) on top of
the [Zinc HTTP components](https://github.com/svenvc/zinc), that focuses on
simplicity and ease of use. It's around 600 lines of code, not counting the tests.

**[Explore the docs](/docs)**

[![Build Status](https://travis-ci.com/zeroflag/Teapot.svg?branch=master)](https://travis-ci.com/zeroflag/Teapot)
[![Coverage Status](https://coveralls.io/repos/github/zeroflag/Teapot/badge.svg?branch=master)](https://coveralls.io/github/zeroflag/Teapot?branch=master)
[![Unit Tests](https://github.com/zeroflag/Teapot/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/zeroflag/Teapot/actions/workflows/unit-tests.yml/badge.svg)
[![Coverage Status](https://codecov.io/github/zeroflag/Teapot/coverage.svg?branch=master)](https://codecov.io/gh/zeroflag/Teapot/branch/master)
[![Baseline Groups](https://github.com/zeroflag/Teapot/actions/workflows/loading-groups.yml/badge.svg)](https://github.com/zeroflag/Teapot/actions/workflows/loading-groups.yml)
[![Markdown Lint](https://github.com/zeroflag/Teapot/actions/workflows/markdown-lint.yml/badge.svg)](https://github.com/zeroflag/Teapot/actions/workflows/markdown-lint.yml)

> *Name origin*: [418 I'm a teapot](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) (RFC 2324) is an HTTP status code.
[![GitHub release](https://img.shields.io/github/release/zeroflag/Teapot.svg)](https://github.com/zeroflag/Teapot/releases/latest)
[![Pharo 9.0](https://img.shields.io/badge/Pharo-9.0-informational)](https://pharo.org)
[![Pharo 10](https://img.shields.io/badge/Pharo-10-informational)](https://pharo.org)
[![Pharo 11](https://img.shields.io/badge/Pharo-11-informational)](https://pharo.org)

This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol. The RFC specifies this code should be returned by tea pots requested to brew coffee.
> *Name origin*: [418 I'm a teapot](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
> (RFC 2324) is an HTTP status code.
This code was defined in 1998 as one of the traditional IETF April Fools' jokes,
in RFC 2324, Hyper Text Coffee Pot Control Protocol. The RFC specifies this code
should be returned by tea pots requested to brew coffee.

## License

- The code is licensed under [MIT](LICENSE).
- The documentation is licensed under [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/).

## Quick Start

- Download the latest [Pharo 32](https://get.pharo.org/) or [64 bits VM](https://get.pharo.org/64/).
- Download the latest [Pharo 64 bits VM](https://get.pharo.org/64/).
- Download a ready to use image from the [release page](http://github.com/zeroflag/Teapot/releases/latest)
- Explore the [documentation](docs/).

```
```smalltalk
Metacello new
baseline: 'Teapot';
repository: 'github://zeroflag/Teapot/source';
load.
baseline: 'Teapot';
repository: 'github://zeroflag/Teapot/source';
load.
```


## Installation

To load the project in a Pharo image, or declare it as a dependency of your own project follow this [instructions](docs/Installation.md)
To load the project in a Pharo image, or declare it as a dependency of your own
project follow this [instructions](docs/Installation.md)

## Contributing

Check the [Contribution Guidelines](CONTRIBUTING.md)

## Other

If you want to lively work with Teapot or quickly implement REST services with it we recommend to have a look at the [Tealight project](https://github.com/astares/Tealight) - a thin layer on top of Teapot to quickly experiment and deliver
If you want to lively work with Teapot or quickly implement REST services with
it, we recommend having a look at the [Tealight project](https://github.com/astares/Tealight)
a thin layer on top of Teapot to quickly experiment and deliver
38 changes: 21 additions & 17 deletions docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,44 @@
## Basic Installation

You can load **Teapot** evaluating:

```smalltalk
Metacello new
baseline: 'Teapot';
repository: 'github://zeroflag/teapot:master/source';
load.
baseline: 'Teapot';
repository: 'github://zeroflag/teapot:master/source';
load.
```
> Change `master` to some released version if you want a pinned version

> Change `master` to some released version if you want a pinned version
## Using as dependency

In order to include **Teapot** as part of your project, you should reference the package in your product baseline:
In order to include **Teapot** as part of your project, you should reference the
package in your product baseline:

```smalltalk
setUpDependencies: spec
spec
baseline: 'Teapot'
with: [ spec
repository: 'github://zeroflag/Teapot:v{XX}/source';
loads: #('Deployment') ];
import: 'Teapot'.
spec
baseline: 'Teapot'
with: [ spec
repository: 'github://zeroflag/Teapot:v{XX}/source';
loads: #('Deployment') ];
import: 'Teapot'.
```

> Replace `{XX}` with the version you want to depend on
```smalltalk
baseline: spec
<baseline>
spec
for: #common
do: [ self setUpDependencies: spec.
spec package: 'My-Package' with: [ spec requires: #('Teapot') ] ]
baseline>
spec
for: #common
do: [ self setUpDependencies: spec.
spec package: 'My-Package' with: [ spec requires: #('Teapot') ] ]
```

## For Pharo 5 and previous

If you are using a Pharo older version see [Smalltalkhub](http://smalltalkhub.com/#!/~zeroflag/Teapot)
If you are using an older Pharo version see [Smalltalkhub](http://smalltalkhub.com/#!/~zeroflag/Teapot)
Loading

0 comments on commit 5774572

Please sign in to comment.