enju_library 0.2.0.beta.8 → 0.2.0.beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/concerns/enju_library/controller.rb +2 -2
- data/app/controllers/libraries_controller.rb +1 -1
- data/app/jobs/user_export_file_job.rb +7 -0
- data/app/jobs/user_import_file_job.rb +7 -0
- data/lib/enju_library/version.rb +1 -1
- data/lib/generators/enju_library/setup/setup_generator.rb +1 -0
- data/lib/tasks/enju_library_tasks.rake +2 -0
- data/spec/controllers/baskets_controller_spec.rb +1 -1
- data/spec/controllers/bookstores_controller_spec.rb +1 -1
- data/spec/controllers/budget_types_controller_spec.rb +1 -1
- data/spec/controllers/libraries_controller_spec.rb +2 -2
- data/spec/controllers/library_groups_controller_spec.rb +1 -1
- data/spec/controllers/request_status_types_controller_spec.rb +1 -1
- data/spec/controllers/request_types_controller_spec.rb +1 -1
- data/spec/controllers/search_engines_controller_spec.rb +1 -1
- data/spec/controllers/shelves_controller_spec.rb +2 -2
- data/spec/controllers/subscribes_controller_spec.rb +1 -1
- data/spec/controllers/subscriptions_controller_spec.rb +1 -1
- data/spec/controllers/user_export_files_controller_spec.rb +1 -1
- data/spec/controllers/user_groups_controller_spec.rb +1 -1
- data/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +9 -0
- data/spec/dummy/db/schema.rb +4 -2
- data/spec/fixtures/library_groups.yml +0 -2
- data/spec/models/accept_spec.rb +1 -1
- data/spec/models/basket_spec.rb +1 -1
- data/spec/models/bookstore_spec.rb +1 -2
- data/spec/models/budget_type_spec.rb +1 -1
- data/spec/models/library_group_spec.rb +1 -1
- data/spec/models/library_spec.rb +1 -1
- data/spec/models/request_status_type_spec.rb +1 -1
- data/spec/models/request_type_spec.rb +1 -1
- data/spec/models/search_engine_spec.rb +1 -1
- data/spec/models/shelf_spec.rb +1 -1
- data/spec/models/subscribe_spec.rb +1 -1
- data/spec/models/subscription_spec.rb +1 -1
- data/spec/models/user_export_file_spec.rb +4 -3
- data/spec/models/user_group_spec.rb +1 -1
- data/spec/models/user_import_file_spec.rb +1 -1
- data/spec/models/user_import_result_spec.rb +1 -1
- data/spec/views/accepts/edit.html.erb_spec.rb +1 -1
- data/spec/views/accepts/index.html.erb_spec.rb +1 -1
- data/spec/views/accepts/new.html.erb_spec.rb +1 -1
- data/spec/views/accepts/show.html.erb_spec.rb +1 -1
- data/spec/views/budget_types/edit.html.erb_spec.rb +1 -1
- data/spec/views/budget_types/index.html.erb_spec.rb +1 -1
- data/spec/views/budget_types/new.html.erb_spec.rb +1 -1
- data/spec/views/budget_types/show.html.erb_spec.rb +1 -1
- data/spec/views/libraries/show.html.erb_spec.rb +1 -1
- data/spec/views/library_groups/edit.html.erb_spec.rb +1 -1
- data/spec/views/library_groups/show.html.erb_spec.rb +1 -1
- data/spec/views/user_export_files/new.html.erb_spec.rb +2 -2
- data/spec/views/user_import_results/index.html.erb_spec.rb +1 -1
- data/spec/views/withdraws/new.html.erb_spec.rb +1 -1
- metadata +27 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0492192a430ab753775d9271dca0f07c2c113cd6
|
4
|
+
data.tar.gz: 0409e1c90e310d2454abc020ee49d46f2b58b181
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39a23aab017b58a997f44d2f99161f172604dce7cec913f1ea0f6fc063b1a3bd93ad32d41dd336fb726e0b376d00fe5f407df08bd439a8acf37b4787d3a6112c
|
7
|
+
data.tar.gz: cd2f94914e1252b74fcfd8e368c924eb16beba26cf3f244d50929551c28eedff4ad9f8f8f40745fb39e6f845c617948c66974c038dad259b1425f3b148c7160f
|
@@ -235,13 +235,13 @@ module EnjuLibrary
|
|
235
235
|
|
236
236
|
def get_library
|
237
237
|
if params[:library_id]
|
238
|
-
@library = Library.find(params[:library_id])
|
238
|
+
@library = Library.friendly.find(params[:library_id])
|
239
239
|
authorize @library, :show?
|
240
240
|
end
|
241
241
|
end
|
242
242
|
|
243
243
|
def get_libraries
|
244
|
-
@libraries = Library.
|
244
|
+
@libraries = Library.order(:position)
|
245
245
|
end
|
246
246
|
|
247
247
|
def get_bookstore
|
data/lib/enju_library/version.rb
CHANGED
@@ -7,5 +7,6 @@ class EnjuLibrary::SetupGenerator < Rails::Generators::Base
|
|
7
7
|
return if file == 'fixture'
|
8
8
|
inject_into_file 'app/controllers/application_controller.rb',
|
9
9
|
" include EnjuLibrary::Controller\n", after: "include EnjuLeaf::Controller\n"
|
10
|
+
append_to_file("app/models/user.rb", "Item.include(EnjuLibrary::EnjuItem)\n")
|
10
11
|
end
|
11
12
|
end
|
@@ -37,6 +37,8 @@ EOS
|
|
37
37
|
library_group.login_banner_en = login_en if library_group.login_banner_en.blank?
|
38
38
|
library_group.footer_banner_ja = footer_ja if library_group.footer_banner_ja.blank?
|
39
39
|
library_group.footer_banner_en = footer_en if library_group.footer_banner_en.blank?
|
40
|
+
library_group.book_jacket_source = 'google'
|
41
|
+
library_group.screenshot_generator = 'mozshot'
|
40
42
|
library_group.save
|
41
43
|
puts 'enju_library: The upgrade completed successfully.'
|
42
44
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe LibrariesController do
|
4
4
|
fixtures :all
|
@@ -44,7 +44,7 @@ describe LibrariesController do
|
|
44
44
|
it "should get index with query" do
|
45
45
|
get :index, :query => 'kamata'
|
46
46
|
response.should be_success
|
47
|
-
assigns(:libraries).include?(Library.find('kamata')).should be_truthy
|
47
|
+
assigns(:libraries).include?(Library.friendly.find('kamata')).should be_truthy
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe ShelvesController do
|
4
4
|
fixtures :all
|
@@ -48,7 +48,7 @@ describe ShelvesController do
|
|
48
48
|
|
49
49
|
it "assigns all shelves as @shelves with library_id" do
|
50
50
|
get :index, :library_id => 'kamata'
|
51
|
-
assigns(:shelves).map(&:id).should eq(Library.find('kamata').shelves.order(:position).page(1).pluck(:id))
|
51
|
+
assigns(:shelves).map(&:id).should eq(Library.friendly.find('kamata').shelves.order(:position).page(1).pluck(:id))
|
52
52
|
response.should be_success
|
53
53
|
end
|
54
54
|
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20160814165332) do
|
15
15
|
|
16
16
|
create_table "accepts", force: :cascade do |t|
|
17
17
|
t.integer "basket_id"
|
@@ -938,6 +938,7 @@ ActiveRecord::Schema.define(version: 20160813203039) do
|
|
938
938
|
t.integer "message_request_id"
|
939
939
|
t.datetime "created_at"
|
940
940
|
t.datetime "updated_at"
|
941
|
+
t.boolean "most_recent"
|
941
942
|
end
|
942
943
|
|
943
944
|
add_index "message_request_transitions", ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
|
@@ -968,11 +969,12 @@ ActiveRecord::Schema.define(version: 20160813203039) do
|
|
968
969
|
|
969
970
|
create_table "message_transitions", force: :cascade do |t|
|
970
971
|
t.string "to_state"
|
971
|
-
t.text "metadata",
|
972
|
+
t.text "metadata", default: "{}"
|
972
973
|
t.integer "sort_key"
|
973
974
|
t.integer "message_id"
|
974
975
|
t.datetime "created_at"
|
975
976
|
t.datetime "updated_at"
|
977
|
+
t.boolean "most_recent"
|
976
978
|
end
|
977
979
|
|
978
980
|
add_index "message_transitions", ["message_id"], name: "index_message_transitions_on_message_id"
|
data/spec/models/accept_spec.rb
CHANGED
data/spec/models/basket_spec.rb
CHANGED
data/spec/models/library_spec.rb
CHANGED
data/spec/models/shelf_spec.rb
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
require '
|
2
|
+
require 'rails_helper'
|
3
3
|
|
4
4
|
describe UserExportFile do
|
5
5
|
fixtures :all
|
6
6
|
|
7
|
-
it "should export
|
7
|
+
it "should export users" do
|
8
8
|
message_count = Message.count
|
9
9
|
file = UserExportFile.new
|
10
10
|
file.user = users(:admin)
|
11
11
|
file.save
|
12
|
-
|
12
|
+
file.export!
|
13
|
+
#UserExportFileJob.perform_later(file).should be_truthy
|
13
14
|
Message.count.should eq message_count + 1
|
14
15
|
Message.order(:id).last.subject.should eq 'エクスポートが完了しました'
|
15
16
|
end
|
@@ -131,7 +131,7 @@ describe UserImportFile do
|
|
131
131
|
@file = UserImportFile.create user_import: File.new("#{Rails.root}/../../examples/user_update_file2.tsv"), user: users(:admin)
|
132
132
|
result = @file.modify
|
133
133
|
result.should have_key(:user_updated)
|
134
|
-
user001 = User.find('user001')
|
134
|
+
user001 = User.friendly.find('user001')
|
135
135
|
user001.email.should eq 'user001@example.jp'
|
136
136
|
user001.profile.user_number.should eq '001'
|
137
137
|
user001.profile.full_name.should eq 'User 001'
|
@@ -1,11 +1,11 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe "user_export_files/new" do
|
4
4
|
before(:each) do
|
5
5
|
assign(:user_export_file, stub_model(
|
6
6
|
UserExportFile
|
7
7
|
).as_new_record)
|
8
|
-
view.stub(:current_user).and_return(User.find('enjuadmin'))
|
8
|
+
view.stub(:current_user).and_return(User.friendly.find('enjuadmin'))
|
9
9
|
end
|
10
10
|
|
11
11
|
it "renders new user form" do
|
@@ -18,7 +18,7 @@ RSpec.describe "withdraws/new", type: :view do
|
|
18
18
|
:created_at => Time.zone.now
|
19
19
|
)
|
20
20
|
]).page(1))
|
21
|
-
view.stub(:current_user).and_return(User.
|
21
|
+
view.stub(:current_user).and_return(User.friendly.find('enjuadmin'))
|
22
22
|
end
|
23
23
|
|
24
24
|
it "renders new withdraw form" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_library
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.beta.
|
4
|
+
version: 0.2.0.beta.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kosuke Tanabe
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.2.0.beta.
|
19
|
+
version: 0.2.0.beta.6
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.2.0.beta.
|
26
|
+
version: 0.2.0.beta.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: paper_trail
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: statesman
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
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: '
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: paperclip
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -360,6 +360,20 @@ dependencies:
|
|
360
360
|
- - ">="
|
361
361
|
- !ruby/object:Gem::Version
|
362
362
|
version: '0'
|
363
|
+
- !ruby/object:Gem::Dependency
|
364
|
+
name: appraisal
|
365
|
+
requirement: !ruby/object:Gem::Requirement
|
366
|
+
requirements:
|
367
|
+
- - ">="
|
368
|
+
- !ruby/object:Gem::Version
|
369
|
+
version: '0'
|
370
|
+
type: :development
|
371
|
+
prerelease: false
|
372
|
+
version_requirements: !ruby/object:Gem::Requirement
|
373
|
+
requirements:
|
374
|
+
- - ">="
|
375
|
+
- !ruby/object:Gem::Version
|
376
|
+
version: '0'
|
363
377
|
description: Library module for Next-L Enju
|
364
378
|
email:
|
365
379
|
- nabeta@fastmail.fm
|
@@ -389,6 +403,8 @@ files:
|
|
389
403
|
- app/controllers/user_import_results_controller.rb
|
390
404
|
- app/controllers/withdraws_controller.rb
|
391
405
|
- app/helpers/shelves_helper.rb
|
406
|
+
- app/jobs/user_export_file_job.rb
|
407
|
+
- app/jobs/user_import_file_job.rb
|
392
408
|
- app/mailers/notifier.rb
|
393
409
|
- app/models/accept.rb
|
394
410
|
- app/models/basket.rb
|
@@ -830,9 +846,11 @@ files:
|
|
830
846
|
- spec/dummy/db/migrate/20160703184723_add_most_recent_to_manifestation_reserve_stat_transitions.rb
|
831
847
|
- spec/dummy/db/migrate/20160703184747_add_most_recent_to_user_checkout_stat_transitions.rb
|
832
848
|
- spec/dummy/db/migrate/20160703184805_add_most_recent_to_user_reserve_stat_transitions.rb
|
849
|
+
- spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb
|
833
850
|
- spec/dummy/db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb
|
834
851
|
- spec/dummy/db/migrate/20160813191533_add_book_jacket_source_to_library_group.rb
|
835
852
|
- spec/dummy/db/migrate/20160813191820_add_screenshot_generator_to_library_group.rb
|
853
|
+
- spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb
|
836
854
|
- spec/dummy/db/schema.rb
|
837
855
|
- spec/dummy/public/404.html
|
838
856
|
- spec/dummy/public/422.html
|
@@ -1206,9 +1224,11 @@ test_files:
|
|
1206
1224
|
- spec/dummy/db/migrate/20160703184723_add_most_recent_to_manifestation_reserve_stat_transitions.rb
|
1207
1225
|
- spec/dummy/db/migrate/20160703184747_add_most_recent_to_user_checkout_stat_transitions.rb
|
1208
1226
|
- spec/dummy/db/migrate/20160703184805_add_most_recent_to_user_reserve_stat_transitions.rb
|
1227
|
+
- spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb
|
1209
1228
|
- spec/dummy/db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb
|
1210
1229
|
- spec/dummy/db/migrate/20160813191533_add_book_jacket_source_to_library_group.rb
|
1211
1230
|
- spec/dummy/db/migrate/20160813191820_add_screenshot_generator_to_library_group.rb
|
1231
|
+
- spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb
|
1212
1232
|
- spec/dummy/db/schema.rb
|
1213
1233
|
- spec/dummy/public/404.html
|
1214
1234
|
- spec/dummy/public/422.html
|