tb_media 1.2.2 → 1.3.beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -2
  3. data/app/controllers/admin/media_controller.rb +57 -61
  4. data/app/controllers/admin/media_picker_controller.rb +9 -9
  5. data/app/controllers/protected_media_controller.rb +7 -7
  6. data/app/helpers/protected_media_helper.rb +1 -1
  7. data/app/models/spud_media.rb +61 -67
  8. data/lib/spud_media/configuration.rb +3 -3
  9. data/lib/spud_media/content_types.rb +2 -2
  10. data/lib/spud_media/engine.rb +17 -17
  11. data/lib/spud_media/version.rb +3 -3
  12. data/lib/tasks/spud_media_tasks.rake +4 -6
  13. data/spec/controllers/admin/media_controller_spec.rb +24 -24
  14. data/spec/dummy/config/application.rb +2 -3
  15. data/spec/dummy/config/boot.rb +1 -1
  16. data/spec/dummy/config/environments/development.rb +0 -7
  17. data/spec/dummy/config/environments/test.rb +3 -5
  18. data/spec/dummy/config/routes.rb +2 -2
  19. data/spec/dummy/config.ru +1 -1
  20. data/spec/dummy/db/migrate/20130904141442_create_spud_users.tb_core.rb +12 -12
  21. data/spec/dummy/db/migrate/20130904141443_add_time_zone_to_spud_user.tb_core.rb +0 -1
  22. data/spec/dummy/db/migrate/20130904141444_add_scope_to_spud_admin_permissions.tb_core.rb +0 -1
  23. data/spec/dummy/db/migrate/20130904141446_create_spud_media.tb_media.rb +1 -1
  24. data/spec/dummy/db/migrate/20130904141447_add_protected_to_spud_media.tb_media.rb +1 -1
  25. data/spec/dummy/db/migrate/20130904141448_add_cropping_to_spud_media.tb_media.rb +3 -3
  26. data/spec/dummy/db/migrate/20151012194531_create_spud_permissions.tb_core.rb +3 -3
  27. data/spec/dummy/db/migrate/20151012194532_create_spud_role_permissions.tb_core.rb +2 -2
  28. data/spec/dummy/db/migrate/20151012194534_add_requires_password_change_to_spud_users.tb_core.rb +1 -1
  29. data/spec/dummy/db/schema.rb +63 -67
  30. data/spec/dummy/public/system/spud_media/1/cropped/test_img1.png +0 -0
  31. data/spec/dummy/public/system/spud_media/1/small/test_img1.png +0 -0
  32. data/spec/dummy/public/system/spud_media/2/cropped/test_img1.png +0 -0
  33. data/spec/dummy/public/system/spud_media/2/small/test_img1.png +0 -0
  34. data/spec/dummy/public/system/spud_media/3/cropped/test_img1.png +0 -0
  35. data/spec/dummy/public/system/spud_media/3/small/test_img1.png +0 -0
  36. data/spec/dummy/public/system/spud_media/4/cropped/test_img1.png +0 -0
  37. data/spec/dummy/public/system/spud_media/4/small/test_img1.png +0 -0
  38. data/spec/dummy/public/system/spud_media/5/cropped/test_img1.png +0 -0
  39. data/spec/dummy/public/system/spud_media/5/small/test_img1.png +0 -0
  40. data/spec/dummy/script/rails +2 -2
  41. data/spec/javascripts/support/jasmine_helper.rb +6 -7
  42. data/spec/models/spud_media_spec.rb +2 -2
  43. data/spec/rails_helper.rb +13 -6
  44. data/spec/spec_helper.rb +42 -44
  45. metadata +51 -49
  46. data/spec/dummy/public/system/spud_media/1/cropped/test_img1.jpg +0 -0
  47. data/spec/dummy/public/system/spud_media/2/cropped/test_img1.jpg +0 -0
  48. data/spec/dummy/public/system/spud_media/3/cropped/test_img1.jpg +0 -0
  49. data/spec/dummy/public/system/spud_media/4/cropped/test_img1.jpg +0 -0
  50. data/spec/dummy/public/system/spud_media/5/cropped/test_img1.jpg +0 -0
  51. data/spec/support/authlogic_helper.rb +0 -2
@@ -22,13 +22,6 @@ Dummy::Application.configure do
22
22
  # Only use best-standards-support built into browsers
23
23
  config.action_dispatch.best_standards_support = :builtin
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
31
-
32
25
  # Do not compress assets
33
26
  config.assets.compress = false
34
27
 
@@ -8,8 +8,8 @@ Dummy::Application.configure do
8
8
  config.cache_classes = true
9
9
 
10
10
  # Configure static asset server for tests with Cache-Control for performance
11
- config.serve_static_files = true
12
- config.static_cache_control = "public, max-age=3600"
11
+ config.serve_static_assets = true
12
+ config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
13
13
 
14
14
  # Do not eager load code on boot. This avoids loading your whole application
15
15
  # just for the purpose of running a single test. If you are using a tool that
@@ -24,7 +24,7 @@ Dummy::Application.configure do
24
24
  config.action_dispatch.show_exceptions = false
25
25
 
26
26
  # Disable request forgery protection in test environment
27
- config.action_controller.allow_forgery_protection = false
27
+ config.action_controller.allow_forgery_protection = false
28
28
 
29
29
  # Tell Action Mailer not to deliver emails to the real world.
30
30
  # The :test delivery method accumulates sent emails in the
@@ -33,6 +33,4 @@ Dummy::Application.configure do
33
33
 
34
34
  # Print deprecation notices to the stderr
35
35
  config.active_support.deprecation = :stderr
36
-
37
- config.active_record.raise_in_transactional_callbacks = true
38
36
  end
@@ -1,5 +1,5 @@
1
1
  Rails.application.routes.draw do
2
2
 
3
- #mount SpudMedia::Engine => "/spud_media"
4
-
3
+ # mount SpudMedia::Engine => "/spud_media"
4
+
5
5
  end
data/spec/dummy/config.ru CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
- require ::File.expand_path('../config/environment', __FILE__)
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
4
  run Dummy::Application
@@ -2,21 +2,21 @@
2
2
  class CreateSpudUsers < ActiveRecord::Migration
3
3
  def change
4
4
  create_table :spud_users do |t|
5
-
5
+
6
6
  t.string :first_name
7
7
  t.string :last_name
8
8
  t.boolean :super_admin
9
- t.string :login, :null => false # optional, you can use email instead, or both
10
- t.string :email, :null => false # optional, you can use login instead, or both
11
- t.string :crypted_password, :null => false # optional, see below
12
- t.string :password_salt, :null => false # optional, but highly recommended
13
- t.string :persistence_token, :null => false # required
14
- t.string :single_access_token, :null => false # optional, see Authlogic::Session::Params
15
- t.string :perishable_token, :null => false # optional, see Authlogic::Session::Perishability
9
+ t.string :login, null: false # optional, you can use email instead, or both
10
+ t.string :email, null: false # optional, you can use login instead, or both
11
+ t.string :crypted_password, null: false # optional, see below
12
+ t.string :password_salt, null: false # optional, but highly recommended
13
+ t.string :persistence_token, null: false # required
14
+ t.string :single_access_token, null: false # optional, see Authlogic::Session::Params
15
+ t.string :perishable_token, null: false # optional, see Authlogic::Session::Perishability
16
16
 
17
17
  # Magic columns, just like ActiveRecord's created_at and updated_at. These are automatically maintained by Authlogic if they are present.
18
- t.integer :login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
19
- t.integer :failed_login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
18
+ t.integer :login_count, null: false, default: 0 # optional, see Authlogic::Session::MagicColumns
19
+ t.integer :failed_login_count, null: false, default: 0 # optional, see Authlogic::Session::MagicColumns
20
20
  t.datetime :last_request_at # optional, see Authlogic::Session::MagicColumns
21
21
  t.datetime :current_login_at # optional, see Authlogic::Session::MagicColumns
22
22
  t.datetime :last_login_at # optional, see Authlogic::Session::MagicColumns
@@ -24,7 +24,7 @@ class CreateSpudUsers < ActiveRecord::Migration
24
24
  t.string :last_login_ip # optional, see Authlogic::Session::MagicColumns
25
25
  t.timestamps
26
26
  end
27
- add_index :spud_users,:login
28
- add_index :spud_users,:email
27
+ add_index :spud_users, :login
28
+ add_index :spud_users, :email
29
29
  end
30
30
  end
@@ -2,6 +2,5 @@
2
2
  class AddTimeZoneToSpudUser < ActiveRecord::Migration
3
3
  def change
4
4
  add_column :spud_users, :time_zone, :string
5
-
6
5
  end
7
6
  end
@@ -2,6 +2,5 @@
2
2
  class AddScopeToSpudAdminPermissions < ActiveRecord::Migration
3
3
  def change
4
4
  add_column :spud_admin_permissions, :scope, :string
5
-
6
5
  end
7
6
  end
@@ -9,4 +9,4 @@ class CreateSpudMedia < ActiveRecord::Migration
9
9
  t.timestamps
10
10
  end
11
11
  end
12
- end
12
+ end
@@ -1,7 +1,7 @@
1
1
  # This migration comes from tb_media (originally 20120501203325)
2
2
  class AddProtectedToSpudMedia < ActiveRecord::Migration
3
3
  def change
4
- add_column :spud_media, :is_protected, :boolean, :default => false
4
+ add_column :spud_media, :is_protected, :boolean, default: false
5
5
  add_column :spud_media, :attachment_updated_at, :datetime
6
6
  end
7
7
  end
@@ -1,10 +1,10 @@
1
1
  # This migration comes from tb_media (originally 20120508132153)
2
2
  class AddCroppingToSpudMedia < ActiveRecord::Migration
3
3
  def change
4
- add_column :spud_media, :crop_x, :int, :default => 0
5
- add_column :spud_media, :crop_y, :int, :default => 0
4
+ add_column :spud_media, :crop_x, :int, default: 0
5
+ add_column :spud_media, :crop_y, :int, default: 0
6
6
  add_column :spud_media, :crop_w, :int
7
7
  add_column :spud_media, :crop_h, :int
8
- add_column :spud_media, :crop_s, :int, :default => 100
8
+ add_column :spud_media, :crop_s, :int, default: 100
9
9
  end
10
10
  end
@@ -2,10 +2,10 @@
2
2
  class CreateSpudPermissions < ActiveRecord::Migration
3
3
  def change
4
4
  create_table :spud_permissions do |t|
5
- t.string :name, :null => false
6
- t.string :tag, :null => false
5
+ t.string :name, null: false
6
+ t.string :tag, null: false
7
7
  t.timestamps
8
8
  end
9
- add_index :spud_permissions, :tag, :unique => true
9
+ add_index :spud_permissions, :tag, unique: true
10
10
  end
11
11
  end
@@ -2,8 +2,8 @@
2
2
  class CreateSpudRolePermissions < ActiveRecord::Migration
3
3
  def change
4
4
  create_table :spud_role_permissions do |t|
5
- t.integer :spud_role_id, :null => false
6
- t.string :spud_permission_tag, :null => false
5
+ t.integer :spud_role_id, null: false
6
+ t.string :spud_permission_tag, null: false
7
7
  t.timestamps
8
8
  end
9
9
  add_index :spud_role_permissions, :spud_role_id
@@ -1,6 +1,6 @@
1
1
  # This migration comes from tb_core (originally 20150610143438)
2
2
  class AddRequiresPasswordChangeToSpudUsers < ActiveRecord::Migration
3
3
  def change
4
- add_column :spud_users, :requires_password_change, :boolean, :default => false
4
+ add_column :spud_users, :requires_password_change, :boolean, default: false
5
5
  end
6
6
  end
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  # This file is auto-generated from the current state of the database. Instead
3
2
  # of editing this file, please use the migrations feature of Active Record to
4
3
  # incrementally modify your database, and then regenerate this schema definition.
@@ -11,83 +10,80 @@
11
10
  #
12
11
  # It's strongly recommended that you check this file into your version control system.
13
12
 
14
- ActiveRecord::Schema.define(version: 20151012194534) do
13
+ ActiveRecord::Schema.define(version: 20_151_012_194_534) do
15
14
 
16
- create_table "spud_media", force: :cascade do |t|
17
- t.string "attachment_content_type", limit: 255
18
- t.integer "attachment_file_size", limit: 4
19
- t.string "attachment_file_name", limit: 255
20
- t.datetime "created_at"
21
- t.datetime "updated_at"
22
- t.boolean "is_protected", limit: 1, default: false
23
- t.datetime "attachment_updated_at"
24
- t.integer "crop_x", limit: 4, default: 0
25
- t.integer "crop_y", limit: 4, default: 0
26
- t.integer "crop_w", limit: 4
27
- t.integer "crop_h", limit: 4
28
- t.integer "crop_s", limit: 4, default: 100
15
+ create_table 'spud_media', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
16
+ t.string 'attachment_content_type'
17
+ t.integer 'attachment_file_size'
18
+ t.string 'attachment_file_name'
19
+ t.datetime 'created_at'
20
+ t.datetime 'updated_at'
21
+ t.boolean 'is_protected', default: false
22
+ t.datetime 'attachment_updated_at'
23
+ t.integer 'crop_x', default: 0
24
+ t.integer 'crop_y', default: 0
25
+ t.integer 'crop_w'
26
+ t.integer 'crop_h'
27
+ t.integer 'crop_s', default: 100
29
28
  end
30
29
 
31
- create_table "spud_permissions", force: :cascade do |t|
32
- t.string "name", limit: 255, null: false
33
- t.string "tag", limit: 255, null: false
34
- t.datetime "created_at"
35
- t.datetime "updated_at"
30
+ create_table 'spud_permissions', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
31
+ t.string 'name', null: false
32
+ t.string 'tag', null: false
33
+ t.datetime 'created_at'
34
+ t.datetime 'updated_at'
35
+ t.index ['tag'], name: 'index_spud_permissions_on_tag', unique: true, using: :btree
36
36
  end
37
37
 
38
- add_index "spud_permissions", ["tag"], name: "index_spud_permissions_on_tag", unique: true, using: :btree
39
-
40
- create_table "spud_role_permissions", force: :cascade do |t|
41
- t.integer "spud_role_id", limit: 4, null: false
42
- t.string "spud_permission_tag", limit: 255, null: false
43
- t.datetime "created_at"
44
- t.datetime "updated_at"
38
+ create_table 'spud_role_permissions', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
39
+ t.integer 'spud_role_id', null: false
40
+ t.string 'spud_permission_tag', null: false
41
+ t.datetime 'created_at'
42
+ t.datetime 'updated_at'
43
+ t.index ['spud_permission_tag'], name: 'index_spud_role_permissions_on_spud_permission_tag', using: :btree
44
+ t.index ['spud_role_id'], name: 'index_spud_role_permissions_on_spud_role_id', using: :btree
45
45
  end
46
46
 
47
- add_index "spud_role_permissions", ["spud_permission_tag"], name: "index_spud_role_permissions_on_spud_permission_tag", using: :btree
48
- add_index "spud_role_permissions", ["spud_role_id"], name: "index_spud_role_permissions_on_spud_role_id", using: :btree
49
-
50
- create_table "spud_roles", force: :cascade do |t|
51
- t.string "name", limit: 255
52
- t.datetime "created_at"
53
- t.datetime "updated_at"
47
+ create_table 'spud_roles', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
48
+ t.string 'name'
49
+ t.datetime 'created_at'
50
+ t.datetime 'updated_at'
54
51
  end
55
52
 
56
- create_table "spud_user_settings", force: :cascade do |t|
57
- t.integer "spud_user_id", limit: 4
58
- t.string "key", limit: 255
59
- t.string "value", limit: 255
60
- t.datetime "created_at"
61
- t.datetime "updated_at"
53
+ create_table 'spud_user_settings', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
54
+ t.integer 'spud_user_id'
55
+ t.string 'key'
56
+ t.string 'value'
57
+ t.datetime 'created_at'
58
+ t.datetime 'updated_at'
62
59
  end
63
60
 
64
- create_table "spud_users", force: :cascade do |t|
65
- t.string "first_name", limit: 255
66
- t.string "last_name", limit: 255
67
- t.boolean "super_admin", limit: 1
68
- t.string "login", limit: 255, null: false
69
- t.string "email", limit: 255, null: false
70
- t.string "crypted_password", limit: 255, null: false
71
- t.string "password_salt", limit: 255, null: false
72
- t.string "persistence_token", limit: 255, null: false
73
- t.string "single_access_token", limit: 255, null: false
74
- t.string "perishable_token", limit: 255, null: false
75
- t.integer "login_count", limit: 4, default: 0, null: false
76
- t.integer "failed_login_count", limit: 4, default: 0, null: false
77
- t.datetime "last_request_at"
78
- t.datetime "current_login_at"
79
- t.datetime "last_login_at"
80
- t.string "current_login_ip", limit: 255
81
- t.string "last_login_ip", limit: 255
82
- t.datetime "created_at"
83
- t.datetime "updated_at"
84
- t.string "time_zone", limit: 255
85
- t.integer "spud_role_id", limit: 4
86
- t.boolean "requires_password_change", limit: 1, default: false
61
+ create_table 'spud_users', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
62
+ t.string 'first_name'
63
+ t.string 'last_name'
64
+ t.boolean 'super_admin'
65
+ t.string 'login', null: false
66
+ t.string 'email', null: false
67
+ t.string 'crypted_password', null: false
68
+ t.string 'password_salt', null: false
69
+ t.string 'persistence_token', null: false
70
+ t.string 'single_access_token', null: false
71
+ t.string 'perishable_token', null: false
72
+ t.integer 'login_count', default: 0, null: false
73
+ t.integer 'failed_login_count', default: 0, null: false
74
+ t.datetime 'last_request_at'
75
+ t.datetime 'current_login_at'
76
+ t.datetime 'last_login_at'
77
+ t.string 'current_login_ip'
78
+ t.string 'last_login_ip'
79
+ t.datetime 'created_at'
80
+ t.datetime 'updated_at'
81
+ t.string 'time_zone'
82
+ t.integer 'spud_role_id'
83
+ t.boolean 'requires_password_change', default: false
84
+ t.index ['email'], name: 'index_spud_users_on_email', using: :btree
85
+ t.index ['login'], name: 'index_spud_users_on_login', using: :btree
86
+ t.index ['spud_role_id'], name: 'index_spud_users_on_spud_role_id', using: :btree
87
87
  end
88
88
 
89
- add_index "spud_users", ["email"], name: "index_spud_users_on_email", using: :btree
90
- add_index "spud_users", ["login"], name: "index_spud_users_on_login", using: :btree
91
- add_index "spud_users", ["spud_role_id"], name: "index_spud_users_on_spud_role_id", using: :btree
92
-
93
89
  end
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
3
 
4
- APP_PATH = File.expand_path('../../config/application', __FILE__)
5
- require File.expand_path('../../config/boot', __FILE__)
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
6
  require 'rails/commands'
@@ -1,11 +1,10 @@
1
- #Use this file to set/override Jasmine configuration options
2
- #You can remove it if you don't need it.
3
- #This file is loaded *after* jasmine.yml is interpreted.
1
+ # Use this file to set/override Jasmine configuration options
2
+ # You can remove it if you don't need it.
3
+ # This file is loaded *after* jasmine.yml is interpreted.
4
4
  #
5
- #Example: using a different boot file.
6
- #Jasmine.configure do |config|
5
+ # Example: using a different boot file.
6
+ # Jasmine.configure do |config|
7
7
  # config.boot_dir = '/absolute/path/to/boot_dir'
8
8
  # config.boot_files = lambda { ['/absolute/path/to/boot_dir/file.js'] }
9
- #end
9
+ # end
10
10
  #
11
-
@@ -1,10 +1,10 @@
1
1
  require 'rails_helper'
2
2
 
3
- describe SpudMedia, :type => :model do
3
+ describe SpudMedia, type: :model do
4
4
 
5
5
  describe 'attachment' do
6
6
  it 'should require an attachment' do
7
- media = FactoryGirl.build(:spud_media, :attachment => nil)
7
+ media = FactoryGirl.build(:spud_media, attachment: nil)
8
8
  expect(media.valid?).to eq(false)
9
9
  expect(media.errors[:attachment].length).to eq(1)
10
10
  end
data/spec/rails_helper.rb CHANGED
@@ -1,13 +1,14 @@
1
1
  # This file is copied to spec/ when you run 'rails generate rspec:install'
2
- ENV["RAILS_ENV"] ||= 'test'
2
+ ENV['RAILS_ENV'] ||= 'test'
3
3
 
4
- require File.expand_path("../dummy/config/environment.rb", __FILE__)
4
+ require File.expand_path('../dummy/config/environment.rb', __FILE__)
5
5
  require 'spec_helper'
6
- require 'support/authlogic_helper'
7
6
  require 'rspec/rails'
7
+ require 'rails-controller-testing'
8
8
  require 'database_cleaner'
9
9
  require 'simplecov'
10
10
  require 'factory_girl_rails'
11
+ require 'tb_core/test_helper'
11
12
 
12
13
  SimpleCov.start 'rails'
13
14
 
@@ -30,12 +31,18 @@ SimpleCov.start 'rails'
30
31
 
31
32
  # Checks for pending migrations before tests are run.
32
33
  # If you are not using ActiveRecord, you can remove this line.
33
- #ActiveRecord::Migration.maintain_test_schema!
34
+ # ActiveRecord::Migration.maintain_test_schema!
34
35
 
35
36
  RSpec.configure do |config|
37
+ [:controller, :view, :request].each do |type|
38
+ config.include ::Rails::Controller::Testing::TestProcess, type: type
39
+ config.include ::Rails::Controller::Testing::TemplateAssertions, type: type
40
+ config.include ::Rails::Controller::Testing::Integration, type: type
41
+ end
42
+
36
43
  config.raise_errors_for_deprecations!
37
44
  config.infer_base_class_for_anonymous_controllers = false
38
-
45
+
39
46
  # If you're not using ActiveRecord, or you'd prefer not to run each of your
40
47
  # examples within a transaction, remove the following line or assign false
41
48
  # instead of true.
@@ -67,5 +74,5 @@ RSpec.configure do |config|
67
74
  example.run
68
75
  end
69
76
  end
70
-
77
+
71
78
  end
data/spec/spec_helper.rb CHANGED
@@ -38,48 +38,46 @@ RSpec.configure do |config|
38
38
  mocks.verify_partial_doubles = true
39
39
  end
40
40
 
41
- # The settings below are suggested to provide a good initial experience
42
- # with RSpec, but feel free to customize to your heart's content.
43
- =begin
44
- # These two settings work together to allow you to limit a spec run
45
- # to individual examples or groups you care about by tagging them with
46
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
47
- # get run.
48
- config.filter_run :focus
49
- config.run_all_when_everything_filtered = true
50
-
51
- # Limits the available syntax to the non-monkey patched syntax that is recommended.
52
- # For more details, see:
53
- # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
54
- # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
55
- # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
56
- config.disable_monkey_patching!
57
-
58
- # Many RSpec users commonly either run the entire suite or an individual
59
- # file, and it's useful to allow more verbose output when running an
60
- # individual spec file.
61
- if config.files_to_run.one?
62
- # Use the documentation formatter for detailed output,
63
- # unless a formatter has already been configured
64
- # (e.g. via a command-line flag).
65
- config.default_formatter = 'doc'
66
- end
67
-
68
- # Print the 10 slowest examples and example groups at the
69
- # end of the spec run, to help surface which specs are running
70
- # particularly slow.
71
- config.profile_examples = 10
72
-
73
- # Run specs in random order to surface order dependencies. If you find an
74
- # order dependency and want to debug it, you can fix the order by providing
75
- # the seed, which is printed after each run.
76
- # --seed 1234
77
- config.order = :random
78
-
79
- # Seed global randomization in this process using the `--seed` CLI option.
80
- # Setting this allows you to use `--seed` to deterministically reproduce
81
- # test failures related to randomization by passing the same `--seed` value
82
- # as the one that triggered the failure.
83
- Kernel.srand config.seed
84
- =end
41
+ # The settings below are suggested to provide a good initial experience
42
+ # with RSpec, but feel free to customize to your heart's content.
43
+ # # These two settings work together to allow you to limit a spec run
44
+ # # to individual examples or groups you care about by tagging them with
45
+ # # `:focus` metadata. When nothing is tagged with `:focus`, all examples
46
+ # # get run.
47
+ # config.filter_run :focus
48
+ # config.run_all_when_everything_filtered = true
49
+ #
50
+ # # Limits the available syntax to the non-monkey patched syntax that is recommended.
51
+ # # For more details, see:
52
+ # # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
53
+ # # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
54
+ # # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
55
+ # config.disable_monkey_patching!
56
+ #
57
+ # # Many RSpec users commonly either run the entire suite or an individual
58
+ # # file, and it's useful to allow more verbose output when running an
59
+ # # individual spec file.
60
+ # if config.files_to_run.one?
61
+ # # Use the documentation formatter for detailed output,
62
+ # # unless a formatter has already been configured
63
+ # # (e.g. via a command-line flag).
64
+ # config.default_formatter = 'doc'
65
+ # end
66
+ #
67
+ # # Print the 10 slowest examples and example groups at the
68
+ # # end of the spec run, to help surface which specs are running
69
+ # # particularly slow.
70
+ # config.profile_examples = 10
71
+ #
72
+ # # Run specs in random order to surface order dependencies. If you find an
73
+ # # order dependency and want to debug it, you can fix the order by providing
74
+ # # the seed, which is printed after each run.
75
+ # # --seed 1234
76
+ # config.order = :random
77
+ #
78
+ # # Seed global randomization in this process using the `--seed` CLI option.
79
+ # # Setting this allows you to use `--seed` to deterministically reproduce
80
+ # # test failures related to randomization by passing the same `--seed` value
81
+ # # as the one that triggered the failure.
82
+ # Kernel.srand config.seed
85
83
  end