enju_library 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -2
- data/app/controllers/shelves_controller.rb +2 -1
- data/app/helpers/shelves_helper.rb +9 -5
- data/app/models/library.rb +1 -2
- data/app/models/library_group.rb +7 -1
- data/app/models/shelf.rb +1 -0
- data/app/views/accepts/index.html.erb +2 -2
- data/app/views/bookstores/index.html.erb +3 -3
- data/app/views/bookstores/show.html.erb +1 -1
- data/app/views/budget_types/index.html.erb +2 -2
- data/app/views/libraries/_form.html.erb +1 -1
- data/app/views/libraries/index.html.erb +3 -3
- data/app/views/libraries/show.html.erb +1 -1
- data/app/views/library_groups/index.html.erb +1 -1
- data/app/views/request_status_types/index.html.erb +2 -2
- data/app/views/request_types/index.html.erb +2 -2
- data/app/views/search_engines/index.html.erb +2 -2
- data/app/views/shelves/_library_facet.html.erb +1 -4
- data/app/views/shelves/index.html.erb +2 -2
- data/app/views/shelves/show.mobile.erb +33 -0
- data/app/views/subscribes/index.html.erb +2 -2
- data/app/views/subscriptions/index.html.erb +2 -2
- data/app/views/subscriptions/show.html.erb +1 -1
- data/lib/enju_library/engine.rb +0 -8
- data/lib/enju_library/version.rb +1 -1
- data/lib/enju_library.rb +0 -2
- data/spec/controllers/bookstores_controller_spec.rb +447 -0
- data/spec/controllers/budget_types_controller_spec.rb +167 -0
- data/spec/controllers/libraries_controller_spec.rb +517 -0
- data/spec/controllers/library_groups_controller_spec.rb +133 -0
- data/spec/controllers/request_status_types_controller_spec.rb +447 -0
- data/spec/controllers/request_types_controller_spec.rb +447 -0
- data/spec/controllers/search_engines_controller_spec.rb +447 -0
- data/spec/controllers/shelves_controller_spec.rb +437 -0
- data/spec/controllers/subscribes_controller_spec.rb +441 -0
- data/spec/controllers/subscriptions_controller_spec.rb +442 -0
- data/{test → spec}/dummy/README.rdoc +0 -0
- data/{test → spec}/dummy/Rakefile +0 -0
- data/{test → spec}/dummy/app/assets/javascripts/application.js +0 -0
- data/{test → spec}/dummy/app/assets/stylesheets/application.css +0 -0
- data/spec/dummy/app/controllers/application_controller.rb +59 -0
- data/spec/dummy/app/helpers/application_helper.rb +13 -0
- data/spec/dummy/app/models/ability.rb +51 -0
- data/spec/dummy/app/models/picture_file.rb +49 -0
- data/spec/dummy/app/models/role.rb +46 -0
- data/spec/dummy/app/models/user.rb +94 -0
- data/spec/dummy/app/models/user_group.rb +40 -0
- data/spec/dummy/app/models/user_has_role.rb +5 -0
- data/{test → spec}/dummy/app/views/layouts/application.html.erb +0 -0
- data/spec/dummy/app/views/page/403.html.erb +9 -0
- data/spec/dummy/app/views/page/403.mobile.erb +5 -0
- data/spec/dummy/app/views/page/403.xml.erb +4 -0
- data/spec/dummy/app/views/page/404.html.erb +9 -0
- data/spec/dummy/app/views/page/404.mobile.erb +5 -0
- data/spec/dummy/app/views/page/404.xml.erb +4 -0
- data/{test → spec}/dummy/config/application.rb +3 -0
- data/{test → spec}/dummy/config/boot.rb +0 -0
- data/{test → spec}/dummy/config/database.yml +0 -0
- data/{test → spec}/dummy/config/environment.rb +0 -0
- data/{test → spec}/dummy/config/environments/development.rb +0 -0
- data/{test → spec}/dummy/config/environments/production.rb +0 -0
- data/{test → spec}/dummy/config/environments/test.rb +0 -0
- data/{test → spec}/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/spec/dummy/config/initializers/devise.rb +205 -0
- data/{test → spec}/dummy/config/initializers/inflections.rb +0 -0
- data/{test → spec}/dummy/config/initializers/mime_types.rb +0 -0
- data/{test → spec}/dummy/config/initializers/secret_token.rb +0 -0
- data/{test → spec}/dummy/config/initializers/session_store.rb +0 -0
- data/{test → spec}/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/{test → spec}/dummy/config/locales/en.yml +0 -0
- data/{test → spec}/dummy/config/routes.rb +2 -0
- data/{test → spec}/dummy/config.ru +0 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/001_create_patrons.rb +58 -0
- data/spec/dummy/db/migrate/005_create_manifestations.rb +61 -0
- data/spec/dummy/db/migrate/006_create_items.rb +31 -0
- data/spec/dummy/db/migrate/012_create_owns.rb +12 -0
- data/spec/dummy/db/migrate/015_create_creates.rb +12 -0
- data/spec/dummy/db/migrate/047_create_produces.rb +12 -0
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +11 -0
- data/spec/dummy/db/migrate/077_create_user_groups.rb +16 -0
- data/spec/dummy/db/migrate/125_create_donates.rb +12 -0
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +13 -0
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +13 -0
- data/spec/dummy/db/migrate/20080905191442_create_patron_types.rb +12 -0
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +28 -0
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +23 -0
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +16 -0
- data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +15 -0
- data/spec/dummy/db/migrate/20090812151902_create_patron_relationship_types.rb +12 -0
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +27 -0
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
- data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +13 -0
- data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +13 -0
- data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +10 -0
- data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +13 -0
- data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +13 -0
- data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +12 -0
- data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +11 -0
- data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +9 -0
- data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +9 -0
- data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +11 -0
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +13 -0
- data/spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb +9 -0
- data/spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb +9 -0
- data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +9 -0
- data/{db → spec/dummy/db}/migrate/20110620173525_add_bookstore_id_to_item.rb +0 -0
- data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +9 -0
- data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +12 -0
- data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +13 -0
- data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +13 -0
- data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +13 -0
- data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +10 -0
- data/spec/dummy/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +13 -0
- data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +9 -0
- data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +7 -0
- data/spec/dummy/db/migrate/20111201121844_create_roles.rb +12 -0
- data/spec/dummy/db/migrate/20111201155456_create_users.rb +16 -0
- data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +44 -0
- data/spec/dummy/db/migrate/20111201163718_create_user_has_roles.rb +10 -0
- data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +6 -0
- data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +5 -0
- data/spec/dummy/db/schema.rb +642 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/{test → spec}/dummy/public/404.html +0 -0
- data/{test → spec}/dummy/public/422.html +0 -0
- data/{test → spec}/dummy/public/500.html +0 -0
- data/{test → spec}/dummy/public/favicon.ico +0 -0
- data/{test → spec}/dummy/script/rails +0 -0
- data/spec/dummy/solr/conf/admin-extra.html +31 -0
- data/spec/dummy/solr/conf/elevate.xml +36 -0
- data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/spec/dummy/solr/conf/protwords.txt +21 -0
- data/spec/dummy/solr/conf/schema.xml +238 -0
- data/spec/dummy/solr/conf/scripts.conf +24 -0
- data/spec/dummy/solr/conf/solrconfig.xml +934 -0
- data/spec/dummy/solr/conf/spellings.txt +2 -0
- data/spec/dummy/solr/conf/stopwords.txt +58 -0
- data/spec/dummy/solr/conf/synonyms.txt +31 -0
- data/spec/dummy/solr/data/test/index/_k.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_k.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_k.fnm +3 -0
- data/spec/dummy/solr/data/test/index/_k.frq +1 -0
- data/spec/dummy/solr/data/test/index/_k.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_k.prx +0 -0
- data/spec/dummy/solr/data/test/index/_k.tii +0 -0
- data/spec/dummy/solr/data/test/index/_k.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_18 +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments.gen +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- data/spec/dummy/tmp/cache/4AD/470/country_all +0 -0
- data/spec/factories/bookstore.rb +5 -0
- data/spec/factories/budget_types.rb +5 -0
- data/spec/factories/carrier_types.yml +51 -0
- data/spec/factories/library.rb +13 -0
- data/spec/factories/manifestation.rb +6 -0
- data/spec/factories/request_status_type.rb +5 -0
- data/spec/factories/request_type.rb +5 -0
- data/spec/factories/search_engine.rb +9 -0
- data/spec/factories/shelf.rb +6 -0
- data/spec/factories/subscribe.rb +8 -0
- data/spec/factories/subscription.rb +6 -0
- data/spec/factories/user.rb +37 -0
- data/spec/fixtures/bookstores.yml +107 -0
- data/spec/fixtures/budget_types.yml +29 -0
- data/spec/fixtures/carrier_types.yml +51 -0
- data/spec/fixtures/languages.yml +1901 -0
- data/spec/fixtures/libraries.yml +102 -0
- data/spec/fixtures/library_groups.yml +33 -0
- data/spec/fixtures/manifestations.yml +2022 -0
- data/spec/fixtures/request_status_types.yml +63 -0
- data/spec/fixtures/request_types.yml +55 -0
- data/spec/fixtures/roles.yml +21 -0
- data/spec/fixtures/search_engines.yml +41 -0
- data/spec/fixtures/shelves.yml +47 -0
- data/spec/fixtures/subscribes.yml +45 -0
- data/spec/fixtures/subscriptions.yml +27 -0
- data/spec/fixtures/user_groups.yml +31 -0
- data/spec/fixtures/user_has_roles.yml +41 -0
- data/spec/fixtures/users.yml +129 -0
- data/spec/models/bookstore_spec.rb +26 -0
- data/spec/models/budget_type_spec.rb +22 -0
- data/spec/models/library_group_spec.rb +33 -0
- data/spec/models/library_spec.rb +47 -0
- data/spec/models/request_status_type_spec.rb +21 -0
- data/spec/models/request_type_spec.rb +21 -0
- data/spec/models/search_engine_spec.rb +29 -0
- data/spec/models/shelf_spec.rb +29 -0
- data/spec/models/subscribe_spec.rb +21 -0
- data/spec/models/subscription_spec.rb +26 -0
- data/spec/routing/budget_types_routing_spec.rb +35 -0
- data/spec/routing/libraries_routing_spec.rb +35 -0
- data/spec/spec_helper.rb +55 -0
- data/spec/support/controller_macros.rb +46 -0
- data/spec/support/devise.rb +4 -0
- data/spec/support/vcr.rb +9 -0
- data/spec/views/budget_types/edit.html.erb_spec.rb +23 -0
- data/spec/views/budget_types/index.html.erb_spec.rb +28 -0
- data/spec/views/budget_types/new.html.erb_spec.rb +23 -0
- data/spec/views/budget_types/show.html.erb_spec.rb +24 -0
- metadata +372 -198
- data/lib/enju_library/master_model.rb +0 -19
- data/lib/enju_library/url_validator.rb +0 -10
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -0
- data/test/dummy/log/test.log +0 -0
- data/test/enju_library_test.rb +0 -7
- data/test/integration/navigation_test.rb +0 -10
- data/test/test_helper.rb +0 -15
@@ -0,0 +1,58 @@
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
+
# contributor license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright ownership.
|
4
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with
|
6
|
+
# the License. You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
|
16
|
+
#-----------------------------------------------------------------------
|
17
|
+
# a couple of test stopwords to test that the words are really being
|
18
|
+
# configured from this file:
|
19
|
+
stopworda
|
20
|
+
stopwordb
|
21
|
+
|
22
|
+
#Standard english stop words taken from Lucene's StopAnalyzer
|
23
|
+
a
|
24
|
+
an
|
25
|
+
and
|
26
|
+
are
|
27
|
+
as
|
28
|
+
at
|
29
|
+
be
|
30
|
+
but
|
31
|
+
by
|
32
|
+
for
|
33
|
+
if
|
34
|
+
in
|
35
|
+
into
|
36
|
+
is
|
37
|
+
it
|
38
|
+
no
|
39
|
+
not
|
40
|
+
of
|
41
|
+
on
|
42
|
+
or
|
43
|
+
s
|
44
|
+
such
|
45
|
+
t
|
46
|
+
that
|
47
|
+
the
|
48
|
+
their
|
49
|
+
then
|
50
|
+
there
|
51
|
+
these
|
52
|
+
they
|
53
|
+
this
|
54
|
+
to
|
55
|
+
was
|
56
|
+
will
|
57
|
+
with
|
58
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
2
|
+
# (the "License"); you may not use this file except in compliance with
|
3
|
+
# the License. You may obtain a copy of the License at
|
4
|
+
#
|
5
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
#-----------------------------------------------------------------------
|
14
|
+
#some test synonym mappings unlikely to appear in real input text
|
15
|
+
aaa => aaaa
|
16
|
+
bbb => bbbb1 bbbb2
|
17
|
+
ccc => cccc1,cccc2
|
18
|
+
a\=>a => b\=>b
|
19
|
+
a\,a => b\,b
|
20
|
+
fooaaa,baraaa,bazaaa
|
21
|
+
|
22
|
+
# Some synonym groups specific to this example
|
23
|
+
GB,gib,gigabyte,gigabytes
|
24
|
+
MB,mib,megabyte,megabytes
|
25
|
+
Television, Televisions, TV, TVs
|
26
|
+
#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming
|
27
|
+
#after us won't split it into two words.
|
28
|
+
|
29
|
+
# Synonym mappings can be used for spelling correction too
|
30
|
+
pixima => pixma
|
31
|
+
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
NRM�||
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,51 @@
|
|
1
|
+
---
|
2
|
+
carrier_type_00004:
|
3
|
+
name: file
|
4
|
+
display_name: file
|
5
|
+
updated_at: 2007-12-24 01:30:50.637433 +09:00
|
6
|
+
id: 4
|
7
|
+
note: !binary |
|
8
|
+
44Kz44Oz44OU44Ol44O844K/44Gu44OV44Kh44Kk44Or44Gn44GZ44CC
|
9
|
+
|
10
|
+
created_at: 2007-12-24 01:30:50.637433 +09:00
|
11
|
+
position: 4
|
12
|
+
carrier_type_00001:
|
13
|
+
name: print
|
14
|
+
display_name: print
|
15
|
+
updated_at: 2007-11-20 16:04:29.853828 +09:00
|
16
|
+
id: 1
|
17
|
+
note: !binary |
|
18
|
+
5pys44Gn44GZ44CC
|
19
|
+
|
20
|
+
created_at: 2007-11-20 15:47:03.641530 +09:00
|
21
|
+
position: 1
|
22
|
+
carrier_type_00002:
|
23
|
+
name: CD
|
24
|
+
display_name: CD
|
25
|
+
updated_at: 2007-12-19 01:45:26.040674 +09:00
|
26
|
+
id: 2
|
27
|
+
note: "\xE9\x9F\xB3\xE6\xA5\xBDCD\xE3\x81\xA7\xE3\x81\x99\xE3\x80\x82"
|
28
|
+
created_at: 2007-12-19 01:45:26.040674 +09:00
|
29
|
+
position: 2
|
30
|
+
carrier_type_00003:
|
31
|
+
name: DVD
|
32
|
+
display_name: DVD
|
33
|
+
updated_at: 2007-12-23 04:24:23.151410 +09:00
|
34
|
+
id: 3
|
35
|
+
note: "DVD\xE3\x81\xA7\xE3\x81\x99\xE3\x80\x82"
|
36
|
+
created_at: 2007-12-23 04:24:23.151410 +09:00
|
37
|
+
position: 3
|
38
|
+
|
39
|
+
# == Schema Information
|
40
|
+
#
|
41
|
+
# Table name: carrier_types
|
42
|
+
#
|
43
|
+
# id :integer not null, primary key
|
44
|
+
# name :string(255) not null
|
45
|
+
# display_name :text
|
46
|
+
# note :text
|
47
|
+
# position :integer
|
48
|
+
# created_at :datetime
|
49
|
+
# updated_at :datetime
|
50
|
+
#
|
51
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
FactoryGirl.define do
|
2
|
+
factory :library do |f|
|
3
|
+
f.sequence(:name){|n| "library#{n}"}
|
4
|
+
f.sequence(:short_display_name){|n| "library_#{n}"}
|
5
|
+
f.library_group_id{LibraryGroup.first.id}
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
FactoryGirl.define do
|
10
|
+
factory :invalid_library, :class => Library do |f|
|
11
|
+
f.library_group_id{LibraryGroup.first.id}
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
FactoryGirl.define do
|
2
|
+
factory :search_engine do |f|
|
3
|
+
f.sequence(:name){|n| "search_engine_#{n}"}
|
4
|
+
f.sequence(:url){|n| "http://search-engine-#{n}.example.jp"}
|
5
|
+
f.sequence(:base_url){|n| "http://search-engine-#{n}.example.jp"}
|
6
|
+
f.query_param 'q'
|
7
|
+
f.http_method 'get'
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
FactoryGirl.define do
|
2
|
+
factory :admin, :class => User do |f|
|
3
|
+
f.sequence(:username){|n| "admin_#{n}"}
|
4
|
+
f.sequence(:email){|n| "admin_#{n}@example.jp"}
|
5
|
+
f.role {Role.find_by_name('Administrator')}
|
6
|
+
f.password 'adminpassword'
|
7
|
+
f.password_confirmation 'adminpassword'
|
8
|
+
f.user_group {UserGroup.first}
|
9
|
+
f.required_role {Role.find_by_name('User')}
|
10
|
+
f.sequence(:user_number){|n| "user_number_#{n}"}
|
11
|
+
end
|
12
|
+
|
13
|
+
factory :librarian, :class => User do |f|
|
14
|
+
f.sequence(:username){|n| "librarian_#{n}"}
|
15
|
+
f.sequence(:email){|n| "librarian_#{n}@example.jp"}
|
16
|
+
f.role {Role.find_by_name('Librarian')}
|
17
|
+
f.password 'librarianpassword'
|
18
|
+
f.password_confirmation 'librarianpassword'
|
19
|
+
f.user_group {UserGroup.first}
|
20
|
+
f.required_role {Role.find_by_name('User')}
|
21
|
+
f.sequence(:user_number){|n| "user_number_#{n}"}
|
22
|
+
end
|
23
|
+
|
24
|
+
factory :user, :class => User do |f|
|
25
|
+
f.sequence(:username){|n| "user_#{n}"}
|
26
|
+
f.sequence(:email){|n| "user_#{n}@example.jp"}
|
27
|
+
f.role {Role.find_by_name('User')}
|
28
|
+
f.password 'userpassword'
|
29
|
+
f.password_confirmation 'userpassword'
|
30
|
+
f.user_group {UserGroup.first}
|
31
|
+
f.required_role {Role.find_by_name('User')}
|
32
|
+
f.sequence(:user_number){|n| "user_number_#{n}"}
|
33
|
+
end
|
34
|
+
|
35
|
+
factory :invalid_user, :class => User do |f|
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
---
|
2
|
+
bookstore_00001:
|
3
|
+
name: unknown
|
4
|
+
fax_number:
|
5
|
+
updated_at: 2008-02-10 11:14:57.605329 +09:00
|
6
|
+
deleted_at:
|
7
|
+
telephone_number:
|
8
|
+
id: 1
|
9
|
+
note: ""
|
10
|
+
address: ""
|
11
|
+
created_at: 2008-02-10 11:14:57.605329 +09:00
|
12
|
+
position: 1
|
13
|
+
bookstore_00002:
|
14
|
+
name: !binary |
|
15
|
+
5a+E6LSI
|
16
|
+
|
17
|
+
fax_number: ""
|
18
|
+
updated_at: 2008-02-10 12:15:14.840711 +09:00
|
19
|
+
deleted_at:
|
20
|
+
telephone_number: ""
|
21
|
+
id: 2
|
22
|
+
note: ""
|
23
|
+
address: ""
|
24
|
+
created_at: 2008-02-10 11:16:02.598844 +09:00
|
25
|
+
position: 2
|
26
|
+
bookstore_00003:
|
27
|
+
name: !binary |
|
28
|
+
5pyJ6Zqj5aCC
|
29
|
+
|
30
|
+
fax_number: ""
|
31
|
+
updated_at: 2008-02-10 12:15:33.555463 +09:00
|
32
|
+
deleted_at:
|
33
|
+
telephone_number: ""
|
34
|
+
id: 3
|
35
|
+
note: ""
|
36
|
+
address: ""
|
37
|
+
created_at: 2008-02-10 11:16:11.585284 +09:00
|
38
|
+
position: 3
|
39
|
+
bookstore_00004:
|
40
|
+
name: !binary |
|
41
|
+
57SA5LyK5ZyL5bGL5pu45bqX
|
42
|
+
|
43
|
+
fax_number: ""
|
44
|
+
updated_at: 2008-02-10 12:16:07.726445 +09:00
|
45
|
+
deleted_at:
|
46
|
+
telephone_number: ""
|
47
|
+
id: 4
|
48
|
+
note: ""
|
49
|
+
address: ""
|
50
|
+
created_at: 2008-02-10 11:16:22.565660 +09:00
|
51
|
+
position: 4
|
52
|
+
bookstore_00005:
|
53
|
+
name: !binary |
|
54
|
+
5Li45ZaE
|
55
|
+
|
56
|
+
fax_number: ""
|
57
|
+
updated_at: 2008-02-10 12:16:17.990285 +09:00
|
58
|
+
deleted_at:
|
59
|
+
telephone_number: ""
|
60
|
+
id: 5
|
61
|
+
note: ""
|
62
|
+
address: ""
|
63
|
+
created_at: 2008-02-10 12:15:44.923758 +09:00
|
64
|
+
position: 5
|
65
|
+
bookstore_00006:
|
66
|
+
name: !binary |
|
67
|
+
5Zuz5pu46aSo5rWB6YCa44K744Oz44K/44O8
|
68
|
+
|
69
|
+
fax_number: ""
|
70
|
+
updated_at: 2008-02-10 12:16:25.906073 +09:00
|
71
|
+
deleted_at:
|
72
|
+
telephone_number: ""
|
73
|
+
id: 6
|
74
|
+
note: ""
|
75
|
+
address: ""
|
76
|
+
created_at: 2008-02-10 12:15:54.558517 +09:00
|
77
|
+
position: 6
|
78
|
+
bookstore_00007:
|
79
|
+
name: Example store
|
80
|
+
fax_number: ""
|
81
|
+
updated_at: 2008-02-10 12:16:25.906073 +09:00
|
82
|
+
deleted_at:
|
83
|
+
telephone_number: ""
|
84
|
+
id: 7
|
85
|
+
note: ""
|
86
|
+
address: ""
|
87
|
+
created_at: 2008-02-10 12:15:54.558517 +09:00
|
88
|
+
position: 7
|
89
|
+
|
90
|
+
# == Schema Information
|
91
|
+
#
|
92
|
+
# Table name: bookstores
|
93
|
+
#
|
94
|
+
# id :integer not null, primary key
|
95
|
+
# name :text not null
|
96
|
+
# zip_code :string(255)
|
97
|
+
# address :text
|
98
|
+
# note :text
|
99
|
+
# telephone_number :string(255)
|
100
|
+
# fax_number :string(255)
|
101
|
+
# url :string(255)
|
102
|
+
# position :integer
|
103
|
+
# deleted_at :datetime
|
104
|
+
# created_at :datetime
|
105
|
+
# updated_at :datetime
|
106
|
+
#
|
107
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
2
|
+
|
3
|
+
public_fund:
|
4
|
+
name: Public fund
|
5
|
+
display_name: Public fund
|
6
|
+
note:
|
7
|
+
position: 1
|
8
|
+
id: 1
|
9
|
+
|
10
|
+
donation:
|
11
|
+
name: Donation
|
12
|
+
display_name: Donation
|
13
|
+
note:
|
14
|
+
position: 2
|
15
|
+
id: 2
|
16
|
+
|
17
|
+
# == Schema Information
|
18
|
+
#
|
19
|
+
# Table name: budget_types
|
20
|
+
#
|
21
|
+
# id :integer not null, primary key
|
22
|
+
# name :string(255)
|
23
|
+
# display_name :text
|
24
|
+
# note :text
|
25
|
+
# position :integer
|
26
|
+
# created_at :datetime
|
27
|
+
# updated_at :datetime
|
28
|
+
#
|
29
|
+
|
@@ -0,0 +1,51 @@
|
|
1
|
+
---
|
2
|
+
carrier_type_00004:
|
3
|
+
name: file
|
4
|
+
display_name: file
|
5
|
+
updated_at: 2007-12-24 01:30:50.637433 +09:00
|
6
|
+
id: 4
|
7
|
+
note: !binary |
|
8
|
+
44Kz44Oz44OU44Ol44O844K/44Gu44OV44Kh44Kk44Or44Gn44GZ44CC
|
9
|
+
|
10
|
+
created_at: 2007-12-24 01:30:50.637433 +09:00
|
11
|
+
position: 4
|
12
|
+
carrier_type_00001:
|
13
|
+
name: print
|
14
|
+
display_name: print
|
15
|
+
updated_at: 2007-11-20 16:04:29.853828 +09:00
|
16
|
+
id: 1
|
17
|
+
note: !binary |
|
18
|
+
5pys44Gn44GZ44CC
|
19
|
+
|
20
|
+
created_at: 2007-11-20 15:47:03.641530 +09:00
|
21
|
+
position: 1
|
22
|
+
carrier_type_00002:
|
23
|
+
name: CD
|
24
|
+
display_name: CD
|
25
|
+
updated_at: 2007-12-19 01:45:26.040674 +09:00
|
26
|
+
id: 2
|
27
|
+
note: "\xE9\x9F\xB3\xE6\xA5\xBDCD\xE3\x81\xA7\xE3\x81\x99\xE3\x80\x82"
|
28
|
+
created_at: 2007-12-19 01:45:26.040674 +09:00
|
29
|
+
position: 2
|
30
|
+
carrier_type_00003:
|
31
|
+
name: DVD
|
32
|
+
display_name: DVD
|
33
|
+
updated_at: 2007-12-23 04:24:23.151410 +09:00
|
34
|
+
id: 3
|
35
|
+
note: "DVD\xE3\x81\xA7\xE3\x81\x99\xE3\x80\x82"
|
36
|
+
created_at: 2007-12-23 04:24:23.151410 +09:00
|
37
|
+
position: 3
|
38
|
+
|
39
|
+
# == Schema Information
|
40
|
+
#
|
41
|
+
# Table name: carrier_types
|
42
|
+
#
|
43
|
+
# id :integer not null, primary key
|
44
|
+
# name :string(255) not null
|
45
|
+
# display_name :text
|
46
|
+
# note :text
|
47
|
+
# position :integer
|
48
|
+
# created_at :datetime
|
49
|
+
# updated_at :datetime
|
50
|
+
#
|
51
|
+
|