forked from Emeric54/p6-text-caesar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI test in preparation for a Raku Community release
- Loading branch information
Showing
19 changed files
with
404 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.precomp/ | ||
/Text-Caesar-* |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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."; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
use v6; | ||
|
||
use Text::Caesar; | ||
|
||
my Str $secret = 'LPDVHFUHWPHVVDJH' | ||
|
2 changes: 0 additions & 2 deletions
2
examples/e03-encrypt-from-file.p6 → examples/e03-encrypt-from-file.raku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); |
2 changes: 0 additions & 2 deletions
2
examples/e04-decrypt-from-file.p6 → examples/e04-decrypt-from-file.raku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.