Skip to content

Commit fb595de

Browse files
committedNov 18, 2014
edited configuration and dependencies
1 parent acbd3f9 commit fb595de

9 files changed

+107
-154
lines changed
 

‎Gemfile

+53-85
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,55 @@
11
source 'https://rubygems.org'
22

3-
ruby "2.1.2"
4-
5-
# gems for Rails 4 upgrade
6-
gem 'rails4_upgrade'
7-
gem 'actionpack-action_caching', '~>1.0.0'
8-
gem 'actionpack-page_caching', '~>1.0.0'
9-
gem 'actionpack-xml_parser', '~>1.0.0'
10-
gem 'actionview-encoded_mail_to', '~>1.0.4'
11-
gem 'activerecord-session_store', '~>0.0.1'
12-
gem 'activeresource', '~>4.0.0.beta1'
13-
# gem 'protected_attributes', '~>1.0.1'
14-
gem 'rails-observers', '~>0.1.1'
15-
gem 'rails-perftest', '~>0.0.2'
3+
ruby '2.1.2'
164

17-
gem 'byebug'
5+
gem 'rails', '4.1.7'
6+
7+
gem 'rails-observers', '~>0.1.1'
188

199
gem 'bundler', '>=1.1.5'
2010

21-
gem 'rails', '4.1.7'
22-
# gem 'rack', '~>1.4.5'
23-
# gem 'json', '~>1.7.7'
11+
gem 'sass-rails', '~> 4.0.4'
12+
gem 'coffee-rails', '~> 4.1.0'
2413
gem 'haml'
25-
gem 'leaflet-rails'
26-
gem 'leaflet-markercluster-rails'
27-
gem 'unicorn' # http server
2814

29-
gem 'pg'
30-
31-
gem 'figaro' # for handling config via ENV variables
15+
# Another CSS preprocessor, used for Bootstrap overrides
16+
gem 'less', '~>2.5.0'
17+
gem 'less-rails', '~> 2.5.0'
18+
# CSS framework
19+
gem 'less-rails-bootstrap', '~> 3.2.0'
3220

33-
gem 'cancancan', '~> 1.9' # for checking member privileges
21+
gem 'uglifier', '~> 2.5.3' # JavaScript compressor
3422

35-
gem 'gibbon' # for Mailchimp newsletter subscriptions
23+
gem 'jquery-rails'
24+
gem 'jquery-ui-rails', '~> 5.0.2'
25+
gem 'js-routes' # provides access to Rails routes in Javascript
26+
gem 'flickraw'
3627

37-
gem 'csv_shaper' # CSV export
28+
gem 'leaflet-rails'
29+
gem 'leaflet-markercluster-rails'
30+
gem 'unicorn' # http server
31+
gem 'pg'
32+
gem 'figaro' # for handling config via ENV variables
33+
gem 'cancancan', '~> 1.9' # for checking member privileges
34+
gem 'gibbon' # for Mailchimp newsletter subscriptions
35+
gem 'csv_shaper' # CSV export
3836

3937
# vendored activemerchant for testing- needed for bogus paypal
4038
# gateway monkeypatch
4139
gem 'activemerchant', '1.33.0',
42-
:path => 'vendor/gems/activemerchant-1.33.0',
40+
:path => 'vendor/gems/activemerchant-1.33.0',
4341
:require => 'active_merchant'
4442
gem 'active_utils', '1.0.5',
45-
:path => 'vendor/gems/active_utils-1.0.5'
46-
47-
group :production, :staging do
48-
gem 'newrelic_rpm'
49-
gem 'dalli'
50-
gem 'memcachier'
51-
gem 'rails_12factor' # supresses heroku plugin injection
52-
end
53-
54-
# CSS preprocessor, used for app/assets/stylesheets/application.css
55-
gem 'sass-rails', '~> 4.0.4'
56-
# CoffeeScript is a Python-like language that compiles to JavaScript
57-
gem 'coffee-rails', '~> 4.1.0'
43+
:path => 'vendor/gems/active_utils-1.0.5'
5844

5945
# less-rails depends on a JavaScript engine; we use therubyracer.
6046
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
6147
# long term, we'll probably want node.js for performance, but this will do
6248
# for now as it's easier for new people to install
63-
gem "therubyracer", "~> 0.12", :platforms => :ruby
49+
gem 'therubyracer', '~> 0.12', :platforms => :ruby
6450
# libv8 is needed by therubyracer and is a bit finicky
6551
gem 'libv8', '3.16.14.3'
6652

67-
# Another CSS preprocessor, used for Bootstrap overrides
68-
gem "less", '~>2.5.0'
69-
gem "less-rails", '~> 2.5.0'
70-
# CSS framework
71-
gem "less-rails-bootstrap", '~> 3.2.0'
72-
73-
gem 'uglifier', '~> 2.5.3' # JavaScript compressor
74-
75-
# gem 'compass-rails', '~> 1.0.3' # Yet Another CSS framework
76-
77-
gem 'jquery-rails'
78-
gem 'jquery-ui-rails', '~> 5.0.2'
79-
gem 'js-routes' # provides access to Rails routes in Javascript
80-
gem 'flickraw'
81-
82-
# To use ActiveModel has_secure_password
83-
# gem 'bcrypt-ruby', '~> 3.0.0'
84-
85-
# To use Jbuilder templates for JSON
86-
# gem 'jbuilder'
87-
88-
# Use unicorn as the app server
89-
# gem 'unicorn'
90-
91-
# To use debugger
92-
group :development do
93-
# A debugger and irb alternative. Pry doesn't play nice
94-
# with unicorn, so start a Webrick server when debugging
95-
# with Pry
96-
gem 'pry'
97-
gem 'better_errors'
98-
gem 'binding_of_caller'
99-
gem 'letter_opener'
100-
end
101-
10253
# Markdown formatting for updates etc
10354
gem 'bluecloth'
10455

@@ -129,16 +80,33 @@ gem 'omniauth-flickr', '>= 0.0.15'
12980

13081
gem 'rake', '>= 10.0.0'
13182

83+
group :production, :staging do
84+
gem 'newrelic_rpm'
85+
gem 'dalli'
86+
gem 'memcachier'
87+
gem 'rails_12factor' # supresses heroku plugin injection
88+
end
89+
90+
group :development do
91+
# A debugger and irb alternative. Pry doesn't play nice
92+
# with unicorn, so start a Webrick server when debugging
93+
# with Pry
94+
gem 'pry'
95+
gem 'better_errors'
96+
gem 'binding_of_caller'
97+
gem 'letter_opener'
98+
end
99+
132100
group :development, :test do
133-
gem 'haml-rails' # HTML templating language
134-
gem 'rspec-rails', '~> 3.1.0' # unit testing framework
101+
gem 'haml-rails' # HTML templating language
102+
gem 'rspec-rails', '~> 3.1.0' # unit testing framework
135103
gem 'rspec-activemodel-mocks'
136104
gem 'database_cleaner', '~> 1.3.0'
137-
gem 'webrat' # provides HTML matchers for view tests
138-
gem 'factory_girl_rails', '~> 4.5.0' # for creating test data
139-
gem 'coveralls', require: false # coverage analysis
140-
gem 'capybara' # integration tests
141-
gem 'capybara-email' # integration tests for email
142-
gem 'poltergeist', '~> 1.5.1' # for headless JS testing
143-
gem 'i18n-tasks' # adds tests for finding missing and unused translations
105+
gem 'webrat' # provides HTML matchers for view tests
106+
gem 'factory_girl_rails', '~> 4.5.0' # for creating test data
107+
gem 'coveralls', require: false # coverage analysis
108+
gem 'capybara' # integration tests
109+
gem 'capybara-email' # integration tests for email
110+
gem 'poltergeist', '~> 1.5.1' # for headless JS testing
111+
gem 'i18n-tasks' # adds tests for finding missing and unused translations
144112
end

‎Gemfile.lock

+1-36
Original file line numberDiff line numberDiff line change
@@ -29,33 +29,17 @@ GEM
2929
activesupport (= 4.1.7)
3030
rack (~> 1.5.2)
3131
rack-test (~> 0.6.2)
32-
actionpack-action_caching (1.0.0)
33-
actionpack (>= 4.0.0.beta, < 5.0)
34-
actionpack-page_caching (1.0.2)
35-
actionpack (>= 4.0.0, < 5)
36-
actionpack-xml_parser (1.0.1)
37-
actionpack (>= 4.0.0.rc1)
3832
actionview (4.1.7)
3933
activesupport (= 4.1.7)
4034
builder (~> 3.1)
4135
erubis (~> 2.7.0)
42-
actionview-encoded_mail_to (1.0.5)
43-
rails
4436
activemodel (4.1.7)
4537
activesupport (= 4.1.7)
4638
builder (~> 3.1)
4739
activerecord (4.1.7)
4840
activemodel (= 4.1.7)
4941
activesupport (= 4.1.7)
5042
arel (~> 5.0.0)
51-
activerecord-session_store (0.0.1)
52-
actionpack (>= 4.0.0.beta, < 5)
53-
activerecord (>= 4.0.0.beta, < 5)
54-
railties (>= 4.0.0.beta, < 5)
55-
activeresource (4.0.0.beta1)
56-
activemodel (>= 4.0.0.beta1)
57-
activesupport (>= 4.0.0.beta1)
58-
rails-observers (~> 0.1.1)
5943
activesupport (4.1.7)
6044
i18n (~> 0.6, >= 0.6.9)
6145
json (~> 1.7, >= 1.7.7)
@@ -75,10 +59,6 @@ GEM
7559
bootstrap-datepicker-rails (1.3.0.2)
7660
railties (>= 3.0)
7761
builder (3.2.2)
78-
byebug (3.5.1)
79-
columnize (~> 0.8)
80-
debugger-linecache (~> 1.2)
81-
slop (~> 3.6)
8262
cancancan (1.9.2)
8363
capybara (2.4.4)
8464
mime-types (>= 1.16)
@@ -98,7 +78,6 @@ GEM
9878
coffee-script-source
9979
execjs
10080
coffee-script-source (1.8.0)
101-
columnize (0.8.9)
10281
commonjs (0.2.7)
10382
coveralls (0.7.1)
10483
multi_json (~> 1.3)
@@ -111,7 +90,6 @@ GEM
11190
dalli (2.7.2)
11291
database_cleaner (1.3.0)
11392
debug_inspector (0.0.2)
114-
debugger-linecache (1.2.0)
11593
devise (3.4.1)
11694
bcrypt (~> 3.0)
11795
orm_adapter (~> 0.1)
@@ -201,7 +179,7 @@ GEM
201179
multi_json (1.10.1)
202180
multi_xml (0.5.5)
203181
netrc (0.8.0)
204-
newrelic_rpm (3.9.6.257)
182+
newrelic_rpm (3.9.7.266)
205183
nokogiri (1.6.4.1)
206184
mini_portile (~> 0.6.0)
207185
oauth (0.4.7)
@@ -242,10 +220,6 @@ GEM
242220
sprockets-rails (~> 2.0)
243221
rails-observers (0.1.2)
244222
activemodel (~> 4.0)
245-
rails-perftest (0.0.5)
246-
rails4_upgrade (0.5.0)
247-
bundler (>= 1.2.2)
248-
terminal-table (>= 1.4.5)
249223
rails_12factor (0.0.3)
250224
rails_serve_static_assets
251225
rails_stdout_logging
@@ -340,20 +314,13 @@ PLATFORMS
340314
ruby
341315

342316
DEPENDENCIES
343-
actionpack-action_caching (~> 1.0.0)
344-
actionpack-page_caching (~> 1.0.0)
345-
actionpack-xml_parser (~> 1.0.0)
346-
actionview-encoded_mail_to (~> 1.0.4)
347317
active_utils (= 1.0.5)!
348318
activemerchant (= 1.33.0)!
349-
activerecord-session_store (~> 0.0.1)
350-
activeresource (~> 4.0.0.beta1)
351319
better_errors
352320
binding_of_caller
353321
bluecloth
354322
bootstrap-datepicker-rails
355323
bundler (>= 1.1.5)
356-
byebug
357324
cancancan (~> 1.9)
358325
capybara
359326
capybara-email
@@ -393,8 +360,6 @@ DEPENDENCIES
393360
pry
394361
rails (= 4.1.7)
395362
rails-observers (~> 0.1.1)
396-
rails-perftest (~> 0.0.2)
397-
rails4_upgrade
398363
rails_12factor
399364
rake (>= 10.0.0)
400365
rspec-activemodel-mocks

‎config/application.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ class Application < Rails::Application
2626
# Activate observers that should always be running.
2727
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
2828

29+
I18n.config.enforce_available_locales = true
30+
2931
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
3032
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
3133
config.time_zone = 'UTC'
3234
config.active_record.default_timezone = :local
3335

34-
config.i18n.enforce_available_locales = true
35-
3636
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
3737
I18n.load_path += Dir[Rails.root.join('config', 'locales', '*.{rb,yml}')]
3838
I18n.default_locale = :en

‎config/environments/development.rb

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Growstuff::Application.configure do
22
# Settings specified here will take precedence over those in config/application.rb
33

4+
# Do not eager load code on boot.
45
config.eager_load = false
56

67
# In the development environment your application's code is reloaded on
@@ -24,15 +25,24 @@
2425
# Only use best-standards-support built into browsers
2526
config.action_dispatch.best_standards_support = :builtin
2627

27-
# Raise exception on mass assignment protection for Active Record models
28-
# config.active_record.mass_assignment_sanitizer = :strict
29-
3028
# Do not compress assets
3129
config.assets.compress = false
3230

3331
# Expands the lines which load the assets
3432
config.assets.debug = true
3533

34+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
35+
# yet still be able to expire them through the digest params.
36+
config.assets.digest = true
37+
38+
# Adds additional error checking when serving assets at runtime.
39+
# Checks for improperly declared sprockets dependencies.
40+
# Raises helpful error messages.
41+
config.assets.raise_runtime_errors = true
42+
43+
# Raises error for missing translations
44+
# config.action_view.raise_on_missing_translations = true
45+
3646
# Growstuff config
3747
config.new_crops_request_link = "http://example.com/not-a-real-url"
3848
config.action_mailer.default_url_options = { :host => 'localhost:8080' }

‎config/environments/production.rb

+15-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Growstuff::Application.configure do
22
# Settings specified here will take precedence over those in config/application.rb
33

4+
# Eager load code on boot. This eager loads most of Rails and
5+
# your application in memory, allowing both threaded web servers
6+
# and those relying on copy on write to perform better.
7+
# Rake tasks automatically ignore this option for performance.
48
config.eager_load = true
59

610
# Code is not reloaded between requests
@@ -13,18 +17,16 @@
1317
# Disable Rails's static asset server (Apache or nginx will already do this)
1418
config.serve_static_assets = false
1519

16-
# Compress JavaScripts and CSS
17-
config.assets.compress = true
20+
# Compress JavaScripts and CSS.
21+
config.assets.js_compressor = :uglifier
22+
config.assets.css_compressor = :sass
1823

1924
# Don't fallback to assets pipeline if a precompiled asset is missed
2025
config.assets.compile = true
2126

2227
# Generate digests for assets URLs
2328
config.assets.digest = true
2429

25-
# Defaults to nil and saved in location specified by config.assets.prefix
26-
# config.assets.manifest = YOUR_PATH
27-
2830
# Specifies the header that your server uses for sending files
2931
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
3032
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
@@ -47,22 +49,23 @@
4749
# Enable serving of images, stylesheets, and JavaScripts from an asset server
4850
# config.action_controller.asset_host = "http://assets.example.com"
4951

50-
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
51-
# config.assets.precompile += %w( search.js )
52-
53-
# Disable delivery errors, bad email addresses will be ignored
52+
# Ignore bad email addresses and do not raise email delivery errors.
53+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
5454
# config.action_mailer.raise_delivery_errors = false
5555

56-
# Enable threaded mode
57-
# config.threadsafe!
58-
5956
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
6057
# the I18n.default_locale when a translation can not be found)
6158
config.i18n.fallbacks = true
6259

6360
# Send deprecation notices to registered listeners
6461
config.active_support.deprecation = :notify
6562

63+
# Use default logging formatter so that PID and timestamp are not suppressed.
64+
config.log_formatter = ::Logger::Formatter.new
65+
66+
# Do not dump schema after migrations.
67+
config.active_record.dump_schema_after_migration = false
68+
6669
# Growstuff configuration
6770
config.new_crops_request_link = "http://growstuff.org/posts/skud-20130319-requests-for-new-crops"
6871
config.action_mailer.default_url_options = { :host => 'growstuff.org' }

‎config/environments/staging.rb

+15-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Growstuff::Application.configure do
22
# Settings specified here will take precedence over those in config/application.rb
33

4+
# Eager load code on boot. This eager loads most of Rails and
5+
# your application in memory, allowing both threaded web servers
6+
# and those relying on copy on write to perform better.
7+
# Rake tasks automatically ignore this option for performance.
48
config.eager_load = true
59

610
# Code is not reloaded between requests
@@ -13,18 +17,16 @@
1317
# Disable Rails's static asset server (Apache or nginx will already do this)
1418
config.serve_static_assets = false
1519

16-
# Compress JavaScripts and CSS
17-
config.assets.compress = true
20+
# Compress JavaScripts and CSS.
21+
config.assets.js_compressor = :uglifier
22+
config.assets.css_compressor = :sass
1823

1924
# Don't fallback to assets pipeline if a precompiled asset is missed
2025
config.assets.compile = true
2126

2227
# Generate digests for assets URLs
2328
config.assets.digest = true
2429

25-
# Defaults to nil and saved in location specified by config.assets.prefix
26-
# config.assets.manifest = YOUR_PATH
27-
2830
# Specifies the header that your server uses for sending files
2931
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
3032
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
@@ -47,22 +49,23 @@
4749
# Enable serving of images, stylesheets, and JavaScripts from an asset server
4850
# config.action_controller.asset_host = "http://assets.example.com"
4951

50-
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
51-
# config.assets.precompile += %w( search.js )
52-
53-
# Disable delivery errors, bad email addresses will be ignored
52+
# Ignore bad email addresses and do not raise email delivery errors.
53+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
5454
# config.action_mailer.raise_delivery_errors = false
5555

56-
# Enable threaded mode
57-
# config.threadsafe!
58-
5956
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
6057
# the I18n.default_locale when a translation can not be found)
6158
config.i18n.fallbacks = true
6259

6360
# Send deprecation notices to registered listeners
6461
config.active_support.deprecation = :notify
6562

63+
# Use default logging formatter so that PID and timestamp are not suppressed.
64+
config.log_formatter = ::Logger::Formatter.new
65+
66+
# Do not dump schema after migrations.
67+
config.active_record.dump_schema_after_migration = false
68+
6669
# Growstuff configuration
6770
config.new_crops_request_link = "http://example.com/not-a-real-url"
6871
config.action_mailer.default_url_options = { :host => 'dev.growstuff.org' }

‎config/environments/test.rb

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Growstuff::Application.configure do
22
# Settings specified here will take precedence over those in config/application.rb
33

4+
# Do not eager load code on boot. This avoids loading your whole application
5+
# just for the purpose of running a single test. If you are using a tool that
6+
# preloads Rails for running tests, you may have to set it to true.
47
config.eager_load = false
58

69
# The test environment is used exclusively to run your application's
@@ -30,12 +33,12 @@
3033
# ActionMailer::Base.deliveries array.
3134
config.action_mailer.delivery_method = :test
3235

33-
# Raise exception on mass assignment protection for Active Record models
34-
# config.active_record.mass_assignment_sanitizer = :strict
35-
3636
# Print deprecation notices to the stderr
3737
config.active_support.deprecation = :stderr
3838

39+
# Raises error for missing translations
40+
# config.action_view.raise_on_missing_translations = true
41+
3942
# Growstuff config
4043
config.new_crops_request_link = "http://example.com/not-a-real-url"
4144
config.action_mailer.default_url_options = { :host => 'localhost:8080' }

‎spec/rails_helper.rb

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
require File.expand_path("../../config/environment", __FILE__)
55
require 'rspec/rails'
66
# Add additional requires below this line. Rails is not loaded until this point!
7-
require 'rspec/autorun'
87
require 'simplecov'
98
require 'coveralls'
109

‎spec/spec_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
# # => "be bigger than 2 and smaller than 4"
2727
# ...rather than:
2828
# # => "be bigger than 2"
29+
expectations.syntax = [:should, :expect]
2930
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
3031
end
3132

@@ -36,6 +37,7 @@
3637
# a real object. This is generally recommended, and will default to
3738
# `true` in RSpec 4.
3839
mocks.verify_partial_doubles = false
40+
mocks.syntax = [:should, :expect]
3941
end
4042

4143
# The settings below are suggested to provide a good initial experience

0 commit comments

Comments
 (0)
Please sign in to comment.