Skip to content

Commit

Permalink
enable strict mode in JavaScript
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeraj Singh committed Jan 9, 2015
1 parent 70917ee commit a44ffea
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ gem 'uglifier', '>= 1.0.3'
# database
gem 'pg'

# use "strict mode" in JavaScript
gem 'sprockets-strict-mode'

# for building JSON
gem 'jbuilder', '~> 1.2'

# HTTP server for Rack applications for staginng and production
# See https://github.com/bigbinary/wheel/issues/43 for why unicorn is
# not used in development.
gem 'unicorn', group: [:staging, :production]

# for authentication
gem 'devise', '3.2.3'

Expand Down Expand Up @@ -56,12 +54,17 @@ gem 'rails_12factor'
# for email validation
gem 'email_validator'

# For variants support
# for variants support
gem 'browser'

# Haml as templating engine
# haml as templating engine
gem 'haml-rails'

# HTTP server for Rack applications for staginng and production
# See https://github.com/bigbinary/wheel/issues/43 for why unicorn is
# not used in development.
gem 'unicorn', group: [:staging, :production]

group :development do

# application server for development
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ GEM
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sprockets-strict-mode (1.0)
sprockets
thin (1.6.3)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0)
Expand Down Expand Up @@ -279,6 +281,7 @@ DEPENDENCIES
simplecov
spring
sprockets-rails (~> 2.0)
sprockets-strict-mode
thin
twitter-bootstrap-rails
uglifier (>= 1.0.3)
Expand Down
2 changes: 2 additions & 0 deletions config/initializers/enable_strict_mode_in_javascript.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# as per https://github.com/jsuder/sprockets-strict-mode
Rails.application.assets.register_postprocessor('application/javascript', Sprockets::StrictMode)

0 comments on commit a44ffea

Please sign in to comment.