Skip to content

Commit

Permalink
CI test in preparation for a Raku Community release
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Dec 14, 2024
1 parent 95d9dda commit 47799b8
Show file tree
Hide file tree
Showing 19 changed files with 404 additions and 134 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Linux

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
raku:
strategy:
matrix:
os:
- ubuntu-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: Raku/setup-raku@v1
with:
raku-version: ${{ matrix.raku-version }}
- name: Run Special Tests
run: raku run-tests -i
26 changes: 26 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: MacOS

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
raku:
strategy:
matrix:
os:
- macos-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: Raku/setup-raku@v1
with:
raku-version: ${{ matrix.raku-version }}
- name: Run Special Tests
run: raku run-tests -i
26 changes: 26 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Windows

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
raku:
strategy:
matrix:
os:
- windows-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: Raku/setup-raku@v1
with:
raku-version: ${{ matrix.raku-version }}
- name: Run Special Tests
run: raku run-tests -i
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.precomp/
/Text-Caesar-*
1 change: 0 additions & 1 deletion .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Revision history for Text::Caesar

{{$NEXT}}
- Initial version as a Raku Community module
38 changes: 25 additions & 13 deletions META6.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
{
"perl" : "6.c",
"name" : "Text::Caesar",
"version" : "0.1",
"description" : "*",
"authors" : [ "Emeric Fischer" ],
"provides" : {
"Text::Caesar" : "lib/Text/Caesar.pm6"
},
"depends" : [ ],
"resources" : [ ],
"source-url" : "git://github.com/Emeric54/p6-text-caesar.git",
"tags" : [ "crypt", "password" ],
"author" : "Emeric Fischer <[email protected]>"
"auth": "raku-community-modules",
"authors": [
"Emeric Fischer"
],
"build-depends": [
],
"depends": [
],
"description": "Encrypt / Decrypt using a Caesar cipher",
"license": "NOASSERTION",
"name": "Text::Caesar",
"perl": "6.c",
"provides": {
"Text::Caesar": "lib/Text/Caesar.rakumod"
},
"resources": [
],
"source-url": "https://github.com/raku-community-modules/Text-Caesar.git",
"tags": [
"crypt",
"password"
],
"test-depends": [
],
"version": "0.1"
}
82 changes: 47 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,88 @@
# Text::Caesar
[![Actions Status](https://github.com/raku-community-modules/Text-Caesar/actions/workflows/linux.yml/badge.svg)](https://github.com/raku-community-modules/Text-Caesar/actions) [![Actions Status](https://github.com/raku-community-modules/Text-Caesar/actions/workflows/macos.yml/badge.svg)](https://github.com/raku-community-modules/Text-Caesar/actions) [![Actions Status](https://github.com/raku-community-modules/Text-Caesar/actions/workflows/windows.yml/badge.svg)](https://github.com/raku-community-modules/Text-Caesar/actions)

## Synopsis
NAME
====

```Perl6
Text::Caesar - Encrypt / Decrypt using a Caesar cipher

SYNOPSIS
========

```raku
use Text::Caesar;

my $message = Message.new(
key => 3,
text => "I am a secret message"
key => 3,
text => "I am a secret message"
);
my $secret = Secret.new(
key => 3,
text => $message.encrypt();
key => 3,
text => $message.encrypt();
);
say $message.encrypt;
say $secret.decrypt;
```

## Installation

To install it using Panda (a module management tool bundled with Rakudo Star):

```
$ panda install Text::Caesar
```
Or with Zef:
```
$ zef install Text::Caesar
```

## Description
DESCRIPTION
===========

This module allows you to use 4 functions.

You can encrypt a message :
```Perl6
use v6;
You can encrypt a message:

```raku
use Text::Caesar;

my Str $secret = "I'm a secret message.";
my Str $message = encrypt(3, $secret);
say $message;
```

You can decrypt a message :
```Perl6

```raku
my Str $secret = 'LPDVHFUHWPHVVDJH'
my Str $message = decrypt(3, $secret);
say $message;
```
You can encrypt (or decrypt) a file :
```Perl6

You can encrypt (or decrypt) a file:

```raku
encrypt-from-file($key, $origin, $destination)
```

This code will encrypt `$origin`'s text into the `$destination` file.

You can also use objects :
```Perl6
You can also use objects:

```raku
my $message = Message.new(
key => 3,
text => "I am a secret message"
key => 3,
text => "I am a secret message"
);
say $message.encrypt;
```
```Perl6

```raku
my $secret = Secret.new(
key => 3,
text => $message.encrypt();
key => 3,
text => $message.encrypt;
);
say $secret.decrypt;
```

## Author
AUTHOR
======

Emeric Fischer

COPYRIGHT AND LICENSE
=====================

Copyright 2016 - 2017 Emeric Fischer

Copyright 2024 Raku Community

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

Emeric Fischer <[email protected]>, emeric on freenode.
11 changes: 11 additions & 0 deletions dist.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name = Text::Caesar

[ReadmeFromPod]
filename = lib/Text/Caesar.rakumod

[UploadToZef]

[Badges]
provider = github-actions/linux.yml
provider = github-actions/macos.yml
provider = github-actions/windows.yml
2 changes: 0 additions & 2 deletions examples/e01-encrypt.p6 → examples/e01-encrypt.raku
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use v6;

use Text::Caesar;

my Str $secret = "I'm a secret message.";
Expand Down
2 changes: 0 additions & 2 deletions examples/e02-decrypt.p6 → examples/e02-decrypt.raku
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use v6;

use Text::Caesar;

my Str $secret = 'LPDVHFUHWPHVVDJH'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use v6;

use Text::Caesar;

encrypt-from-file(3, 'message.txt', 'secret.txt');
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use v6;

use Text::Caesar;

decrypt-from-file(3, 'secret.txt', 'message.txt');
68 changes: 0 additions & 68 deletions lib/Text/Caesar.pm6

This file was deleted.

Loading

0 comments on commit 47799b8

Please sign in to comment.