Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release] Version 1.1.0 #8

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 24 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,33 @@ jobs:
fail-fast: false
matrix:
include:
- { os: ubuntu-20.04, crystal: 1.6.1 }
- { os: ubuntu-20.04, crystal: 1.12.1 }
- { os: ubuntu-20.04, crystal: 1.11.2 }
- { os: ubuntu-20.04, crystal: 1.10.1 }
- { os: ubuntu-20.04, crystal: 1.9.2 }
- { os: ubuntu-20.04, crystal: 1.8.2 }
- { os: ubuntu-20.04, crystal: 1.7.3 }
- { os: ubuntu-20.04, crystal: 1.6.2 }
- { os: ubuntu-20.04, crystal: 1.5.1 }
- { os: ubuntu-20.04, crystal: 1.4.1 }
- { os: ubuntu-20.04, crystal: 1.3.2 }
- { os: ubuntu-20.04, crystal: 1.2.1 }
- { os: ubuntu-20.04, crystal: 1.1.1 }
- { os: ubuntu-20.04, crystal: 1.0.0 }
- { os: ubuntu-20.04, crystal: 0.36.1 }
- { os: ubuntu-22.04, crystal: 1.6.1 }
- { os: ubuntu-22.04, crystal: 1.12.1 }
- { os: ubuntu-22.04, crystal: 1.11.2 }
- { os: ubuntu-22.04, crystal: 1.10.1 }
- { os: ubuntu-22.04, crystal: 1.9.2 }
- { os: ubuntu-22.04, crystal: 1.8.2 }
- { os: ubuntu-22.04, crystal: 1.7.3 }
- { os: ubuntu-22.04, crystal: 1.6.2 }
- { os: ubuntu-22.04, crystal: 1.5.1 }
- { os: ubuntu-22.04, crystal: 1.4.1 }
- { os: ubuntu-22.04, crystal: 1.3.2 }
- { os: ubuntu-22.04, crystal: 1.2.1 }
- { os: ubuntu-22.04, crystal: 1.1.1 }
- { os: ubuntu-22.04, crystal: 1.0.0 }
- { os: ubuntu-22.04, crystal: 0.36.1 }
- { os: macOS-latest, crystal: 1.6.1 }
- { os: macOS-latest, crystal: 1.12.1 }
- { os: macOS-latest, crystal: 1.11.2 }
- { os: macOS-latest, crystal: 1.10.1 }
- { os: macOS-latest, crystal: 1.9.2 }
- { os: macOS-latest, crystal: 1.8.2 }
- { os: macOS-latest, crystal: 1.7.3 }
- { os: macOS-latest, crystal: 1.6.2 }
- { os: macOS-latest, crystal: 1.5.1 }
- { os: macOS-latest, crystal: 1.4.1 }
- { os: macOS-latest, crystal: 1.3.2 }
- { os: macOS-latest, crystal: 1.2.1 }
- { os: macOS-latest, crystal: 1.1.1 }
- { os: macOS-latest, crystal: 1.0.0 }
- { os: macOS-latest, crystal: 0.36.1 }
runs-on: ${{matrix.os}}
steps:
- name: 'Prepare Ubuntu 22.04 ENV'
Expand All @@ -50,23 +53,17 @@ jobs:
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt install pdftk
- name: 'Prepare Ubuntu 18.04 ENV'
if: matrix.os == 'ubuntu-18.04'
run: |
wget http://launchpadlibrarian.net/475142792/pdftk-java_3.0.9-1_all.deb
sudo apt install default-jre-headless libcommons-lang3-java libbcprov-java
sudo dpkg -i pdftk-java_3.0.9-1_all.deb
- name: 'Prepare MacOS ENV'
if: matrix.os == 'macOS-latest'
run: |
brew install pdftk-java
- uses: oprypin/install-crystal@v1
- uses: crystal-lang/install-crystal@v1
with:
crystal: ${{matrix.crystal}}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Test
run: |
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
crystal 1.6.1
crystal 1.12.1
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.1.0] - 2024-04-24
- Improve test matrix to test against Ubuntu 22.04 and Crystal version 1.7.x, 1.8.x, 1.9.x, 1.10.x, 1.11.x, 1.12.x.
- Use Crystal `1.12.1` in `.tools-versions` as latest Crystal version.
- Bump shard version to `v1.1.0` due to old Crystal versions drop.
- Update `actions/checkhout` to `v4` to avoid unsupported packages versions usage.

## [1.0.0] - 2022-10-24
- Improve test matrix to test against Ubuntu 22.04 and Crystal version 1.4.1, 1.5.1, 1.6.1.
- Use Crystal `1.6.1` in `.tools-versions` as latest Crystal version.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019-2022 Vladislav Volkov
Copyright (c) 2019-2024 Vladislav Volkov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
44 changes: 17 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,38 @@ This shard is a port of the [pdf-forms](https://github.com/jkraemer/pdf-forms) R

## Important Information

This shard has been tested and works great with PDFtk 3.0, Ubuntu 18.04, Ubuntu 20.04 and Crystal 0.36.1 - 1.0.0.
This shard has been tested and works great with PDFtk 3.0, Ubuntu 20.04 and Crystal 1.1.1 - 1.12.1.

Also it tested against MacOS latest and Crystal 0.36.1 - 1.0.0.
Also it tested against MacOS latest and Crystal 1.1.1 - 1.12.1.

The installation of the PDFtk 3.0 is recommended for normal work.

Shard can work with PDFtk 2.0 if PDFtk has access to the **/tmp** diretcory.

## Crystal and OS support

You can see test matrix with OS and Crystal version support using the following link:
See [older releases](https://github.com/unrooty/pdf-forms.cr/releases) for the support of the older Crystal versions and OS.

https://github.com/unrooty/pdf-forms.cr/actions/workflows/test.yml
You can see [test matrix](https://github.com/unrooty/pdf-forms.cr/actions/workflows/test.yml) with OS and Crystal version supports.

## Installation

- Install PDFtk (Ubuntu 18.04 only)

```bash
wget http://launchpadlibrarian.net/475142792/pdftk-java_3.0.9-1_all.deb
sudo apt install default-jre-headless libcommons-lang3-java libbcprov-java
sudo dpkg -i pdftk-java_3.0.9-1_all.deb
```

- Install PDFtk (Ubuntu 20.04 only)

```bash
sudo apt install pdftk
```

- Install PDFtk (MacOS latest only)
```bash
brew install pdftk-java
```
- Install PDFtk
- Ubuntu 20.04 / Ununtu 22.04
```bash
sudo apt install pdftk
```
- MacOS latest
```bash
brew install pdftk-java
```

- Add the dependency to your `shard.yml`:

```yaml
dependencies:
pdf-forms.cr:
github: unrooty/pdf-forms.cr
version: 0.3.0 # optional
version: 1.1.0 # optional
```

- Run
Expand All @@ -62,7 +52,7 @@ https://github.com/unrooty/pdf-forms.cr/actions/workflows/test.yml
### FDF/XFdf creation

```ruby
require 'pdf_forms'
require "pdf_forms"
fdf = PdfForms::Fdf.new("key" => "value", "other_key" => "other value")
Expand All @@ -78,7 +68,7 @@ To generate XFDF instead of FDF instantiate `PdfForms::XFdf` instead of `PdfForm
### Query form fields and fill out PDF forms with pdftk

```ruby
require 'pdf_forms'
require "pdf_forms"
# adjust the pdftk path to suit your pdftk installation
# add "data_format" => "xfdf" option to generate XFDF instead of FDF when
Expand Down Expand Up @@ -118,7 +108,7 @@ If value has not been stored, most of the time there is a problem with filling o
## Testing
Currencly shard uses [minitest.cr](https://github.com/ysbaddaden/minitest.cr).
Currently shard uses [minitest.cr](https://github.com/ysbaddaden/minitest.cr).
To run specs use `crystal run ./spec/*_test.cr` command.
Expand Down
6 changes: 3 additions & 3 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: pdf-forms
version: 1.0.0
version: 1.1.0

authors:
- Vladislav Volkov <volcharneverfall1996@gmail.com>

development_dependencies:
minitest:
github: ysbaddaden/minitest.cr
version: '>= 1.0.1'
version: '>= 1.1.0'

crystal: '>= 0.36.1'
crystal: '>= 1.1.1'

license: MIT