Skip to content

Commit 1a79d32

Browse files
committed
feature: add date as title of new posts
1 parent 1d260f2 commit 1a79d32

File tree

9 files changed

+87
-9
lines changed

9 files changed

+87
-9
lines changed

.github/workflows/ruby-main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
matrix:
2020
os: [ubuntu-latest, macos-latest, macos-latest-xlarge]
2121
ruby-version: ["3.3"]
22-
rust-version: ["1.73.0"]
22+
rust-version: ["1.76.0"]
2323

2424
runs-on: ${{ matrix.os }}
2525
timeout-minutes: 30

.github/workflows/ruby.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
strategy:
1919
matrix:
2020
os: [ubuntu-latest, macos-latest]
21-
ruby-version: ["3.3"]
22-
rust-version: ["1.73.0"]
21+
ruby-version: ["3.3.4"]
22+
rust-version: ["1.76.0"]
2323

2424
runs-on: ${{ matrix.os }}
2525
timeout-minutes: 30

.tool-versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
ruby 3.3.4
2-
rust 1.73.0
2+
rust 1.76.0
33
nodejs 22.7.0

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ new entry format:
1212

1313
### next (yyyy/mm/dd)
1414

15-
- [#106](https://github.com/simonneutert/labradorite-notebook/pulls/106) Updates Ruby, Node.js, and Nokogiri versions, and replace unmaintained tag JS framework with "use-bootstrap-tag". - [@simonneutert](https://github.com/simonneutert)
15+
- []() All new posts' title will be set to the current date. Please visit the [UPGRADING](UPGRADING.md) readme file, too. - [@simonneutert](https://github.com/simonneutert)
16+
- [#106](https://github.com/simonneutert/labradorite-notebook/pull/106) Updates Ruby, Node.js, and Nokogiri versions, and replace unmaintained tag JS framework with "use-bootstrap-tag". - [@simonneutert](https://github.com/simonneutert)
1617

1718
### 0.4.4 (2023/11/17)
1819

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
##### Setup for Alpine #####
22

3-
FROM ruby:3.3-alpine AS builder
3+
FROM ruby:3.3-alpine3.19 AS builder
44

55
ENV LANG C.UTF-8
66
ENV WORKDIR="/app/"
@@ -10,7 +10,7 @@ RUN apk add --no-cache \
1010
linux-headers \
1111
build-base \
1212
gcc \
13-
rust \
13+
"rust=1.76.0-r0" \
1414
cargo
1515

1616
##### Ruby Gem Management #####

Dockerfile.test

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
##### Setup for Alpine #####
2+
3+
FROM ruby:3.3-alpine3.19 AS builder
4+
5+
ENV LANG C.UTF-8
6+
ENV WORKDIR="/app/"
7+
WORKDIR ${WORKDIR}
8+
9+
RUN apk add --no-cache \
10+
linux-headers \
11+
build-base \
12+
gcc \
13+
"rust=1.76.0-r0" \
14+
cargo
15+
16+
##### Ruby Gem Management #####
17+
18+
FROM builder AS gembuilder
19+
20+
ARG bundler_jobs=2
21+
22+
ENV WORKDIR="/app/"
23+
WORKDIR ${WORKDIR}
24+
25+
COPY Gemfile* ${WORKDIR}
26+
27+
RUN bundle install -j${bundler_jobs}
28+
29+
##### MAIN CONTAINER #####
30+
31+
FROM ruby:3.3-alpine
32+
33+
RUN apk add nodejs npm \
34+
&& rm -rf /var/cache/apk/*; \
35+
npm install -g prettier;
36+
37+
ENV LANG C.UTF-8
38+
ENV RUBY_YJIT_ENABLE=1
39+
ENV NODEJS_VERSION=20
40+
ENV RACK_ENV=test
41+
42+
# replace labradorite with your username on your server
43+
ARG USERNAME=labradorite
44+
RUN adduser -D ${USERNAME}
45+
USER ${USERNAME}
46+
WORKDIR /home/${USERNAME}
47+
48+
EXPOSE 9292
49+
50+
COPY --from=gembuilder /usr/local/bundle/ /usr/local/bundle/
51+
COPY --chown=${USERNAME} . ${WORKDIR}
52+
53+
CMD bundle exec rake

UPGRADING.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
# Upgrading Labradorite
22

3-
_empty_
3+
## To Version v0.5.0
4+
5+
Development on Mac OS X is no longer supported.
6+
7+
See https://github.com/baygeldin/tantiny/issues/21 for more information.
8+
9+
Please use a Linux machine for development (or Docker).
10+
11+
When using Docker, you can run the following command to test the development environment:
12+
13+
```bash
14+
just test
15+
```
16+
17+
running the project:
18+
19+
```bash
20+
just dev
21+
```

justfile

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
default:
22
@just --list
33

4+
dev:
5+
@docker buildx build -f Dockerfile . -t labra && docker run --rm -it -p"9292:9292" --name labra labra
6+
7+
test:
8+
@docker buildx build -f Dockerfile.test . -t labra-test && docker run --rm -it --name labra-test labra-test
9+
410
pretty_js:
511
@npx prettier --write assets/js/**/*.js

lib/search_index/core.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class << self
1818
def init_index
1919
dev = ENV['RACK_ENV'] == 'development' || ENV['RACK_ENV'] == 'test'
2020
# using exclusive_writer break hot reloading in development
21-
Tantiny::Index.new '.tantiny', exclusive_writer: !dev do
21+
Tantiny::Index.new('.tantiny', exclusive_writer: !dev) do
2222
id :id
2323
text :tags
2424
text :title

0 commit comments

Comments
 (0)