Skip to content

Commit edf5cbc

Browse files
authored
Merge pull request #30 from blocknotes/minor-improvements
v1.0.0
2 parents 8a13dd4 + 38e5406 commit edf5cbc

35 files changed

+2384
-54
lines changed

.fasterer.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
exclude_paths:
33
- bin/*
44
- db/schema.rb
5+
- gemfiles/**/*
56
- spec/dummy/**/*
67
- vendor/**/*
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Specs Rails 6.0
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
tests:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
ruby: ['2.6', '2.7']
19+
gemfile: ['rails60_activeadmin22', 'rails60_activeadmin']
20+
21+
env:
22+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v2
27+
28+
- name: Set up Ruby
29+
uses: ruby/setup-ruby@v1
30+
with:
31+
ruby-version: ${{ matrix.ruby }}
32+
bundler-cache: true
33+
34+
- name: Run tests
35+
run: bundle exec rspec --profile
36+
37+
- name: On failure, archive screenshots as artifacts
38+
uses: actions/upload-artifact@v2
39+
if: failure()
40+
with:
41+
name: test-failed-screenshots
42+
path: spec/dummy/tmp/screenshots
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Specs Rails 6.1
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
tests:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
ruby: ['2.6', '2.7', '3.0']
19+
gemfile: ['rails61_activeadmin29', 'rails61_activeadmin']
20+
21+
env:
22+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v2
27+
28+
- name: Set up Ruby
29+
uses: ruby/setup-ruby@v1
30+
with:
31+
ruby-version: ${{ matrix.ruby }}
32+
bundler-cache: true
33+
34+
- name: Run tests
35+
run: bundle exec rspec --profile
36+
37+
- name: On failure, archive screenshots as artifacts
38+
uses: actions/upload-artifact@v2
39+
if: failure()
40+
with:
41+
name: test-failed-screenshots
42+
path: spec/dummy/tmp/screenshots
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
---
2-
name: Specs
2+
name: Specs Rails 7.0
33

44
on:
55
push:
6-
branches: [master]
6+
branches:
7+
- master
78
pull_request:
8-
branches: [master]
9+
branches:
10+
- master
911

1012
jobs:
11-
specs:
13+
tests:
1214
runs-on: ubuntu-latest
1315

1416
strategy:
1517
matrix:
16-
ruby: ['2.5', '2.6', '2.7']
18+
ruby: ['2.7', '3.0']
19+
gemfile: ['rails70_activeadmin']
20+
21+
env:
22+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
1723

1824
steps:
19-
- name: Checkout
25+
- name: Checkout repository
2026
uses: actions/checkout@v2
2127

2228
- name: Set up Ruby
@@ -26,9 +32,9 @@ jobs:
2632
bundler-cache: true
2733

2834
- name: Run tests
29-
run: bundle exec rake
35+
run: bundle exec rspec --profile
3036

31-
- name: Archive screenshots for failed tests
37+
- name: On failure, archive screenshots as artifacts
3238
uses: actions/upload-artifact@v2
3339
if: failure()
3440
with:

.rubocop.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,15 @@ AllCops:
1212
Exclude:
1313
- bin/*
1414
- db/schema.rb
15+
- gemfiles/**/*
1516
- spec/dummy/**/*
1617
- vendor/**/*
1718
NewCops: enable
1819

19-
Gemspec/RequiredRubyVersion:
20-
Enabled: false
21-
22-
Naming/FileName:
23-
Enabled: false
24-
25-
Layout/LineLength:
26-
Enabled: true
27-
Max: 120
28-
2920
RSpec/ExampleLength:
3021
# default 5
3122
Max: 12
3223

3324
RSpec/MultipleExpectations:
3425
# default 1
3526
Max: 4
36-
37-
Style/HashEachMethods:
38-
Enabled: true
39-
40-
Style/HashTransformKeys:
41-
Enabled: true
42-
43-
Style/HashTransformValues:
44-
Enabled: true

Appraisals

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# frozen_string_literal: true
2+
3+
appraise 'rails52-activeadmin20' do
4+
gem 'activeadmin', '~> 2.0.0'
5+
gem 'rails', '~> 5.2.0'
6+
end
7+
8+
appraise 'rails60-activeadmin22' do
9+
gem 'activeadmin', '~> 2.2.0'
10+
gem 'rails', '~> 6.0.0'
11+
gem 'selenium-webdriver', require: false
12+
end
13+
14+
appraise 'rails60-activeadmin' do
15+
gem 'activeadmin'
16+
gem 'rails', '~> 6.0.0'
17+
gem 'selenium-webdriver', require: false
18+
end
19+
20+
appraise 'rails61-activeadmin29' do
21+
gem 'activeadmin', '~> 2.9.0'
22+
gem 'rails', '~> 6.1.0'
23+
end
24+
25+
appraise 'rails61-activeadmin' do
26+
gem 'activeadmin'
27+
gem 'rails', '~> 6.1.0'
28+
end
29+
30+
appraise 'rails70-activeadmin' do
31+
gem 'activeadmin'
32+
gem 'rails', '~> 7.0.0'
33+
gem 'sprockets-rails'
34+
end

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Quill Editor for ActiveAdmin
2+
3+
An Active Admin plugin to use Quill Rich Text Editor.
4+
5+
## v1.0.0 - 2022-04-18
6+
7+
- Set minimum Ruby version to 2.6.0
8+
- Remove `sassc` dependency
9+
- Enable Ruby 3.0 specs support
10+
- Enable Rails 7.0 specs support
11+
- Internal improvements
12+
13+
## v0.3.4 - 2021-03-16
14+
15+
- Fix editor loading with Turbolinks
16+
17+
## v0.3.2 - 2021-03-14
18+
19+
- Specs improvements
20+
- Minor internal changes
21+
22+
## v0.3.0 - 2020-10-01
23+
24+
- Add Webpacker support
25+
26+
## v0.2.14 - 2020-09-10
27+
28+
- JS: enable strict directive
29+
- Minor specs improvement
30+
31+
## v0.2.12 - 2020-09-08
32+
33+
- JS refactoring
34+
35+
## v0.2.10 - 2020-09-05
36+
37+
- Include Image Uploader plugin
38+
39+
## v0.2.9 - 2020-09-04
40+
41+
- Fix not working alignments (issue #8)
42+
- Fix empty editor problem which produces `<p><br></p>` (pull request #9)
43+
44+
## v0.2.8 - 2020-09-03
45+
46+
- Minor style improvements
47+
- Add specs for editor in nested resources
48+
- Add Rubocop and remove SimpleCov gems
49+
50+
## v0.2.4 - 2020-09-01
51+
52+
- Update Quill editor to version 1.3.7
53+
- Add minimum specs (using RSpec)
54+
- Minor internal changes

Gemfile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@ source 'https://rubygems.org'
55
gemspec
66

77
group :development, :test do
8-
gem 'activestorage', '~> 6.0'
9-
gem 'capybara', '~> 3.33'
10-
gem 'puma', '~> 4.3'
11-
gem 'rspec_junit_formatter', '~> 0.4'
12-
gem 'rspec-rails', '~> 4.0'
13-
gem 'selenium-webdriver', '~> 3.142'
14-
gem 'sprockets-rails', '~> 3.2'
15-
gem 'sqlite3', '~> 1.4'
8+
gem 'puma'
9+
gem 'sassc'
10+
gem 'sqlite3'
11+
12+
# Testing
13+
gem 'capybara'
14+
gem 'cuprite'
15+
gem 'rspec_junit_formatter'
16+
gem 'rspec-rails'
1617

1718
# Linters
18-
gem 'brakeman'
1919
gem 'fasterer'
20-
gem 'reek'
2120
gem 'rubocop'
2221
gem 'rubocop-packaging'
2322
gem 'rubocop-performance'

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017-2020 Mattia Roccoberton
1+
Copyright (c) 2017-2022 Mattia Roccoberton
22

33
Permission is hereby granted, free of charge, to any person obtaining
44
a copy of this software and associated documentation files (the

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# ActiveAdmin Quill Editor
2-
[![gem version](https://badge.fury.io/rb/activeadmin_quill_editor.svg)](https://badge.fury.io/rb/activeadmin_quill_editor) [![gem downloads](https://badgen.net/rubygems/dt/activeadmin_quill_editor)](https://rubygems.org/gems/activeadmin_quill_editor) [![Linters](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/linters.yml/badge.svg)](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/linters.yml) [![specs](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs.yml/badge.svg)](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs.yml)
2+
[![gem version](https://badge.fury.io/rb/activeadmin_quill_editor.svg)](https://badge.fury.io/rb/activeadmin_quill_editor)
3+
[![gem downloads](https://badgen.net/rubygems/dt/activeadmin_quill_editor)](https://rubygems.org/gems/activeadmin_quill_editor)
4+
[![linters](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/linters.yml/badge.svg)](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/linters.yml)
5+
[![specs Rails 6.1](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails61.yml/badge.svg)](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails61.yml)
6+
[![specs Rails 7.0](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails70.yml/badge.svg)](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails70.yml)
37

48
An Active Admin plugin to use [Quill Rich Text Editor](https://github.com/quilljs/quill) in form fields.
59

6-
![screenshot](screenshot.png)
10+
![screenshot](extra/screenshot.png)
711

812
Please :star: if you like it.
913

@@ -13,6 +17,7 @@ After installing Active Admin, add to your Gemfile: `gem 'activeadmin_quill_edit
1317

1418
If you installed Active Admin without Webpacker support (default for now):
1519

20+
- Add a SASS/SCSS gem to your Gemfile (ex. `gem 'sassc'`)
1621
- Add at the end of your Active Admin styles (_app/assets/stylesheets/active_admin.scss_):
1722
```scss
1823
@import 'activeadmin/quill_editor/quill.snow';
@@ -92,6 +97,10 @@ Consider that this is just a basic example: images are uploaded as soon as they
9297
the *upload_admin_post_path*) and it doesn't provide a way to remove images (just deleting them from
9398
the editor will not destroy them, you'll need to implement a purge logic for that).
9499

100+
## Changelog
101+
102+
The changelog is available [here](CHANGELOG.md).
103+
95104
## Do you like it? Star it!
96105

97106
If you use this component just star it. A developer is more motivated to improve a project when there is some interest. My other [Active Admin components](https://github.com/blocknotes?utf8=✓&tab=repositories&q=activeadmin&type=source).

0 commit comments

Comments
 (0)