Skip to content

Commit

Permalink
test againt 3 different versions of Ruby + update the doc + bump vers…
Browse files Browse the repository at this point in the history
…ion to 1.7.1
  • Loading branch information
did committed Mar 2, 2023
1 parent 1f59b18 commit 1b8ff39
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ language: ruby
services: mongodb
before_script: ./script/ci/before_build.sh
rvm:
- 2.7.4
- 2.7.7
- 3.0.5
- 3.1.3
addons:
code_climate:
repo_token: 3fa74f2ade25037fccd7261090acbdeae232639c3a83aafb80ee428ec16b8cf9
6 changes: 4 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
locomotivecms_steam (1.7.0)
locomotivecms_steam (1.7.1)
RedCloth (~> 4.3.2)
bcrypt (~> 3.1.11)
chronic (~> 0.10.2)
Expand Down Expand Up @@ -114,6 +114,8 @@ GEM
nokogiri (1.14.2)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.14.2-x86_64-darwin)
racc (~> 1.4)
origin (2.3.1)
pony (1.13.1)
mail (>= 2.0)
Expand All @@ -122,7 +124,7 @@ GEM
nio4r (~> 2.0)
racc (1.6.2)
rack (2.2.3.1)
rack-cache (1.7.2)
rack-cache (1.13.0)
rack (>= 0.4)
rack-mini-profiler (0.10.7)
rack (>= 1.2.0)
Expand Down
2 changes: 1 addition & 1 deletion MIT-LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 NoCoffee
Copyright (c) 2023 NoCoffee

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The rendering stack used by both Wagon and Engine. It includes:

- the rack stack to serve assets (SCSS, Coffeescript, ...etc) and pages.
- the rack stack to pages and already precompiled assets (through webpack, vite or other).
- the liquid drops/filters/tags libs to parse and render liquid templates.
- a Filesystem adapter which reads the source of a site written for Wagon.
- a MongoDB adapter which reads an existing site hosted by the Locomotive Engine.
Expand Down Expand Up @@ -103,4 +103,4 @@ Note: you do not need to prefix with bundle exec as the docky-ruby image already

## License

Copyright (c) 2020 NoCoffee. MIT Licensed, see MIT-LICENSE for details.
Copyright (c) 2023 NoCoffee. MIT Licensed, see MIT-LICENSE for details.
2 changes: 1 addition & 1 deletion lib/locomotive/steam/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# 1.0.0.alpha < 1.0.0.alpha1 < 1.0.0.beta < 1.0.0.beta2 < 1.0.0.beta11 < 1.0.0.rc1 < 1.0.0
module Locomotive
module Steam
VERSION = '1.7.0'
VERSION = '1.7.1'
end
end
8 changes: 4 additions & 4 deletions spec/unit/middlewares/cache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@

let(:response) { nil }

before { expect(cache).to receive(:read).with('57f157d0981a09b1565fb31f250229d4').and_return(response) }
before { expect(cache).to receive(:read).with('40ba2b3cfde6e2f8539c9ffa02fab139').and_return(response) }

context 'the cache is empty' do

before { expect(cache).to receive(:write).with('57f157d0981a09b1565fb31f250229d4', Marshal.dump([200, {}, ["Hello world!"]])) }
before { expect(cache).to receive(:write).with('40ba2b3cfde6e2f8539c9ffa02fab139', Marshal.dump([200, {}, ["Hello world!"]])) }

it 'tells the CDN to cache the page and also cache it internally' do
is_expected.to eq ['max-age=0, s-maxage=3600, public, must-revalidate', 'Accept-Language']
Expand All @@ -69,7 +69,7 @@

subject { send_request[:env]['steam.cache_etag'] }

it { is_expected.to eq '57f157d0981a09b1565fb31f250229d4' }
it { is_expected.to eq '40ba2b3cfde6e2f8539c9ffa02fab139' }

end

Expand Down Expand Up @@ -104,7 +104,7 @@

context 'based on the ETag' do

let(:etag) { '57f157d0981a09b1565fb31f250229d4' }
let(:etag) { '40ba2b3cfde6e2f8539c9ffa02fab139' }

it 'returns a 304 (Not modified) without no cache headers' do
expect(subject.first).to eq 304
Expand Down

0 comments on commit 1b8ff39

Please sign in to comment.