popolo 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -2
  3. data/Rakefile +13 -4
  4. data/app/models/popolo/area.rb +3 -3
  5. data/app/models/popolo/contact_detail.rb +4 -0
  6. data/app/models/popolo/motion.rb +3 -1
  7. data/app/models/popolo/organization.rb +8 -4
  8. data/app/models/popolo/other_name.rb +12 -0
  9. data/app/models/popolo/person.rb +3 -3
  10. data/app/models/popolo/post.rb +2 -0
  11. data/app/models/popolo/vote_event.rb +1 -1
  12. data/lib/popolo/version.rb +1 -1
  13. data/spec/controllers/popolo/memberships_controller_spec.rb +13 -11
  14. data/spec/controllers/popolo/organizations_controller_spec.rb +18 -17
  15. data/spec/controllers/popolo/people_controller_spec.rb +13 -11
  16. data/spec/controllers/popolo/posts_controller_spec.rb +13 -11
  17. data/spec/dummy/README.rdoc +28 -0
  18. data/spec/dummy/Rakefile +1 -2
  19. data/spec/dummy/app/assets/javascripts/application.js +3 -3
  20. data/spec/dummy/app/assets/stylesheets/application.css +5 -4
  21. data/spec/dummy/app/controllers/application_controller.rb +3 -1
  22. data/spec/dummy/app/views/layouts/application.html.erb +2 -4
  23. data/spec/dummy/bin/bundle +3 -0
  24. data/spec/dummy/bin/rails +4 -0
  25. data/spec/dummy/bin/rake +4 -0
  26. data/spec/dummy/config/application.rb +1 -38
  27. data/spec/dummy/config/boot.rb +4 -9
  28. data/spec/dummy/config/environment.rb +3 -3
  29. data/spec/dummy/config/environments/development.rb +19 -19
  30. data/spec/dummy/config/environments/production.rb +44 -28
  31. data/spec/dummy/config/environments/test.rb +17 -15
  32. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  33. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  34. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  35. data/spec/dummy/config/initializers/inflections.rb +16 -0
  36. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  37. data/spec/dummy/config/initializers/session_store.rb +1 -6
  38. data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
  39. data/spec/dummy/config/locales/en.yml +20 -2
  40. data/spec/dummy/config/mongoid.yml +21 -20
  41. data/spec/dummy/config/secrets.yml +22 -0
  42. data/spec/dummy/config.ru +1 -1
  43. data/spec/dummy/log/development.log +0 -0
  44. data/spec/dummy/log/test.log +4423 -0
  45. data/spec/dummy/public/404.html +54 -13
  46. data/spec/dummy/public/422.html +54 -13
  47. data/spec/dummy/public/500.html +53 -12
  48. data/spec/helpers/popolo_helper_spec.rb +2 -2
  49. data/spec/models/popolo/area_spec.rb +4 -2
  50. data/spec/models/popolo/contact_detail_spec.rb +6 -4
  51. data/spec/models/popolo/count_spec.rb +6 -4
  52. data/spec/models/popolo/date_string_spec.rb +92 -90
  53. data/spec/models/popolo/group_result_spec.rb +6 -4
  54. data/spec/models/popolo/identifier_spec.rb +5 -3
  55. data/spec/models/popolo/link_spec.rb +5 -3
  56. data/spec/models/popolo/membership_spec.rb +9 -7
  57. data/spec/models/popolo/motion_spec.rb +5 -3
  58. data/spec/models/popolo/organization_spec.rb +6 -4
  59. data/spec/models/popolo/other_name_spec.rb +7 -5
  60. data/spec/models/popolo/person_spec.rb +22 -20
  61. data/spec/models/popolo/post_spec.rb +5 -3
  62. data/spec/models/popolo/vote_event_spec.rb +4 -2
  63. data/spec/models/popolo/vote_spec.rb +4 -2
  64. data/spec/popolo_spec.rb +15 -15
  65. data/spec/rails_helper.rb +68 -0
  66. data/spec/routing/popolo/memberships_routing_spec.rb +8 -6
  67. data/spec/routing/popolo/organizations_routing_spec.rb +11 -9
  68. data/spec/routing/popolo/people_routing_spec.rb +8 -6
  69. data/spec/routing/popolo/posts_routing_spec.rb +8 -6
  70. data/spec/spec_helper.rb +70 -80
  71. data/spec/support/{shared_examples.rb → shared_examples/date.rb} +1 -1
  72. metadata +52 -89
  73. data/spec/controllers/popolo_controller_spec.rb +0 -4
  74. data/spec/dummy/config/initializers/secret_token.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b262b9d00eefda6f0d4c7d4a1f16156d2171e8fd
4
- data.tar.gz: 39a3597b95e23673b95359835a7fa8616b79a43a
3
+ metadata.gz: 4e4af5de6382cd30315c8b8d91f7196a0b2b7e10
4
+ data.tar.gz: 1ac17145d435c01a474f4d1e6d5bece79dbef95c
5
5
  SHA512:
6
- metadata.gz: 0387526074220780969de76501f8be258d523f89e61335bc392a4e533c00547f945aa47979d4fcb9a9df28159058d9cc48b8b0bd3dee19c19faf43c488380302
7
- data.tar.gz: 134501f00a580017df2b4cbb38343056ae0d5d0d8279914c3df3e33e764295b870a8bfabf5a1de27287bce79f2ab6e1a1f63b01d48dc4cc7de9c712d61619056
6
+ metadata.gz: 2dc1011a71bb243ac1cf2606f90e9d98620c276460715f7970a7f5f55b31e18db03389a2dd8d8a6cfc785628ac799a91e030f32963080d8c5071243e790d8d1a
7
+ data.tar.gz: eaebcd62d51538da8922bd6cbe3d20d54cd9c72d98eb226a3947797d19c75dcee0c4c6dc5d01de4186037b735ad2150fec0bab4e328fe3e61d0cbd4b42328e37
data/README.md CHANGED
@@ -12,11 +12,15 @@ Popolo's goal is to make it easier for civic developers to create government tra
12
12
 
13
13
  Popolo is a [Ruby on Rails engine](http://guides.rubyonrails.org/engines.html) that provides additional functionality to a [Ruby on Rails](http://rubyonrails.org/) application, so that developers can focus on what's special about the governments they want to monitor, instead of re-implementing features commonly found in open government websites. The core Popolo engine provides basic models, controllers and views for the objects found in all open government websites – people, organizations and the relationships between the two. Other engines provide additional functionality.
14
14
 
15
- In addition to being a Rails engine, Popolo is also a [data specification](http://popoloproject.com/specs/). This engine is up-to-date with its 2014-02-10 version.
15
+ In addition to being a Rails engine, Popolo is also a [data specification](http://popoloproject.com/specs/). This engine is up-to-date with its 2014-12-21 version, except for the updates:
16
+
17
+ * 2014-12-14: Add a video property to the Speech class.
18
+ * 2014-11-23: Add a Speech class.
19
+ * 2014-05-09: Add a member property to the Membership class, to relate organizations to organizations.
16
20
 
17
21
  ## Getting Started
18
22
 
19
- Popolo uses Mongoid to connect to MongoDB, which requires Rails 3 and supports only MRI 1.9.3, 2.0.0 and HEAD, and JRuby 1.6.0+ in 1.9 mode.
23
+ Popolo uses Mongoid to connect to MongoDB.
20
24
 
21
25
  First, create your Rails application:
22
26
 
data/Rakefile CHANGED
@@ -1,10 +1,19 @@
1
- require 'bundler'
2
- Bundler::GemHelper.install_tasks
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
8
+ load 'rails/tasks/engine.rake'
9
+
10
+ require 'thor'
11
+ helper = Bundler::GemHelper.new
12
+ helper.install
3
13
 
4
14
  require 'rspec/core/rake_task'
5
15
  RSpec::Core::RakeTask.new(:spec)
6
-
7
- task :default => :spec
16
+ task default: :spec
8
17
 
9
18
  begin
10
19
  require 'yard'
@@ -7,11 +7,11 @@ module Popolo
7
7
 
8
8
  store_in Popolo.storage_options_per_class.fetch(:Area, Popolo.storage_options)
9
9
 
10
- # The geographic area to which the membership is related.
10
+ # The memberships to which this area is related.
11
11
  has_many :memberships, class_name: 'Popolo::Membership'
12
- # The geographic area to which the organization is related.
12
+ # The organizations to which this area is related.
13
13
  has_many :organizations, class_name: 'Popolo::Organization'
14
- # The geographic area to which the post is related.
14
+ # The posts to which this area is related.
15
15
  has_many :posts, class_name: 'Popolo::Post'
16
16
 
17
17
  # URLs to documents from which the area is derived.
@@ -16,6 +16,10 @@ module Popolo
16
16
  field :value, type: String
17
17
  # A note, e.g. for grouping contact details by physical location.
18
18
  field :note, type: String
19
+ # The date from which the contact detail is valid.
20
+ field :valid_from, type: DateString
21
+ # The date from which the contact detail is no longer valid.
22
+ field :valid_until, type: DateString
19
23
 
20
24
  validates_presence_of :type, :value
21
25
  end
@@ -9,7 +9,7 @@ module Popolo
9
9
  # The organization in which the motion is proposed.
10
10
  belongs_to :organization, class_name: 'Popolo::Organization'
11
11
  # The legislative session in which the motion is proposed.
12
- # @todo belongs to :legislative_session, class_name: 'Popolo::Event'
12
+ belongs_to :legislative_session # @todo , class_name: 'Popolo::Event'
13
13
  # The person who proposed the motion.
14
14
  belongs_to :creator, class_name: 'Popolo::Person'
15
15
  # Events at which people vote on the motion.
@@ -19,6 +19,8 @@ module Popolo
19
19
 
20
20
  # The transcript or text of the motion.
21
21
  field :text, type: String
22
+ # An issued identifier.
23
+ field :identifier, type: String
22
24
  # A motion category, e.g. adjournment.
23
25
  field :classification, type: String
24
26
  # The date on which the motion was proposed.
@@ -10,15 +10,15 @@ module Popolo
10
10
 
11
11
  # The geographic area to which the organization is related.
12
12
  belongs_to :area, index: true, class_name: 'Popolo::Area'
13
- # The relationships to which the organization is a party.
13
+ # The memberships of the members of the organization.
14
14
  has_many :memberships, class_name: 'Popolo::Membership', dependent: :destroy, inverse_of: :organization
15
- # The organization in which the motion is proposed.
15
+ # Motions within the organization.
16
16
  has_many :motions, class_name: 'Popolo::Motion', dependent: :destroy
17
17
  # Posts within the organization.
18
18
  has_many :posts, class_name: 'Popolo::Post', dependent: :destroy
19
- # The organization whose members are voting.
19
+ # Vote events in which members of the organization are voting.
20
20
  has_many :vote_events, class_name: 'Popolo::VoteEvent', dependent: :destroy
21
- # The organization that is voting.
21
+ # Votes cast by the organization.
22
22
  has_many :votes, as: :voter, class_name: 'Popolo::Vote'
23
23
  # Alternate or former names.
24
24
  embeds_many :other_names, as: :nameable, class_name: 'Popolo::OtherName'
@@ -35,6 +35,10 @@ module Popolo
35
35
  field :name, type: String
36
36
  # An organization category, e.g. committee.
37
37
  field :classification, type: String
38
+ # A one-line description of an organization.
39
+ field :abstract, type: String
40
+ # An extended description of an organization.
41
+ field :description, type: String
38
42
  # A date of founding.
39
43
  field :founding_date, type: DateString
40
44
  # A date of dissolution.
@@ -7,6 +7,18 @@ module Popolo
7
7
 
8
8
  # An alternate or former name.
9
9
  field :name, type: String
10
+ # One or more family names.
11
+ field :family_name, type: String
12
+ # One or more primary given names.
13
+ field :given_name, type: String
14
+ # One or more secondary given names.
15
+ field :additional_name, type: String
16
+ # One or more honorifics preceding a person's name.
17
+ field :honorific_prefix, type: String
18
+ # One or more honorifics following a person's name.
19
+ field :honorific_suffix, type: String
20
+ # One or more patronymic names.
21
+ field :patronymic_name, type: String
10
22
  # The date on which the name was adopted.
11
23
  field :start_date, type: DateString
12
24
  # The date on which the name was abandoned.
@@ -6,11 +6,11 @@ module Popolo
6
6
 
7
7
  store_in Popolo.storage_options_per_class.fetch(:Person, Popolo.storage_options)
8
8
 
9
- # The relationships to which the person is a party.
9
+ # The person's memberships.
10
10
  has_many :memberships, class_name: 'Popolo::Membership', dependent: :destroy
11
- # The person who proposed the motion.
11
+ # The person's motions.
12
12
  has_many :motions, class_name: 'Popolo::Motion'
13
- # The person that is voting.
13
+ # The person's votes.
14
14
  has_many :votes, as: :voter, class_name: 'Popolo::Vote'
15
15
  # Alternate or former names.
16
16
  embeds_many :other_names, as: :nameable, class_name: 'Popolo::OtherName'
@@ -21,6 +21,8 @@ module Popolo
21
21
 
22
22
  # A label describing the post.
23
23
  field :label, type: String
24
+ # An alternate label.
25
+ field :other_label, type: Array
24
26
  # The function that the holder of the post fulfills.
25
27
  field :role, type: String
26
28
  # The date on which the post was created.
@@ -9,7 +9,7 @@ module Popolo
9
9
  # The organization whose members are voting.
10
10
  belongs_to :organization, class_name: 'Popolo::Organization'
11
11
  # The legislative session in which the vote occurs.
12
- # @todo belongs to :legislative_session, class_name: 'Popolo::Event'
12
+ belongs_to :legislative_session # @todo , class_name: 'Popolo::Event'
13
13
  # The motion being decided.
14
14
  belongs_to :motion, class_name: 'Popolo::Motion'
15
15
  # The result of the vote event within groups of voters.
@@ -1,3 +1,3 @@
1
1
  module Popolo
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -1,16 +1,18 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
- describe Popolo::MembershipsController do
4
- before :each do
5
- @routes = Popolo::Engine.routes
6
- @membership = FactoryGirl.create :membership
7
- end
3
+ module Popolo
4
+ RSpec.describe MembershipsController, type: :controller do
5
+ routes { Engine.routes }
6
+
7
+ before :each do
8
+ @membership = FactoryGirl.create(:membership)
9
+ end
8
10
 
9
- describe 'GET show' do
10
- it 'assigns the requested membership as @membership' do
11
- get :show, id: @membership.id.to_s
12
- assigns(:membership).should == @membership
13
- response.should be_success
11
+ describe 'GET show' do
12
+ it 'assigns the requested membership as @membership' do
13
+ get :show, {id: @membership.to_param}
14
+ expect(assigns(:membership)).to eq(@membership)
15
+ end
14
16
  end
15
17
  end
16
18
  end
@@ -1,24 +1,25 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
- describe Popolo::OrganizationsController do
4
- before :each do
5
- @routes = Popolo::Engine.routes
6
- @organization = FactoryGirl.create :organization
7
- end
3
+ module Popolo
4
+ RSpec.describe OrganizationsController, type: :controller do
5
+ routes { Engine.routes }
8
6
 
9
- describe 'GET index' do
10
- it 'assigns all organizations as @organizations' do
11
- get :index
12
- assigns(:organizations).to_a.should == [@organization]
13
- response.should be_success
7
+ before :each do
8
+ @organization = FactoryGirl.create(:organization)
9
+ end
10
+
11
+ describe 'GET index' do
12
+ it 'assigns all organizations as @organizations' do
13
+ get :index, {}
14
+ expect(assigns(:organizations)).to eq([@organization])
15
+ end
14
16
  end
15
- end
16
17
 
17
- describe 'GET show' do
18
- it 'assigns the requested organization as @organization' do
19
- get :show, id: @organization.id.to_s
20
- assigns(:organization).should == @organization
21
- response.should be_success
18
+ describe 'GET show' do
19
+ it 'assigns the requested organization as @organization' do
20
+ get :show, {id: @organization.to_param}
21
+ expect(assigns(:organization)).to eq(@organization)
22
+ end
22
23
  end
23
24
  end
24
25
  end
@@ -1,16 +1,18 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
- describe Popolo::PeopleController do
4
- before :each do
5
- @routes = Popolo::Engine.routes
6
- @person = FactoryGirl.create :person
7
- end
3
+ module Popolo
4
+ RSpec.describe PeopleController, type: :controller do
5
+ routes { Engine.routes }
6
+
7
+ before :each do
8
+ @person = FactoryGirl.create(:person)
9
+ end
8
10
 
9
- describe 'GET show' do
10
- it 'assigns the requested person as @person' do
11
- get :show, id: @person.id.to_s
12
- assigns(:person).should == @person
13
- response.should be_success
11
+ describe 'GET show' do
12
+ it 'assigns the requested person as @person' do
13
+ get :show, {id: @person.to_param}
14
+ expect(assigns(:person)).to eq(@person)
15
+ end
14
16
  end
15
17
  end
16
18
  end
@@ -1,16 +1,18 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
- describe Popolo::PostsController do
4
- before :each do
5
- @routes = Popolo::Engine.routes
6
- @post = FactoryGirl.create :post
7
- end
3
+ module Popolo
4
+ RSpec.describe PostsController, type: :controller do
5
+ routes { Engine.routes }
6
+
7
+ before :each do
8
+ @post = FactoryGirl.create(:post)
9
+ end
8
10
 
9
- describe 'GET show' do
10
- it 'assigns the requested post as @post' do
11
- get :show, id: @post.id.to_s
12
- assigns(:post).should == @post
13
- response.should be_success
11
+ describe 'GET show' do
12
+ it 'assigns the requested post as @post' do
13
+ get :show, {id: @post.to_param}
14
+ expect(assigns(:post)).to eq(@post)
15
+ end
14
16
  end
15
17
  end
16
18
  end
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
data/spec/dummy/Rakefile CHANGED
@@ -1,7 +1,6 @@
1
- #!/usr/bin/env rake
2
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
3
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
3
 
5
4
  require File.expand_path('../config/application', __FILE__)
6
5
 
7
- Dummy::Application.load_tasks
6
+ Rails.application.load_tasks
@@ -5,9 +5,9 @@
5
5
  // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
6
  //
7
7
  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // the compiled file.
8
+ // compiled file.
9
9
  //
10
- // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
- // GO AFTER THE REQUIRES BELOW.
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
12
  //
13
13
  //= require_tree .
@@ -5,10 +5,11 @@
5
5
  * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
6
  * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
7
  *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
10
12
  *
11
- *= require_self
12
13
  *= require_tree .
13
- *= require popolo
14
+ *= require_self
14
15
  */
@@ -1,3 +1,5 @@
1
1
  class ApplicationController < ActionController::Base
2
- protect_from_forgery
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
3
5
  end
@@ -2,15 +2,13 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Dummy</title>
5
- <%= stylesheet_link_tag "application", :media => "all" %>
6
- <%= javascript_include_tag "application" %>
5
+ <%= stylesheet_link_tag 'application', media: 'all' %>
6
+ <%= javascript_include_tag 'application' %>
7
7
  <%= csrf_meta_tags %>
8
8
  </head>
9
9
  <body>
10
10
 
11
- <div class="container">
12
11
  <%= yield %>
13
- </div>
14
12
 
15
13
  </body>
16
14
  </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -2,10 +2,9 @@ require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  require "action_controller/railtie"
4
4
  require "action_mailer/railtie"
5
- require "active_resource/railtie"
6
5
  require "sprockets/railtie"
7
6
 
8
- Bundler.require
7
+ Bundler.require(*Rails.groups)
9
8
  require "popolo"
10
9
 
11
10
  module Dummy
@@ -14,16 +13,6 @@ module Dummy
14
13
  # Application configuration should go into files in config/initializers
15
14
  # -- all .rb files in that directory are automatically loaded.
16
15
 
17
- # Custom directories with classes and modules you want to be autoloadable.
18
- # config.autoload_paths += %W(#{config.root}/extras)
19
-
20
- # Only load the plugins named here, in the order given (default is alphabetical).
21
- # :all can be used as a placeholder for all plugins not explicitly named.
22
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
23
-
24
- # Activate observers that should always be running.
25
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
26
-
27
16
  # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
28
17
  # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
29
18
  # config.time_zone = 'Central Time (US & Canada)'
@@ -31,32 +20,6 @@ module Dummy
31
20
  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
32
21
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
33
22
  # config.i18n.default_locale = :de
34
-
35
- # Configure the default encoding used in templates for Ruby 1.9.
36
- config.encoding = "utf-8"
37
-
38
- # Configure sensitive parameters which will be filtered from the log file.
39
- config.filter_parameters += [:password]
40
-
41
- # Enable escaping HTML in JSON.
42
- config.active_support.escape_html_entities_in_json = true
43
-
44
- # Use SQL instead of Active Record's schema dumper when creating the database.
45
- # This is necessary if your schema can't be completely dumped by the schema dumper,
46
- # like if you have constraints or database-specific column types
47
- # config.active_record.schema_format = :sql
48
-
49
- # Enforce whitelist mode for mass assignment.
50
- # This will create an empty whitelist of attributes available for mass-assignment for all models
51
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
52
- # parameters by using an attr_accessible or attr_protected declaration.
53
- # config.active_record.whitelist_attributes = true
54
-
55
- # Enable the asset pipeline
56
- config.assets.enabled = true
57
-
58
- # Version of your assets, change this if you want to expire all your assets
59
- config.assets.version = '1.0'
60
23
  end
61
24
  end
62
25
 
@@ -1,10 +1,5 @@
1
- require 'rubygems'
2
- gemfile = File.expand_path('../../../../Gemfile', __FILE__)
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
3
 
4
- if File.exist?(gemfile)
5
- ENV['BUNDLE_GEMFILE'] = gemfile
6
- require 'bundler'
7
- Bundler.setup
8
- end
9
-
10
- $:.unshift File.expand_path('../../../../lib', __FILE__)
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -1,5 +1,5 @@
1
- # Load the rails application
1
+ # Load the Rails application.
2
2
  require File.expand_path('../application', __FILE__)
3
3
 
4
- # Initialize the rails application
5
- Dummy::Application.initialize!
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -1,37 +1,37 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # In the development environment your application's code is reloaded on
5
5
  # every request. This slows down response time but is perfect for development
6
6
  # since you don't have to restart the web server when you make code changes.
7
7
  config.cache_classes = false
8
8
 
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
11
 
12
- # Show full error reports and disable caching
12
+ # Show full error reports and disable caching.
13
13
  config.consider_all_requests_local = true
14
14
  config.action_controller.perform_caching = false
15
15
 
16
- # Don't care if the mailer can't send
16
+ # Don't care if the mailer can't send.
17
17
  config.action_mailer.raise_delivery_errors = false
18
18
 
19
- # Print deprecation notices to the Rails logger
19
+ # Print deprecation notices to the Rails logger.
20
20
  config.active_support.deprecation = :log
21
21
 
22
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
22
+ # Raise an error on page load if there are pending migrations.
23
+ # config.active_record.migration_error = :page_load
24
24
 
25
- # Raise exception on mass assignment protection for Active Record models
26
- # config.active_record.mass_assignment_sanitizer = :strict
27
-
28
- # Log the query plan for queries taking more than this (works
29
- # with SQLite, MySQL, and PostgreSQL)
30
- # config.active_record.auto_explain_threshold_in_seconds = 0.5
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
31
29
 
32
- # Do not compress assets
33
- config.assets.compress = false
30
+ # Adds additional error checking when serving assets at runtime.
31
+ # Checks for improperly declared sprockets dependencies.
32
+ # Raises helpful error messages.
33
+ config.assets.raise_runtime_errors = true
34
34
 
35
- # Expands the lines which load the assets
36
- config.assets.debug = true
35
+ # Raises error for missing translations
36
+ # config.action_view.raise_on_missing_translations = true
37
37
  end