Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[N/A] update to jekyll 3 #1

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 89 additions & 86 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,125 +2,128 @@ GEM
remote: https://rubygems.org/
specs:
RedCloth (4.2.9)
activesupport (4.1.8)
i18n (~> 0.6, >= 0.6.9)
activesupport (4.2.5.1)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
blankslate (2.1.2.4)
celluloid (0.16.0)
timers (~> 4.0.0)
classifier-reborn (2.0.2)
fast-stemmer (~> 1.0)
coffee-script (2.3.0)
addressable (2.3.8)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.8.0)
coffee-script-source (1.10.0)
colorator (0.1)
execjs (2.2.2)
fast-stemmer (1.0.2)
ffi (1.9.6)
ethon (0.8.1)
ffi (>= 1.3.0)
execjs (2.6.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
ffi (1.9.10)
gemoji (2.1.0)
github-pages (29)
github-pages (45)
RedCloth (= 4.2.9)
github-pages-health-check (~> 0.1)
jekyll (= 2.4.0)
jekyll-coffeescript (= 1.0.0)
jekyll-mentions (= 0.1.3)
jekyll-redirect-from (= 0.6.2)
jekyll-sass-converter (= 1.2.0)
jekyll-sitemap (= 0.6.0)
jemoji (= 0.3.0)
kramdown (= 1.3.1)
liquid (= 2.6.1)
maruku (= 0.7.0)
github-pages-health-check (= 0.6.0)
jekyll (= 3.0.2)
jekyll-coffeescript (= 1.0.1)
jekyll-feed (= 0.3.1)
jekyll-gist (= 1.4.0)
jekyll-mentions (= 1.0.0)
jekyll-paginate (= 1.1.0)
jekyll-redirect-from (= 0.9.1)
jekyll-sass-converter (= 1.3.0)
jekyll-seo-tag (= 0.1.4)
jekyll-sitemap (= 0.10.0)
jekyll-textile-converter (= 0.1.0)
jemoji (= 0.5.1)
kramdown (= 1.9.0)
liquid (= 3.0.6)
mercenary (~> 0.3)
pygments.rb (= 0.6.0)
rdiscount (= 2.1.7)
redcarpet (= 3.1.2)
rdiscount (= 2.1.8)
redcarpet (= 3.3.3)
rouge (= 1.10.1)
terminal-table (~> 1.4)
github-pages-health-check (0.2.1)
net-dns (~> 0.6)
github-pages-health-check (0.6.0)
addressable (~> 2.3)
net-dns (~> 0.8)
public_suffix (~> 1.4)
hitimes (1.2.2)
html-pipeline (1.9.0)
activesupport (>= 2)
nokogiri (~> 1.4)
i18n (0.6.11)
jekyll (2.4.0)
classifier-reborn (~> 2.0)
typhoeus (~> 0.7)
html-pipeline (2.3.0)
activesupport (>= 2, < 5)
nokogiri (>= 1.4)
i18n (0.7.0)
jekyll (3.0.2)
colorator (~> 0.1)
jekyll-coffeescript (~> 1.0)
jekyll-gist (~> 1.0)
jekyll-paginate (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 2.6.1)
liquid (~> 3.0)
mercenary (~> 0.3.3)
pygments.rb (~> 0.6.0)
redcarpet (~> 3.1)
rouge (~> 1.7)
safe_yaml (~> 1.0)
toml (~> 0.1.0)
jekyll-coffeescript (1.0.0)
jekyll-coffeescript (1.0.1)
coffee-script (~> 2.2)
jekyll-gist (1.1.0)
jekyll-mentions (0.1.3)
html-pipeline (~> 1.9.0)
jekyll (~> 2.0)
jekyll-feed (0.3.1)
jekyll-gist (1.4.0)
octokit (~> 4.2)
jekyll-mentions (1.0.0)
html-pipeline (~> 2.2)
jekyll (~> 3.0)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.6.2)
jekyll (~> 2.0)
jekyll-sass-converter (1.2.0)
jekyll-redirect-from (0.9.1)
jekyll (>= 2.0)
jekyll-sass-converter (1.3.0)
sass (~> 3.2)
jekyll-sitemap (0.6.0)
jekyll-watch (1.1.2)
listen (~> 2.7)
jemoji (0.3.0)
jekyll-seo-tag (0.1.4)
jekyll (>= 2.0)
jekyll-sitemap (0.10.0)
jekyll-textile-converter (0.1.0)
RedCloth (~> 4.0)
jekyll-watch (1.3.1)
listen (~> 3.0)
jemoji (0.5.1)
gemoji (~> 2.0)
html-pipeline (~> 1.9)
jekyll (~> 2.0)
json (1.8.1)
kramdown (1.3.1)
liquid (2.6.1)
listen (2.8.3)
celluloid (>= 0.15.2)
html-pipeline (~> 2.2)
jekyll (>= 2.0)
json (1.8.3)
kramdown (1.9.0)
liquid (3.0.6)
listen (3.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
maruku (0.7.0)
mercenary (0.3.5)
mini_portile (0.6.1)
minitest (5.4.3)
mini_portile2 (2.0.0)
minitest (5.8.4)
multipart-post (2.0.0)
net-dns (0.8.0)
nokogiri (1.6.5)
mini_portile (~> 0.6.0)
parslet (1.5.0)
blankslate (~> 2.0)
posix-spawn (0.3.9)
public_suffix (1.4.6)
pygments.rb (0.6.0)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
rb-fsevent (0.9.4)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
octokit (4.2.0)
sawyer (~> 0.6.0, >= 0.5.3)
public_suffix (1.5.3)
rb-fsevent (0.9.7)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rdiscount (2.1.7)
redcarpet (3.1.2)
rdiscount (2.1.8)
redcarpet (3.3.3)
rouge (1.10.1)
safe_yaml (1.0.4)
sass (3.4.9)
terminal-table (1.4.5)
thread_safe (0.3.4)
timers (4.0.1)
hitimes
toml (0.1.2)
parslet (~> 1.5.0)
sass (3.4.21)
sawyer (0.6.0)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
terminal-table (1.5.2)
thread_safe (0.3.5)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
yajl-ruby (1.1.0)

PLATFORMS
ruby

DEPENDENCIES
github-pages

BUNDLED WITH
1.10.6
6 changes: 3 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Syntax highlighting via Pygments
highlighter: pygments

kramdown:
input: GFM
syntax_highlighter: rouge

sass:
sass_dir: _scss
Expand Down
4 changes: 1 addition & 3 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,4 @@ TBC

## Ruby

Use 2 spaces for indentation, no tabs.

Wrap lines at 100 columns.
[Ruby guidelines](ruby-guidelines)
59 changes: 59 additions & 0 deletions ruby-guidelines/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: Ruby Guidelines
resource_prefix: ../
---

# Ruby guidelines

Please consult the following [ruby-style-guide](https://github.com/bbatsov/ruby-style-guide) for general guidelines.

The following are a collection of Westfield specific coding guidelines:

* <a name="line-wrapping"></a>Long lines should be wrapped at 100 columns. When wrapping chained method calls, the method should be placed on a new line with the dot preceding it and indented by two spaces.<sup>[[link](#line-wrapping)]</sup>

```ruby
# bad - line is too long
allow(ParkingActivityProcessor).to receive(:new).with(hash_including(params.slice(:access_device, :activity_type, :activity_at))).and_return(processor)

# good - line is wrapped
allow(ParkingActivityProcessor).to receive(:new)
.with(hash_including(params.slice(:access_device, :activity_type, :activity_at)))
.and_return(processor)
```

String literals should be wrapped using the `\` operator:

```ruby
# bad - line is too long
error_message = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud"

# good - line is wrapped
error_message = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor" \
" incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud"
```

* <a name="spaces-for-indentation"></a>Use 2 spaces for indentation, no tabs.<sup>[[link](#spaces-for-indentation)]</sup>

```ruby
# bad - too many spaces
def require_app_access_token
unless incoming_access_token_info.has_permissions?
render_error_response(
key: 'access_token',
message: "has insufficient permissions for the requested endpoint",
status: :unauthorized
)
end
end

# good - 2 spaces indentation
def require_app_access_token
unless incoming_access_token_info.has_permissions?
render_error_response(
key: 'access_token',
message: "has insufficient permissions for the requested endpoint",
status: :unauthorized
)
end
end
```