comma 3.2.0 → 3.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/{spec/spec.opts → .rspec} +0 -0
  3. data/.travis.yml +51 -4
  4. data/Appraisals +3 -3
  5. data/Gemfile.lock +1 -1
  6. data/README.markdown +3 -3
  7. data/Rakefile +2 -1
  8. data/gemfiles/active3.0.20.gemfile.lock +1 -1
  9. data/gemfiles/active3.1.12.gemfile.lock +1 -1
  10. data/gemfiles/{active3.2.14.gemfile → active3.2.17.gemfile} +2 -2
  11. data/gemfiles/{active3.2.14.gemfile.lock → active3.2.17.gemfile.lock} +20 -18
  12. data/gemfiles/{active4.0.0.gemfile → active4.0.4.gemfile} +2 -2
  13. data/gemfiles/{active4.0.0.gemfile.lock → active4.0.4.gemfile.lock} +24 -22
  14. data/gemfiles/active4.1.1.gemfile +9 -0
  15. data/gemfiles/active4.1.1.gemfile.lock +66 -0
  16. data/gemfiles/data_mapper1.2.0.gemfile.lock +1 -1
  17. data/gemfiles/{mongoid3.1.4.gemfile → mongoid3.1.6.gemfile} +1 -1
  18. data/gemfiles/{mongoid3.1.4.gemfile.lock → mongoid3.1.6.gemfile.lock} +18 -16
  19. data/gemfiles/rails3.0.20.gemfile.lock +1 -1
  20. data/gemfiles/rails3.1.12.gemfile.lock +1 -1
  21. data/gemfiles/{rails3.2.14.gemfile → rails3.2.17.gemfile} +1 -1
  22. data/gemfiles/{rails3.2.14.gemfile.lock → rails3.2.17.gemfile.lock} +42 -40
  23. data/gemfiles/{rails4.0.0.gemfile → rails4.0.4.gemfile} +1 -1
  24. data/gemfiles/{rails4.0.0.gemfile.lock → rails4.0.4.gemfile.lock} +43 -41
  25. data/gemfiles/rails4.1.1.gemfile +9 -0
  26. data/gemfiles/rails4.1.1.gemfile.lock +123 -0
  27. data/lib/comma.rb +1 -1
  28. data/lib/comma/header_extractor.rb +5 -3
  29. data/lib/comma/version.rb +1 -1
  30. data/spec/comma/rails/active_record_spec.rb +48 -0
  31. data/spec/controllers/users_controller_spec.rb +17 -4
  32. data/spec/rails_app/active_record/config.rb +4 -0
  33. data/spec/rails_app/active_record/models.rb +53 -0
  34. data/spec/rails_app/data_mapper/config.rb +3 -0
  35. data/spec/rails_app/mongoid/config.rb +9 -0
  36. data/spec/rails_app/rails_app.rb +54 -0
  37. data/spec/spec_helper.rb +15 -45
  38. metadata +114 -186
  39. data/spec/rails_app/Rakefile +0 -7
  40. data/spec/rails_app/app/controllers/application_controller.rb +0 -2
  41. data/spec/rails_app/app/controllers/users_controller.rb +0 -23
  42. data/spec/rails_app/app/helpers/application_helper.rb +0 -3
  43. data/spec/rails_app/app/models/post.rb +0 -10
  44. data/spec/rails_app/app/models/user.rb +0 -16
  45. data/spec/rails_app/app/views/layouts/application.html.erb +0 -12
  46. data/spec/rails_app/app/views/users/index.html.erb +0 -1
  47. data/spec/rails_app/config.ru +0 -4
  48. data/spec/rails_app/config/application.rb +0 -42
  49. data/spec/rails_app/config/boot.rb +0 -8
  50. data/spec/rails_app/config/database.yml +0 -18
  51. data/spec/rails_app/config/environment.rb +0 -5
  52. data/spec/rails_app/config/environments/development.rb +0 -19
  53. data/spec/rails_app/config/environments/production.rb +0 -37
  54. data/spec/rails_app/config/environments/test.rb +0 -32
  55. data/spec/rails_app/config/initializers/backtrace_silencers.rb +0 -7
  56. data/spec/rails_app/config/initializers/inflections.rb +0 -2
  57. data/spec/rails_app/config/initializers/secret_token.rb +0 -2
  58. data/spec/rails_app/config/routes.rb +0 -9
  59. data/spec/rails_app/db/migrate/20120224085510_create_tables.rb +0 -24
  60. data/spec/rails_app/db/schema.rb +0 -32
  61. data/spec/rails_app/public/404.html +0 -26
  62. data/spec/rails_app/public/422.html +0 -26
  63. data/spec/rails_app/public/500.html +0 -26
  64. data/spec/rails_app/public/favicon.ico +0 -0
  65. data/spec/rails_app/script/rails +0 -6
@@ -1,7 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
- require 'rake'
6
-
7
- RailsApp::Application.load_tasks
@@ -1,2 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- end
@@ -1,23 +0,0 @@
1
- class UsersController < ApplicationController
2
- def index
3
- respond_to do |format|
4
- format.html { render :text => 'Users!' }
5
- format.csv { render :csv => User.all }
6
- end
7
- end
8
-
9
- def with_custom_options
10
- render_options = {:csv => User.all}.update(params[:custom_options].symbolize_keys)
11
-
12
- respond_to do |format|
13
- format.csv { render render_options }
14
- end
15
- end
16
-
17
- def with_custom_style
18
- respond_to do |format|
19
- format.csv { render :csv => User.all, :style => :shortened }
20
- end
21
- end
22
-
23
- end
@@ -1,3 +0,0 @@
1
- # Methods added to this helper will be available to all templates in the application.
2
- module ApplicationHelper
3
- end
@@ -1,10 +0,0 @@
1
- class Post < ActiveRecord::Base
2
-
3
- comma do
4
- title
5
- description
6
-
7
- user :full_name
8
- end
9
-
10
- end
@@ -1,16 +0,0 @@
1
- class User < ActiveRecord::Base
2
- comma do
3
- first_name
4
- last_name
5
- full_name "Name"
6
- end
7
-
8
- comma :shortened do
9
- first_name
10
- last_name
11
- end
12
-
13
- def full_name
14
- "#{first_name} #{last_name}".strip
15
- end
16
- end
@@ -1,12 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
- <html>
4
- <head>
5
- <title>Comma Test App</title>
6
- </head>
7
- <body>
8
- <div id="container">
9
- <%= yield %>
10
- </div>
11
- </body>
12
- </html>
@@ -1 +0,0 @@
1
- Users!
@@ -1,4 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run RailsApp::Application
@@ -1,42 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails/all'
4
-
5
- # If you have a Gemfile, require the gems listed there, including any gems
6
- # you've limited to :test, :development, or :production.
7
- Bundler.require(:default, Rails.env) if defined?(Bundler)
8
-
9
- module RailsApp
10
- class Application < Rails::Application
11
- # Settings in config/environments/* take precedence over those specified here.
12
- # Application configuration should go into files in config/initializers
13
- # -- all .rb files in that directory are automatically loaded.
14
-
15
- # Custom directories with classes and modules you want to be autoloadable.
16
- # config.autoload_paths += %W(#{config.root}/extras)
17
-
18
- # Only load the plugins named here, in the order given (default is alphabetical).
19
- # :all can be used as a placeholder for all plugins not explicitly named.
20
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
21
-
22
- # Activate observers that should always be running.
23
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
24
-
25
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
26
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
27
- # config.time_zone = 'Central Time (US & Canada)'
28
-
29
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
30
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
31
- # config.i18n.default_locale = :de
32
-
33
- # JavaScript files you want as :defaults (application.js is always included).
34
- # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
35
-
36
- # Configure the default encoding used in templates for Ruby 1.9.
37
- config.encoding = "utf-8"
38
-
39
- # Configure sensitive parameters which will be filtered from the log file.
40
- config.filter_parameters += [:password]
41
- end
42
- end
@@ -1,8 +0,0 @@
1
- unless defined?(DEVISE_ORM)
2
- DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
3
- end
4
-
5
- require 'rubygems'
6
- require 'bundler/setup'
7
-
8
- $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -1,18 +0,0 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3-ruby (not necessary on OS X Leopard)
3
- development:
4
- adapter: sqlite3
5
- database: db/development.sqlite3
6
- pool: 5
7
- timeout: 5000
8
-
9
- # Warning: The database defined as "test" will be erased and
10
- # re-generated from your development database when you run "rake".
11
- # Do not set this db to the same as development or production.
12
- test:
13
- adapter: sqlite3
14
- database: ":memory:"
15
-
16
- production:
17
- adapter: sqlite3
18
- database: ":memory:"
@@ -1,5 +0,0 @@
1
- # Load the rails application
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the rails application
5
- RailsApp::Application.initialize!
@@ -1,19 +0,0 @@
1
- RailsApp::Application.configure do
2
- # Settings specified here will take precedence over those in config/environment.rb
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the webserver when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Show full error reports and disable caching
10
- config.consider_all_requests_local = true
11
- config.action_controller.perform_caching = false
12
-
13
- # Don't care if the mailer can't send
14
- config.action_mailer.raise_delivery_errors = false
15
-
16
- config.active_support.deprecation = :log
17
-
18
- config.eager_load = false
19
- end
@@ -1,37 +0,0 @@
1
- RailsApp::Application.configure do
2
- # Settings specified here will take precedence over those in config/environment.rb
3
-
4
- # The production environment is meant for finished, "live" apps.
5
- # Code is not reloaded between requests
6
- config.cache_classes = true
7
-
8
- # Full error reports are disabled and caching is turned on
9
- config.consider_all_requests_local = false
10
- config.action_controller.perform_caching = true
11
-
12
- # See everything in the log (default is :info)
13
- # config.log_level = :debug
14
-
15
- # Use a different logger for distributed setups
16
- # config.logger = SyslogLogger.new
17
-
18
- # Use a different cache store in production
19
- # config.cache_store = :mem_cache_store
20
-
21
- # Disable Rails's static asset server
22
- # In production, Apache or nginx will already do this
23
- config.serve_static_assets = false
24
-
25
- # Enable serving of images, stylesheets, and javascripts from an asset server
26
- # config.action_controller.asset_host = "http://assets.example.com"
27
-
28
- # Disable delivery errors, bad email addresses will be ignored
29
- # config.action_mailer.raise_delivery_errors = false
30
-
31
- # Enable threaded mode
32
- # config.threadsafe!
33
-
34
- config.active_support.deprecation = :log
35
-
36
- config.eager_load = true
37
- end
@@ -1,32 +0,0 @@
1
- RailsApp::Application.configure do
2
- # Settings specified here will take precedence over those in config/environment.rb
3
-
4
- # The test environment is used exclusively to run your application's
5
- # test suite. You never need to work with it otherwise. Remember that
6
- # your test database is "scratch space" for the test suite and is wiped
7
- # and recreated between test runs. Don't rely on the data there!
8
- config.cache_classes = true
9
-
10
- # Show full error reports and disable caching
11
- config.consider_all_requests_local = true
12
- config.action_controller.perform_caching = false
13
-
14
- # Disable request forgery protection in test environment
15
- config.action_controller.allow_forgery_protection = false
16
-
17
- # Tell Action Mailer not to deliver emails to the real world.
18
- # The :test delivery method accumulates sent emails in the
19
- # ActionMailer::Base.deliveries array.
20
- config.action_mailer.delivery_method = :test
21
-
22
- # Use SQL instead of Active Record's schema dumper when creating the test database.
23
- # This is necessary if your schema can't be completely dumped by the schema dumper,
24
- # like if you have constraints or database-specific column types
25
- # config.active_record.schema_format = :sql
26
-
27
- config.action_dispatch.show_exceptions = false
28
-
29
- config.active_support.deprecation = :stderr
30
-
31
- config.eager_load = false
32
- end
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
- # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
-
6
- # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
- Rails.backtrace_cleaner.remove_silencers!
@@ -1,2 +0,0 @@
1
- ActiveSupport::Inflector.inflections do |inflect|
2
- end
@@ -1,2 +0,0 @@
1
- Rails.application.config.secret_token = 'ea942c41850d502f2c8283e26bdc57829f471bb18224ddff0a192c4f32cdf6cb5aa0d82b3a7a7adbeb640c4b06f3aa1cd5f098162d8240f669b39d6b49680571'
2
- Rails.application.config.session_store :cookie_store, :key => "_my_app"
@@ -1,9 +0,0 @@
1
- Rails.application.routes.draw do
2
- # Resources for testing
3
- resources :users, :only => [:index]
4
-
5
- get "with_custom_options", :to => "users#with_custom_options"
6
- get "with_custom_style", :to => "users#with_custom_style"
7
-
8
- root :to => "users#index"
9
- end
@@ -1,24 +0,0 @@
1
-
2
- class CreateTables < ActiveRecord::Migration
3
- def self.up
4
- create_table :users do |t|
5
- t.string :first_name
6
- t.string :last_name
7
-
8
- t.timestamps
9
- end
10
-
11
- create_table :posts do |t|
12
- t.references :user
13
- t.string :title
14
- t.string :description
15
-
16
- t.timestamps
17
- end
18
- end
19
-
20
- def self.down
21
- drop_table :posts
22
- drop_table :users
23
- end
24
- end
@@ -1,32 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # Note that this schema.rb definition is the authoritative source for your
6
- # database schema. If you need to create the application database on another
7
- # system, you should be using db:schema:load, not running all the migrations
8
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
- # you'll amass, the slower it'll run and the greater likelihood for issues).
10
- #
11
- # It's strongly recommended to check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(:version => 20120224085510) do
14
-
15
- create_table "posts", :force => true do |t|
16
- t.string "title"
17
- t.string "description", :limit => 128
18
- t.integer "user_id"
19
-
20
- t.datetime "created_at"
21
- t.datetime "updated_at"
22
- end
23
-
24
- create_table "users", :force => true do |t|
25
- t.string "first_name"
26
- t.string "last_name"
27
-
28
- t.datetime "created_at"
29
- t.datetime "updated_at"
30
- end
31
-
32
- end
@@ -1,26 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The page you were looking for doesn't exist (404)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/404.html -->
21
- <div class="dialog">
22
- <h1>The page you were looking for doesn't exist.</h1>
23
- <p>You may have mistyped the address or the page may have moved.</p>
24
- </div>
25
- </body>
26
- </html>
@@ -1,26 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The change you wanted was rejected (422)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/422.html -->
21
- <div class="dialog">
22
- <h1>The change you wanted was rejected.</h1>
23
- <p>Maybe you tried to change something you didn't have access to.</p>
24
- </div>
25
- </body>
26
- </html>
@@ -1,26 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>We're sorry, but something went wrong (500)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/500.html -->
21
- <div class="dialog">
22
- <h1>We're sorry, but something went wrong.</h1>
23
- <p>We've been notified about this issue and we'll take a look at it shortly.</p>
24
- </div>
25
- </body>
26
- </html>
File without changes