Skip to content
Permalink
master

Commits on Sep 2, 2020

  1. Migrate to GitHub Actions for CI (#3444)

    I decided to move our continuous integration to GitHub Actions.
    parndt committed Sep 2, 2020

Commits on Aug 31, 2020

  1. Total rewrite (#3467)

    This elaborates on many of the aspects of S3 configuration.
    jussihirvi committed Aug 31, 2020
  2. fix fragment caching for deleting page (#3480)

    Hey,
    
    we discovered some strange behaviour in our live application. If an refinery admin deletes a specific page, the fragment caching cannot resolve the caching to the right pages. We found a specific setup which always fails. You can see it in the Test Setup section. The main problem is, that we can't reproduce it in the refinery spec tests. To fix this issue, we updated the collection caching part. 
    
    In the Error Output ActiveSupport::Cache.retrieve_cache_key section you can see the strange behaviour of mapping the cache to the wrong refinery_page.
    
    
    ## Test Setup
    
    ```ruby
        setup do
          # delete all refinery pages and create a root page
          ensure_only_homepage!
    
          page_first = Refinery::Page.root
          page_second = create(:refinery_page, title: 'Parent Page second')
          
          page_second.children.create(title: 'Second Parent Page First Child')
          page_second.children.create(title: 'Second Parent Page Second Child')
    
          @delete_me = page_first.children.create(title: 'Delete Me Page')
    
          sign_in_to_cms
        end
    
        should 'delete an existing page' do
          with_caching do
            visit refinery.admin_pages_path
    
            refinery_page = @delete_me
            assert has_content? refinery_page.title
            find("#page_#{refinery_page.id} .delete_icon", match: :first).click
            page.accept_alert
    
            Refinery::Page.all.map(&:title).uniq.each do |title|
              next if title.blank?
              assert has_no_text?(title, minimum: 2)
            end
          end
        end
    ```
    
    ## Error Output ActiveSupport::Cache.retrieve_cache_key
    
    ```ruby
    # ActiveSupport::Cache.send(:retrieve_cache_key, child_page.self_and_descendants)
    # -> "refinery/pages/query-0dee4f65ed115ac80776d3631787c654-1-20200728075715363993"
    # pages/app/views/refinery/admin/pages/_page.html.erb:51
    <%= render(partial: 'page', collection: page.children, cached: ->(child_page) { child_page.self_and_descendants }) if Refinery::Pages.auto_expand_admin_tree %>
    ```
    
    "Delete Me Page"
    "refinery/pages/query-0dee4f65ed115ac80776d3631787c654-1-20200728075715363993"
    **"Second Parent Page First Child"
    "refinery/pages/query-a20646e1c9e01c14baa0dc202ef92914-1-20200728075715368561"**
    "Second Parent Page Second Child"
    "refinery/pages/query-001604e0b0207ef77654cb87e68984c5-1-20200728075715368561"
    "Second Parent Page First Child"
    "refinery/pages/query-5d256fce3841f5fcfe02f103c76909d9-1-20200728075715368561"
    **"Second Parent Page Second Child"
    "refinery/pages/query-a20646e1c9e01c14baa0dc202ef92914-1-20200728075715368561"**
    
    ![Caching Error](https://i.ibb.co/my2PL19/caching-error.png)
    
    ## Solved Caching Issue
    
    ```ruby
    # ActiveSupport::Cache.send(:retrieve_cache_key, child_page.self_and_descendants.to_a)
    # -> "refinery/pages/692-20200728080256269998"
    # pages/app/views/refinery/admin/pages/_page.html.erb:51
    <%= render(partial: 'page', collection: page.children, cached: ->(child_page) { child_page.self_and_descendants.to_a }) if Refinery::Pages.auto_expand_admin_tree %>
    ```
    
    
    "Delete Me Page"
    "refinery/pages/692-20200728080256269998"
    "Second Parent Page First Child"
    "refinery/pages/690-20200728080256281249"
    "Second Parent Page Second Child"
    "refinery/pages/691-20200728080256281249"
    "Second Parent Page First Child"
    "refinery/pages/690-20200728080256281249"
    "Second Parent Page Second Child"
    "refinery/pages/691-20200728080256281249"
    
    ![Caching Fixed](https://i.ibb.co/VTRXZ4G/caching-success.png)
    
    ### CachingHelper to reproduce the error
    
    ```ruby
    module CachingHelper
      def with_caching
        cache_store_type_origin = Rails.application.config.cache_store
        cache_store_origin = Rails.cache
        Rails.application.config.cache_store = [
          :memory_store, {:size => 64.megabytes }
        ]
        Rails.cache = ActiveSupport::Cache::MemoryStore.new(
          :expires_in => 1.minute
        )
        ActionController::Base.perform_caching = true
        yield
      ensure
        Rails.cache.clear
        Rails.cache = cache_store_origin
        Rails.application.config.cache_store = cache_store_type_origin
        ActionController::Base.perform_caching = false
      end
    end
    ```
    Philwi committed Aug 31, 2020

Commits on Aug 28, 2020

  1. Add Github sponsors (#3461)

    This adds buttons on the repository's page to help us with
    funding to spend time on the project.
    bricesanchez committed Aug 28, 2020

Commits on May 10, 2020

  1. Update gemspec files, and signing certificate (#3475)

    Many aspects of the gemspec files were out of date, so I've let rubocop make
    any changes that it wants to make.
    
    I've taken the opportunity to update to my current gem signing identify,
    and to more accurately represent `authors`.
    parndt committed May 10, 2020
  2. Revert "GitBook: [master] 2 pages modified" (#3474)

    This reverts commit db8bb6b.
    
    This introduced a `README.md` which conflicts with our existing `readme.md`
    and was pushed directly to master.
    parndt committed May 10, 2020

Commits on Apr 7, 2020

  1. GitBook: [master] 2 pages modified

    bricesanchez authored and gitbook-bot committed Apr 7, 2020
    2

Commits on Mar 3, 2020

  1. Upgrade Refinery version to v4

    daveharris authored and bricesanchez committed Mar 3, 2020

Commits on Dec 19, 2019

Commits on Dec 18, 2019

  1. remove blank lines

    parndt authored and bricesanchez committed Dec 18, 2019
  2. Update template address

    parndt authored and bricesanchez committed Dec 18, 2019
  3. Add Heroku button

    bricesanchez committed Dec 18, 2019

Commits on Nov 27, 2019

  1. Add collection caching page links

    Change proposed by @evenreven
    evenreven authored and bricesanchez committed Nov 27, 2019
  2. Fix the configuration for Dragonfly so you can use the before_s… (#3451)

    This fixes an issue with setting the `Dragonfly` configuration for `before_serve`. It looked like before it was a simple attr_accessor, but since `before_serve` is more like a DSL it was expecting to be called with a block. This PR corrects that, and I'm able to confirm it works on my project.
    
    The good news is this also solves another use case, serving private content. If you look at this Google Groups post from a few years ago, it appears my client isn't alone in wanting this feature. https://groups.google.com/forum/#!searchin/refinery-cms/dragonfly$20before_serve%7Csort:date/refinery-cms/lRBOsddSzHM/1tXNjzaHcBUJ
    joebutler2 authored and parndt committed Nov 27, 2019

Commits on Nov 10, 2019

  1. Update slovak locale files

    Martin Markech authored and bricesanchez committed Nov 10, 2019

Commits on Nov 7, 2019

  1. Fix `render file:` deprecation warning (#3454)

    DEPRECATION WARNING: render file: should be given the absolute path to a file
    
    We were giving it an absolute path, but removing the `.html` so it was causing
    a deprecation warning to be shown while running this code.
    parndt committed Nov 7, 2019

Commits on Nov 6, 2019

  1. Only run CI for pull request, and push to master (#3455)

    This will result in a lot less waiting around for pull request checks.
    parndt committed Nov 6, 2019
  2. Fetch Dragonfly S3 credentials safely (#3453)

    Sometimes `Rails.application` is `nil`, like when we haven't generated
    a dummy app yet.  This change will avoid calling `credentials` on `nil`.
    parndt committed Nov 6, 2019
  3. refinerycms-dragonfly 1.0.1 was November, 2018

    Since commit 575c8be
    parndt committed Nov 6, 2019

Commits on Oct 21, 2019

  1. Get S3 credentials from the encrypted credentials file instead of ENV (

    …#3436)
    
    With the introduction of `config/credentials.yml.enc` we can avoid using ENV to store what should be secure keys.
    
    Notes:
    
    - `bucket_name` and `region` aren't strictly security keys, but they seems to belong with the other keys here
    -  We could continue to use ENV  as an alternative to credentials. However once people have to create a credentials or secrets file, they may as well include their s3 keys in it.
    anitagraham authored and parndt committed Oct 21, 2019
  2. images: Change "whitelisted" to "allowed" in configuration. (#3440)

    The terms had been changed in some comments but not in the configuration.
    
    Also made the message for invalid mime-type more specific: 
    
    was `'Your image must be either a JPG, PNG or GIF'`
    now: `'Your image type is '%{actual}' but must be one of %{valid_types}'`
    
    For example: "Your image type is 'application/pdf' but must be one of image/jpeg, image/png, image/gif or image/tiff"
    anitagraham authored and parndt committed Oct 21, 2019
  3. Remove spring (#3449)

    We don't get a lot of value from including this
    parndt committed Oct 21, 2019
  4. Use config.s3_datastore? to test for s3_data_store (#3435)

    I found that `s3_datastore` only works if it is set explicitly, but `s3_datastore?` is true whenever the access_key and access_secret are both set. I think this is a better approach, and the existence of `s3_datastore(no question mark)` probably an oversight of mine.
    anitagraham authored and parndt committed Oct 21, 2019

Commits on Oct 20, 2019

  1. Use rspec-rails gem instead of git source (#3448)

    Fixes:
    
    >Revision 4-0-dev does not exist in the repository https://github.com/rspec/rspec-rails. Maybe you misspelled it?
    parndt committed Oct 20, 2019
Older