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

.TIFF File Extension #90

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5a621f2
Create fork for solution without overwriting redmine template and dro…
alexandermeindl Jun 4, 2021
c735a24
drop mysql tests (there are no database operations in this plugin) an…
alexandermeindl Jun 4, 2021
d4078d6
Try to fix github actions
alexandermeindl Jun 4, 2021
bc240b0
Try to fix fixtures
alexandermeindl Jun 4, 2021
0303ed5
README update
alexandermeindl Jun 5, 2021
08b3d4e
Fix journal link - which broke diff view
alexandermeindl Jun 8, 2021
c152036
fix contacts support
alexandermeindl Aug 1, 2021
3412e2a
Only use lighbox for contacts avatars
alexandermeindl Aug 1, 2021
e5f67b4
drop unused rubocop settings
alexandermeindl Sep 20, 2021
3b12612
Use postgresql 14 for tests
alexandermeindl Oct 5, 2021
71ee0a6
Ruby 3.0 tests added to pipeline. Drop ruby 2.5 support
alexandermeindl Oct 17, 2021
b8dbc6a
Working on zeitwerk support
alexandermeindl Nov 23, 2021
a35ad01
Use redmine_plugin kit as loader
alexandermeindl Dec 7, 2021
5ac57d5
Version bump and rubocop/brakeman fixes
alexandermeindl Dec 8, 2021
9a8a492
Add thumbnail support
alexandermeindl Mar 1, 2022
7e0aea5
rubocop-minitest added
alexandermeindl Apr 11, 2022
3469808
rubocop-minitest added - gem
alexandermeindl Apr 11, 2022
759194b
remove Gemfile.lock and add it to .gitignore
alexandermeindl Apr 12, 2022
fb659ad
fix for contacts
alexandermeindl Jun 19, 2022
b903567
remove db:test:prepare
alexandermeindl Jun 23, 2022
fe91f47
rubocop update
alexandermeindl Jun 27, 2022
e24192d
switch to actions/checkout@v2
alexandermeindl Sep 24, 2022
364137a
ruby 2.7 and redmine 4.2 is required
alexandermeindl Oct 24, 2022
c7c1ccb
version bump
alexandermeindl Oct 24, 2022
75d7db4
rename license filename
alexandermeindl Dec 13, 2022
db64a1c
#10179 stylelint standard settings
alexandermeindl Dec 29, 2022
fc1fe9e
require refactoring for tests
alexandermeindl Jan 1, 2023
a8d93c9
Drop redmine 4.2 tests and add ruby 3.2 tests
alexandermeindl Jan 24, 2023
f395d3c
Replace an absolute path for download attachment link with relative t…
dmakurin Jan 26, 2023
8fdf2b9
Merge pull request #1 from dmakurin/main
alexandermeindl Jan 26, 2023
1f9fb4f
do not use require_relative for test helper: this breaks file loading…
alexandermeindl Feb 26, 2023
7fb4037
do not use require_relative in test helper #10179
alexandermeindl Feb 26, 2023
774b00d
Fix fixture for dashboard lock #10786
alexandermeindl Mar 5, 2023
2bfc1c3
Update github action - add redmine 5.1 for tests
alexandermeindl Nov 5, 2023
66591fe
plugin name without redmine
alexandermeindl Dec 5, 2023
36eedb2
fix rubocop offenses
alexandermeindl Dec 11, 2023
08ae9bc
switch to pg16 for tests
alexandermeindl Jan 21, 2024
f243098
fix asset tests for asset pipeline changes
alexandermeindl Apr 9, 2024
5127f19
Drop unsupported ruby 2.7 from tests
alexandermeindl Apr 9, 2024
84b9123
Fix rubocop offense
alexandermeindl May 23, 2024
cc1af89
more readme work
alexandermeindl Oct 5, 2024
11a4640
use eslint no-jquery rules. Migrate bind to on
alexandermeindl Oct 8, 2024
dc7610b
some stylelint work
alexandermeindl Nov 19, 2024
e5a929f
do not allow nested css code
alexandermeindl Dec 11, 2024
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
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# eslint ignore file
assets/javascripts/*.min.js
23 changes: 23 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
env:
browser: true
jquery: true
extends:
- 'eslint:recommended'
- 'plugin:no-jquery/deprecated'
plugins:
- no-jquery
parserOptions:
ecmaVersion: 2019
rules:
indent:
- error
- 2
linebreak-style:
- error
- unix
quotes:
- error
- single
semi:
- error
- always
27 changes: 0 additions & 27 deletions .gitattributes

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Run Linters
on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install package dependencies
run: |
sudo apt-get install --yes --quiet pandoc

- name: Setup gems
run: |
cp test/support/gemfile.rb Gemfile

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true

- name: Run bundler
run: |
bundle install --jobs 4 --retry 3

- name: Run RuboCop
run: |
bundle exec rubocop -S

- name: Run Brakeman
run: |
bundle exec brakeman -5

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18'

- run: yarn install

- name: Run Stylelint
run: node_modules/.bin/stylelint assets/stylesheets/

- name: Run ESLint
run: node_modules/.bin/eslint assets/javascripts/
91 changes: 91 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Tests
on:
push:
pull_request:

jobs:
test:
name: ${{ matrix.redmine }} ruby-${{ matrix.ruby }}
runs-on: ubuntu-latest

strategy:
matrix:
ruby: ['3.0', '3.1', '3.2']
redmine: ['5.0-stable', '5.1-stable', 'master']
db: ['postgres', 'mysql']
exclude:
- ruby: '3.2'
redmine: 5.0-stable
fail-fast: false

services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432

options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- name: Checkout Redmine
uses: actions/checkout@v4
with:
repository: redmine/redmine
ref: ${{ matrix.redmine }}
path: redmine

- name: Checkout redmine_lightbox
uses: actions/checkout@v4
with:
repository: AlphaNodes/redmine_lightbox
path: redmine/plugins/redmine_lightbox

- name: Update package archives
run: sudo apt-get update --yes --quiet

- name: Install package dependencies
run: >
sudo apt-get install --yes --quiet
build-essential
cmake
libicu-dev
libpq-dev

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Prepare Redmine source
working-directory: redmine
run: |
cp plugins/redmine_lightbox/test/support/database.yml config/
cp plugins/redmine_lightbox/test/support/configuration.yml config/

- name: Install Ruby dependencies
working-directory: redmine
run: |
bundle config set --local without 'development'
bundle install --jobs=4 --retry=3

- name: Run Redmine rake tasks
env:
RAILS_ENV: test
working-directory: redmine
run: |
bundle exec rake generate_secret_token
bundle exec rake db:create db:migrate

- name: Run tests
env:
RAILS_ENV: test
working-directory: redmine
run: bundle exec rake redmine:plugins:test NAME=redmine_lightbox RUBYOPT="-W0"
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
.DS_Store
.buildpath
*.gem
coverage/
tmp/
Gemfile.lock
.project
.vscode
.bundle
.settings/
docs/_build
docs/_static
docs/_templates
.enable_*
/node_modules
/yarn.lock
124 changes: 124 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
require:
- rubocop-performance
- rubocop-rails
- rubocop-minitest

AllCops:
TargetRubyVersion: 2.7
TargetRailsVersion: 5.2
NewCops: enable
ActiveSupportExtensionsEnabled: true

Rails:
Enabled: true

Minitest/MultipleAssertions:
Max: 5
Enabled: true

Minitest/AssertPredicate:
Enabled: false

Minitest/TestMethodName:
Enabled: true
Exclude:
- 'test/test_helper.rb'

Metrics/AbcSize:
Enabled: false

Metrics/BlockLength:
Enabled: false

Metrics/ParameterLists:
Enabled: true
CountKeywordArgs: false

Metrics/ClassLength:
Enabled: false

Metrics/CyclomaticComplexity:
Max: 25

Style/HashConversion:
Enabled: true

Layout/LineLength:
Max: 140

Metrics/MethodLength:
Max: 60

Metrics/ModuleLength:
Enabled: false

Metrics/PerceivedComplexity:
Max: 25

Rails/ApplicationJob:
Enabled: false

Rails/ApplicationRecord:
Enabled: false

Rails/CreateTableWithTimestamps:
Enabled: false

Rails/HelperInstanceVariable:
Enabled: false

Rails/SkipsModelValidations:
Enabled: false

Performance/ChainArrayAllocation:
Enabled: true

Style/AutoResourceCleanup:
Enabled: true

Style/ExpandPathArguments:
Enabled: true
Exclude:
- test/**/*

Style/FrozenStringLiteralComment:
Enabled: true
Exclude:
- '/**/*.rsb'

Style/OptionHash:
Enabled: true
SuspiciousParamNames:
- options
- api_options
- opts
- args
- params
- parameters
- settings

Style/ReturnNil:
Enabled: true

Style/UnlessLogicalOperators:
Enabled: true

Style/MethodCallWithArgsParentheses:
Enabled: true
AllowParenthesesInMultilineCall: true
AllowParenthesesInChaining: true
EnforcedStyle: omit_parentheses

Style/SuperWithArgsParentheses:
Enabled: false

Style/Documentation:
Enabled: false

Style/HashTransformValues:
Enabled: false

Naming/VariableNumber:
Enabled: true
Exclude:
- 'test/**/*'
2 changes: 2 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# stylelint ignore file
assets/stylesheets/*.min.css
12 changes: 12 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "stylelint-config-standard",
"rules": {
"string-quotes": "single",
"selector-nested-pattern": "false",
"declaration-property-unit-disallowed-list": {
"font-size": [
"px"
]
}
}
}
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# frozen_string_literal: true

gem 'redmine_plugin_kit'
6 changes: 2 additions & 4 deletions LICENSE.md → LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
The MIT License

Copyright (c) Genki Zhang
Copyright <YEAR> <COPYRIGHT HOLDER>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading