trix-rails 2.0.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +39 -0
- data/.travis.yml +10 -5
- data/Appraisals +14 -19
- data/CHANGELOG.md +50 -12
- data/README.md +6 -4
- data/gemfiles/{rails_4.2.gemfile → rails_5_2.gemfile} +1 -1
- data/gemfiles/{rails_5.0.gemfile → rails_6_0.gemfile} +1 -1
- data/gemfiles/{rails_5.1.gemfile → rails_6_1.gemfile} +1 -1
- data/gemfiles/{rails_5.2.1.gemfile → rails_7.gemfile} +1 -1
- data/lib/trix/simple_form/trix_editor_input.rb +1 -1
- data/lib/trix/version.rb +1 -1
- data/trix.gemspec +3 -3
- data/vendor/assets/javascripts/trix.js +9 -9
- data/vendor/assets/stylesheets/trix.css +317 -208
- metadata +15 -23
- data/gemfiles/rails_5.2.gemfile +0 -7
- data/gemfiles/rails_master.gemfile +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb93d87948dae892f401b527310642483edd8a5a07a7493e9177337fccefa69f
|
4
|
+
data.tar.gz: 03b1a94b56734f4e57391e9b1f6086e77635022b22fa17917835f1ce015ae5a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f8d4d482dba187b37b78612d9a8f70724b29d1bba4a9fb23e06dd22961492d8745f14ad92e3f97a2494e2fcef67539f0bdc5933203f3bdd398651f247d06d41
|
7
|
+
data.tar.gz: 451bbea5451a20725fba8e1d8b2fc83ac7413bda1fba48a1fadff9ac64db4b5da39d8eae4f2736ef99223349016c05147f2c21cec5eeb45f0cc6a7fd87191b39
|
@@ -0,0 +1,39 @@
|
|
1
|
+
name: Tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
branches:
|
6
|
+
- "*"
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
jobs:
|
11
|
+
test:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
strategy:
|
14
|
+
matrix:
|
15
|
+
ruby: ["2.7", "3.0"]
|
16
|
+
gemfile:
|
17
|
+
- rails_5_2
|
18
|
+
- rails_6_0
|
19
|
+
- rails_6_1
|
20
|
+
- rails_7
|
21
|
+
exclude:
|
22
|
+
- ruby: "3.0"
|
23
|
+
gemfile: "rails_5_2"
|
24
|
+
env:
|
25
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
26
|
+
BUNDLE_PATH_RELATIVE_TO_CWD: true
|
27
|
+
|
28
|
+
steps:
|
29
|
+
- uses: actions/checkout@master
|
30
|
+
|
31
|
+
- name: Set up Ruby
|
32
|
+
uses: ruby/setup-ruby@v1
|
33
|
+
with:
|
34
|
+
ruby-version: ${{ matrix.ruby }}
|
35
|
+
bundler: default
|
36
|
+
bundler-cache: true
|
37
|
+
- name: Run tests
|
38
|
+
run: |
|
39
|
+
bundle exec rspec
|
data/.travis.yml
CHANGED
@@ -1,16 +1,21 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.3.
|
4
|
-
- 2.4.
|
5
|
-
- 2.5.
|
3
|
+
- 2.3.8
|
4
|
+
- 2.4.7
|
5
|
+
- 2.5.6
|
6
|
+
- 2.6.4
|
6
7
|
gemfile:
|
7
|
-
- gemfiles/rails_4.2.gemfile
|
8
8
|
- gemfiles/rails_5.0.gemfile
|
9
9
|
- gemfiles/rails_5.1.gemfile
|
10
10
|
- gemfiles/rails_5.2.gemfile
|
11
11
|
- gemfiles/rails_5.2.1.gemfile
|
12
|
+
- gemfiles/rails_6.0.0.gemfile
|
12
13
|
- gemfiles/rails_master.gemfile
|
13
14
|
matrix:
|
14
15
|
allow_failures:
|
15
16
|
- gemfile: 'gemfiles/rails_master.gemfile'
|
16
|
-
|
17
|
+
- gemfile: gemfiles/rails_6.0.0.gemfile
|
18
|
+
rvm: 2.3.8
|
19
|
+
- gemfile: gemfiles/rails_6.0.0.gemfile
|
20
|
+
rvm: 2.4.7
|
21
|
+
before_install: gem install bundler -v '~> 2.0'
|
data/Appraisals
CHANGED
@@ -1,27 +1,22 @@
|
|
1
|
-
appraise 'rails-
|
2
|
-
gem 'rails', '~>
|
1
|
+
appraise 'rails-5-2' do
|
2
|
+
gem 'rails', '~> 5.2'
|
3
3
|
end
|
4
4
|
|
5
|
-
appraise 'rails-
|
6
|
-
gem 'rails', '
|
5
|
+
appraise 'rails-6-0' do
|
6
|
+
gem 'rails', '6.0.0'
|
7
7
|
end
|
8
8
|
|
9
|
-
appraise 'rails-
|
10
|
-
gem 'rails', '~>
|
9
|
+
appraise 'rails-6-1' do
|
10
|
+
gem 'rails', '~> 6.1'
|
11
11
|
end
|
12
12
|
|
13
|
-
appraise 'rails-
|
14
|
-
gem 'rails', '~>
|
13
|
+
appraise 'rails-7' do
|
14
|
+
gem 'rails', '~> 7.0'
|
15
15
|
end
|
16
16
|
|
17
|
-
appraise 'rails-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
gem 'arel', git: 'https://github.com/rails/arel.git', branch: 'master'
|
24
|
-
%w[rspec-core rspec-expectations rspec-mocks rspec-rails rspec-support].each do |lib|
|
25
|
-
gem lib, git: "https://github.com/rspec/#{lib}.git", branch: 'master'
|
26
|
-
end
|
27
|
-
end
|
17
|
+
# appraise 'rails-main' do
|
18
|
+
# gem 'rails', git: 'https://github.com/rails/rails.git', branch: 'main'
|
19
|
+
# %w[rspec-core rspec-expectations rspec-mocks rspec-rails rspec-support].each do |lib|
|
20
|
+
# gem lib, git: "https://github.com/rspec/#{lib}.git", branch: 'main'
|
21
|
+
# end
|
22
|
+
# end
|
data/CHANGELOG.md
CHANGED
@@ -3,29 +3,67 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
5
5
|
|
6
|
+
## Master
|
7
|
+
|
8
|
+
Not released
|
9
|
+
|
10
|
+
## 2.4.0
|
11
|
+
|
12
|
+
Released December 15th, 2021
|
13
|
+
|
14
|
+
- 🚫 Remove old appraisals for Rails 5.1.x and below (support will be removed in trix-rails 3.x)
|
15
|
+
- ✅ Add Appraisal configuration for Rails 7
|
16
|
+
- ✅ Relax gemspec to support Rails versions greater than 4.x
|
17
|
+
- ✅ Setup GitHub CI for running gem tests against Ruby 2.7 and 3.0
|
18
|
+
- 💪 Bump version to 2.4.0
|
19
|
+
|
20
|
+
## 2.3.0
|
21
|
+
|
22
|
+
Released December 6th, 2020
|
23
|
+
|
24
|
+
- ✅ Relax gemspec for Rails 6.1 and higher offical release.
|
25
|
+
- ✅ Add Appraisal configration for Rails 6.1.
|
26
|
+
- ✅ Upgrade to [Trix 1.3.1](https://github.com/basecamp/trix/releases/tag/1.3.1)
|
27
|
+
- 💪 Bump to version 2.3.0
|
28
|
+
|
29
|
+
## 2.2.0
|
30
|
+
|
31
|
+
Released September 13, 2019
|
32
|
+
|
33
|
+
- ✅ Upgrade to [Trix 1.2.0](https://github.com/basecamp/trix/releases/tag/1.2.0)
|
34
|
+
- 💪 Bump to version 2.2.0
|
35
|
+
- 🚫 Remove appraisals for Rails 4.2 (support will be removed in trix-rails 3.x)
|
36
|
+
|
37
|
+
## 2.1.0
|
38
|
+
|
39
|
+
Released September 9, 2019
|
40
|
+
|
41
|
+
- 🐛🔨 Add customizable input name for trix-editor in simple form ([#12](https://github.com/kylefox/trix/pull/12)). Thanks [@ptrr](https://github.com/ptrr)!
|
42
|
+
- 💪 Modify Gemspec to support Rails 6 ([#17](https://github.com/kylefox/trix/pull/17)). Thanks [@afomera](https://github.com/afomera)!
|
43
|
+
- 💪 Bump to version 2.1.0
|
44
|
+
|
6
45
|
## 2.0.0
|
7
46
|
|
8
47
|
Released September 29, 2018
|
9
48
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
49
|
+
- ✅ Upgrade to [Trix 1.0.0](https://github.com/basecamp/trix/releases/tag/1.0.0) 🎉
|
50
|
+
- ☝️ Note: following this project's [versioning policy](https://github.com/kylefox/trix/issues/4), the major version for `trix-rails` is likewise bumped when Trix receives a major version bump.
|
51
|
+
- 🐛🔨 simple_form helper outputs hidden input tag before trix editor tag ([#10](https://github.com/kylefox/trix/pull/10)). Thanks [@bensie](https://github.com/bensie)!
|
52
|
+
- 💪 Add appraisals for Rails 5.2.1
|
15
53
|
|
16
54
|
## 1.0.1
|
17
55
|
|
18
56
|
Released September 20, 2018
|
19
57
|
|
20
|
-
|
21
|
-
|
58
|
+
- ✅ Upgrade to Trix 0.12.1.
|
59
|
+
- 🐛🔨 Formtastic helper outputs hidden input tag before trix editor tag ([#9](https://github.com/kylefox/trix/pull/9)). Thanks [@ch000](https://github.com/ch000)!
|
22
60
|
|
23
61
|
## 1.0.0
|
24
62
|
|
25
63
|
Released September 2, 2018
|
26
64
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
65
|
+
- ✅ Bumped to version 1.0.0 — `trix-rails` version numbers are now independent of [Trix](https://github.com/basecamp/trix) itself. See [this issue](https://github.com/kylefox/trix/issues/4) for more detail.
|
66
|
+
- ✅ Upgrade to Trix 0.12.0.
|
67
|
+
- ✅ Added support for Ruby 2.5.1.
|
68
|
+
- 🚫 Dropped support for Ruby 2.2.
|
69
|
+
- 🐛🔨 Allow additional options when using simple_form ([#8](https://github.com/kylefox/trix/pull/8)). Thanks [@phylor](https://github.com/phylor)!
|
data/README.md
CHANGED
@@ -6,7 +6,9 @@ Want to include Basecamp's awesome [Trix WYSIWYG
|
|
6
6
|
editor](http://trix-editor.org) in your Ruby on Rails application?
|
7
7
|
You've come to the right place!
|
8
8
|
|
9
|
-
Compatible with Rails
|
9
|
+
Compatible with Rails 5.2 and up.
|
10
|
+
|
11
|
+
_Note: trix-rails 2.x is technically compatible with Rails 4.2 and up, but is no longer tested or maintained. Support for < Rails 5.2 will be dropped in trix-rails 3.x_
|
10
12
|
|
11
13
|
# Installation
|
12
14
|
|
@@ -83,15 +85,15 @@ For example:
|
|
83
85
|
will render:
|
84
86
|
|
85
87
|
```html
|
86
|
-
<trix-editor autofocus="true" data-coffee="delicious">
|
88
|
+
<trix-editor autofocus="true" data-coffee="delicious"></trix-editor>
|
87
89
|
```
|
88
90
|
|
89
91
|
# Contributing
|
90
92
|
|
91
93
|
Bug reports and feature requests are welcome. They're _much_ more likely to be addressed if they are accompanied by a pull request 😘
|
92
94
|
|
93
|
-
|
94
|
-
|
95
|
+
- [Report a bug](https://github.com/kylefox/trix/issues/new?template=bug_report.md)
|
96
|
+
- [Request a feature](https://github.com/kylefox/trix/issues/new?template=feature_request.md)
|
95
97
|
|
96
98
|
## Testing
|
97
99
|
|
@@ -2,7 +2,7 @@ module Trix
|
|
2
2
|
module SimpleForm
|
3
3
|
class TrixEditorInput < ::SimpleForm::Inputs::Base
|
4
4
|
def input(_wrapper_options)
|
5
|
-
trix_options = options.slice(:spellcheck, :toolbar, :tabindex)
|
5
|
+
trix_options = options.slice(:spellcheck, :toolbar, :tabindex, :input)
|
6
6
|
editor_options = { input: input_class, class: 'trix-content' }.merge(trix_options)
|
7
7
|
|
8
8
|
editor_tag = template.content_tag('trix-editor', '', editor_options)
|
data/lib/trix/version.rb
CHANGED
data/trix.gemspec
CHANGED
@@ -18,12 +18,12 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_runtime_dependency 'rails', '> 4.1'
|
21
|
+
spec.add_runtime_dependency 'rails', '> 4.1'
|
22
22
|
|
23
23
|
spec.add_development_dependency 'appraisal'
|
24
|
-
spec.add_development_dependency 'bundler', '~>
|
24
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
25
25
|
spec.add_development_dependency 'formtastic', '~> 3.0'
|
26
|
-
spec.add_development_dependency 'rake', '
|
26
|
+
spec.add_development_dependency 'rake', '>= 10.0'
|
27
27
|
spec.add_development_dependency 'rspec-activemodel-mocks'
|
28
28
|
spec.add_development_dependency 'rspec-rails'
|
29
29
|
spec.add_development_dependency 'rubocop', '0.35.1'
|