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.
- checksums.yaml +4 -4
- data/Rakefile +2 -2
- data/app/controllers/admin/media_controller.rb +57 -61
- data/app/controllers/admin/media_picker_controller.rb +9 -9
- data/app/controllers/protected_media_controller.rb +7 -7
- data/app/helpers/protected_media_helper.rb +1 -1
- data/app/models/spud_media.rb +61 -67
- data/lib/spud_media/configuration.rb +3 -3
- data/lib/spud_media/content_types.rb +2 -2
- data/lib/spud_media/engine.rb +17 -17
- data/lib/spud_media/version.rb +3 -3
- data/lib/tasks/spud_media_tasks.rake +4 -6
- data/spec/controllers/admin/media_controller_spec.rb +24 -24
- data/spec/dummy/config/application.rb +2 -3
- data/spec/dummy/config/boot.rb +1 -1
- data/spec/dummy/config/environments/development.rb +0 -7
- data/spec/dummy/config/environments/test.rb +3 -5
- data/spec/dummy/config/routes.rb +2 -2
- data/spec/dummy/config.ru +1 -1
- data/spec/dummy/db/migrate/20130904141442_create_spud_users.tb_core.rb +12 -12
- data/spec/dummy/db/migrate/20130904141443_add_time_zone_to_spud_user.tb_core.rb +0 -1
- data/spec/dummy/db/migrate/20130904141444_add_scope_to_spud_admin_permissions.tb_core.rb +0 -1
- data/spec/dummy/db/migrate/20130904141446_create_spud_media.tb_media.rb +1 -1
- data/spec/dummy/db/migrate/20130904141447_add_protected_to_spud_media.tb_media.rb +1 -1
- data/spec/dummy/db/migrate/20130904141448_add_cropping_to_spud_media.tb_media.rb +3 -3
- data/spec/dummy/db/migrate/20151012194531_create_spud_permissions.tb_core.rb +3 -3
- data/spec/dummy/db/migrate/20151012194532_create_spud_role_permissions.tb_core.rb +2 -2
- data/spec/dummy/db/migrate/20151012194534_add_requires_password_change_to_spud_users.tb_core.rb +1 -1
- data/spec/dummy/db/schema.rb +63 -67
- data/spec/dummy/public/system/spud_media/1/cropped/test_img1.png +0 -0
- data/spec/dummy/public/system/spud_media/1/small/test_img1.png +0 -0
- data/spec/dummy/public/system/spud_media/2/cropped/test_img1.png +0 -0
- data/spec/dummy/public/system/spud_media/2/small/test_img1.png +0 -0
- data/spec/dummy/public/system/spud_media/3/cropped/test_img1.png +0 -0
- data/spec/dummy/public/system/spud_media/3/small/test_img1.png +0 -0
- data/spec/dummy/public/system/spud_media/4/cropped/test_img1.png +0 -0
- data/spec/dummy/public/system/spud_media/4/small/test_img1.png +0 -0
- data/spec/dummy/public/system/spud_media/5/cropped/test_img1.png +0 -0
- data/spec/dummy/public/system/spud_media/5/small/test_img1.png +0 -0
- data/spec/dummy/script/rails +2 -2
- data/spec/javascripts/support/jasmine_helper.rb +6 -7
- data/spec/models/spud_media_spec.rb +2 -2
- data/spec/rails_helper.rb +13 -6
- data/spec/spec_helper.rb +42 -44
- metadata +51 -49
- data/spec/dummy/public/system/spud_media/1/cropped/test_img1.jpg +0 -0
- data/spec/dummy/public/system/spud_media/2/cropped/test_img1.jpg +0 -0
- data/spec/dummy/public/system/spud_media/3/cropped/test_img1.jpg +0 -0
- data/spec/dummy/public/system/spud_media/4/cropped/test_img1.jpg +0 -0
- data/spec/dummy/public/system/spud_media/5/cropped/test_img1.jpg +0 -0
- 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.
|
12
|
-
config.
|
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
|
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
|
data/spec/dummy/config/routes.rb
CHANGED
data/spec/dummy/config.ru
CHANGED
@@ -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, :
|
10
|
-
t.string :email, :
|
11
|
-
t.string :crypted_password, :
|
12
|
-
t.string :password_salt, :
|
13
|
-
t.string :persistence_token, :
|
14
|
-
t.string :single_access_token, :
|
15
|
-
t.string :perishable_token, :
|
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, :
|
19
|
-
t.integer :failed_login_count, :
|
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
|
28
|
-
add_index :spud_users
|
27
|
+
add_index :spud_users, :login
|
28
|
+
add_index :spud_users, :email
|
29
29
|
end
|
30
30
|
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, :
|
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, :
|
5
|
-
add_column :spud_media, :crop_y, :int, :
|
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, :
|
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, :
|
6
|
-
t.string :tag, :
|
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, :
|
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, :
|
6
|
-
t.string :spud_permission_tag, :
|
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
|
data/spec/dummy/db/migrate/20151012194534_add_requires_password_change_to_spud_users.tb_core.rb
CHANGED
@@ -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, :
|
4
|
+
add_column :spud_users, :requires_password_change, :boolean, default: false
|
5
5
|
end
|
6
6
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -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:
|
13
|
+
ActiveRecord::Schema.define(version: 20_151_012_194_534) do
|
15
14
|
|
16
|
-
create_table
|
17
|
-
t.string
|
18
|
-
t.integer
|
19
|
-
t.string
|
20
|
-
t.datetime
|
21
|
-
t.datetime
|
22
|
-
t.boolean
|
23
|
-
t.datetime
|
24
|
-
t.integer
|
25
|
-
t.integer
|
26
|
-
t.integer
|
27
|
-
t.integer
|
28
|
-
t.integer
|
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
|
32
|
-
t.string
|
33
|
-
t.string
|
34
|
-
t.datetime
|
35
|
-
t.datetime
|
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
|
-
|
39
|
-
|
40
|
-
|
41
|
-
t.
|
42
|
-
t.
|
43
|
-
t.
|
44
|
-
t.
|
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
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
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
|
57
|
-
t.integer
|
58
|
-
t.string
|
59
|
-
t.string
|
60
|
-
t.datetime
|
61
|
-
t.datetime
|
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
|
65
|
-
t.string
|
66
|
-
t.string
|
67
|
-
t.boolean
|
68
|
-
t.string
|
69
|
-
t.string
|
70
|
-
t.string
|
71
|
-
t.string
|
72
|
-
t.string
|
73
|
-
t.string
|
74
|
-
t.string
|
75
|
-
t.integer
|
76
|
-
t.integer
|
77
|
-
t.datetime
|
78
|
-
t.datetime
|
79
|
-
t.datetime
|
80
|
-
t.string
|
81
|
-
t.string
|
82
|
-
t.datetime
|
83
|
-
t.datetime
|
84
|
-
t.string
|
85
|
-
t.integer
|
86
|
-
t.boolean
|
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
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/spec/dummy/script/rails
CHANGED
@@ -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',
|
5
|
-
require File.expand_path('../../config/boot',
|
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, :
|
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, :
|
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[
|
2
|
+
ENV['RAILS_ENV'] ||= 'test'
|
3
3
|
|
4
|
-
require File.expand_path(
|
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
|
-
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
config.
|
49
|
-
|
50
|
-
|
51
|
-
#
|
52
|
-
#
|
53
|
-
# - http://
|
54
|
-
# - http://
|
55
|
-
#
|
56
|
-
|
57
|
-
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
|
72
|
-
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
|
78
|
-
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
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
|