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

bump to v0.11.2 and add 5.2 support #62

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
/spec/reports/
/tmp/
/gemfiles/*.gemfile.lock
/gemfiles/.bundle/
.ruby-version
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ gemfile:
- gemfiles/rails_4.2.gemfile
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
- gemfiles/rails_master.gemfile
matrix:
allow_failures:
Expand Down
4 changes: 4 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ appraise "rails-5.1" do
gem "rails", "~> 5.1.0"
end

appraise "rails-5.2" do
gem "rails", "~> 5.2.0"
end

appraise "rails-master" do
gem "rails", git: "https://github.com/rails/rails.git", branch: "master"
gem "arel", git: "https://github.com/rails/arel.git", branch: "master"
Expand Down
7 changes: 7 additions & 0 deletions gemfiles/rails_5.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rails", "~> 5.2.0"

gemspec :path => "../"
7 changes: 6 additions & 1 deletion lib/trix/form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ def render
options = @options.stringify_keys
add_default_name_and_id(options)
options['input'] ||= dom_id(object, [options['id'], :trix_input].compact.join('_'))
trix_editor_tag(options.delete('name'), value_before_type_cast(object), options)
if Rails.version >= '5.2.0'
value = options.delete('value') { value_before_type_cast }
else
value = value_before_type_cast(object)
end
trix_editor_tag(options.delete('name'), value, options)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/trix/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Trix
VERSION = '0.11.1'.freeze
VERSION = '0.11.2'.freeze
end
4 changes: 2 additions & 2 deletions trix.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.add_runtime_dependency 'rails', ['> 4.1', '< 5.2']
spec.add_runtime_dependency 'rails', ['> 4.1', '<= 6.0']

spec.add_development_dependency 'appraisal'
spec.add_development_dependency 'bundler', '~> 1.10'
spec.add_development_dependency 'formtastic', '~> 3.0'
spec.add_development_dependency 'simple_form', '~> 3.5'
spec.add_development_dependency 'simple_form', '~> 4.0'
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'rspec-rails'
spec.add_development_dependency 'rspec-activemodel-mocks'
Expand Down
18 changes: 9 additions & 9 deletions vendor/assets/javascripts/trix.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions vendor/assets/stylesheets/trix.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@charset "UTF-8";
/*
Trix 0.11.1
Copyright © 2017 Basecamp, LLC
Trix 0.11.2
Copyright © 2018 Basecamp, LLC
http://trix-editor.org/*/
trix-editor {
border: 1px solid #bbb;
Expand Down Expand Up @@ -209,7 +209,6 @@ trix-editor .attachment__remove--icon {
height: 1.8em;
line-height: 1.8em;
border-radius: 50%;
text-indent: -9999px;
background-color: #fff;
border: 2px solid highlight;
box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25); }
Expand Down