Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nebulab/renderful
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.0
Choose a base ref
...
head repository: nebulab/renderful
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.2.0
Choose a head ref
  • 20 commits
  • 24 files changed
  • 1 contributor

Commits on Jun 13, 2019

  1. Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    5325981 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    2bdbfdb View commit details

Commits on Jan 15, 2020

  1. Ignore Gemfile.lock

    aldesantis committed Jan 15, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    b8456f1 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    35d10f1 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    0f02576 View commit details
  4. Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    54808ad View commit details
  5. Remove Hound

    Hound is problematic because it forces us to run checks with their
    own versions of RuboCop and its plugins, as well as preventing us
    from having more complex configurations.
    aldesantis committed Jan 15, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    f8aa67e View commit details
  6. Run linters in CircleCI

    aldesantis committed Jan 15, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    a01dfe7 View commit details
  7. Upgrade to Bundler 2

    aldesantis committed Jan 15, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    c44628d View commit details
  8. Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    c75eb17 View commit details
  9. Fix coding style issues

    aldesantis committed Jan 15, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    d51f8ff View commit details

Commits on Jan 16, 2020

  1. Merge pull request #6 from nebulab/infrastructure-update

    Update linting and testing infrastructure
    aldesantis authored Jan 16, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    746ea33 View commit details
  2. Add support for Rails 6

    aldesantis committed Jan 16, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    e039f2f View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    942e912 View commit details
  4. Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    0778f1b View commit details
  5. Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    6ee7482 View commit details
  6. Fix dependency caching in CircleCI

    CircleCI will not overwrite a cache key that already exists, so we
    need to ensure cache keys are unique. Otherwise, adding new gems
    will make the build fail because they won't be installed.
    aldesantis committed Jan 16, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    0e46de3 View commit details
  7. Merge pull request #5 from nebulab/rails-6

    Add support for Rails 6
    aldesantis authored Jan 16, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2564210 View commit details

Commits on Jan 17, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    ddaeaed View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    aldesantis Alessandro Desantis
    Copy the full SHA
    87f08aa View commit details
51 changes: 44 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
version: 2
jobs:
build:
setup:
docker:
- image: circleci/ruby:2.6.2
- image: circleci/ruby:2.7.0
environment:
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
@@ -11,22 +10,60 @@ jobs:
- checkout
- restore_cache:
keys:
- renderful-v1-{{ checksum "Gemfile.lock" }}
- renderful-v1-{{ .Branch }}-{{ .Revision }}
- renderful-v1-{{ .Branch }}
- renderful-v1-
- run:
name: Bundle Install
command: bundle check || bundle install
- save_cache:
key: renderful-v1-{{ checksum "Gemfile.lock" }}
key: renderful-v1-{{ .Branch }}-{{ .Revision }}
paths:
- vendor/bundle

test:
docker:
- image: circleci/ruby:2.7.0
environment:
BUNDLE_PATH: vendor/bundle
steps:
- checkout
- restore_cache:
keys:
- renderful-v1-{{ .Branch }}-{{ .Revision }}
- run:
name: Run rspec in parallel
name: Run RSpec
command: |
bundle exec rspec --profile 10 \
bundle exec appraisal rspec --profile 10 \
--format RspecJunitFormatter \
--out test_results/rspec.xml \
--format progress \
$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
- store_test_results:
path: test_results

lint:
docker:
- image: circleci/ruby:2.7.0
environment:
BUNDLE_PATH: vendor/bundle
steps:
- checkout
- restore_cache:
keys:
- renderful-v1-{{ .Branch }}-{{ .Revision }}
- run:
name: Run RuboCop
command: bundle exec rubocop

workflows:
version: 2
test-and-lint:
jobs:
- setup
- test:
requires:
- setup
- lint:
requires:
- setup
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.rspec_status
Gemfile.lock
gemfiles/*.lock
5 changes: 0 additions & 5 deletions .hound.yml

This file was deleted.

10 changes: 9 additions & 1 deletion .rubocop-https---relaxed-ruby-style-rubocop-yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Relaxed.Ruby.Style
## Version 2.2
## Version 2.4

Style/Alias:
Enabled: false
@@ -65,6 +65,10 @@ Style/NegatedWhile:
Enabled: false
StyleGuide: https://relaxed.ruby.style/#stylenegatedwhile

Style/NumericPredicate:
Enabled: false
StyleGuide: https://relaxed.ruby.style/#stylenumericpredicate

Style/ParallelAssignment:
Enabled: false
StyleGuide: https://relaxed.ruby.style/#styleparallelassignment
@@ -121,6 +125,10 @@ Style/TrailingCommaInHashLiteral:
Enabled: false
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainhashliteral

Style/SymbolArray:
Enabled: false
StyleGuide: http://relaxed.ruby.style/#stylesymbolarray

Style/WhileUntilModifier:
Enabled: false
StyleGuide: https://relaxed.ruby.style/#stylewhileuntilmodifier
18 changes: 2 additions & 16 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
inherit_from:
- https://relaxed.ruby.style/rubocop.yml

require: rubocop-rspec
AllCops:
TargetRubyVersion: 2.4

Metrics/BlockLength:
Enabled: false

Layout/IndentHash:
EnforcedStyle: consistent

RSpec/ExampleLength:
Enabled: false

Layout/ClosingParenthesisIndentation:
Enabled: false

Layout/FirstParameterIndentation:
EnforcedStyle: consistent

RSpec/NestedGroups:
Enabled: false
9 changes: 9 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

appraise 'rails-5-2' do
gem 'rails', '~> 5.2.0'
end

appraise 'rails-6-0' do
gem 'rails', '~> 6.0.0'
end
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -7,4 +7,17 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

[Unreleased]: https://github.com/nebulab/renderful
### Added

- Added support for Rails 6 ([#5](https://github.com/nebulab/renderful/pull/5))

### Fixed

- Fixed linked entries not being invalidated ([5325981](https://github.com/nebulab/renderful/commit/5325981b6ed093407712e16e9937d86f92cdbab0))

## [0.1.0] (2019-06-08)

First public release.

[Unreleased]: https://github.com/nebulab/renderful/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/nebulab/renderful/tree/v0.1.0
190 changes: 0 additions & 190 deletions Gemfile.lock

This file was deleted.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -172,13 +172,20 @@ This is how you could use it in a Rails controller:

```ruby
class ContentfulWebhooksController < ApplicationController
skip_before_action :verify_authenticity_token

def create
Renderful::CacheInvalidator.new(RenderfulClient).process_webhook(request.raw_post)
head :no_content
end
end
```

The cache invalidator will not only invalidate the cache for the entry that has been updated, but
also for any entries linking to it, so that they are re-rendered. This is very useful, for instance,
if you have a `Page` entry type that contains references to many UI components - when one of the
components is updated, you want the page to be re-rendered.

### Rails integration

If you are using Ruby on Rails and you want to use ERB instead of including HTML in your renderers,
9 changes: 9 additions & 0 deletions config.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

require "rubygems"
require "bundler"

Bundler.require :default, :development

Combustion.initialize! :all
run Combustion::Application
Loading