Skip to content

Commit

Permalink
cleanup spelling, markdown, yaml, update github actions (#1440)
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer authored Jun 26, 2024
1 parent f9ceb0c commit 9327c28
Show file tree
Hide file tree
Showing 78 changed files with 571 additions and 435 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/index-recipes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@ name: Generate Recipes Index
on:
push:
branches:
- '**' # This will trigger on push to any branch
- "**" # This will trigger on push to any branch
paths:
- 'docs/recipes/**'
- "docs/recipes/**"
workflow_dispatch:

jobs:
generate-index:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "14"

- name: Install dependencies
run: |
npm install fs-extra
- name: Install dependencies
run: |
npm install fs-extra
- name: Generate index
run: |
node .github/scripts/generate-index-recipes.js
- name: Generate index
run: |
node .github/scripts/generate-index-recipes.js
- name: Commit and push changes
run: |
BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add docs/recipes/index.json docs/recipes/README.md
git commit -m "Update recipes index and README"
git push origin $BRANCH_NAME
- name: Commit and push changes
run: |
BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add docs/recipes/index.json docs/recipes/README.md
git commit -m "Update recipes index and README"
git push origin $BRANCH_NAME
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ jobs:
name: 🧹 Markdown Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: 🥝 Use Node.js
uses: actions/setup-node@v3.5.1
uses: actions/setup-node@v4
with:
node-version: '12.x'
- run: npm install -g [email protected]
Expand All @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🍉 Check Out
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 🥥 Install
run: |
wget -O - -q https://git.io/misspell | sh -s -- -b .
Expand All @@ -30,8 +30,8 @@ jobs:
name: 🧹 YAML Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4.3.0
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ jobs:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2
key: lucee-script-runner-m2-cache
- name: Cache Lucee files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: _actions/lucee/script-runner/main/lucee-download-cache
key: lucee-downloads-${{ env.luceeVersion }}
Expand All @@ -39,11 +39,11 @@ jobs:
with:
webroot: ${{ github.workspace }}
execute: /build-all.cfm
luceeVersion: 6.0.2.1-SNAPSHOT
luceeVersion: 6.0.3.1
# redis, chart, lucene, form. ajax, chart
extensions: 60772C12-F179-D555-8E2CD2B4F7428718;version=3.0.0.54-SNAPSHOT,D46B46A9-A0E3-44E1-D972A04AC3A8DC10,EFDEB172-F52E-4D84-9CD1A1F561B3DFC8,FAD67145-E3AE-30F8-1C11A6CCF544F0B7,6E2CB28F-98FB-4B51-B6BE6C64ADF35473,DF28D0A4-6748-44B9-A2FDC12E4E2E4D38
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: lucee-docs
path: builds/artifacts/lucee-docs.zip
Expand All @@ -61,7 +61,7 @@ jobs:
run: curl https://google.com/ping?sitemap=https://docs.lucee.org/sitemap.xml
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master'}}
# - name: Notify slack
# uses: 8398a7/action-slack@v3.9.1
# uses: 8398a7/action-slack@v4.9.1
# with:
# status: ${{ job.status }}
# author_name: GitHub Actions # default: 8398a7@action-slack
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2
key: lucee-script-runner-m2-cache
- name: Cache Lucee files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: _actions/lucee/script-runner/main/lucee-download-cache
key: lucee-downloads-${{ env.luceeVersion }}
Expand Down
2 changes: 1 addition & 1 deletion docs/03.reference/02.tags/queryparam/_attributes/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ True or False, the default is False

Indicates whether to process the value attribute as a comma delimited list of values, separated by a separator character.

You can also pass an array as a value which automatically achieves the same result and doesn't require list="true", unless list is explictly set to "false"
You can also pass an array as a value which automatically achieves the same result and doesn't require list="true", unless list is explicitly set to "false"
4 changes: 2 additions & 2 deletions docs/recipes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ How to define a Datasource in Lucee.

Guide on using and running Lucee with Docker

## [Encryption/Decryption ](/docs/recipes/encryption_decryption.md)
## [Encryption/Decryption](/docs/recipes/encryption_decryption.md)

This document explains about Encryption/Decryption with public and private keys with simple examples.

Expand Down Expand Up @@ -96,7 +96,7 @@ Overview of different mapping types in the file system.

This document explains how to use a Function Listeners in Lucee.

## [Function SystemOutput #](/docs/recipes/function-systemoutput.md)
## [Function SystemOutput](/docs/recipes/function-systemoutput.md)

This document explains the systemoutput function with some simple examples.

Expand Down
3 changes: 2 additions & 1 deletion docs/recipes/application-context-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
]
}
-->

# Application Context update

Lucee allows you to update the existing application context defined for example in [cookbook-application-context-basic].
Expand All @@ -43,4 +44,4 @@ This example doesn't extend the existing application mappings with this new one,
<cfapplication action="update" mappings="#mappings#">
```

Of course, it's not only mappings you can update. [tag-application] lets you update all the settings you can do in the Application.cfc!
Of course, it's not only mappings you can update. [tag-application] lets you update all the settings you can do in the Application.cfc!
11 changes: 6 additions & 5 deletions docs/recipes/archives-creating-and-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
]
}
-->

# Archives - Creating and deploying Lucee Archives (.lar files)

This document explains how to deploy an Application on a live server without using a single CFML file.
Expand Down Expand Up @@ -45,8 +46,8 @@ resource: **Full folder path**/component/

After creating the mapping, you need to create an archive file for the CFC.

* Go to the detail view of mycfc mapping page,
* Click the button **assign archive to mapping**.
- Go to the detail view of mycfc mapping page,
- Click the button **assign archive to mapping**.

An archive (lar file) is created automatically and saved in `WEB-INF/lucee/context/archives`.

Expand All @@ -73,8 +74,8 @@ After creating the mapping in the Administrator, you can create an archive file

Now you can see both lar files in the `WEB-INF/lucee/context/archives` folder:

* One is `lucee/context/archives/xxx-deploy.lar` file,
* Another one is `lucee/context/archives/xxx-mycfc.lar`
- One is `lucee/context/archives/xxx-deploy.lar` file,
- Another one is `lucee/context/archives/xxx-mycfc.lar`

Now you can place the archive files on your target server.

Expand All @@ -86,4 +87,4 @@ You can now view mappings in the admin.

Here you can see the above details in a video:

[Lucee Deploy Archive file](https://www.youtube.com/watch?time_continue=473&v=E9Z0KvspBAY)
[Lucee Deploy Archive file](https://www.youtube.com/watch?time_continue=473&v=E9Z0KvspBAY)
3 changes: 2 additions & 1 deletion docs/recipes/basic-date.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
]
}
-->

# Basic Date - Output the current date

The following examples show you how to output the current date.
Expand All @@ -34,4 +35,4 @@ You can then configure a different locale for the current request in the Applica
<cfoutput>
<p>The time is #lsDateTimeFormat(date:now(),locale:'de_CH')#</p>
</cfoutput>
```
```
3 changes: 2 additions & 1 deletion docs/recipes/cached-within-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
]
}
-->

# Cache a Query for the current request

Perhaps you're familiar with the "cachedwithin" attribute of the tag [tag-query], which is normally used as follows:
Expand All @@ -41,4 +42,4 @@ Request query caching is a simple solution to this problem. Replace the timespan
</cfquery>
```

Then the query is cached for only the current request, independent of how long the request takes!
Then the query is cached for only the current request, independent of how long the request takes!
16 changes: 9 additions & 7 deletions docs/recipes/caches-defined-in-application-cfc.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
]
}
-->

# Caches defined in Application.cfc

It is possible to add cache connections in Lucee 5.1+ on a per-application basis by adding configuration to your `Application.cfc`. You can also select the default object cache, query cache, function cache, etc. Note if these caches use an extension that provides the cache driver, the extension must be installed already.
Expand Down Expand Up @@ -57,16 +58,17 @@ The easiest way to generate the code block above is to follow these steps:

Let's take a look at some of the keys used to define a cache connection.

* **class** - This is the Java class of the driver for the cache engine.
* **bundleName** - Optional. The name of the OSGI bundle to load the `class` from.
* **bundleVersion** - Optional. The version of the OSGI bundle to load the `class` from.
* **storage** - A boolean that flags whether this cache can be used for client or session storage.
* **custom** - A struct of key/value pairs for configuring the cache. This struct is entirely dependent on the cache driver in use, so refer to the docs for that cache driver to see the possible values. Note, some of these custom values might be required for some cache drivers to work.
* **default** - Optional. If you want this cache to be used as a default cache, then give this one of these values: `function`, `object`, `template`, `query`, `resource`, `include`, `http`, `file`, `webservice`.
- **class** - This is the Java class of the driver for the cache engine.
- **bundleName** - Optional. The name of the OSGI bundle to load the `class` from.
- **bundleVersion** - Optional. The version of the OSGI bundle to load the `class` from.
- **storage** - A boolean that flags whether this cache can be used for client or session storage.
- **custom** - A struct of key/value pairs for configuring the cache. This struct is entirely dependent on the cache driver in use, so refer to the docs for that cache driver to see the possible values. Note, some of these custom values might be required for some cache drivers to work.
- **default** - Optional. If you want this cache to be used as a default cache, then give this one of these values: `function`, `object`, `template`, `query`, `resource`, `include`, `http`, `file`, `webservice`.

## Default Caches

When declaring a cache, you can make it the default cache for creation operations, but it is also possible to configure the default caches for each operation all at once in your `Application.cfc` like so:

```lucee
this.cache.object = "myCache";
this.cache.template = "AnotherCache";
Expand All @@ -79,4 +81,4 @@ this.cache.file = "<cache-name>";
this.cache.webservice = "<cache-name>";
```

A single cache can only be the default storage location for a single operation at a time. For example, a cache named "myCache" cannot both be the default cache for objects as well as queries.
A single cache can only be the default storage location for a single operation at a time. For example, a cache named "myCache" cannot both be the default cache for objects as well as queries.
3 changes: 2 additions & 1 deletion docs/recipes/check-for-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
]
}
-->

# Check for changes in your configuration file automatically

Lucee can automatically check for changes in your configuration files from the complete server or a single web context.
Expand Down Expand Up @@ -51,4 +52,4 @@ And add the same changes from above:

Lucee will now check for any changes in the Lucee configuration files every minute, and if there is a change, reload it and enable those changes.

A very handy little feature for those automated deployments!
A very handy little feature for those automated deployments!
9 changes: 5 additions & 4 deletions docs/recipes/checksum.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
]
}
-->

# Checksum

This document explains how to use a checksum in Lucee.
Expand Down Expand Up @@ -53,9 +54,9 @@ dump("something went wrong! give it another try?");
</cfscript>
```

* Download the jar file by using cfhttp.
* Dump the file response header. You can see the "X-Checksum-MD5" "X-Checksum-SHA1" keys from the file itself.
* Save the file, and dump(fileInfo(localFile.checksum)). Check to see if the dump matches the value of the downloaded file response["X-Checksum-MD5"] header.
- Download the jar file by using cfhttp.
- Dump the file response header. You can see the "X-Checksum-MD5" "X-Checksum-SHA1" keys from the file itself.
- Save the file, and dump(fileInfo(localFile.checksum)). Check to see if the dump matches the value of the downloaded file response["X-Checksum-MD5"] header.

Checksum values are hashed from the binaryfile itself.

Expand Down Expand Up @@ -145,4 +146,4 @@ The above code checks and validates the downloaded file.
## Footnotes

You can see the details in this video:
[Checksum](https://www.youtube.com/watch?v=Kb_zSsRDEOg)
[Checksum](https://www.youtube.com/watch?v=Kb_zSsRDEOg)
3 changes: 2 additions & 1 deletion docs/recipes/configuration-administrator-cfc.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
]
}
-->

# Configure Lucee within your application

Lucee provides a web frontend to configure the server and each web context, but you can also do this configuration from within your application.
Expand All @@ -31,4 +32,4 @@ admin.updateCharset(resourceCharset: "UTF-8"); // set the resource charset
## cfadmin Tag

The component "Administrator" is far from being feature complete, so if you miss a functionality, best consult the unofficial tag "cfadmin" (undocumented) and check out how this tag is used inside the [Lucee Administrator](https://github.com/lucee/Lucee/blob/5.2/core/src/main/java/resource/component/org/lucee/cfml/Administrator.cfc).
Of course, it would be great if you could contribute your addition to the "Administrator" component.
Of course, it would be great if you could contribute your addition to the "Administrator" component.
5 changes: 3 additions & 2 deletions docs/recipes/convert-a-cfml-func-to-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
]
}
-->

# Convert a CFML Function/Component to use in Java

Lucee allows you to convert user-defined functions or components so you can use them in Java.
Expand Down Expand Up @@ -42,7 +43,7 @@ component {
Then you can pass that component to a Java method needing a specific interface/class.

```lucee
// This class has a method that takes as an argument a CharSequence.
// This class has a method that takes as an argument a CharSequence.
// This way we can force Lucee to convert/wrap our component to that interface.
HashUtil = createObject("java", "lucee.commons.digest.HashUtil");
Expand Down Expand Up @@ -76,4 +77,4 @@ numeric function echoInt(numeric i) {
if (i == 1) throw "Test output!!!";
return i * 2;
}
```
```
Loading

0 comments on commit 9327c28

Please sign in to comment.