enju_circulation 0.1.0.pre34 → 0.1.0.pre35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/checkout_types/index.html.erb +0 -2
- data/app/views/reserves/index.csv.erb +2 -2
- data/lib/enju_circulation/version.rb +1 -1
- data/spec/dummy/db/migrate/005_create_manifestations.rb +0 -12
- data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +5 -0
- data/spec/dummy/db/schema.rb +1 -12
- data/spec/views/checkout_types/edit.html.erb_spec.rb +23 -0
- data/spec/views/checkout_types/index.html.erb_spec.rb +32 -0
- data/spec/views/checkout_types/new.html.erb_spec.rb +23 -0
- data/spec/views/checkout_types/show.html.erb_spec.rb +24 -0
- data/spec/views/reserves/index.html.erb_spec.rb +20 -0
- data/spec/views/use_restrictions/edit.html.erb_spec.rb +23 -0
- data/spec/views/use_restrictions/index.html.erb_spec.rb +32 -0
- data/spec/views/use_restrictions/new.html.erb_spec.rb +23 -0
- data/spec/views/use_restrictions/show.html.erb_spec.rb +24 -0
- metadata +24 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a3216e676dbc07704ac904dabd531ad2f30e791
|
4
|
+
data.tar.gz: c0510c8b0026db004c8049c17d275016db7f90f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 085e2eca8407d8e7f32ab6208b39b5a9f7bf7a0eb302eeff7f7a7287f8083e424c2dec069c04e1f83a060926b1c58022e1e435eefc1cdc20ed69f52a69015ae4
|
7
|
+
data.tar.gz: eb08e4b88d0db822d291590a0de6817c89d8e1835e92e2173788d6214f6fe5e40c14218a45e9f4905445660e2195b8cd54f46e84d4935dd1878b244486440b6d
|
@@ -7,7 +7,6 @@
|
|
7
7
|
<th id="position"></th>
|
8
8
|
<th><%= t('activerecord.attributes.checkout_type.name') -%></th>
|
9
9
|
<th><%= t('activerecord.attributes.checkout_type.display_name') -%></th>
|
10
|
-
<th><%= t('activerecord.attributes.checkout_type.note') -%></th>
|
11
10
|
<th></th>
|
12
11
|
</tr>
|
13
12
|
|
@@ -22,7 +21,6 @@
|
|
22
21
|
</td>
|
23
22
|
<td><%= link_to checkout_type.name, checkout_type -%></td>
|
24
23
|
<td><%= link_to checkout_type.display_name.localize, checkout_type -%></td>
|
25
|
-
<td><%= checkout_type.note -%></td>
|
26
24
|
<td>
|
27
25
|
<%- if can? :update, checkout_type -%>
|
28
26
|
<%= link_to t('page.edit'), edit_checkout_type_path(checkout_type) -%>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
id,title,isbn,item_identifier,call_number,username,created_at,expired_at
|
1
|
+
id,title,isbn,item_identifier,call_number,username,created_at,expired_at,state
|
2
2
|
<%- @reserves.each do |reserve| -%>
|
3
|
-
<%= reserve.id %>,"<%= reserve.manifestation.original_title.gsub(/"/, '""') -%>",<%= reserve.manifestation.isbn %>,<%= reserve.item.try(:item_identifier) -%>,<%= reserve.item.try(:call_number) -%>,<%= reserve.user.try(:username) %>,<%= reserve.created_at %>,<%= reserve.expired_at %><%= "\n" -%>
|
3
|
+
<%= reserve.id %>,"<%= reserve.manifestation.original_title.gsub(/"/, '""') -%>",<%= reserve.manifestation.identifier_contents(:isbn).first %>,<%= reserve.item.try(:item_identifier) -%>,<%= reserve.item.try(:call_number) -%>,<%= reserve.user.try(:username) %>,<%= reserve.created_at %>,<%= reserve.expired_at %>,<%= i18n_state(reserve.state) %><%= "\n" -%>
|
4
4
|
<%- end -%>
|
@@ -19,13 +19,6 @@ class CreateManifestations < ActiveRecord::Migration
|
|
19
19
|
t.integer :height
|
20
20
|
t.integer :width
|
21
21
|
t.integer :depth
|
22
|
-
t.string :isbn
|
23
|
-
t.string :isbn10
|
24
|
-
t.string :wrong_isbn
|
25
|
-
t.string :nbn
|
26
|
-
t.string :lccn
|
27
|
-
t.string :oclc_number
|
28
|
-
t.string :issn
|
29
22
|
t.integer :price # TODO: 通貨単位
|
30
23
|
t.text :fulltext
|
31
24
|
t.string :volume_number_list
|
@@ -48,11 +41,6 @@ class CreateManifestations < ActiveRecord::Migration
|
|
48
41
|
end
|
49
42
|
add_index :manifestations, :carrier_type_id
|
50
43
|
add_index :manifestations, :required_role_id
|
51
|
-
add_index :manifestations, :isbn
|
52
|
-
add_index :manifestations, :nbn
|
53
|
-
add_index :manifestations, :lccn
|
54
|
-
add_index :manifestations, :oclc_number
|
55
|
-
add_index :manifestations, :issn
|
56
44
|
add_index :manifestations, :access_address
|
57
45
|
add_index :manifestations, :frequency_id
|
58
46
|
add_index :manifestations, :manifestation_identifier
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -526,13 +526,6 @@ ActiveRecord::Schema.define(:version => 20130519065837) do
|
|
526
526
|
t.integer "height"
|
527
527
|
t.integer "width"
|
528
528
|
t.integer "depth"
|
529
|
-
t.string "isbn"
|
530
|
-
t.string "isbn10"
|
531
|
-
t.string "wrong_isbn"
|
532
|
-
t.string "nbn"
|
533
|
-
t.string "lccn"
|
534
|
-
t.string "oclc_number"
|
535
|
-
t.string "issn"
|
536
529
|
t.integer "price"
|
537
530
|
t.text "fulltext"
|
538
531
|
t.string "volume_number_string"
|
@@ -566,18 +559,14 @@ ActiveRecord::Schema.define(:version => 20130519065837) do
|
|
566
559
|
t.integer "serial_number"
|
567
560
|
t.string "doi"
|
568
561
|
t.text "statement_of_responsibility"
|
562
|
+
t.boolean "periodical"
|
569
563
|
end
|
570
564
|
|
571
565
|
add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
|
572
566
|
add_index "manifestations", ["carrier_type_id"], :name => "index_manifestations_on_carrier_type_id"
|
573
567
|
add_index "manifestations", ["doi"], :name => "index_manifestations_on_doi"
|
574
568
|
add_index "manifestations", ["frequency_id"], :name => "index_manifestations_on_frequency_id"
|
575
|
-
add_index "manifestations", ["isbn"], :name => "index_manifestations_on_isbn"
|
576
|
-
add_index "manifestations", ["issn"], :name => "index_manifestations_on_issn"
|
577
|
-
add_index "manifestations", ["lccn"], :name => "index_manifestations_on_lccn"
|
578
569
|
add_index "manifestations", ["manifestation_identifier"], :name => "index_manifestations_on_manifestation_identifier"
|
579
|
-
add_index "manifestations", ["nbn"], :name => "index_manifestations_on_nbn"
|
580
|
-
add_index "manifestations", ["oclc_number"], :name => "index_manifestations_on_oclc_number"
|
581
570
|
add_index "manifestations", ["required_role_id"], :name => "index_manifestations_on_required_role_id"
|
582
571
|
add_index "manifestations", ["updated_at"], :name => "index_manifestations_on_updated_at"
|
583
572
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "checkout_types/edit" do
|
4
|
+
before(:each) do
|
5
|
+
@checkout_type = assign(:checkout_type, stub_model(CheckoutType,
|
6
|
+
:name => "MyString",
|
7
|
+
:display_name => "MyText",
|
8
|
+
:note => "MyText",
|
9
|
+
:position => 1
|
10
|
+
))
|
11
|
+
end
|
12
|
+
|
13
|
+
it "renders the edit checkout_type form" do
|
14
|
+
render
|
15
|
+
|
16
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
17
|
+
assert_select "form", :action => checkout_types_path(@checkout_type), :method => "post" do
|
18
|
+
assert_select "input#checkout_type_name", :name => "checkout_type[name]"
|
19
|
+
assert_select "textarea#checkout_type_display_name", :name => "checkout_type[display_name]"
|
20
|
+
assert_select "textarea#checkout_type_note", :name => "checkout_type[note]"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "checkout_types/index" do
|
4
|
+
fixtures :users, :roles, :user_has_roles
|
5
|
+
|
6
|
+
before(:each) do
|
7
|
+
view.extend EnjuLeaf::EnjuLeafHelper
|
8
|
+
|
9
|
+
assign(:checkout_types, Kaminari::paginate_array([
|
10
|
+
stub_model(CheckoutType,
|
11
|
+
:name => "book",
|
12
|
+
:display_name => "Book",
|
13
|
+
:note => "MyText",
|
14
|
+
:position => 1
|
15
|
+
),
|
16
|
+
stub_model(CheckoutType,
|
17
|
+
:name => "cd",
|
18
|
+
:display_name => "CD",
|
19
|
+
:note => "MyText",
|
20
|
+
:position => 2
|
21
|
+
)
|
22
|
+
]).page(1))
|
23
|
+
end
|
24
|
+
|
25
|
+
it "renders a list of checkout_types" do
|
26
|
+
render
|
27
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
28
|
+
assert_select "tr>td", :text => "Book".to_s, :count => 1
|
29
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
30
|
+
assert_select "tr>td", :text => "MyText".to_s, :count => 0
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "checkout_types/new" do
|
4
|
+
before(:each) do
|
5
|
+
assign(:checkout_type, stub_model(CheckoutType,
|
6
|
+
:name => "MyString",
|
7
|
+
:display_name => "MyText",
|
8
|
+
:note => "MyText",
|
9
|
+
:position => 1
|
10
|
+
).as_new_record)
|
11
|
+
end
|
12
|
+
|
13
|
+
it "renders new checkout_type form" do
|
14
|
+
render
|
15
|
+
|
16
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
17
|
+
assert_select "form", :action => checkout_types_path, :method => "post" do
|
18
|
+
assert_select "input#checkout_type_name", :name => "checkout_type[name]"
|
19
|
+
assert_select "textarea#checkout_type_display_name", :name => "checkout_type[display_name]"
|
20
|
+
assert_select "textarea#checkout_type_note", :name => "checkout_type[note]"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "checkout_types/show" do
|
4
|
+
before(:each) do
|
5
|
+
@checkout_type = assign(:checkout_type, stub_model(CheckoutType,
|
6
|
+
:name => "Name",
|
7
|
+
:display_name => "MyText",
|
8
|
+
:note => "MyText",
|
9
|
+
:position => 1
|
10
|
+
))
|
11
|
+
end
|
12
|
+
|
13
|
+
it "renders attributes in <p>" do
|
14
|
+
render
|
15
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
16
|
+
rendered.should match(/Name/)
|
17
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
18
|
+
rendered.should match(/MyText/)
|
19
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
20
|
+
rendered.should match(/MyText/)
|
21
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
22
|
+
rendered.should match(/1/)
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "reserves/index" do
|
4
|
+
fixtures :users, :roles, :user_has_roles, :reserves
|
5
|
+
|
6
|
+
before(:each) do
|
7
|
+
view.extend EnjuLeaf::EnjuLeafHelper
|
8
|
+
|
9
|
+
assign(:reserves, Reserve.page(1))
|
10
|
+
view.stub(:current_user).and_return(User.find('admin'))
|
11
|
+
end
|
12
|
+
|
13
|
+
it "renders a list of reserves" do
|
14
|
+
render
|
15
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
16
|
+
assert_select "tr>td:nth-child(1)", :text => reserves(:reserve_00001).id.to_s
|
17
|
+
assert_select "tr>td:nth-child(2)", :text => /#{reserves(:reserve_00001).user.username}/
|
18
|
+
assert_select "tr>td:nth-child(2)", :text => /#{reserves(:reserve_00002).manifestation.original_title}/
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "use_restrictions/edit" do
|
4
|
+
before(:each) do
|
5
|
+
@use_restriction = assign(:use_restriction, stub_model(UseRestriction,
|
6
|
+
:name => "MyString",
|
7
|
+
:display_name => "MyText",
|
8
|
+
:note => "MyText",
|
9
|
+
:position => 1
|
10
|
+
))
|
11
|
+
end
|
12
|
+
|
13
|
+
it "renders the edit use_restriction form" do
|
14
|
+
render
|
15
|
+
|
16
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
17
|
+
assert_select "form", :action => use_restrictions_path(@use_restriction), :method => "post" do
|
18
|
+
assert_select "input#use_restriction_name", :name => "use_restriction[name]"
|
19
|
+
assert_select "textarea#use_restriction_display_name", :name => "use_restriction[display_name]"
|
20
|
+
assert_select "textarea#use_restriction_note", :name => "use_restriction[note]"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "use_restrictions/index" do
|
4
|
+
fixtures :users, :roles, :user_has_roles
|
5
|
+
|
6
|
+
before(:each) do
|
7
|
+
view.extend EnjuLeaf::EnjuLeafHelper
|
8
|
+
|
9
|
+
assign(:use_restrictions, Kaminari::paginate_array([
|
10
|
+
stub_model(UseRestriction,
|
11
|
+
:name => "Not For Loan",
|
12
|
+
:display_name => "Not For Loan",
|
13
|
+
:note => "MyText",
|
14
|
+
:position => 1
|
15
|
+
),
|
16
|
+
stub_model(UseRestriction,
|
17
|
+
:name => "On Loan",
|
18
|
+
:display_name => "On Loan",
|
19
|
+
:note => "MyText",
|
20
|
+
:position => 2
|
21
|
+
)
|
22
|
+
]).page(1))
|
23
|
+
end
|
24
|
+
|
25
|
+
it "renders a list of use_restrictions" do
|
26
|
+
render
|
27
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
28
|
+
assert_select "tr>td", :text => "Not For Loan".to_s, :count => 2
|
29
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
30
|
+
assert_select "tr>td", :text => "MyText".to_s, :count => 0
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "use_restrictions/new" do
|
4
|
+
before(:each) do
|
5
|
+
assign(:use_restriction, stub_model(UseRestriction,
|
6
|
+
:name => "MyString",
|
7
|
+
:display_name => "MyText",
|
8
|
+
:note => "MyText",
|
9
|
+
:position => 1
|
10
|
+
).as_new_record)
|
11
|
+
end
|
12
|
+
|
13
|
+
it "renders new use_restriction form" do
|
14
|
+
render
|
15
|
+
|
16
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
17
|
+
assert_select "form", :action => use_restrictions_path, :method => "post" do
|
18
|
+
assert_select "input#use_restriction_name", :name => "use_restriction[name]"
|
19
|
+
assert_select "textarea#use_restriction_display_name", :name => "use_restriction[display_name]"
|
20
|
+
assert_select "textarea#use_restriction_note", :name => "use_restriction[note]"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "use_restrictions/show" do
|
4
|
+
before(:each) do
|
5
|
+
@use_restriction = assign(:use_restriction, stub_model(UseRestriction,
|
6
|
+
:name => "Name",
|
7
|
+
:display_name => "MyText",
|
8
|
+
:note => "MyText",
|
9
|
+
:position => 1
|
10
|
+
))
|
11
|
+
end
|
12
|
+
|
13
|
+
it "renders attributes in <p>" do
|
14
|
+
render
|
15
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
16
|
+
rendered.should match(/Name/)
|
17
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
18
|
+
rendered.should match(/MyText/)
|
19
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
20
|
+
rendered.should match(/MyText/)
|
21
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
22
|
+
rendered.should match(/1/)
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_circulation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kosuke Tanabe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: enju_biblio
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.1.17.
|
61
|
+
version: 0.1.17.pre17
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.1.17.
|
68
|
+
version: 0.1.17.pre17
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: enju_leaf
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -549,6 +549,7 @@ files:
|
|
549
549
|
- spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb
|
550
550
|
- spec/dummy/db/migrate/20120224094141_create_delayed_jobs.rb
|
551
551
|
- spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb
|
552
|
+
- spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb
|
552
553
|
- spec/dummy/db/migrate/20130506175303_create_identifier_types.rb
|
553
554
|
- spec/dummy/db/migrate/20130506175834_create_identifiers.rb
|
554
555
|
- spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb
|
@@ -694,6 +695,15 @@ files:
|
|
694
695
|
- spec/spec_helper.rb
|
695
696
|
- spec/support/controller_macros.rb
|
696
697
|
- spec/support/devise.rb
|
698
|
+
- spec/views/checkout_types/edit.html.erb_spec.rb
|
699
|
+
- spec/views/checkout_types/index.html.erb_spec.rb
|
700
|
+
- spec/views/checkout_types/new.html.erb_spec.rb
|
701
|
+
- spec/views/checkout_types/show.html.erb_spec.rb
|
702
|
+
- spec/views/reserves/index.html.erb_spec.rb
|
703
|
+
- spec/views/use_restrictions/edit.html.erb_spec.rb
|
704
|
+
- spec/views/use_restrictions/index.html.erb_spec.rb
|
705
|
+
- spec/views/use_restrictions/new.html.erb_spec.rb
|
706
|
+
- spec/views/use_restrictions/show.html.erb_spec.rb
|
697
707
|
homepage: https://github.com/next-l/enju_circulation
|
698
708
|
licenses: []
|
699
709
|
metadata: {}
|
@@ -838,6 +848,7 @@ test_files:
|
|
838
848
|
- spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb
|
839
849
|
- spec/dummy/db/migrate/20120224094141_create_delayed_jobs.rb
|
840
850
|
- spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb
|
851
|
+
- spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb
|
841
852
|
- spec/dummy/db/migrate/20130506175303_create_identifier_types.rb
|
842
853
|
- spec/dummy/db/migrate/20130506175834_create_identifiers.rb
|
843
854
|
- spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb
|
@@ -985,3 +996,12 @@ test_files:
|
|
985
996
|
- spec/spec_helper.rb
|
986
997
|
- spec/support/controller_macros.rb
|
987
998
|
- spec/support/devise.rb
|
999
|
+
- spec/views/checkout_types/edit.html.erb_spec.rb
|
1000
|
+
- spec/views/checkout_types/index.html.erb_spec.rb
|
1001
|
+
- spec/views/checkout_types/new.html.erb_spec.rb
|
1002
|
+
- spec/views/checkout_types/show.html.erb_spec.rb
|
1003
|
+
- spec/views/reserves/index.html.erb_spec.rb
|
1004
|
+
- spec/views/use_restrictions/edit.html.erb_spec.rb
|
1005
|
+
- spec/views/use_restrictions/index.html.erb_spec.rb
|
1006
|
+
- spec/views/use_restrictions/new.html.erb_spec.rb
|
1007
|
+
- spec/views/use_restrictions/show.html.erb_spec.rb
|