refinerycms-wymeditor 2.2.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d61d3ef826db978e0a0fa59cf29044cb2ebf25027efb4ff89d1b77906e885e3
4
- data.tar.gz: 4b89be565f8e0d92177d04797b38b73e0ddc04a910a6394c29215915784586b8
3
+ metadata.gz: 4cf82ac55ad6df4c5c63fcf711573086542f02880f1b7e573fdf6fb136b946d7
4
+ data.tar.gz: 9724b930c20a5ae8d0449691de5df60e0caa35b457aa730f6325ebea93d94f8a
5
5
  SHA512:
6
- metadata.gz: e6faad561967faf967737f06ba4f6c291bccb5aff04986847a10d064b6bcb8fe81a8f628f21f407d59031fc32d42d21fac4dde707f66f730c7b0a75f1922b515
7
- data.tar.gz: 32ab733c60ee79d5469375e43e322e412cc1aefff422cbe02bfb0382b89af82551e36d69ea0d07574619cf27250294147f4c0cb44ca688a36a12fc41176c925f
6
+ metadata.gz: 8f3e7376bca8860cff2d51b7dea404f9a7fb935da6a216642219fd082e953ab196c1c75c4e2af36ae58fff66c1c664fb582c3f29889297116f313efb06cce322
7
+ data.tar.gz: 846f6ab81a80e761f05b0696f89b99638d3024509c60afdae39a2249ff033dfca192e508fb6e0679cf376c0c132affc1da57eb4000153233945b12b5ec0b1e88
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -0,0 +1 @@
1
+ github: [parndt, bricesanchez]
@@ -0,0 +1,52 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+
9
+ jobs:
10
+ test:
11
+ strategy:
12
+ matrix:
13
+ database: [ mysql, postgresql ]
14
+ ruby: [ 2.7, 2.6 ]
15
+ fail-fast: false
16
+ max-parallel: 20
17
+ runs-on: ubuntu-latest
18
+
19
+ env:
20
+ CI: true
21
+ DB: ${{ matrix.database }}
22
+ MYSQL_PASSWORD: root
23
+ PGHOST: localhost
24
+ PGPASSWORD: runner
25
+ PGUSER: runner
26
+ RAILS_ENV: test
27
+ RETRY_COUNT: 3
28
+
29
+ name: rspec ${{ matrix.ruby }} ${{ matrix.database }}
30
+ steps:
31
+ - run: sudo apt-get update && sudo apt-get install libsqlite3-dev -y
32
+ - uses: actions/checkout@v2
33
+ - uses: ruby/setup-ruby@v1
34
+ with:
35
+ bundler-cache: true
36
+ ruby-version: ${{ matrix.ruby }}
37
+
38
+ - name: "Set up MySQL using VM's server"
39
+ if: ${{ env.DB == 'mysql' }}
40
+ run: |
41
+ sudo apt-get install libmysqlclient-dev -y
42
+ sudo systemctl start mysql.service
43
+
44
+ - name: "Set up PostgreSQL using VM's server"
45
+ if: ${{ env.DB == 'postgresql' }}
46
+ run: |
47
+ sudo apt-get install libpq-dev -y
48
+ sudo systemctl start postgresql.service
49
+ sudo -u postgres psql -c "CREATE USER runner WITH SUPERUSER PASSWORD 'runner'"
50
+
51
+ - run: bin/rake refinery:testing:dummy_app
52
+ - run: bin/rake
@@ -33,6 +33,7 @@
33
33
  *= require wymeditor/classes
34
34
  *= require wymeditor/validators
35
35
  *= require_tree ../wymeditor/browsers
36
+ *= require_tree ../wymeditor/lang
36
37
  *= require wymeditor/init_interface
37
38
  *= require refinery/boot_wym
38
39
  *= require_self
@@ -0,0 +1,11 @@
1
+ module AssetHelper
2
+ module_function
3
+
4
+ def asset_exists?(path)
5
+ if Rails.configuration.assets.compile
6
+ Rails.application.precompiled_assets.include? path
7
+ else
8
+ Rails.application.assets_manifest.assets[path].present?
9
+ end
10
+ end
11
+ end
@@ -5,7 +5,7 @@
5
5
  <meta charset='<%= ::Rails.application.config.encoding %>' />
6
6
  <meta httpequiv="XUACompatible" content="IE=edge,chrome=1" />
7
7
  <%= stylesheet_link_tag "wymeditor/skins/refinery/wymiframe", :media => "all" %>
8
- <%= stylesheet_link_tag "formatting", :media => "all" if Rails.application.assets.find_asset('formatting.css') %>
8
+ <%= stylesheet_link_tag "formatting", :media => "all" if AssetHelper.asset_exists?('formatting.css') %>
9
9
  <%= stylesheet_link_tag "theme", :media => "all" %>
10
10
  <%= javascript_include_tag 'modernizr-min' %>
11
11
  </head>
@@ -1,3 +1,6 @@
1
+ require 'refinery/wymeditor/engine'
2
+ require 'refinery/wymeditor/configuration'
3
+
1
4
  module Refinery
2
5
  module Wymeditor
3
6
  class << self
@@ -5,8 +8,5 @@ module Refinery
5
8
  @root ||= Pathname.new(File.expand_path('../../../', __FILE__))
6
9
  end
7
10
  end
8
-
9
- require 'refinery/wymeditor/engine'
10
- require 'refinery/wymeditor/configuration'
11
11
  end
12
12
  end
@@ -29,7 +29,7 @@ module Refinery
29
29
  Refinery::Core.config.register_visual_editor_stylesheet stylesheet
30
30
  end
31
31
 
32
- %W(refinery/wymeditor wymeditor/lang/#{::I18n.locale} wymeditor/skins/refinery/skin).each do |javascript|
32
+ %w(refinery/wymeditor wymeditor/skins/refinery/skin).each do |javascript|
33
33
  Refinery::Core.config.register_visual_editor_javascript javascript
34
34
  end
35
35
 
data/readme.md CHANGED
@@ -19,7 +19,7 @@ You can also switch to "source" view and edit HTML manually if the visual editor
19
19
  Simply put this in the Gemfile of your Refinery application:
20
20
 
21
21
  ```ruby
22
- gem 'refinerycms-wymeditor', ['~> 2.0', '>= 2.0.0']
22
+ gem 'refinerycms-wymeditor', ['~> 3.0', '>= 3.0.0']
23
23
  ```
24
24
 
25
25
  Now, run `bundle install`
@@ -3,7 +3,7 @@
3
3
  Gem::Specification.new do |s|
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.name = 'refinerycms-wymeditor'
6
- s.version = '2.2.0'
6
+ s.version = '3.0.0'
7
7
  s.summary = 'WYMeditor support for Refinery CMS'
8
8
  s.description = 'This extension adds WYMeditor support to Refinery CMS for visual editing.'
9
9
  s.email = 'gems@p.arndt.io'
@@ -5,7 +5,7 @@ module Refinery
5
5
  it "should render the wymiframe template" do
6
6
  get :wymiframe
7
7
 
8
- expect(response).to be_success
8
+ expect(response).to be_successful
9
9
  expect(response).to render_template(:wymiframe)
10
10
  end
11
11
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe 'wymeditor', :type => :feature do
3
+ describe 'wymeditor', type: :system do
4
4
  refinery_login
5
5
  # see https://github.com/refinery/refinerycms/pull/1583
6
6
  context "when switching locales" do
@@ -27,7 +27,7 @@ describe 'wymeditor', :type => :feature do
27
27
  page
28
28
  end
29
29
 
30
- specify "dialog has correct links", js: true do
30
+ specify "dialog has correct links", :js do
31
31
  visit refinery.edit_admin_page_path(about_page)
32
32
 
33
33
  find("#page_part_body .wym_tools_link a").click
@@ -5,7 +5,7 @@ module Refinery
5
5
 
6
6
  subject { Page.create title: "wymiframe" }
7
7
  it "treats wymiframe as a reserved word" do
8
- expect(subject.url[:path]).to eq(["wymiframe-page"])
8
+ expect(subject.url[:path]).to be_any {|f| f.start_with?("wymiframe-page")}
9
9
  end
10
10
 
11
11
  end
data/spec/spec_helper.rb CHANGED
@@ -7,28 +7,62 @@ require File.expand_path("../dummy/config/environment", __FILE__)
7
7
 
8
8
  require 'rspec/rails'
9
9
  require 'capybara/rspec'
10
+ require 'webdrivers/chromedriver'
11
+
12
+ if ENV['RETRY_COUNT']
13
+ require 'rspec/retry'
14
+ RSpec.configure do |config|
15
+ # rspec-retry
16
+ config.verbose_retry = true
17
+ config.default_sleep_interval = 0.33
18
+ config.clear_lets_on_failure = true
19
+ config.default_retry_count = ENV["RETRY_COUNT"]
20
+ end
21
+ end
10
22
 
11
23
  Rails.backtrace_cleaner.remove_silencers!
12
24
 
13
25
  RSpec.configure do |config|
14
26
  config.mock_with :rspec
15
27
  config.filter_run :focus => true
28
+ config.filter_run :js => true if ENV['JS'] == 'true'
29
+ config.filter_run :js => nil if ENV['JS'] == 'false'
16
30
  config.run_all_when_everything_filtered = true
17
- end
31
+ config.include ActionView::TestCase::Behavior, :file_path => %r{spec/presenters}
32
+ config.infer_spec_type_from_file_location!
18
33
 
19
- # set javascript driver for capybara
20
- require 'selenium-webdriver'
34
+ config.use_transactional_fixtures = true
21
35
 
22
- Capybara.register_driver :chrome do |app|
23
- Capybara::Selenium::Driver.new(app, :browser => :chrome)
24
- end
36
+ config.when_first_matching_example_defined(type: :system) do
37
+ config.before :suite do
38
+ # Preload assets
39
+ # This should avoid capybara timeouts, and avoid counting asset compilation
40
+ # towards the timing of the first feature spec.
41
+ Rails.application.precompiled_assets
42
+ end
43
+ end
44
+
45
+ config.before(:each) do
46
+ ::I18n.default_locale = I18n.locale = Mobility.locale = :en
47
+ end
48
+
49
+ config.before(:each, type: :system) do
50
+ driven_by :rack_test
51
+ end
52
+
53
+ config.before(:each, type: :system, js: true) do
54
+ driven_by :selenium, using: :headless_chrome, screen_size: [1400, 1080]
55
+ end
25
56
 
26
- Capybara.javascript_driver = :chrome
57
+ unless ENV['FULL_BACKTRACE']
58
+ config.backtrace_exclusion_patterns = %w(
59
+ rails actionpack railties capybara activesupport rack warden rspec actionview
60
+ activerecord dragonfly benchmark quiet_assets rubygems
61
+ ).map { |noisy| /\b#{noisy}\b/ }
62
+ end
27
63
 
28
- Capybara.configure do |config|
29
- config.default_max_wait_time = ENV['CAPYBARA_MAX_WAIT_TIME'] || 10 # seconds
30
- config.default_driver = :selenium
31
- config.server = :webrick
64
+ # Store last errors so we can run rspec with --only-failures
65
+ config.example_status_persistence_file_path = ".rspec_failures"
32
66
  end
33
67
 
34
68
  # Requires supporting files with custom matchers and macros, etc,
metadata CHANGED
@@ -1,40 +1,40 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-wymeditor
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Arndt
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIEMjCCApqgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQD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7tMQ5+DdHcqbu3SOAe1/VaaRk28J0CdPZS6Y60YuRqL17Zg2WOODiBkA9WE
34
- JjcyzdERZXsSPh+DT5PrllEbTNTZPbBcnAWjqdEWLtBIxD3JpgZHTmYP4I2ExAeu
35
- 2Oqsxsw30MIZnh2Cw/xLRkc1I50luA==
27
+ aW8wDQYJKoZIhvcNAQELBQADggGBANlxc4uAnkPC3zbztG7uZfBfn4HSuvv655Pa
28
+ UaYZ6hNETFrqg78mGs3PkFe2Ru7cVWwckbmH46aq50QoNnx4ClxT03vr03n76Jg1
29
+ 8WWHkf0+rcINFlbtIFcmcFrois5Ow3n7pH+xstDtzoWcbh41WwuZStNhrIYsnjAK
30
+ /ovz8D5JlboxceOpVLB/0NiqNEWltK+EMQHmX25Sqf/r5o5rAL9zwEKPFp1Y5X+z
31
+ t2jBjYt2ymr1eMWxux6e+N2uKZL4MblHawxvKlI8UHsIiV9xrc4BwlwlbitcvNIL
32
+ ZykdSlpTJd0Guy92iYjCJMC09tMRUNxiVBwD3jRGSeW9YAPIZGXIcVlm6srIRDjJ
33
+ o8wB6oOvHAkRXnntOo/4bBDH+ehmgvhh/O/mI+au6C0M430fv+ooH0w08LEXLx1k
34
+ e17ZNASZffbQRP09MH2GZ2AOlkildTX6looWRforZEZi+qamognrozd3MI5QHi1W
35
+ UAZUzHLrrFu7gnkFvLVpxOUf4ItOkA==
36
36
  -----END CERTIFICATE-----
37
- date: 2019-10-16 00:00:00.000000000 Z
37
+ date: 2021-07-14 00:00:00.000000000 Z
38
38
  dependencies:
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: refinerycms-core
@@ -62,7 +62,8 @@ executables: []
62
62
  extensions: []
63
63
  extra_rdoc_files: []
64
64
  files:
65
- - ".travis.yml"
65
+ - ".github/FUNDING.yml"
66
+ - ".github/workflows/main.yml"
66
67
  - app/assets/config/refinery_wymeditor_manifest.js
67
68
  - app/assets/images/wymeditor/skins/refinery/arrow_redo.png
68
69
  - app/assets/images/wymeditor/skins/refinery/arrow_undo.png
@@ -187,6 +188,7 @@ files:
187
188
  - app/assets/stylesheets/wymeditor/skins/refinery/wymiframe.css.scss
188
189
  - app/controllers/refinery/wymeditor_controller.rb
189
190
  - app/decorators/controllers/refinery/fast_controller_decorator.rb
191
+ - app/helpers/asset_helper.rb
190
192
  - app/views/refinery/admin/dialogs/show.html.erb
191
193
  - app/views/refinery/wymiframe.html.erb
192
194
  - bin/rails
@@ -196,7 +198,7 @@ files:
196
198
  - lib/refinery/wymeditor.rb
197
199
  - lib/refinery/wymeditor/configuration.rb
198
200
  - lib/refinery/wymeditor/engine.rb
199
- - lib/refinerycms-wymeditor.rb
201
+ - lib/refinerycms/wymeditor.rb
200
202
  - public/wymeditor/GPL-license.txt
201
203
  - public/wymeditor/MIT-license.txt
202
204
  - public/wymeditor/README
@@ -210,7 +212,7 @@ homepage: https://manuka.co
210
212
  licenses:
211
213
  - MIT
212
214
  metadata: {}
213
- post_install_message:
215
+ post_install_message:
214
216
  rdoc_options: []
215
217
  require_paths:
216
218
  - lib
@@ -225,8 +227,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
227
  - !ruby/object:Gem::Version
226
228
  version: '0'
227
229
  requirements: []
228
- rubygems_version: 3.0.3
229
- signing_key:
230
+ rubygems_version: 3.1.6
231
+ signing_key:
230
232
  specification_version: 4
231
233
  summary: WYMeditor support for Refinery CMS
232
234
  test_files:
metadata.gz.sig CHANGED
Binary file
data/.travis.yml DELETED
@@ -1,23 +0,0 @@
1
- language: ruby
2
- dist: trusty
3
- cache: bundler
4
- bundler_args: --without development
5
- addons:
6
- apt:
7
- packages:
8
- - google-chrome-stable
9
- before_script:
10
- - sh -e /etc/init.d/xvfb start
11
- - bin/rake refinery:testing:dummy_app
12
- - export DISPLAY=:99.0
13
- env:
14
- - DB=postgresql
15
- - DB=mysql
16
- notifications:
17
- webhooks:
18
- - https://webhooks.gitter.im/e/b5d48907cdc89864b874
19
- rvm:
20
- - 2.6.4
21
- - 2.5.6
22
- - 2.4.7
23
- sudo: false