enju_subject 0.1.0.pre28 → 0.1.0.pre29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +8 -1
  3. data/app/controllers/classification_types_controller.rb +7 -2
  4. data/app/controllers/classifications_controller.rb +8 -2
  5. data/app/controllers/subject_heading_types_controller.rb +7 -2
  6. data/app/controllers/subject_types_controller.rb +7 -2
  7. data/app/controllers/subjects_controller.rb +9 -2
  8. data/app/models/classification.rb +0 -1
  9. data/app/models/classification_type.rb +0 -1
  10. data/app/models/subject.rb +0 -3
  11. data/app/models/subject_heading_type.rb +0 -1
  12. data/app/models/subject_type.rb +0 -1
  13. data/lib/enju_subject/engine.rb +0 -1
  14. data/lib/enju_subject/manifestation.rb +0 -1
  15. data/lib/enju_subject/version.rb +1 -1
  16. data/spec/dummy/bin/bundle +3 -0
  17. data/spec/dummy/bin/rails +4 -0
  18. data/spec/dummy/bin/rake +4 -0
  19. data/spec/dummy/bin/setup +29 -0
  20. data/spec/dummy/config/database.yml +23 -18
  21. data/spec/dummy/db/migrate/005_create_manifestations.rb +0 -1
  22. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +5 -1
  23. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +5 -1
  24. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +5 -1
  25. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +5 -1
  26. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +5 -1
  27. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +5 -1
  28. data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +5 -0
  29. data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +5 -0
  30. data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +5 -0
  31. data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +9 -0
  32. data/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +5 -0
  33. data/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +5 -0
  34. data/spec/dummy/db/schema.rb +7 -3
  35. data/spec/fixtures/users.yml +1 -1
  36. data/spec/spec_helper.rb +2 -0
  37. metadata +49 -135
  38. data/spec/dummy/db/test.sqlite3 +0 -0
  39. data/spec/dummy/script/rails +0 -6
  40. data/spec/dummy/solr/conf/admin-extra.html +0 -31
  41. data/spec/dummy/solr/conf/elevate.xml +0 -36
  42. data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +0 -246
  43. data/spec/dummy/solr/conf/protwords.txt +0 -21
  44. data/spec/dummy/solr/conf/schema.xml +0 -255
  45. data/spec/dummy/solr/conf/scripts.conf +0 -24
  46. data/spec/dummy/solr/conf/solrconfig.xml +0 -667
  47. data/spec/dummy/solr/conf/spellings.txt +0 -2
  48. data/spec/dummy/solr/conf/stopwords.txt +0 -58
  49. data/spec/dummy/solr/conf/synonyms.txt +0 -31
  50. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  51. data/spec/dummy/solr/default/data/index/segments_17a +0 -0
  52. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001547 +0 -0
  53. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001548 +0 -0
  54. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001549 +0 -0
  55. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001550 +0 -0
  56. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001551 +0 -0
  57. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001552 +0 -0
  58. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001553 +0 -0
  59. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001554 +0 -0
  60. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001555 +0 -0
  61. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001556 +0 -0
  62. data/spec/dummy/solr/development/data/index/segments.gen +0 -0
  63. data/spec/dummy/solr/development/data/index/segments_1 +0 -0
  64. data/spec/dummy/solr/solr.xml +0 -8
  65. data/spec/dummy/solr/test/data/index/segments.gen +0 -0
  66. data/spec/dummy/solr/test/data/index/segments_1 +0 -0
  67. data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
  68. data/spec/dummy/tmp/cache/assets/test/sprockets/016f86e39ffdee229513e167e190373b +0 -0
  69. data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  70. data/spec/dummy/tmp/cache/assets/test/sprockets/154f7b83f2da0e86effbe25f32135177 +0 -0
  71. data/spec/dummy/tmp/cache/assets/test/sprockets/16453aa846d172232cb70ea0ef5d25bb +0 -0
  72. data/spec/dummy/tmp/cache/assets/test/sprockets/1867899076fb1e0b90ad8e952258ceb6 +0 -0
  73. data/spec/dummy/tmp/cache/assets/test/sprockets/1d1ea12f4657d43009075ba81a2ff949 +0 -0
  74. data/spec/dummy/tmp/cache/assets/test/sprockets/22c8941ab6dec8cd7b3f725e1989dc20 +0 -0
  75. data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  76. data/spec/dummy/tmp/cache/assets/test/sprockets/3054c50144654f9c7e57bb0639a276e9 +0 -0
  77. data/spec/dummy/tmp/cache/assets/test/sprockets/306cf2727f2c4d5bcc3318fdf704f9f8 +0 -0
  78. data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  79. data/spec/dummy/tmp/cache/assets/test/sprockets/3bd7a263237ba366f64d938fe5303757 +0 -0
  80. data/spec/dummy/tmp/cache/assets/test/sprockets/3ef32f79b6e9b4487b09c38d17e96c5b +0 -0
  81. data/spec/dummy/tmp/cache/assets/test/sprockets/5e6bfa8ff735312df3c6e3ab5e4544dd +0 -0
  82. data/spec/dummy/tmp/cache/assets/test/sprockets/6b7aedea4a0dfd10ee27dd93199ac9e6 +0 -0
  83. data/spec/dummy/tmp/cache/assets/test/sprockets/8c36936509297e044c5353b3c57148f9 +0 -0
  84. data/spec/dummy/tmp/cache/assets/test/sprockets/90453e0e28686c374df46268d089c661 +0 -0
  85. data/spec/dummy/tmp/cache/assets/test/sprockets/9c500035359d42d1d6eb3152407753da +0 -0
  86. data/spec/dummy/tmp/cache/assets/test/sprockets/aff11c6f1bdcce6d91baf69968f93ad6 +0 -0
  87. data/spec/dummy/tmp/cache/assets/test/sprockets/b9cc8f1cd929beaef586e5f42a2aa4c2 +0 -0
  88. data/spec/dummy/tmp/cache/assets/test/sprockets/ba0d2851c8d282b95f6fbf157269bd9f +0 -0
  89. data/spec/dummy/tmp/cache/assets/test/sprockets/c375808e937ed78c91a7e18cf15d8d38 +0 -0
  90. data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  91. data/spec/dummy/tmp/cache/assets/test/sprockets/d38d8658b30de1d068603968227680d4 +0 -0
  92. data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  93. data/spec/dummy/tmp/cache/assets/test/sprockets/e3b2c7938a8e711ea73c7c89ebe73d28 +0 -0
  94. data/spec/dummy/tmp/cache/assets/test/sprockets/ea20f8df525b74f3cb6581c9c8c10831 +0 -0
  95. data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  96. data/spec/dummy/tmp/cache/assets/test/sprockets/fa36be28948b64b82117be61d1712366 +0 -0
  97. data/spec/dummy/tmp/cache/assets/test/sprockets/ffb98f25d690ed017b364714434126e5 +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24b1cedd55fd1965984d3d805c1da038a09ceee5
4
- data.tar.gz: fbb78976e497cdfa186125ca56a7471089452479
3
+ metadata.gz: 0503ad173d3bdd8b7a4d0b50d9eb0cbdc76e2863
4
+ data.tar.gz: 74e8d352a546599f2846929da4557b91a49a9a4b
5
5
  SHA512:
6
- metadata.gz: 71182abc88a3fe014facbf64b9f50c941f5bb1c6d6e44f285b1c8e2da5ea57c97379e82d641f74e08827f558e1c55059fc2b46295778b427e4314db06f403020
7
- data.tar.gz: aa4e989f8c95c9038ca7109b8def5140add32dfaa500fccc45f7026ef6c1d80bb593071457d443c813476d6728f5e1d902afa140470b95b1405f76fc1efff8a3
6
+ metadata.gz: 0b1dd11a610e7ddf09c162abb76d50f045b9faf2fe242013f04f3e5e8f354c4b0d19f00d70caace0c236916b4fb90a0accf0402f67ff5d4e30ca0d55cb14ebeb
7
+ data.tar.gz: c4e31de69a2f590e97400492e4cb6eb021d805ec3f2d1806da60f61d86cb4c8b33f366818ed92d7220320907acf0707ef455c3dd3fa2fc414c7bb646425d02bb
data/README.rdoc CHANGED
@@ -1,3 +1,10 @@
1
- = EnjuSubject {<img src="https://secure.travis-ci.org/nabeta/enju_subject.png?branch=master" alt="Build Status" />}[http://travis-ci.org/nabeta/enju_subject]
1
+ = EnjuSubject
2
+ {<img src="https://secure.travis-ci.org/next-l/enju_subject.png?branch=1.1" alt="Build Status" />}[http://travis-ci.org/next-l/enju_subject]
3
+ {<img src="https://coveralls.io/repos/next-l/enju_subject/badge.png?branch=1.1" alt="Coverage Status" />}[https://coveralls.io/r/next-l/enju_subject?branch=1.1]
4
+ {<img src="https://hakiri.io/github/next-l/enju_subject/1.1.svg" alt="security" />}[https://hakiri.io/github/next-l/enju_subject/1.1]
2
5
 
3
6
  This project rocks and uses MIT-LICENSE.
7
+
8
+ == 製作者・貢献者 (Authors and contributors)
9
+ * {TANABE, Kosuke}[https://github.com/nabeta] ({@nabeta}[https://twitter.com/nabeta])
10
+ * {Project Next-L}[http://www.next-l.jp] ({@ProjectNextL}[https://twitter.com/ProjectNextL])
@@ -38,7 +38,7 @@ class ClassificationTypesController < ApplicationController
38
38
  # POST /classification_types
39
39
  # POST /classification_types.json
40
40
  def create
41
- @classification_type = ClassificationType.new(params[:classification_type])
41
+ @classification_type = ClassificationType.new(classification_type_params)
42
42
 
43
43
  respond_to do |format|
44
44
  if @classification_type.save
@@ -60,7 +60,7 @@ class ClassificationTypesController < ApplicationController
60
60
  end
61
61
 
62
62
  respond_to do |format|
63
- if @classification_type.update_attributes(params[:classification_type])
63
+ if @classification_type.update_attributes(classification_type_params)
64
64
  format.html { redirect_to @classification_type, notice: t('controller.successfully_updated', model: t('activerecord.models.classification_type')) }
65
65
  format.json { head :no_content }
66
66
  else
@@ -80,4 +80,9 @@ class ClassificationTypesController < ApplicationController
80
80
  format.json { head :no_content }
81
81
  end
82
82
  end
83
+
84
+ private
85
+ def classification_type_params
86
+ params.require(:classification_type).permit(:name, :display_name, :note)
87
+ end
83
88
  end
@@ -67,7 +67,7 @@ class ClassificationsController < ApplicationController
67
67
  # POST /classifications
68
68
  # POST /classifications.json
69
69
  def create
70
- @classification = Classification.new(params[:classification])
70
+ @classification = Classification.new(classification_params)
71
71
 
72
72
  respond_to do |format|
73
73
  if @classification.save
@@ -85,7 +85,7 @@ class ClassificationsController < ApplicationController
85
85
  # PUT /classifications/1.json
86
86
  def update
87
87
  respond_to do |format|
88
- if @classification.update_attributes(params[:classification])
88
+ if @classification.update_attributes(classification_params)
89
89
  format.html { redirect_to @classification, notice: t('controller.successfully_updated', model: t('activerecord.models.classification')) }
90
90
  format.json { head :no_content }
91
91
  else
@@ -109,6 +109,12 @@ class ClassificationsController < ApplicationController
109
109
  end
110
110
 
111
111
  private
112
+ def classification_params
113
+ params.require(:classification).permit(
114
+ :parent_id, :category, :note, :classification_type_id
115
+ )
116
+ end
117
+
112
118
  def get_classification_type
113
119
  @classification_type = ClassificationType.find(params[:classification_type_id]) rescue nil
114
120
  end
@@ -38,7 +38,7 @@ class SubjectHeadingTypesController < ApplicationController
38
38
  # POST /subject_heading_types
39
39
  # POST /subject_heading_types.json
40
40
  def create
41
- @subject_heading_type = SubjectHeadingType.new(params[:subject_heading_type])
41
+ @subject_heading_type = SubjectHeadingType.new(subject_heading_type_params)
42
42
 
43
43
  respond_to do |format|
44
44
  if @subject_heading_type.save
@@ -60,7 +60,7 @@ class SubjectHeadingTypesController < ApplicationController
60
60
  end
61
61
 
62
62
  respond_to do |format|
63
- if @subject_heading_type.update_attributes(params[:subject_heading_type])
63
+ if @subject_heading_type.update_attributes(subject_heading_type_params)
64
64
  format.html { redirect_to @subject_heading_type, notice: t('controller.successfully_updated', model: t('activerecord.models.subject_heading_type')) }
65
65
  format.json { head :no_content }
66
66
  else
@@ -80,4 +80,9 @@ class SubjectHeadingTypesController < ApplicationController
80
80
  format.json { head :no_content }
81
81
  end
82
82
  end
83
+
84
+ private
85
+ def subject_heading_type_params
86
+ params.require(:subject_heading_type).permit(:name, :display_name, :note)
87
+ end
83
88
  end
@@ -38,7 +38,7 @@ class SubjectTypesController < ApplicationController
38
38
  # POST /subject_types
39
39
  # POST /subject_types.json
40
40
  def create
41
- @subject_type = SubjectType.new(params[:subject_type])
41
+ @subject_type = SubjectType.new(subject_type_params)
42
42
 
43
43
  respond_to do |format|
44
44
  if @subject_type.save
@@ -60,7 +60,7 @@ class SubjectTypesController < ApplicationController
60
60
  end
61
61
 
62
62
  respond_to do |format|
63
- if @subject_type.update_attributes(params[:subject_type])
63
+ if @subject_type.update_attributes(subject_type_params)
64
64
  format.html { redirect_to @subject_type, notice: t('controller.successfully_updated', model: t('activerecord.models.subject_type')) }
65
65
  format.json { head :no_content }
66
66
  else
@@ -80,4 +80,9 @@ class SubjectTypesController < ApplicationController
80
80
  format.json { head :no_content }
81
81
  end
82
82
  end
83
+
84
+ private
85
+ def subject_type_params
86
+ params.require(:subject_type).permit(:name, :display_name, :note)
87
+ end
83
88
  end
@@ -90,7 +90,7 @@ class SubjectsController < ApplicationController
90
90
  # POST /subjects
91
91
  # POST /subjects.json
92
92
  def create
93
- @subject = Subject.new(params[:subject])
93
+ @subject = Subject.new(subject_params)
94
94
 
95
95
  respond_to do |format|
96
96
  if @subject.save
@@ -108,7 +108,7 @@ class SubjectsController < ApplicationController
108
108
  # PUT /subjects/1.json
109
109
  def update
110
110
  respond_to do |format|
111
- if @subject.update_attributes(params[:subject])
111
+ if @subject.update_attributes(subject_params)
112
112
  format.html { redirect_to @subject, notice: t('controller.successfully_updated', model: t('activerecord.models.subject')) }
113
113
  format.json { head :no_content }
114
114
  else
@@ -131,6 +131,13 @@ class SubjectsController < ApplicationController
131
131
  end
132
132
 
133
133
  private
134
+ def subject_params
135
+ params.require(:subject).permit(
136
+ :parent_id, :use_term_id, :term, :term_transcription,
137
+ :subject_type_id, :note, :required_role_id, :subject_heading_type_id
138
+ )
139
+ end
140
+
134
141
  def prepare_options
135
142
  @subject_heading_types = SubjectHeadingType.select([:id, :display_name, :position])
136
143
  @subject_types = SubjectType.select([:id, :display_name, :position])
@@ -1,5 +1,4 @@
1
1
  class Classification < ActiveRecord::Base
2
- attr_accessible :parent_id, :category, :note, :classification_type_id
3
2
  belongs_to :classification_type
4
3
  belongs_to :manifestation, touch: true
5
4
 
@@ -1,5 +1,4 @@
1
1
  class ClassificationType < ActiveRecord::Base
2
- attr_accessible :name, :display_name, :note
3
2
  include MasterModel
4
3
  default_scope { order('classification_types.position') }
5
4
  has_many :classifications
@@ -1,7 +1,4 @@
1
1
  class Subject < ActiveRecord::Base
2
- attr_accessible :parent_id, :use_term_id, :term, :term_transcription,
3
- :subject_type_id, :note, :required_role_id, :subject_heading_type_id
4
-
5
2
  belongs_to :manifestation, touch: true
6
3
  belongs_to :subject_type
7
4
  belongs_to :subject_heading_type
@@ -1,5 +1,4 @@
1
1
  class SubjectHeadingType < ActiveRecord::Base
2
- attr_accessible :name, :display_name, :note
3
2
  include MasterModel
4
3
  default_scope { order("subject_heading_types.position") }
5
4
  has_many :subjects
@@ -1,5 +1,4 @@
1
1
  class SubjectType < ActiveRecord::Base
2
- attr_accessible :name, :display_name, :note
3
2
  include MasterModel
4
3
  default_scope { order("subject_types.position") }
5
4
  has_many :subjects
@@ -1,4 +1,3 @@
1
- require 'enju_seed'
2
1
  require 'dynamic_form'
3
2
 
4
3
  module EnjuSubject
@@ -7,7 +7,6 @@ module EnjuSubject
7
7
  module ClassMethods
8
8
  def enju_subject_manifestation_model
9
9
  include InstanceMethods
10
- attr_accessible :subjects_attributes, :classifications_attributes
11
10
  has_many :subjects
12
11
  has_many :classifications
13
12
  accepts_nested_attributes_for :subjects, :allow_destroy => true, :reject_if => :all_blank
@@ -1,3 +1,3 @@
1
1
  module EnjuSubject
2
- VERSION = "0.1.0.pre28"
2
+ VERSION = "0.1.0.pre29"
3
3
  end
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+
4
+ # path to your application root.
5
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+
7
+ Dir.chdir APP_ROOT do
8
+ # This script is a starting point to setup your application.
9
+ # Add necessary setup steps to this file:
10
+
11
+ puts "== Installing dependencies =="
12
+ system "gem install bundler --conservative"
13
+ system "bundle check || bundle install"
14
+
15
+ # puts "\n== Copying sample files =="
16
+ # unless File.exist?("config/database.yml")
17
+ # system "cp config/database.yml.sample config/database.yml"
18
+ # end
19
+
20
+ puts "\n== Preparing database =="
21
+ system "bin/rake db:setup"
22
+
23
+ puts "\n== Removing old logs and tempfiles =="
24
+ system "rm -f log/*"
25
+ system "rm -rf tmp/cache"
26
+
27
+ puts "\n== Restarting application server =="
28
+ system "touch tmp/restart.txt"
29
+ end
@@ -1,25 +1,30 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
6
- development:
1
+ sqlite: &sqlite
7
2
  adapter: sqlite3
8
- database: db/development.sqlite3
3
+ database: db/<%= Rails.env %>.sqlite3
4
+
5
+ mysql: &mysql
6
+ adapter: mysql2
7
+ username: root
8
+ password:
9
+ database: enju_<%= Rails.env %>
10
+
11
+ postgresql: &postgresql
12
+ adapter: postgresql
13
+ username: postgres
14
+ password:
15
+ database: enju_<%= Rails.env %>
16
+
17
+ defaults: &defaults
9
18
  pool: 5
10
19
  timeout: 5000
20
+ host: localhost
21
+ <<: *<%= ENV['DB'] || "sqlite" %>
22
+
23
+ development:
24
+ <<: *defaults
11
25
 
12
- # Warning: The database defined as "test" will be erased and
13
- # re-generated from your development database when you run "rake".
14
- # Do not set this db to the same as development or production.
15
26
  test:
16
- adapter: sqlite3
17
- database: db/test.sqlite3
18
- pool: 5
19
- timeout: 5000
27
+ <<: *defaults
20
28
 
21
29
  production:
22
- adapter: sqlite3
23
- database: db/production.sqlite3
24
- pool: 5
25
- timeout: 5000
30
+ <<: *defaults
@@ -13,7 +13,6 @@ class CreateManifestations < ActiveRecord::Migration
13
13
  t.string :access_address
14
14
  t.integer :language_id, :default => 1, :null => false
15
15
  t.integer :carrier_type_id, :default => 1, :null => false
16
- t.integer :extent_id, :default => 1, :null => false
17
16
  t.integer :start_page
18
17
  t.integer :end_page
19
18
  t.integer :height
@@ -2,7 +2,11 @@ class CreateResourceImportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :resource_import_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :resource_import_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateImportRequestTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :import_request_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :import_request_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateAgentImportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :agent_import_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :agent_import_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateUserImportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_import_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_import_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateResourceExportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :resource_export_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :resource_export_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateUserExportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_export_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_export_file_id
8
12
  t.timestamps
@@ -0,0 +1,5 @@
1
+ class AddErrorMessageToResourceImportResult < ActiveRecord::Migration
2
+ def change
3
+ add_column :resource_import_results, :error_message, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddExtentToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :extent, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddDimensionsToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :dimensions, :text
4
+ end
5
+ end
@@ -0,0 +1,9 @@
1
+ class RenameManifestationPeriodicalToSerial < ActiveRecord::Migration
2
+ def up
3
+ rename_column :manifestations, :periodical, :serial
4
+ end
5
+
6
+ def down
7
+ rename_column :manifestations, :serial, :periodical
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class AddFullNameTranscriptionToProfile < ActiveRecord::Migration
2
+ def change
3
+ add_column :profiles, :full_name_transcription, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddDateOfBirthToProfile < ActiveRecord::Migration
2
+ def change
3
+ add_column :profiles, :date_of_birth, :datetime
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: 20140813182425) do
14
+ ActiveRecord::Schema.define(version: 20141003182825) do
15
15
 
16
16
  create_table "accepts", force: true do |t|
17
17
  t.integer "basket_id"
@@ -510,7 +510,6 @@ ActiveRecord::Schema.define(version: 20140813182425) do
510
510
  t.string "access_address"
511
511
  t.integer "language_id", default: 1, null: false
512
512
  t.integer "carrier_type_id", default: 1, null: false
513
- t.integer "extent_id", default: 1, null: false
514
513
  t.integer "start_page"
515
514
  t.integer "end_page"
516
515
  t.integer "height"
@@ -552,9 +551,11 @@ ActiveRecord::Schema.define(version: 20140813182425) do
552
551
  t.integer "month_of_publication"
553
552
  t.boolean "fulltext_content"
554
553
  t.string "doi"
555
- t.boolean "periodical"
554
+ t.boolean "serial"
556
555
  t.text "statement_of_responsibility"
557
556
  t.text "publication_place"
557
+ t.text "extent"
558
+ t.text "dimensions"
558
559
  end
559
560
 
560
561
  add_index "manifestations", ["access_address"], name: "index_manifestations_on_access_address"
@@ -636,6 +637,8 @@ ActiveRecord::Schema.define(version: 20140813182425) do
636
637
  t.datetime "created_at"
637
638
  t.datetime "updated_at"
638
639
  t.datetime "expired_at"
640
+ t.text "full_name_transcription"
641
+ t.datetime "date_of_birth"
639
642
  end
640
643
 
641
644
  add_index "profiles", ["user_id"], name: "index_profiles_on_user_id"
@@ -745,6 +748,7 @@ ActiveRecord::Schema.define(version: 20140813182425) do
745
748
  t.text "body"
746
749
  t.datetime "created_at"
747
750
  t.datetime "updated_at"
751
+ t.text "error_message"
748
752
  end
749
753
 
750
754
  add_index "resource_import_results", ["item_id"], name: "index_resource_import_results_on_item_id"
@@ -48,4 +48,4 @@ user4:
48
48
  username: user4
49
49
  email: user4@kamata.lib.teu.ac.jp
50
50
  created_at: 2007-11-19 16:58:34.637413 +09:00
51
- locked_at: <%= 1.day.ago %>
51
+ locked_at: <%= 1.day.ago.to_s(:db) %>
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  require 'simplecov'
2
+ require 'coveralls'
2
3
  SimpleCov.start 'rails'
4
+ Coveralls.wear!
3
5
 
4
6
  # This file is copied to spec/ when you run 'rails generate rspec:install'
5
7
  ENV["RAILS_ENV"] ||= 'test'