repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20140518111006_create_message_transitions.rb | db/migrate/20140518111006_create_message_transitions.rb | class CreateMessageTransitions < ActiveRecord::Migration[5.2]
def change
create_table :message_transitions do |t|
t.string :to_state
t.text :metadata, default: '{}'
t.integer :sort_key
t.references :message
t.timestamps
end
add_index :message_transitions, [:sort_key, :messag... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20081220034117_create_reserve_stat_has_users.rb | db/migrate/20081220034117_create_reserve_stat_has_users.rb | class CreateReserveStatHasUsers < ActiveRecord::Migration[4.2]
def up
create_table :reserve_stat_has_users do |t|
t.references :user_reserve_stat, index: true, foreign_key: true, null: false
t.references :user, index: true, foreign_key: true, null: false
t.integer :reserves_count
t.timest... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20150506105356_add_error_message_to_user_import_result.rb | db/migrate/20150506105356_add_error_message_to_user_import_result.rb | class AddErrorMessageToUserImportResult < ActiveRecord::Migration[4.2]
def change
add_column :user_import_results, :error_message, :text
end
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb | db/migrate/20120319120638_add_content_type_id_to_manifestation.rb | class AddContentTypeIdToManifestation < ActiveRecord::Migration[4.2]
def change
add_column :manifestations, :content_type_id, :integer, default: 1
end
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20081028093607_create_event_import_files.rb | db/migrate/20081028093607_create_event_import_files.rb | class CreateEventImportFiles < ActiveRecord::Migration[4.2]
def up
create_table :event_import_files do |t|
t.references :parent, index: true
t.string :content_type
t.integer :size
t.references :user, index: true
t.text :note
t.datetime :imported_at
t.string :event_import_... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20100211105551_add_admin_networks_to_library_group.rb | db/migrate/20100211105551_add_admin_networks_to_library_group.rb | class AddAdminNetworksToLibraryGroup < ActiveRecord::Migration[4.2]
def up
add_column :library_groups, :admin_networks, :text
end
def down
remove_column :library_groups, :admin_networks
end
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20221112082227_add_index_to_user_has_roles_on_user_id_and_role_id.rb | db/migrate/20221112082227_add_index_to_user_has_roles_on_user_id_and_role_id.rb | class AddIndexToUserHasRolesOnUserIdAndRoleId < ActiveRecord::Migration[6.1]
def change
remove_index :user_has_roles, :user_id
add_index :user_has_roles, [:user_id, :role_id], unique: true
end
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20220507153151_remove_deleted_at_from_tables.rb | db/migrate/20220507153151_remove_deleted_at_from_tables.rb | class RemoveDeletedAtFromTables < ActiveRecord::Migration[6.1]
def change
%i(agents manifestations items subjects reserves libraries shelves
user_groups events bookstores subscriptions users ).each do |table|
remove_column table, :deleted_at, :timestamp
end
end
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20081025083905_create_languages.rb | db/migrate/20081025083905_create_languages.rb | class CreateLanguages < ActiveRecord::Migration[4.2]
# ISO 639 is the set of international standards that lists short codes for language names.
# Note this doesn't include macrolanguages (dialects)
# Information on macrolanguages http://en.wikipedia.org/wiki/ISO_639_macrolanguage
def change
create_table :... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/rails_helper.rb | spec/rails_helper.rb | # This file is copied to spec/ when you run 'rails generate rspec:install'
require 'simplecov'
SimpleCov.start 'rails'
require 'spec_helper'
ENV['RAILS_ENV'] ||= 'test'
require_relative '../config/environment'
# Prevent database truncation if the environment is production
abort("The Rails environment is running in pro... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/spec_helper.rb | spec/spec_helper.rb | # This file was generated by the `rails generate rspec:install` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause
# this file to always be loaded, without a need to explicitly require ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/system/bookmarks_spec.rb | spec/system/bookmarks_spec.rb | require 'rails_helper'
RSpec.describe 'Bookmarks', type: :system do
include Devise::Test::IntegrationHelpers
fixtures :all
describe 'When logged in as Librarian' do
it 'should get new bookmark' do
sign_in users(:librarian1)
visit new_bookmark_path('bookmark[title]': 'ブックマークのテスト')
expect(p... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/system/user_group_has_checkout_types_spec.rb | spec/system/user_group_has_checkout_types_spec.rb | require 'rails_helper'
RSpec.describe 'UserGroupHasCheckoutType', type: :system do
include Devise::Test::IntegrationHelpers
fixtures :all
describe 'When logged in as Admin' do
it 'should render' do
sign_in users(:admin)
visit edit_user_group_has_checkout_type_path(user_group_has_checkout_types(:... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/system/items_spec.rb | spec/system/items_spec.rb | require 'rails_helper'
RSpec.describe 'Items', type: :system do
include Devise::Test::IntegrationHelpers
fixtures :all
before do
@item = FactoryBot.create(:item, shelf: shelves(:shelf_00002))
CarrierType.find_by(name: 'volume').attachment.attach(io: File.open("#{Rails.root.to_s}/app/assets/images/icons/b... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/system/series_statements_spec.rb | spec/system/series_statements_spec.rb | require 'rails_helper'
RSpec.describe 'SeriesStatements', type: :system do
include Devise::Test::IntegrationHelpers
fixtures :all
before do
@series_statement = FactoryBot.create(:series_statement)
end
describe 'When not logged in' do
it 'should show default series_statement' do
visit series_st... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/system/checkouts_spec.rb | spec/system/checkouts_spec.rb | require 'rails_helper'
RSpec.describe 'Checkouts', type: :system do
include Devise::Test::IntegrationHelpers
fixtures :all
before(:each) do
CarrierType.find_by(name: 'volume').attachment.attach(io: File.open("#{Rails.root.to_s}/app/assets/images/icons/book.png"), filename: 'book.png')
end
describe 'Whe... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/system/baskets_spec.rb | spec/system/baskets_spec.rb | require 'rails_helper'
RSpec.describe 'Baskets', type: :system do
include Devise::Test::IntegrationHelpers
fixtures :all
describe 'When logged in as Librarian' do
it 'should contain checkout item' do
sign_in users(:librarian1)
visit new_basket_path
fill_in :basket_user_number, with: '00003... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/system/manifestations_spec.rb | spec/system/manifestations_spec.rb | require 'rails_helper'
RSpec.describe 'Manifestations', type: :system do
include Devise::Test::IntegrationHelpers
fixtures :all
before do
@item = FactoryBot.create(:item, shelf: shelves(:shelf_00002))
CarrierType.find_by(name: 'volume').attachment.attach(io: File.open("#{Rails.root.to_s}/app/assets/image... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/system/reserves_spec.rb | spec/system/reserves_spec.rb | require 'rails_helper'
RSpec.describe 'Reserves', type: :system do
include Devise::Test::IntegrationHelpers
fixtures :all
describe 'When logged in as Librarian' do
before(:each) do
sign_in users(:librarian1)
end
it 'should contain user information' do
visit reserves_path(format: :text)
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/system/checkins_spec.rb | spec/system/checkins_spec.rb | require 'rails_helper'
RSpec.describe 'Checkins', type: :system do
include Devise::Test::IntegrationHelpers
fixtures :all
describe 'When logged in as Librarian' do
it 'should contain checkin item' do
sign_in users(:librarian1)
visit new_checkin_path
fill_in :checkin_item_identifier, with:... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/system/libraries_spec.rb | spec/system/libraries_spec.rb | require 'rails_helper'
RSpec.describe 'Libraries', type: :system do
include Devise::Test::IntegrationHelpers
fixtures :all
describe 'When logged in as Administrator' do
before do
sign_in users(:admin)
end
xit 'should show library config' do
visit library_path(libraries(:library_00002).i... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/support/capybara.rb | spec/support/capybara.rb | require 'capybara/rspec'
require "selenium-webdriver"
Capybara.register_driver :remote_chrome do |app|
url = ENV['SELENIUM_DRIVER_URL']
options = ::Selenium::WebDriver::Chrome::Options.new
options.add_argument("--headless")
options.add_argument("--no-sandbox")
options.add_argument('--disable-dev-shm-usage')... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/support/vcr.rb | spec/support/vcr.rb | VCR.configure do |c|
c.cassette_library_dir = 'spec/cassette_library'
c.hook_into :webmock
c.configure_rspec_metadata!
c.allow_http_connections_when_no_cassette = true
c.ignore_hosts 'localhost', 'solr'
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/support/precompile_assets.rb | spec/support/precompile_assets.rb | RSpec.configure do |config|
config.before(:suite) do
examples = RSpec.world.filtered_examples.values.flatten
has_no_system_tests = examples.none? { |example| example.metadata[:type] == :system }
if has_no_system_tests
$stdout.puts "\n No system test selected. Skip assets compilation.\n"
next
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/support/devise.rb | spec/support/devise.rb | RSpec.configure do |config|
config.include Devise::Test::ControllerHelpers, type: :controller
config.include Devise::Test::ControllerHelpers, type: :view
config.include Devise::Test::IntegrationHelpers, type: :request
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/support/controller_macros.rb | spec/support/controller_macros.rb | module ControllerMacros
def login_admin
before(:each) do
@request.env["devise.mapping"] = Devise.mappings[:admin]
sign_in FactoryBot.create(:admin)
end
end
def login_librarian
before(:each) do
@request.env["devise.mapping"] = Devise.mappings[:librarian]
sign_in FactoryBot.crea... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/routing/periodicals_routing_spec.rb | spec/routing/periodicals_routing_spec.rb | require "rails_helper"
RSpec.describe PeriodicalsController, type: :routing do
describe "routing" do
it "routes to #index" do
expect(get: "/periodicals").to route_to("periodicals#index")
end
it "routes to #new" do
expect(get: "/periodicals/new").to route_to("periodicals#new")
end
it... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/routing/picture_files_routing_spec.rb | spec/routing/picture_files_routing_spec.rb | require "rails_helper"
RSpec.describe PictureFilesController, type: :routing do
describe "routing" do
it "routes to #index" do
expect(get: "/picture_files").to route_to("picture_files#index")
end
it "routes to #new" do
expect(get: "/picture_files/new").to route_to("picture_files#new")
en... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/requests/manifestations_controller_spec.rb | spec/requests/manifestations_controller_spec.rb | require 'rails_helper'
RSpec.describe "ManifestationsController", type: :request do
describe "GET /manifestations/1" do
fixtures :all
before(:each) do
@manifestation = manifestations(:manifestation_00023)
end
it 'should not download an attachment file' do
@manifestation.attachment.attach... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/requests/oai_controller_spec.rb | spec/requests/oai_controller_spec.rb | require 'rails_helper'
RSpec.describe "OaiController", type: :request do
describe "GET /oai" do
fixtures :all
before(:each) do
@manifestation = manifestations(:manifestation_00001)
end
it "should get Identify" do
get oai_path(verb: 'Identify')
expect(response).to be_successful
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/requests/iiif_presentations_controller_spec.rb | spec/requests/iiif_presentations_controller_spec.rb | require 'rails_helper'
RSpec.describe "IiifPresentationsController", type: :request do
describe "GET /show" do
fixtures :all
before(:each) do
@manifestation = manifestations(:manifestation_00001)
@manifestation.picture_files.first.attachment.attach(io: File.open(Rails.root.join('app/assets/images... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/requests/periodicals_spec.rb | spec/requests/periodicals_spec.rb | require 'rails_helper'
# This spec was generated by rspec-rails when you ran the scaffold generator.
# It demonstrates how one might use RSpec to test the controller code that
# was generated by Rails when you ran the scaffold generator.
#
# It assumes that the implementation code is generated by the rails scaffold
# ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/helpers/application_helper_spec.rb | spec/helpers/application_helper_spec.rb | require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the PatronsHelper. For example:
#
# describe PatronsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# helper.concat_strings("this","that").should == "this that"
# end
# end
# e... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/helpers/manifestations_helper_spec.rb | spec/helpers/manifestations_helper_spec.rb | require 'rails_helper'
describe ManifestationsHelper do
fixtures :all
it 'should export rdf_statement"' do
expect(rdf_statement(manifestations(:manifestation_00001)).to_s).to match '<https://next-l.jp/vocab/originalTitle> "よくわかる最新Webサービス技術の基本と仕組み : 標準Webシステム技術とeコマース基盤技術入門"'
end
it "should get paginate_id... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/helpers/book_jacket_helper_spec.rb | spec/helpers/book_jacket_helper_spec.rb | require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the PatronsHelper. For example:
#
# describe PatronsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# helper.concat_strings("this","that").should == "this that"
# end
# end
# e... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/helpers/enju_biblio/application_helper_spec.rb | spec/helpers/enju_biblio/application_helper_spec.rb | require 'rails_helper'
describe EnjuBiblio::ApplicationHelper do
fixtures :all
it "should render form_icon if carrier_type is nil" do
expect(helper.form_icon(nil)).to match /src=\"\/assets\/icons\/help-/
end
it "should render form_icon if carrier_type's attachment is blank" do
expect(helper.form_icon... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/series_statement_merge_lists.rb | spec/factories/series_statement_merge_lists.rb | FactoryBot.define do
factory :series_statement_merge_list do |f|
f.sequence(:title) {|n| "series_statement_merge_list_#{n}"}
end
end
# == Schema Information
#
# Table name: series_statement_merge_lists
#
# id :bigint not null, primary key
# title :string
# created_at :datetime ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/classifications.rb | spec/factories/classifications.rb | FactoryBot.define do
factory :classification do |f|
f.sequence(:category) {|n| "classification_#{n}"}
f.classification_type_id {FactoryBot.create(:classification_type).id}
end
end
# == Schema Information
#
# Table name: classifications
#
# id :bigint not null, primary key
# ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/user_checkout_stats.rb | spec/factories/user_checkout_stats.rb | FactoryBot.define do
factory :user_checkout_stat do
start_date { 1.week.ago }
end_date { 1.day.ago }
association :user, factory: :librarian
end
end
# == Schema Information
#
# Table name: user_checkout_stats
#
# id :bigint not null, primary key
# completed_at :datetime
# end_date... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/manifestations.rb | spec/factories/manifestations.rb | FactoryBot.define do
factory :manifestation do |f|
f.sequence(:original_title) {|n| "manifestation_title_#{n}"}
f.carrier_type_id {CarrierType.find(1).id}
end
factory :manifestation_serial, class: Manifestation do |f|
f.sequence(:original_title) {|n| "manifestation_title_#{n}"}
f.carrier_type_id ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/donates.rb | spec/factories/donates.rb | FactoryBot.define do
factory :donate do |f|
f.item_id {FactoryBot.create(:item).id}
f.agent_id {FactoryBot.create(:agent).id}
end
end
# == Schema Information
#
# Table name: donates
#
# id :bigint not null, primary key
# created_at :datetime not null
# updated_at :datetime ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/events.rb | spec/factories/events.rb | FactoryBot.define do
factory :event do |f|
f.sequence(:name) {|n| "event_#{n}"}
f.start_at {Time.zone.now}
f.end_at {1.hour.from_now}
f.library_id {FactoryBot.create(:library).id}
f.event_category_id {FactoryBot.create(:event_category).id}
end
end
# == Schema Information
#
# Table name: events
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/bookmarks.rb | spec/factories/bookmarks.rb | FactoryBot.define do
factory :bookmark do
sequence(:title) {|n| "bookmark_#{n}"}
sequence(:url) {|n| "http://example.jp/#{n}"}
user_id {FactoryBot.create(:user).id}
association :manifestation
end
end
# == Schema Information
#
# Table name: bookmarks
#
# id :bigint not null,... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/carrier_type_has_checkout_types.rb | spec/factories/carrier_type_has_checkout_types.rb | FactoryBot.define do
factory :carrier_type_has_checkout_type do |f|
f.carrier_type_id {FactoryBot.create(:carrier_type).id}
f.checkout_type_id {FactoryBot.create(:checkout_type).id}
end
end
# == Schema Information
#
# Table name: carrier_type_has_checkout_types
#
# id :bigint not n... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/checkouts.rb | spec/factories/checkouts.rb | FactoryBot.define do
factory :checkout, class: Checkout do |f|
f.due_date { Time.zone.now.next_week }
f.association :item, factory: :item
f.association :user, factory: :user
f.association :librarian, factory: :librarian
f.association :basket, factory: :basket
end
end
# == Schema Information
#
#... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/users.rb | spec/factories/users.rb | FactoryBot.define do
factory :admin, class: User do |f|
f.sequence(:username) {|n| "admin_#{n}"}
f.sequence(:email) {|n| "admin_#{n}@example.jp"}
f.password { 'adminpassword' }
f.password_confirmation { 'adminpassword' }
f.association :profile, required_role_id: 4
f.after(:create) do |user|
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/content_types.rb | spec/factories/content_types.rb | FactoryBot.define do
factory :content_type do |f|
f.sequence(:name) {|n| "content_type_#{n}"}
end
end
# == Schema Information
#
# Table name: content_types
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note :text
# positio... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/doi_records.rb | spec/factories/doi_records.rb | FactoryBot.define do
factory :doi_record do
sequence(:body) {|n| "body_#{n}"}
association :manifestation
end
end
# == Schema Information
#
# Table name: doi_records
#
# id :bigint not null, primary key
# body :string not null
# created_at :datetime ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/profiles.rb | spec/factories/profiles.rb | FactoryBot.define do
factory :profile, class: Profile do |f|
f.user_group_id {UserGroup.first.id}
f.required_role_id {Role.where(name: 'User').first.id}
f.sequence(:user_number) {|n| "user_number_#{n}"}
f.library_id { 2 }
f.locale { "ja" }
end
end
# == Schema Information
#
# Table name: profile... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/budget_types.rb | spec/factories/budget_types.rb | FactoryBot.define do
factory :budget_type do |f|
f.sequence(:name) {|n| "budget_type_#{n}"}
end
end
# == Schema Information
#
# Table name: budget_types
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note :text
# position ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/news_posts.rb | spec/factories/news_posts.rb | FactoryBot.define do
factory :news_post do |f|
f.sequence(:title) {|n| "news_post_#{n}"}
f.sequence(:body) {|n| "news_post_#{n}"}
f.user {FactoryBot.create(:librarian)}
end
end
# == Schema Information
#
# Table name: news_posts
#
# id :bigint not null, primary key
# body ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/order_lists.rb | spec/factories/order_lists.rb | FactoryBot.define do
factory :order_list do |f|
f.user_id {FactoryBot.create(:user).id}
f.sequence(:title) {|n| "order_list_#{n}"}
f.bookstore_id {FactoryBot.create(:bookstore).id}
end
end
# == Schema Information
#
# Table name: order_lists
#
# id :bigint not null, primary key
# n... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/baskets.rb | spec/factories/baskets.rb | FactoryBot.define do
factory :basket do |f|
f.user_id {FactoryBot.create(:user).id}
end
end
# == Schema Information
#
# Table name: baskets
#
# id :bigint not null, primary key
# lock_version :integer default(0), not null
# note :text
# created_at :datetime no... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/item_custom_properties.rb | spec/factories/item_custom_properties.rb | FactoryBot.define do
factory :item_custom_property do
sequence(:name) {|n| "property_name_#{n}"}
sequence(:display_name) {|n| "プロパティ名_#{n}"}
end
end
# == Schema Information
#
# Table name: item_custom_properties
#
# id :bigint not null, primary key
# display_name(表示名) :text ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/items.rb | spec/factories/items.rb | FactoryBot.define do
factory :item do
sequence(:item_identifier) {|n| "item_#{n}"}
circulation_status_id {CirculationStatus.find(1).id}
manifestation_id {FactoryBot.create(:manifestation).id}
after(:build) do |item|
bookstore = Bookstore.find(1)
budget_type = BudgetType.find(1)
item.... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/user_group_has_checkout_types.rb | spec/factories/user_group_has_checkout_types.rb | FactoryBot.define do
factory :user_group_has_checkout_type do |f|
f.user_group_id {FactoryBot.create(:user_group).id}
f.checkout_type_id {FactoryBot.create(:checkout_type).id}
end
end
# == Schema Information
#
# Table name: user_group_has_checkout_types
#
# id :bigint ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/frequencies.rb | spec/factories/frequencies.rb | FactoryBot.define do
factory :frequency do |f|
f.sequence(:name) {|n| "frequency_#{n}"}
end
end
# == Schema Information
#
# Table name: frequencies
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note :text
# position :i... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/request_types.rb | spec/factories/request_types.rb | FactoryBot.define do
factory :request_type do |f|
f.sequence(:name) {|n| "request_type_#{n}"}
end
end
# == Schema Information
#
# Table name: request_types
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note :text
# positio... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/checkout_types.rb | spec/factories/checkout_types.rb | FactoryBot.define do
factory :checkout_type do |f|
f.sequence(:name) {|n| "checkout_type_#{n}"}
end
end
# == Schema Information
#
# Table name: checkout_types
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note :text
# posi... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/orders.rb | spec/factories/orders.rb | FactoryBot.define do
factory :order do |f|
f.order_list_id {FactoryBot.create(:order_list).id}
f.purchase_request_id {FactoryBot.create(:purchase_request).id}
end
end
# == Schema Information
#
# Table name: orders
#
# id :bigint not null, primary key
# position :inte... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/user_groups.rb | spec/factories/user_groups.rb | FactoryBot.define do
factory :user_group do |f|
f.sequence(:name) {|n| "user_group_#{n}"}
end
end
# == Schema Information
#
# Table name: user_groups
#
# id :bigint not null, primary key
# display_name :text
# expired_at :date... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/roles.rb | spec/factories/roles.rb | FactoryBot.define do
factory :role, class: Role do |f|
f.sequence(:name) do |n|
idx = "a"
n.times { idx = idx.next }
"name#{idx}"
end
end
end
# == Schema Information
#
# Table name: roles
#
# id :bigint not null, primary key
# display_name :string
# name :st... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/accepts.rb | spec/factories/accepts.rb | # Read about factories at https://github.com/thoughtbot/factory_bot
FactoryBot.define do
factory :accept do
basket_id {FactoryBot.create(:basket).id}
item_id {FactoryBot.create(:item).id}
librarian_id {FactoryBot.create(:librarian).id}
end
end
# == Schema Information
#
# Table name: accepts
#
# id ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/places.rb | spec/factories/places.rb | FactoryBot.define do
factory :place do |f|
f.sequence(:term) {|n| "term_#{n}"}
end
end
# == Schema Information
#
# Table name: places
#
# id :bigint not null, primary key
# city :text
# latitude :float
# longitude :float
# term :string
# created_at :datetime not n... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/reserves.rb | spec/factories/reserves.rb | FactoryBot.define do
factory :reserve do
before(:create) do |reserve|
profile = FactoryBot.create(:profile)
user = User.new(FactoryBot.attributes_for(:user))
user.profile = profile
reserve.user = user
end
after(:build) do |reserve|
item = FactoryBot.create(:item, use_restrict... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/produces.rb | spec/factories/produces.rb | FactoryBot.define do
factory :produce do |f|
f.manifestation_id {FactoryBot.create(:manifestation).id}
f.agent_id {FactoryBot.create(:agent).id}
end
end
# == Schema Information
#
# Table name: produces
#
# id :bigint not null, primary key
# position :integer
# created_at ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/participates.rb | spec/factories/participates.rb | FactoryBot.define do
factory :participate do |f|
f.event_id {FactoryBot.create(:event).id}
f.agent_id {FactoryBot.create(:agent).id}
end
end
# == Schema Information
#
# Table name: participates
#
# id :bigint not null, primary key
# position :integer
# created_at :datetime no... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/classification_types.rb | spec/factories/classification_types.rb | FactoryBot.define do
factory :classification_type do |f|
f.sequence(:name) {|n| "classification_type_#{n}"}
end
end
# == Schema Information
#
# Table name: classification_types
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/periodicals.rb | spec/factories/periodicals.rb | FactoryBot.define do
factory :periodical do
sequence(:original_title) {|n| "periodical_title_#{n}"}
association :manifestation
frequency_id { 1 }
end
end
# == Schema Information
#
# Table name: periodicals
#
# id :bigint not null, primary key
# original_title :text ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/series_statements.rb | spec/factories/series_statements.rb | FactoryBot.define do
factory :series_statement do
sequence(:original_title) {|n| "series_statement_#{n}"}
sequence(:creator_string) {|n| "シリーズの著者 #{n}" }
end
factory :series_statement_serial, class: SeriesStatement do
sequence(:original_title) {|n| "series_statement_serial_#{n}" }
#f.root_manifes... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/agent_relationship_types.rb | spec/factories/agent_relationship_types.rb | FactoryBot.define do
factory :agent_relationship_type do |f|
f.sequence(:name) {|n| "agent_relationship_type_#{n}"}
end
end
# == Schema Information
#
# Table name: agent_relationship_types
#
# id :bigint not null, primary key
# display_name :text
# name :string not null... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/libraries.rb | spec/factories/libraries.rb | FactoryBot.define do
factory :library do |f|
f.sequence(:name) {|n| "library#{n}"}
f.sequence(:short_display_name) {|n| "library_#{n}"}
f.library_group_id {LibraryGroup.first.id}
end
end
FactoryBot.define do
factory :invalid_library, class: Library do |f|
f.library_group_id {LibraryGroup.first.id... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/circulation_statuses.rb | spec/factories/circulation_statuses.rb | FactoryBot.define do
factory :circulation_status do |f|
f.sequence(:name) {|n| "circulation_status_#{n}"}
end
end
# == Schema Information
#
# Table name: circulation_statuses
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/agent_merge_lists.rb | spec/factories/agent_merge_lists.rb | FactoryBot.define do
factory :agent_merge_list do |f|
f.sequence(:title) {|n| "agent_merge_list_#{n}"}
end
end
# == Schema Information
#
# Table name: agent_merge_lists
#
# id :bigint not null, primary key
# title :string
# created_at :datetime not null
# updated_at :datetime... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/withdraws.rb | spec/factories/withdraws.rb | # Read about factories at https://github.com/thoughtbot/factory_bot
FactoryBot.define do
factory :withdraw do
item_id {FactoryBot.create(:item).id}
librarian_id {FactoryBot.create(:librarian).id}
basket_id {FactoryBot.create(:basket, user_id: librarian_id).id}
end
end
# == Schema Information
#
# Table... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/demands.rb | spec/factories/demands.rb | FactoryBot.define do
factory :demand do
user_id { FactoryBot.create(:user).id }
item_id { FactoryBot.create(:item).id }
message_id { FactoryBot.create(:message).id }
end
end
# == Schema Information
#
# Table name: demands
#
# id :bigint not null, primary key
# created_at :datetime ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/bookmark_stats.rb | spec/factories/bookmark_stats.rb | FactoryBot.define do
factory :bookmark_stat do |f|
f.start_date { 1.week.ago }
f.end_date { 1.day.ago }
end
end
# == Schema Information
#
# Table name: bookmark_stats
#
# id :bigint not null, primary key
# start_date :datetime
# end_date :datetime
# started_at :datetime
# c... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/identifier_types.rb | spec/factories/identifier_types.rb | FactoryBot.define do
factory :identifier_type do |f|
f.sequence(:name) {|n| "identifier_type_#{n}"}
end
end
# == Schema Information
#
# Table name: identifier_types
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note :text
#... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/manifestation_custom_values.rb | spec/factories/manifestation_custom_values.rb | FactoryBot.define do
factory :manifestation_custom_value do
association :manifestation_custom_property
sequence(:value) {|n| "value_#{n}"}
end
end
# == Schema Information
#
# Table name: manifestation_custom_values
#
# id :bigint not null, primary key
# value ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/countries.rb | spec/factories/countries.rb | FactoryBot.define do
factory :country do |f|
f.sequence(:name) {|n| "country_#{n}"}
f.sequence(:alpha_2) {|n| "alpha_2_#{n}"}
f.sequence(:alpha_3) {|n| "alpha_3_#{n}"}
f.sequence(:numeric_3) {|n| "numeric_3_#{n}"}
end
end
# == Schema Information
#
# Table name: countries
#
# id :bigint ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/event_categories.rb | spec/factories/event_categories.rb | FactoryBot.define do
factory :event_category do |f|
f.sequence(:name) {|n| "event_category_#{n}"}
end
end
# == Schema Information
#
# Table name: event_categories
#
# id :bigint not null, primary key
# name :string not null
# display_name :text
# note :text
# ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/manifestation_custom_properties.rb | spec/factories/manifestation_custom_properties.rb | FactoryBot.define do
factory :manifestation_custom_property do
sequence(:name) {|n| "property_name_#{n}"}
sequence(:display_name) {|n| "プロパティ名_#{n}"}
end
end
# == Schema Information
#
# Table name: manifestation_custom_properties
#
# id :bigint not null, primary key
# display_... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/news_feeds.rb | spec/factories/news_feeds.rb | FactoryBot.define do
factory :news_feed do |f|
f.sequence(:title) {|n| "news_feed_#{n}"}
f.sequence(:url) {|n| "http://www.example.com/feed/#{n}"}
end
end
# == Schema Information
#
# Table name: news_feeds
#
# id :bigint not null, primary key
# library_group_id :bigint d... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/subject_types.rb | spec/factories/subject_types.rb | FactoryBot.define do
factory :subject_type do |f|
f.sequence(:name) {|n| "subject_type_#{n}"}
end
end
# == Schema Information
#
# Table name: subject_types
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note :text
# positio... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/create_types.rb | spec/factories/create_types.rb | # Read about factories at http://github.com/thoughtbot/factory_bot
FactoryBot.define do
factory :create_type do
name { "mystring" }
display_name { "MyText" }
note { "MyText" }
end
end
# == Schema Information
#
# Table name: create_types
#
# id :bigint not null, primary key
# disp... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/series_statement_merges.rb | spec/factories/series_statement_merges.rb | FactoryBot.define do
factory :series_statement_merge do |f|
f.series_statement_merge_list_id {FactoryBot.create(:series_statement_merge_list).id}
f.series_statement_id {FactoryBot.create(:series_statement).id}
end
end
# == Schema Information
#
# Table name: series_statement_merges
#
# id ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/licenses.rb | spec/factories/licenses.rb | FactoryBot.define do
factory :license do |f|
f.sequence(:name) {|n| "license_#{n}"}
end
end
# == Schema Information
#
# Table name: licenses
#
# id :bigint not null, primary key
# display_name :string
# name :string not null
# note :text
# position :intege... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/identifiers.rb | spec/factories/identifiers.rb | FactoryBot.define do
factory :identifier do
sequence(:body) {|n| "identifier_body_#{n}"}
association :identifier_type
association :manifestation
end
end
# == Schema Information
#
# Table name: identifiers
#
# id :bigint not null, primary key
# body :string ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/messages.rb | spec/factories/messages.rb | FactoryBot.define do
factory :message do
recipient { 'user1' }
association :sender, factory: :user
subject { 'new message' }
body { 'new message body is really short' }
end
end
# == Schema Information
#
# Table name: messages
#
# id :bigint not null, primary key
# body ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/agent_merges.rb | spec/factories/agent_merges.rb | FactoryBot.define do
factory :agent_merge do |f|
f.agent_merge_list_id {FactoryBot.create(:agent_merge_list).id}
f.agent_id {FactoryBot.create(:agent).id}
end
end
# == Schema Information
#
# Table name: agent_merges
#
# id :bigint not null, primary key
# created_at :da... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/item_custom_values.rb | spec/factories/item_custom_values.rb | FactoryBot.define do
factory :item_custom_value do
association :item_custom_property
sequence(:value) {|n| "value_#{n}"}
end
end
# == Schema Information
#
# Table name: item_custom_values
#
# id :bigint not null, primary key
# value :text
# created_at ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/subject_heading_types.rb | spec/factories/subject_heading_types.rb | FactoryBot.define do
factory :subject_heading_type do |f|
f.sequence(:name) {|n| "subject_heading_type_#{n}"}
end
end
# == Schema Information
#
# Table name: subject_heading_types
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/manifestation_relationships.rb | spec/factories/manifestation_relationships.rb | FactoryBot.define do
factory :manifestation_relationship do
parent_id {FactoryBot.create(:manifestation).id}
child_id {FactoryBot.create(:manifestation).id}
association :manifestation_relationship_type
end
end
# == Schema Information
#
# Table name: manifestation_relationships
#
# id ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/agents.rb | spec/factories/agents.rb | FactoryBot.define do
factory :agent do |f|
f.sequence(:full_name) {|n| "full_name_#{n}"}
f.agent_type_id {AgentType.find_by(name: 'person').id}
f.country_id {Country.first.id}
f.language_id {Language.first.id}
end
end
FactoryBot.define do
factory :invalid_agent, class: Agent do |f|
end
end
# =... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/languages.rb | spec/factories/languages.rb | FactoryBot.define do
factory :language do |f|
f.sequence(:name) {|n| "language_#{n}"}
f.sequence(:iso_639_1) {|n| "639_1_#{n}"}
f.sequence(:iso_639_2) {|n| "639_2_#{n}"}
f.sequence(:iso_639_3) {|n| "639_3_#{n}"}
end
end
# == Schema Information
#
# Table name: languages
#
# id :bigint ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/carrier_types.rb | spec/factories/carrier_types.rb | FactoryBot.define do
factory :carrier_type do |f|
f.sequence(:name) {|n| "carrier_type_#{n}"}
end
end
# == Schema Information
#
# Table name: carrier_types
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note :text
# positio... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/lccn_records.rb | spec/factories/lccn_records.rb | FactoryBot.define do
factory :lccn_record do
sequence(:body) {|n| "body_#{n}"}
association :manifestation
end
end
# == Schema Information
#
# Table name: lccn_records
#
# id :bigint not null, primary key
# body :string not null
# created_at :datetime ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/realize_types.rb | spec/factories/realize_types.rb | # Read about factories at http://github.com/thoughtbot/factory_bot
FactoryBot.define do
factory :realize_type do
name { "mystring" }
display_name { "MyText" }
note { "MyText" }
end
end
# == Schema Information
#
# Table name: realize_types
#
# id :bigint not null, primary key
# di... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/agent_types.rb | spec/factories/agent_types.rb | FactoryBot.define do
factory :agent_type do |f|
f.sequence(:name) {|n| "agent_type_#{n}"}
end
end
# == Schema Information
#
# Table name: agent_types
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note :text
# position ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/spec/factories/import_requests.rb | spec/factories/import_requests.rb | FactoryBot.define do
factory :import_request do
sequence(:isbn) {|n| "isbn_#{n}"}
association :user, factory: :librarian
end
end
# == Schema Information
#
# Table name: import_requests
#
# id :bigint not null, primary key
# isbn :string
# created_at :datetime ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.