Skip to content

Commit

Permalink
Merge branch 'chore/create_stable_local_environment' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
maisiembleton committed Dec 13, 2024
2 parents 98a16ef + ec4e628 commit 2f3a4c9
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.10
2.7.7
12 changes: 11 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
source 'https://rubygems.org'

# we still need BigDecimal.new for ActiveSupport 4.x
gem 'bigdecimal', '~> 1.4'

gem 'rake'
gem 'middleman', '~> 3.4.1'
gem 'middleman-livereload'
gem 'middleman-s3_sync'
gem 'middleman-cloudfront'
gem 'middleman-cloudfront', '0.2.1'
gem 'middleman-autoprefixer'
gem 'middleman-minify-html'
gem 'middleman-sprockets'
gem "middleman-es6", git: "https://github.com/vast/middleman-es6"
gem 'uglifier'
gem 'contentful', '~> 2.13.0'
gem "contentful_middleman", '~> 2.1.2'
gem 'middleman-syntax'

Expand All @@ -27,9 +31,15 @@ gem 'stopwords-filter', require: 'stopwords'
# ensure we have secure version
gem 'nokogiri', '>= 1.10.8'

# debugging tools
# gem 'debug'
# gem 'binding_of_caller'

# tests
group :test do
gem 'capybara'
gem 'ffi', '~> 1.16.3'
gem 'selenium-webdriver', '~> 3.0'
gem 'capybara-selenium'
gem 'chromedriver-helper' # for headless chrome
gem 'rspec'
Expand Down
43 changes: 25 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
ansi (1.5.0)
archive-zip (0.12.0)
io-like (~> 0.3.0)
Expand All @@ -31,6 +31,7 @@ GEM
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
bigdecimal (1.4.4)
builder (3.2.2)
capybara (2.4.4)
mime-types (>= 1.16)
Expand Down Expand Up @@ -64,8 +65,8 @@ GEM
sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
contentful (2.5.0)
http (> 0.8, < 3.0)
contentful (2.13.3)
http (> 0.8, < 5.0)
multi_json (~> 1)
contentful-webhook-listener (0.3.0)
contentful_middleman (2.1.3)
Expand All @@ -74,16 +75,18 @@ GEM
middleman-core (~> 3.4)
crass (1.0.6)
diff-lcs (1.4.4)
domain_name (0.5.20170404)
unf (>= 0.0.5, < 1.0.0)
domain_name (0.6.20240107)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
erubis (2.7.0)
eventmachine (1.2.0.1)
excon (0.71.0)
execjs (2.7.0)
ffi (1.9.25)
ffi (1.16.3)
ffi-compiler (1.3.2)
ffi (>= 1.15.5)
rake
fission (0.5.0)
CFPropertyList (~> 2.2)
fog (1.38.0)
Expand Down Expand Up @@ -233,14 +236,16 @@ GEM
hooks (0.4.1)
uber (~> 0.0.14)
htmlcompressor (0.2.0)
http (2.2.2)
http (4.4.1)
addressable (~> 2.3)
http-cookie (~> 1.0)
http-form_data (~> 1.0.1)
http_parser.rb (~> 0.6.0)
http-cookie (1.0.3)
http-form_data (~> 2.2)
http-parser (~> 1.2.0)
http-cookie (1.0.7)
domain_name (~> 0.5)
http-form_data (1.0.3)
http-form_data (2.3.0)
http-parser (1.2.3)
ffi-compiler (>= 1.0, < 2.0)
http_parser.rb (0.6.0)
i18n (0.7.0)
inflecto (0.0.2)
Expand Down Expand Up @@ -317,7 +322,7 @@ GEM
mime-types-data (3.2016.0521)
mini_portile2 (2.8.0)
minitest (5.10.1)
multi_json (1.13.1)
multi_json (1.15.0)
nenv (0.3.0)
nokogiri (1.13.6)
mini_portile2 (~> 2.8.0)
Expand All @@ -335,7 +340,7 @@ GEM
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (4.0.6)
public_suffix (5.1.1)
racc (1.6.0)
rack (1.6.12)
rack-livereload (0.3.16)
Expand Down Expand Up @@ -399,9 +404,7 @@ GEM
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
unf (0.2.0)
xml-simple (1.1.5)
xpath (2.0.0)
nokogiri (~> 1.3)
Expand All @@ -411,14 +414,17 @@ PLATFORMS

DEPENDENCIES
aws-s3
bigdecimal (~> 1.4)
capybara
capybara-selenium
chromedriver-helper
contentful (~> 2.13.0)
contentful_middleman (~> 2.1.2)
ffi (~> 1.16.3)
guard-rspec
middleman (~> 3.4.1)
middleman-autoprefixer
middleman-cloudfront
middleman-cloudfront (= 0.2.1)
middleman-es6!
middleman-livereload
middleman-minify-html
Expand All @@ -431,6 +437,7 @@ DEPENDENCIES
rails-html-sanitizer
rake
rspec
selenium-webdriver (~> 3.0)
stopwords-filter
string-urlize
uglifier
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Built with Middleman, Contentful, and Lunr.js search.
### To Deploy Locally:
- Be able to run locally first.
- Run tests: `$ bundle exec rspec spec`
- Those will only work fully after having downloaded content (via `middleman contentful` below and building the site via `middleman build` below)
- Set `APP_ENV` to either `production` or `staging` with your target; defaults to `staging`.
- Download from Contentful: `$ bundle exec middleman contentful`
- Build Static HTML to deploy: `$ bundle exec middleman build --verbose`
Expand Down
8 changes: 6 additions & 2 deletions mappers/help/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ def map(context, entry)
super

# Adds a "content available in locales" field to the page; NOTE: 'en' is available in all locales.
context.content_langs = context&.content&.keys
context.content_langs = ['en'] if context.content_langs.blank?
begin
context.content_langs = context&.content&.keys
context.content_langs = ['en'] if context.content_langs.blank?
rescue KeyError
context.content_langs = ['en']
end

keys = entry.fields_with_locales.keys

Expand Down

0 comments on commit 2f3a4c9

Please sign in to comment.