enju_subject 0.2.0.beta.2 → 0.2.0.beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/classification.rb +1 -0
  3. data/lib/enju_subject/version.rb +1 -1
  4. data/lib/tasks/enju_subject_tasks.rake +4 -8
  5. data/spec/controllers/classification_types_controller_spec.rb +1 -1
  6. data/spec/controllers/classifications_controller_spec.rb +1 -1
  7. data/spec/controllers/subject_heading_types_controller_spec.rb +1 -1
  8. data/spec/controllers/subject_types_controller_spec.rb +1 -1
  9. data/spec/controllers/subjects_controller_spec.rb +1 -1
  10. data/spec/dummy/app/models/user.rb +1 -2
  11. data/spec/dummy/config/application.rb +3 -1
  12. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  13. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +14 -0
  14. data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +5 -0
  15. data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +5 -0
  16. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +13 -0
  17. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +13 -0
  18. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +9 -0
  19. data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +5 -0
  20. data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +9 -0
  21. data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +9 -0
  22. data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +5 -0
  23. data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +5 -0
  24. data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +5 -0
  25. data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +5 -0
  26. data/spec/dummy/db/schema.rb +49 -5
  27. data/spec/fixtures/classifications.yml +1 -0
  28. data/spec/fixtures/library_groups.yml +1 -0
  29. data/spec/models/classification_spec.rb +2 -2
  30. data/spec/models/classification_type_spec.rb +1 -2
  31. data/spec/models/subject_heading_type_spec.rb +1 -2
  32. data/spec/models/subject_spec.rb +1 -2
  33. data/spec/models/subject_type_spec.rb +1 -2
  34. data/spec/rails_helper.rb +53 -0
  35. data/spec/requests/subjects_spec.rb +1 -1
  36. data/spec/spec_helper.rb +82 -43
  37. metadata +60 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 47bed20b89e4e8a4379ec0bfd57b53210bbdc876
4
- data.tar.gz: 66eac8bd2d209885846ad484278ea6f46f286168
3
+ metadata.gz: 794e5bc5c6cfb74496167d52cd6daa692b5d59dc
4
+ data.tar.gz: fe40e33d687169d398d6a5189defe46229483e56
5
5
  SHA512:
6
- metadata.gz: 70665d6afeee00e7648569813d42c313461ad3d18d9cda4a8adf1df4baea601442f22fcfae6a4a28672ff533763ba03a4957bed330fc0c2aca57f89cc9fc2e1f
7
- data.tar.gz: d7872fd655d2b992db22683bcc771f7c5df7ea8284304ef4a4736c59361e784daa654ede1b28738252d0f3fef4bf009f53e9fcbcdb5e5e9432163e8411fa4d37
6
+ metadata.gz: 8e0f10fc7fd783b693b72b9fd6eb5fe9ee9e15fcfce945e99b2dce67666cd07d6c67497a8cc10a8c85a236e3f5672b5bd90490a42129dd03d44b56c93079008b
7
+ data.tar.gz: 63e51fcd918313090f54e21fc9de6fc367ebc826076f02bde3fd97f4e104dc70c1a54a7a6be32979af7739ca63d67bfc0446c5308238f0cd6a0fd08ecea32006
@@ -28,4 +28,5 @@ end
28
28
  # rgt :integer
29
29
  # manifestation_id :integer
30
30
  # url :string
31
+ # label :string
31
32
  #
@@ -1,3 +1,3 @@
1
1
  module EnjuSubject
2
- VERSION = "0.2.0.beta.2"
2
+ VERSION = "0.2.0.beta.3"
3
3
  end
@@ -12,12 +12,8 @@ namespace :enju_subject do
12
12
  puts 'initial fixture files loaded.'
13
13
  end
14
14
 
15
- desc "upgrade enju_subject"
16
- task :upgrade => :environment do
17
- SubjectType.transaction do
18
- update_subject_type
19
- update_subject_heading_type
20
- end
21
- puts 'enju_subject: The upgrade completed successfully.'
22
- end
15
+ #desc "upgrade enju_subject"
16
+ #task :upgrade => :environment do
17
+ # puts 'enju_subject: The upgrade completed successfully.'
18
+ #end
23
19
  end
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
  require 'sunspot/rails/spec_helper'
3
3
 
4
4
  describe ClassificationTypesController do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  describe ClassificationsController do
4
4
  fixtures :all
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
  require 'sunspot/rails/spec_helper'
3
3
 
4
4
  describe SubjectHeadingTypesController do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
  require 'sunspot/rails/spec_helper'
3
3
 
4
4
  describe SubjectTypesController do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  describe SubjectsController do
4
4
  fixtures :all
@@ -1,8 +1,7 @@
1
- # -*- encoding: utf-8 -*-
2
1
  class User < ActiveRecord::Base
3
2
  devise :database_authenticatable, #:registerable,
4
3
  :recoverable, :rememberable, :trackable, #, :validatable
5
4
  :lockable, :lock_strategy => :none, :unlock_strategy => :none
6
5
 
7
- include EnjuLeaf::EnjuUser
6
+ include EnjuSeed::EnjuUser
8
7
  end
@@ -3,8 +3,10 @@ require File.expand_path('../boot', __FILE__)
3
3
  require 'rails/all'
4
4
 
5
5
  Bundler.require(*Rails.groups)
6
- require 'enju_leaf'
7
6
  require 'enju_subject'
7
+ require 'enju_leaf'
8
+ require 'globalize'
9
+ require 'globalize-accessors'
8
10
 
9
11
  module Dummy
10
12
  class Application < Rails::Application
@@ -6,7 +6,7 @@ class CreateUserImportFiles < ActiveRecord::Migration
6
6
  t.datetime :executed_at
7
7
  t.string :user_import_file_name
8
8
  t.string :user_import_content_type
9
- t.string :user_import_file_size
9
+ t.integer :user_import_file_size
10
10
  t.datetime :user_import_updated_at
11
11
  t.string :user_import_fingerprint
12
12
  t.string :edit_mode
@@ -0,0 +1,14 @@
1
+ class CreateColors < ActiveRecord::Migration
2
+ def change
3
+ create_table :colors do |t|
4
+ t.integer :library_group_id
5
+ t.string :property
6
+ t.string :code
7
+ t.integer :position
8
+
9
+ t.timestamps
10
+ end
11
+
12
+ add_index :colors, :library_group_id
13
+ end
14
+ end
@@ -0,0 +1,5 @@
1
+ class AddSettingsToLibraryGroup < ActiveRecord::Migration
2
+ def change
3
+ add_column :library_groups, :settings, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddErrorMessageToUserImportResult < ActiveRecord::Migration
2
+ def change
3
+ add_column :user_import_results, :error_message, :text
4
+ end
5
+ end
@@ -0,0 +1,13 @@
1
+ class CreateWithdraws < ActiveRecord::Migration
2
+ def change
3
+ create_table :withdraws do |t|
4
+ t.integer :basket_id
5
+ t.integer :item_id
6
+ t.integer :librarian_id
7
+
8
+ t.timestamps null: false
9
+ end
10
+ add_index :withdraws, :basket_id
11
+ add_index :withdraws, :item_id
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class AddTranslationTableToLibraryGroup < ActiveRecord::Migration
2
+ def up
3
+ LibraryGroup.create_translation_table!({
4
+ login_banner: :text
5
+ }, {
6
+ migrate_data: true
7
+ })
8
+ end
9
+
10
+ def down
11
+ LibraryGroup.drop_translation_table! migrate_data: true
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ class AddFooterBannerToLibraryGroup < ActiveRecord::Migration
2
+ def up
3
+ LibraryGroup.add_translation_fields! footer_banner: :text
4
+ end
5
+
6
+ def down
7
+ remove_column :library_group_translations, :footer_banner
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class AddHtmlSnippetToLibraryGroup < ActiveRecord::Migration
2
+ def change
3
+ add_column :library_groups, :html_snippet, :text
4
+ end
5
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToUserImportFileTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :user_import_file_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :user_import_file_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToUserExportFileTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :user_export_file_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :user_export_file_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class AddMaxNumberOfResultsToLibraryGroup < ActiveRecord::Migration
2
+ def change
3
+ add_column :library_groups, :max_number_of_results, :integer, default: 500
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddFamilyNameFirstToLibraryGroup < ActiveRecord::Migration
2
+ def change
3
+ add_column :library_groups, :family_name_first, :boolean, default: true
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddPubYearFacetRangeIntervalToLibraryGroup < ActiveRecord::Migration
2
+ def change
3
+ add_column :library_groups, :pub_year_facet_range_interval, :integer, default: 10
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddUserIdToLibraryGroup < ActiveRecord::Migration
2
+ def change
3
+ add_reference :library_groups, :user, index: true, foreign_key: true
4
+ end
5
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20150925092505) do
14
+ ActiveRecord::Schema.define(version: 20160813203039) do
15
15
 
16
16
  create_table "accepts", force: :cascade do |t|
17
17
  t.integer "basket_id"
@@ -236,6 +236,17 @@ ActiveRecord::Schema.define(version: 20150925092505) do
236
236
  add_index "classifications", ["manifestation_id"], name: "index_classifications_on_manifestation_id"
237
237
  add_index "classifications", ["parent_id"], name: "index_classifications_on_parent_id"
238
238
 
239
+ create_table "colors", force: :cascade do |t|
240
+ t.integer "library_group_id"
241
+ t.string "property"
242
+ t.string "code"
243
+ t.integer "position"
244
+ t.datetime "created_at"
245
+ t.datetime "updated_at"
246
+ end
247
+
248
+ add_index "colors", ["library_group_id"], name: "index_colors_on_library_group_id"
249
+
239
250
  create_table "content_types", force: :cascade do |t|
240
251
  t.string "name", null: false
241
252
  t.text "display_name"
@@ -451,10 +462,22 @@ ActiveRecord::Schema.define(version: 20150925092505) do
451
462
  add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
452
463
  add_index "libraries", ["name"], name: "index_libraries_on_name", unique: true
453
464
 
465
+ create_table "library_group_translations", force: :cascade do |t|
466
+ t.integer "library_group_id", null: false
467
+ t.string "locale", null: false
468
+ t.datetime "created_at", null: false
469
+ t.datetime "updated_at", null: false
470
+ t.text "login_banner"
471
+ t.text "footer_banner"
472
+ end
473
+
474
+ add_index "library_group_translations", ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
475
+ add_index "library_group_translations", ["locale"], name: "index_library_group_translations_on_locale"
476
+
454
477
  create_table "library_groups", force: :cascade do |t|
455
- t.string "name", null: false
478
+ t.string "name", null: false
456
479
  t.text "display_name"
457
- t.string "short_name", null: false
480
+ t.string "short_name", null: false
458
481
  t.text "my_networks"
459
482
  t.text "login_banner"
460
483
  t.text "note"
@@ -463,10 +486,17 @@ ActiveRecord::Schema.define(version: 20150925092505) do
463
486
  t.datetime "created_at"
464
487
  t.datetime "updated_at"
465
488
  t.text "admin_networks"
466
- t.string "url", default: "http://localhost:3000/"
489
+ t.string "url", default: "http://localhost:3000/"
490
+ t.text "settings"
491
+ t.text "html_snippet"
492
+ t.integer "max_number_of_results", default: 500
493
+ t.boolean "family_name_first", default: true
494
+ t.integer "pub_year_facet_range_interval", default: 10
495
+ t.integer "user_id"
467
496
  end
468
497
 
469
498
  add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
499
+ add_index "library_groups", ["user_id"], name: "index_library_groups_on_user_id"
470
500
 
471
501
  create_table "licenses", force: :cascade do |t|
472
502
  t.string "name", null: false
@@ -913,6 +943,7 @@ ActiveRecord::Schema.define(version: 20150925092505) do
913
943
  t.integer "user_export_file_id"
914
944
  t.datetime "created_at"
915
945
  t.datetime "updated_at"
946
+ t.boolean "most_recent"
916
947
  end
917
948
 
918
949
  add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
@@ -958,6 +989,7 @@ ActiveRecord::Schema.define(version: 20150925092505) do
958
989
  t.integer "user_import_file_id"
959
990
  t.datetime "created_at"
960
991
  t.datetime "updated_at"
992
+ t.boolean "most_recent"
961
993
  end
962
994
 
963
995
  add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
@@ -969,7 +1001,7 @@ ActiveRecord::Schema.define(version: 20150925092505) do
969
1001
  t.datetime "executed_at"
970
1002
  t.string "user_import_file_name"
971
1003
  t.string "user_import_content_type"
972
- t.string "user_import_file_size"
1004
+ t.integer "user_import_file_size"
973
1005
  t.datetime "user_import_updated_at"
974
1006
  t.string "user_import_fingerprint"
975
1007
  t.string "edit_mode"
@@ -987,6 +1019,7 @@ ActiveRecord::Schema.define(version: 20150925092505) do
987
1019
  t.text "body"
988
1020
  t.datetime "created_at"
989
1021
  t.datetime "updated_at"
1022
+ t.text "error_message"
990
1023
  end
991
1024
 
992
1025
  create_table "users", force: :cascade do |t|
@@ -1027,4 +1060,15 @@ ActiveRecord::Schema.define(version: 20150925092505) do
1027
1060
 
1028
1061
  add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
1029
1062
 
1063
+ create_table "withdraws", force: :cascade do |t|
1064
+ t.integer "basket_id"
1065
+ t.integer "item_id"
1066
+ t.integer "librarian_id"
1067
+ t.datetime "created_at", null: false
1068
+ t.datetime "updated_at", null: false
1069
+ end
1070
+
1071
+ add_index "withdraws", ["basket_id"], name: "index_withdraws_on_basket_id"
1072
+ add_index "withdraws", ["item_id"], name: "index_withdraws_on_item_id"
1073
+
1030
1074
  end
@@ -115,4 +115,5 @@ classification_00005:
115
115
  # rgt :integer
116
116
  # manifestation_id :integer
117
117
  # url :string
118
+ # label :string
118
119
  #
@@ -9,6 +9,7 @@ one:
9
9
  url: "http://localhost:3000/"
10
10
  position: 1
11
11
  login_banner: "*Next-L Enju*"
12
+ user_id: 1
12
13
 
13
14
  # == Schema Information
14
15
  #
@@ -1,5 +1,4 @@
1
- # -*- encoding: utf-8 -*-
2
- require 'spec_helper'
1
+ require 'rails_helper'
3
2
 
4
3
  describe Classification do
5
4
  #pending "add some examples to (or delete) #{__FILE__}"
@@ -21,4 +20,5 @@ end
21
20
  # rgt :integer
22
21
  # manifestation_id :integer
23
22
  # url :string
23
+ # label :string
24
24
  #
@@ -1,5 +1,4 @@
1
- # -*- encoding: utf-8 -*-
2
- require 'spec_helper'
1
+ require 'rails_helper'
3
2
 
4
3
  describe ClassificationType do
5
4
  #pending "add some examples to (or delete) #{__FILE__}"
@@ -1,5 +1,4 @@
1
- # -*- encoding: utf-8 -*-
2
- require 'spec_helper'
1
+ require 'rails_helper'
3
2
 
4
3
  describe SubjectHeadingType do
5
4
  #pending "add some examples to (or delete) #{__FILE__}"
@@ -1,5 +1,4 @@
1
- # -*- encoding: utf-8 -*-
2
- require 'spec_helper'
1
+ require 'rails_helper'
3
2
 
4
3
  describe Subject do
5
4
  fixtures :subjects
@@ -1,5 +1,4 @@
1
- # -*- encoding: utf-8 -*-
2
- require 'spec_helper'
1
+ require 'rails_helper'
3
2
 
4
3
  describe SubjectType do
5
4
  #pending "add some examples to (or delete) #{__FILE__}"
@@ -0,0 +1,53 @@
1
+ require 'simplecov'
2
+ require 'coveralls'
3
+ SimpleCov.start 'rails'
4
+ Coveralls.wear!
5
+
6
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
7
+ ENV["RAILS_ENV"] ||= 'test'
8
+ require File.expand_path("../dummy/config/environment", __FILE__)
9
+ require 'rspec/rails'
10
+ require 'factory_girl'
11
+ require 'sunspot-rails-tester'
12
+
13
+ # Requires supporting ruby files with custom matchers and macros, etc,
14
+ # in spec/support/ and its subdirectories.
15
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
16
+
17
+ RSpec.configure do |config|
18
+ # == Mock Framework
19
+ #
20
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
21
+ #
22
+ # config.mock_with :mocha
23
+ # config.mock_with :flexmock
24
+ # config.mock_with :rr
25
+ config.mock_with :rspec
26
+
27
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
28
+ config.fixture_path = "#{::Rails.root}/../../spec/fixtures"
29
+
30
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
31
+ # examples within a transaction, remove the following line or assign false
32
+ # instead of true.
33
+ config.use_transactional_fixtures = true
34
+
35
+ config.extend ControllerMacros, :type => :controller
36
+
37
+ $original_sunspot_session = Sunspot.session
38
+
39
+ config.before do
40
+ Sunspot.session = Sunspot::Rails::StubSessionProxy.new($original_sunspot_session)
41
+ end
42
+
43
+ config.before :each, :solr => true do
44
+ Sunspot::Rails::Tester.start_original_sunspot_session
45
+ Sunspot.session = $original_sunspot_session
46
+ Sunspot.remove_all!
47
+ end
48
+
49
+ config.infer_spec_type_from_file_location!
50
+ end
51
+
52
+ FactoryGirl.definition_file_paths << "#{::Rails.root}/../../spec/factories"
53
+ FactoryGirl.find_definitions
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  describe "Subjects" do
4
4
  describe "GET /subjects", :solr => true do
data/spec/spec_helper.rb CHANGED
@@ -1,53 +1,92 @@
1
- require 'simplecov'
2
- require 'coveralls'
3
- SimpleCov.start 'rails'
4
- Coveralls.wear!
5
-
6
- # This file is copied to spec/ when you run 'rails generate rspec:install'
7
- ENV["RAILS_ENV"] ||= 'test'
8
- require File.expand_path("../dummy/config/environment", __FILE__)
9
- require 'rspec/rails'
10
- require 'factory_girl'
11
- require 'sunspot-rails-tester'
12
-
13
- # Requires supporting ruby files with custom matchers and macros, etc,
14
- # in spec/support/ and its subdirectories.
15
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
16
-
1
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # The `.rspec` file also contains a few flags that are not defaults but that
16
+ # users commonly want.
17
+ #
18
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
19
  RSpec.configure do |config|
18
- # == Mock Framework
19
- #
20
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
21
- #
22
- # config.mock_with :mocha
23
- # config.mock_with :flexmock
24
- # config.mock_with :rr
25
- config.mock_with :rspec
20
+ # rspec-expectations config goes here. You can use an alternate
21
+ # assertion/expectation library such as wrong or the stdlib/minitest
22
+ # assertions if you prefer.
23
+ config.expect_with :rspec do |expectations|
24
+ # This option will default to `true` in RSpec 4. It makes the `description`
25
+ # and `failure_message` of custom matchers include text for helper methods
26
+ # defined using `chain`, e.g.:
27
+ # be_bigger_than(2).and_smaller_than(4).description
28
+ # # => "be bigger than 2 and smaller than 4"
29
+ # ...rather than:
30
+ # # => "be bigger than 2"
31
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32
+ end
26
33
 
27
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
28
- config.fixture_path = "#{::Rails.root}/../../spec/fixtures"
34
+ # rspec-mocks config goes here. You can use an alternate test double
35
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
36
+ config.mock_with :rspec do |mocks|
37
+ # Prevents you from mocking or stubbing a method that does not exist on
38
+ # a real object. This is generally recommended, and will default to
39
+ # `true` in RSpec 4.
40
+ mocks.verify_partial_doubles = false
41
+ end
29
42
 
30
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
31
- # examples within a transaction, remove the following line or assign false
32
- # instead of true.
33
- config.use_transactional_fixtures = true
43
+ # The settings below are suggested to provide a good initial experience
44
+ # with RSpec, but feel free to customize to your heart's content.
45
+ =begin
46
+ # These two settings work together to allow you to limit a spec run
47
+ # to individual examples or groups you care about by tagging them with
48
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
49
+ # get run.
50
+ config.filter_run :focus
51
+ config.run_all_when_everything_filtered = true
34
52
 
35
- config.extend ControllerMacros, :type => :controller
53
+ # Allows RSpec to persist some state between runs in order to support
54
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
55
+ # you configure your source control system to ignore this file.
56
+ config.example_status_persistence_file_path = "spec/examples.txt"
36
57
 
37
- $original_sunspot_session = Sunspot.session
58
+ # Limits the available syntax to the non-monkey patched syntax that is
59
+ # recommended. For more details, see:
60
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
61
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
62
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
63
+ config.disable_monkey_patching!
38
64
 
39
- config.before do
40
- Sunspot.session = Sunspot::Rails::StubSessionProxy.new($original_sunspot_session)
65
+ # Many RSpec users commonly either run the entire suite or an individual
66
+ # file, and it's useful to allow more verbose output when running an
67
+ # individual spec file.
68
+ if config.files_to_run.one?
69
+ # Use the documentation formatter for detailed output,
70
+ # unless a formatter has already been configured
71
+ # (e.g. via a command-line flag).
72
+ config.default_formatter = 'doc'
41
73
  end
42
74
 
43
- config.before :each, :solr => true do
44
- Sunspot::Rails::Tester.start_original_sunspot_session
45
- Sunspot.session = $original_sunspot_session
46
- Sunspot.remove_all!
47
- end
75
+ # Print the 10 slowest examples and example groups at the
76
+ # end of the spec run, to help surface which specs are running
77
+ # particularly slow.
78
+ config.profile_examples = 10
48
79
 
49
- config.infer_spec_type_from_file_location!
50
- end
80
+ # Run specs in random order to surface order dependencies. If you find an
81
+ # order dependency and want to debug it, you can fix the order by providing
82
+ # the seed, which is printed after each run.
83
+ # --seed 1234
84
+ config.order = :random
51
85
 
52
- FactoryGirl.definition_file_paths << "#{::Rails.root}/../../spec/factories"
53
- FactoryGirl.find_definitions
86
+ # Seed global randomization in this process using the `--seed` CLI option.
87
+ # Setting this allows you to use `--seed` to deterministically reproduce
88
+ # test failures related to randomization by passing the same `--seed` value
89
+ # as the one that triggered the failure.
90
+ Kernel.srand config.seed
91
+ =end
92
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_subject
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.beta.2
4
+ version: 0.2.0.beta.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-12 00:00:00.000000000 Z
11
+ date: 2016-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: enju_biblio
@@ -16,14 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.0.beta.2
19
+ version: 0.2.0.beta.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.0.beta.2
26
+ version: 0.2.0.beta.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: globalize
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 5.0.1
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 5.0.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: globalize-accessors
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: enju_leaf
29
57
  requirement: !ruby/object:Gem::Requirement
@@ -443,12 +471,25 @@ files:
443
471
  - spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb
444
472
  - spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb
445
473
  - spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb
474
+ - spec/dummy/db/migrate/20140821151023_create_colors.rb
446
475
  - spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb
447
476
  - spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb
448
477
  - spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb
449
478
  - spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb
450
479
  - spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb
451
480
  - spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb
481
+ - spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb
482
+ - spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb
483
+ - spec/dummy/db/migrate/20150924115059_create_withdraws.rb
484
+ - spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
485
+ - spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb
486
+ - spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb
487
+ - spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb
488
+ - spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb
489
+ - spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb
490
+ - spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb
491
+ - spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb
492
+ - spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb
452
493
  - spec/dummy/db/schema.rb
453
494
  - spec/dummy/db/seeds.rb
454
495
  - spec/dummy/public/404.html
@@ -487,6 +528,7 @@ files:
487
528
  - spec/models/subject_heading_type_spec.rb
488
529
  - spec/models/subject_spec.rb
489
530
  - spec/models/subject_type_spec.rb
531
+ - spec/rails_helper.rb
490
532
  - spec/requests/subjects_spec.rb
491
533
  - spec/routing/subject_heading_types_routing_spec.rb
492
534
  - spec/routing/subject_types_routing_spec.rb
@@ -677,12 +719,25 @@ test_files:
677
719
  - spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb
678
720
  - spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb
679
721
  - spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb
722
+ - spec/dummy/db/migrate/20140821151023_create_colors.rb
680
723
  - spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb
681
724
  - spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb
682
725
  - spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb
683
726
  - spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb
684
727
  - spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb
685
728
  - spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb
729
+ - spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb
730
+ - spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb
731
+ - spec/dummy/db/migrate/20150924115059_create_withdraws.rb
732
+ - spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
733
+ - spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb
734
+ - spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb
735
+ - spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb
736
+ - spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb
737
+ - spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb
738
+ - spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb
739
+ - spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb
740
+ - spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb
686
741
  - spec/dummy/db/schema.rb
687
742
  - spec/dummy/db/seeds.rb
688
743
  - spec/dummy/public/404.html
@@ -722,6 +777,7 @@ test_files:
722
777
  - spec/models/subject_heading_type_spec.rb
723
778
  - spec/models/subject_spec.rb
724
779
  - spec/models/subject_type_spec.rb
780
+ - spec/rails_helper.rb
725
781
  - spec/requests/subjects_spec.rb
726
782
  - spec/routing/subject_heading_types_routing_spec.rb
727
783
  - spec/routing/subject_types_routing_spec.rb