From f1c2cbf5eca2e6aa4eaf17f6a4d98b76b88c833b Mon Sep 17 00:00:00 2001 From: Mattia Roccoberton Date: Wed, 19 May 2021 08:58:32 +0200 Subject: [PATCH 1/3] Add Github Actions specs --- .github/workflows/specs.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/specs.yml diff --git a/.github/workflows/specs.yml b/.github/workflows/specs.yml new file mode 100644 index 0000000..beecb81 --- /dev/null +++ b/.github/workflows/specs.yml @@ -0,0 +1,35 @@ +name: Specs + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + ruby: ['2.5', '2.6', '2.7'] + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: Run tests + run: bundle exec rake + + - name: Archive screenshots for failed tests + uses: actions/upload-artifact@v2 + if: failure() + with: + name: test-failed-screenshots + path: spec/dummy/tmp/screenshots From c237980ab13350e9c50be361e356f8c27c43aeda Mon Sep 17 00:00:00 2001 From: Mattia Roccoberton Date: Wed, 19 May 2021 09:06:06 +0200 Subject: [PATCH 2/3] Remove CircleCI config --- .circleci/config.yml | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index cff75ad..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,33 +0,0 @@ -version: 2.1 -orbs: - ruby: circleci/ruby@0.1.2 - -jobs: - build: - docker: - - image: circleci/ruby:2.6.6-stretch-node-browsers - executor: ruby/default - steps: - - checkout - - restore_cache: - key: gem-cache-{{ checksum "activeadmin_medium_editor.gemspec" }} - - run: - name: Setup Bundler - command: gem install bundler - - run: - name: Bundle Install - command: bundle install --path vendor/bundle - - save_cache: - key: gem-cache-{{ checksum "activeadmin_medium_editor.gemspec" }} - paths: vendor/bundle - - run: - name: Run Specs - command: | - bin/rspec \ - --profile 10 \ - --format RspecJunitFormatter \ - --out test_results/rspec.xml \ - --format progress \ - $(circleci tests glob "spec/**/*_spec.rb") - - store_test_results: - path: test_results From 037d0d8d993dd4060256a5447481ff334271295e Mon Sep 17 00:00:00 2001 From: Mattia Roccoberton Date: Wed, 19 May 2021 09:07:57 +0200 Subject: [PATCH 3/3] Update the specs badge --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a658e52..b4ccd64 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Active Admin Medium Editor [![Gem Version](https://badge.fury.io/rb/activeadmin_medium_editor.svg)](https://badge.fury.io/rb/activeadmin_medium_editor) [![CircleCI](https://circleci.com/gh/blocknotes/activeadmin_medium_editor.svg?style=svg)](https://circleci.com/gh/blocknotes/activeadmin_medium_editor) +# Active Admin Medium Editor [![Gem Version](https://badge.fury.io/rb/activeadmin_medium_editor.svg)](https://badge.fury.io/rb/activeadmin_medium_editor) [![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) An Active Admin plugin to use [medium-editor](https://github.com/yabwe/medium-editor), a compact and clean WYSIWYG editor. @@ -7,11 +7,13 @@ An Active Admin plugin to use [medium-editor](https://github.com/yabwe/medium-ed ![screenshot](screenshot.png) ## Usage + - After the installation, select some text in the editor - A pop-up menu is shown with the available buttons - Click on a button and the effect will be applied to the selected text ## Install + - After installing Active Admin, add to your Gemfile: `gem 'activeadmin_medium_editor'` (and execute *bundle*) - Add at the end of your Active Admin styles (_app/assets/stylesheets/active_admin.scss_): ```scss @@ -57,13 +59,16 @@ f.input :description, as: :medium_editor, input_html: { data: { options: { toolb For details about the buttons' effect please refer to medium-editor documentation. ## Do you like it? Star it! + 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). Or consider offering me a coffee, it's a small thing but it is greatly appreciated: [about me](https://www.blocknot.es/about-me). ## Contributors + - [Mattia Roccoberton](http://blocknot.es): author - The good guys that opened issues and pull requests from time to time ## License + The gem is available as open-source under the terms of the [MIT](LICENSE.txt).