Skip to content
This repository was archived by the owner on May 18, 2025. It is now read-only.

Commit 1cc69a9

Browse files
authored
Merge pull request #12 from blocknotes/v1.0.0
v1.0.0
2 parents a7a607a + 9121340 commit 1cc69a9

35 files changed

Lines changed: 2367 additions & 74 deletions

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

44
on:
55
push:
@@ -8,15 +8,19 @@ on:
88
branches: [master]
99

1010
jobs:
11-
test:
11+
tests:
1212
runs-on: ubuntu-latest
1313

1414
strategy:
1515
matrix:
16-
ruby: ['2.5', '2.6', '2.7']
16+
ruby: ['2.7', '3.0']
17+
gemfile: ['rails70_activeadmin']
18+
19+
env:
20+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
1721

1822
steps:
19-
- name: Checkout
23+
- name: Checkout repository
2024
uses: actions/checkout@v2
2125

2226
- name: Set up Ruby
@@ -26,9 +30,9 @@ jobs:
2630
bundler-cache: true
2731

2832
- name: Run tests
29-
run: bundle exec rake
33+
run: bundle exec rspec --profile
3034

31-
- name: Archive screenshots for failed tests
35+
- name: On failure, archive screenshots as artifacts
3236
uses: actions/upload-artifact@v2
3337
if: failure()
3438
with:

.rubocop.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,7 @@ AllCops:
66
Exclude:
77
- bin/*
88
- db/schema.rb
9+
- gemfiles/**/*
910
- spec/dummy/**/*
1011
- vendor/**/*
1112
NewCops: enable
12-
13-
Gemspec/RequiredRubyVersion:
14-
Enabled: false
15-
16-
Naming/FileName:
17-
Enabled: false
18-
19-
Layout/LineLength:
20-
Enabled: true
21-
Max: 120
22-
23-
Style/HashEachMethods:
24-
Enabled: true
25-
26-
Style/HashTransformKeys:
27-
Enabled: true
28-
29-
Style/HashTransformValues:
30-
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: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# medium-editor for ActiveAdmin
2+
3+
An Active Admin plugin to use Medium 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.2.14 - 2021-03-20
14+
15+
- Fix editor loading with Turbolinks
16+
- Specs improvements
17+
18+
## v0.2.12 - 2020-09-09
19+
20+
- JS refactoring
21+
- Minor specs improvements
22+
- README changes
23+
24+
## v0.2.9 - 2020-09-04
25+
26+
- Reset some styles manually to the defaults to render better the elements in the editor
27+
28+
## v0.2.8 - 2020-09-03
29+
30+
- Update MediumEditor to commit `d113a744`
31+
- Add specs for editor in nested resources
32+
- Add Rubocop and remove SimpleCov gems

Gemfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ 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
1819
gem 'fasterer'

README.md

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

48
An Active Admin plugin to use [medium-editor](https://github.com/yabwe/medium-editor), a compact and clean WYSIWYG editor.
59

610
**IMPORTANT NOTICE**: while I like the Medium Editor idea of having floating buttons, it looks like that they are slow to release new stable versions. Some editor bugs are related to this problem unfortunately.
711

8-
![screenshot](screenshot.png)
12+
![screenshot](extra/screenshot.png)
913

1014
## Usage
1115

@@ -15,7 +19,8 @@ An Active Admin plugin to use [medium-editor](https://github.com/yabwe/medium-ed
1519

1620
## Install
1721

18-
- After installing Active Admin, add to your Gemfile: `gem 'activeadmin_medium_editor'` (and execute *bundle*)
22+
- After installing Active Admin, add to your Gemfile: `gem 'activeadmin_medium_editor'`
23+
- Add also a SASS/SCSS gem to your Gemfile (ex. `gem 'sassc'`)
1924
- Add at the end of your Active Admin styles (_app/assets/stylesheets/active_admin.scss_):
2025
```scss
2126
@import 'activeadmin/medium_editor/medium_editor';
@@ -59,6 +64,10 @@ f.input :description, as: :medium_editor, input_html: { data: { options: { toolb
5964

6065
For details about the buttons' effect please refer to medium-editor documentation.
6166

67+
## Changelog
68+
69+
The changelog is available [here](CHANGELOG.md).
70+
6271
## Do you like it? Star it!
6372

6473
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).
@@ -67,7 +76,7 @@ Or consider offering me a coffee, it's a small thing but it is greatly appreciat
6776

6877
## Contributors
6978

70-
- [Mattia Roccoberton](http://blocknot.es): author
79+
- [Mattia Roccoberton](https://blocknot.es): author
7180
- The good guys that opened issues and pull requests from time to time
7281

7382
## License

activeadmin_medium_editor.gemspec

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,18 @@ Gem::Specification.new do |spec|
1414
spec.email = 'mat@blocknot.es'
1515
spec.homepage = 'https://github.com/blocknotes/activeadmin_medium_editor'
1616

17+
spec.required_ruby_version = '>= 2.6.0'
18+
19+
spec.metadata['homepage_uri'] = spec.homepage
20+
spec.metadata['changelog_uri'] = 'https://github.com/blocknotes/activeadmin_medium_editor/blob/master/CHANGELOG.md'
21+
spec.metadata['source_code_uri'] = spec.homepage
22+
23+
spec.metadata['rubygems_mfa_required'] = 'true'
24+
1725
spec.files = Dir['{app,lib}/**/*', 'LICENSE.txt', 'Rakefile', 'README.md']
1826
spec.require_paths = ['lib']
1927

2028
spec.add_runtime_dependency 'activeadmin', '~> 2.0'
21-
spec.add_runtime_dependency 'sassc', '~> 2.4'
29+
30+
spec.add_development_dependency 'appraisal', '~> 2.4'
2231
end

0 commit comments

Comments
 (0)