enju_leaf 1.1.0.pre3 → 1.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/config/locales/translation_en.yml +1 -0
  3. data/config/locales/translation_ja.yml +1 -0
  4. data/lib/enju_leaf/engine.rb +0 -1
  5. data/lib/enju_leaf/version.rb +1 -1
  6. data/lib/enju_leaf.rb +5 -3
  7. data/lib/generators/enju_leaf/quick_install/quick_install_generator.rb +15 -7
  8. data/lib/generators/enju_leaf/setup/setup_generator.rb +0 -1
  9. data/lib/generators/enju_leaf/setup/templates/config/schedule.rb +3 -14
  10. data/lib/generators/enju_leaf/setup/templates/db/seeds.rb +7 -6
  11. data/lib/tasks/enju_leaf_tasks.rake +10 -1
  12. data/spec/dummy/db/migrate/006_create_items.rb +0 -4
  13. data/spec/dummy/db/schema.rb +7 -11
  14. data/spec/dummy/db/test.sqlite3 +0 -0
  15. data/spec/dummy/solr/data/test/index/{_3b.fdt → _3t.fdt} +0 -0
  16. data/spec/dummy/solr/data/test/index/{_3b.fdx → _3t.fdx} +0 -0
  17. data/spec/dummy/solr/data/test/index/{_3b.fnm → _3t.fnm} +0 -0
  18. data/spec/dummy/solr/data/test/index/{_3b.frq → _3t.frq} +0 -0
  19. data/spec/dummy/solr/data/test/index/{_3b.nrm → _3t.nrm} +0 -0
  20. data/spec/dummy/solr/data/test/index/{_3b.prx → _3t.prx} +0 -0
  21. data/spec/dummy/solr/data/test/index/{_3b.tii → _3t.tii} +0 -0
  22. data/spec/dummy/solr/data/test/index/{_3b.tis → _3t.tis} +0 -0
  23. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  24. data/spec/dummy/solr/data/test/index/{segments_6p → segments_7p} +0 -0
  25. data/spec/fixtures/items.yml +0 -49
  26. data/vendor/assets/javascripts/jquery.powertip.js +792 -422
  27. data/vendor/assets/stylesheets/jquery.powertip.css +34 -5
  28. metadata +45 -45
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dca2c161e223fc00c166d5e5e6c8bf7269b16b3b
4
- data.tar.gz: bcd185aed88225b1553eb937ada754111c5592c8
3
+ metadata.gz: e460dfb746a695bc7488df46411d278b325f1b0f
4
+ data.tar.gz: 21c7e6d60ef5f7dbf40093ea0928612c4fc009c0
5
5
  SHA512:
6
- metadata.gz: daec85fbc1a7d7a980111735dee1ba9056ad4ad08d80e9a7681665ba7c13b74f9d36be4ed1c896e316a14696d7939753738742b044e7ce9f894479bb1b477389
7
- data.tar.gz: 130cbf879f58500cd18ea71eabbd750ec05a3f297890636d78592c07f8285dafb6284db64b434af48370c3c7a5dbfe1a15dd4e5ce101a5bb9753a800f0ccd843
6
+ metadata.gz: 8f89f9d2ade2efcecccf7d7bc2d9a69f5e757e1ae10bea255d9b1220996b851014e4617ddd52f36974746f224f4a7db31be53b6fd61f218326a84ebc860a06ce
7
+ data.tar.gz: 9e2b0c521f4e0d05a49674a84d916808104455017342d1bc5bd4ea0fd7fff72be70e5408e818deaa09018dcad3d857d7de644ad4671e5c38402b539d1d5e4d50
@@ -262,6 +262,7 @@ en:
262
262
  advanced_search:
263
263
  from: "from"
264
264
  to: "to"
265
+ from_to: "-"
265
266
  all_libraries: "All libraries"
266
267
  work:
267
268
  patrons_work: "%{patron_name}'s works"
@@ -241,6 +241,7 @@ ja:
241
241
  advanced_search:
242
242
  from: "ここから"
243
243
  to: "ここまで"
244
+ from_to: "から"
244
245
  all_libraries: "全ての図書館"
245
246
  work:
246
247
  patron_work: "%{patron_name} の書いた資料"
@@ -1,6 +1,5 @@
1
1
  require 'enju_biblio'
2
2
  require 'enju_library'
3
- require 'enju_book_jacket'
4
3
  require 'enju_manifestation_viewer'
5
4
  require 'redcarpet'
6
5
  require 'mobylette'
@@ -1,3 +1,3 @@
1
1
  module EnjuLeaf
2
- VERSION = "1.1.0.pre3"
2
+ VERSION = "1.1.0.rc1"
3
3
  end
data/lib/enju_leaf.rb CHANGED
@@ -268,10 +268,12 @@ module EnjuLeaf
268
268
  request.format = :mobile
269
269
  when 'false'
270
270
  session[:mobylette_override] = :ignore_mobile
271
- request.format = :html if request.format == :mobile
271
+ unless params[:format]
272
+ request.format = :html if request.format == :mobile
273
+ end
272
274
  end
273
- else
274
- session[:mobylette_override] = nil
275
+ #else
276
+ # session[:mobylette_override] = nil
275
277
  end
276
278
  end
277
279
 
@@ -2,7 +2,9 @@ class EnjuLeaf::QuickInstallGenerator < Rails::Generators::Base
2
2
  source_root File.expand_path('../templates', __FILE__)
3
3
 
4
4
  def quick_install
5
- environment = ENV['RAILS_ENV'] ||= 'development'
5
+ environment = ENV['ENJU_ENV'] || 'development'
6
+ rake("db:create:all")
7
+ rake("db:migrate", :env => environment)
6
8
  generate("enju_circulation:setup")
7
9
  generate("enju_subject:setup")
8
10
  gsub_file 'config/schedule.rb', /^set :environment, :development$/,
@@ -16,12 +18,18 @@ class EnjuLeaf::QuickInstallGenerator < Rails::Generators::Base
16
18
  gsub_file 'config/environments/production.rb',
17
19
  /# config.assets.precompile \+= %w\( search.js \)$/,
18
20
  "config.assets.precompile += %w( mobile.js mobile.css print.css )"
19
- rake("db:migrate")
20
- rake("enju_leaf:setup")
21
- rake("enju_circulation:setup")
22
- rake("enju_subject:setup")
23
- #rake("sunspot:solr:start")
24
- #rake("db:seed")
21
+ rake("db:migrate", :env => environment)
22
+ rake("enju_leaf:setup", :env => environment)
23
+ rake("enju_circulation:setup", :env => environment)
24
+ rake("enju_subject:setup", :env => environment)
25
25
  rake("assets:precompile") if environment == 'production'
26
+ rake("db:seed", :env => environment)
27
+ if ENV['OS'] == 'Windows_NT'
28
+ rake("sunspot:solr:run", :env => environment)
29
+ else
30
+ rake("sunspot:solr:start", :env => environment)
31
+ rake("enju_leaf:create_initial_index", :env => environment)
32
+ rake("sunspot:solr:stop", :env => environment)
33
+ end
26
34
  end
27
35
  end
@@ -48,7 +48,6 @@ EOS
48
48
  <<"EOS"
49
49
  include EnjuLeaf::EnjuLeafHelper
50
50
  include EnjuBiblio::BiblioHelper if defined?(EnjuBiblio)
51
- include EnjuBookJacket::BookJacketHelper if defined?(EnjuBookJacket)
52
51
  include EnjuManifestationViewer::ManifestationViewerHelper if defined?(EnjuManifestationViewer)
53
52
  EOS
54
53
  end
@@ -23,31 +23,20 @@ set :path, '/path/to/enju_leaf'
23
23
  set :environment, :development
24
24
  set :output, "#{path}/log/cron_log.log"
25
25
 
26
- every 5.minute do
27
- rake "enju:message:send"
26
+ every 1.hour do
27
+ rake "enju:import:start"
28
+ rake "enju:import:expire"
28
29
  end
29
30
 
30
31
  every 1.day, :at => '0:00 am' do
31
- rake "enju:circulation:expire"
32
32
  runner "User.lock_expired_users"
33
33
  end
34
34
 
35
- every 1.day, :at => '1:00 am' do
36
- rake "enju:circulation:stat"
37
- # rake "enju:bookmark:stat"
38
- end
39
-
40
- every 1.hour do
41
- rake "enju:import:start"
42
- rake "enju:import:expire"
43
- end
44
-
45
35
  every 1.day, :at => '3:00 am' do
46
36
  rake "sunspot:reindex"
47
37
  # rake "sitemap:refresh:no_ping"
48
38
  end
49
39
 
50
40
  every 1.day, :at => '5:00 am' do
51
- rake "enju:circulation:send_notification"
52
41
  rake "enju:import:destroy"
53
42
  end
@@ -4,13 +4,14 @@ password = 'adminpassword'
4
4
 
5
5
  # Don't edit!
6
6
 
7
- unless solr = Sunspot.commit rescue nil
8
- raise "Solr is not running."
9
- end
7
+ Sunspot.session = Sunspot::Rails::StubSessionProxy.new(Sunspot.session)
8
+ #unless solr = Sunspot.commit rescue nil
9
+ # raise "Solr is not running."
10
+ #end
10
11
 
11
- Patron.reindex
12
- Library.reindex
13
- Shelf.reindex
12
+ #Patron.reindex
13
+ #Library.reindex
14
+ #Shelf.reindex
14
15
 
15
16
  system_user = User.new
16
17
  system_user.username = 'system'
@@ -1,6 +1,6 @@
1
1
  require 'active_record/fixtures'
2
- desc "create initial records for enju_leaf"
3
2
  namespace :enju_leaf do
3
+ desc "create initial records for enju_leaf"
4
4
  task :setup => :environment do
5
5
  Dir.glob(Rails.root.to_s + '/db/fixtures/enju_leaf/*.yml').each do |file|
6
6
  ActiveRecord::Fixtures.create_fixtures('db/fixtures/enju_leaf', File.basename(file, '.*'))
@@ -11,4 +11,13 @@ namespace :enju_leaf do
11
11
 
12
12
  puts 'initial fixture files loaded.'
13
13
  end
14
+
15
+ desc "create initial index"
16
+ task :create_initial_index => :environment do
17
+ Library.reindex
18
+ Shelf.reindex
19
+ User.reindex
20
+
21
+ puts 'indexing completed.'
22
+ end
14
23
  end
@@ -4,8 +4,6 @@ class CreateItems < ActiveRecord::Migration
4
4
  #t.integer :manifestation_id
5
5
  t.string :call_number
6
6
  t.string :item_identifier
7
- t.integer :circulation_status_id, :default => 5, :null => false
8
- t.integer :checkout_type_id, :default => 1, :null => false
9
7
  t.timestamps
10
8
  t.datetime :deleted_at
11
9
  t.integer :shelf_id, :default => 1, :null => false
@@ -19,8 +17,6 @@ class CreateItems < ActiveRecord::Migration
19
17
  t.integer :required_score, :default => 0, :null => false
20
18
  end
21
19
  #add_index :items, :manifestation_id
22
- add_index :items, :circulation_status_id
23
- add_index :items, :checkout_type_id
24
20
  add_index :items, :shelf_id
25
21
  add_index :items, :item_identifier
26
22
  add_index :items, :required_role_id
@@ -175,20 +175,18 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
175
175
  create_table "items", :force => true do |t|
176
176
  t.string "call_number"
177
177
  t.string "item_identifier"
178
- t.integer "circulation_status_id", :default => 5, :null => false
179
- t.integer "checkout_type_id", :default => 1, :null => false
180
- t.datetime "created_at", :null => false
181
- t.datetime "updated_at", :null => false
178
+ t.datetime "created_at", :null => false
179
+ t.datetime "updated_at", :null => false
182
180
  t.datetime "deleted_at"
183
- t.integer "shelf_id", :default => 1, :null => false
184
- t.boolean "include_supplements", :default => false, :null => false
181
+ t.integer "shelf_id", :default => 1, :null => false
182
+ t.boolean "include_supplements", :default => false, :null => false
185
183
  t.text "note"
186
184
  t.string "url"
187
185
  t.integer "price"
188
- t.integer "lock_version", :default => 0, :null => false
189
- t.integer "required_role_id", :default => 1, :null => false
186
+ t.integer "lock_version", :default => 0, :null => false
187
+ t.integer "required_role_id", :default => 1, :null => false
190
188
  t.string "state"
191
- t.integer "required_score", :default => 0, :null => false
189
+ t.integer "required_score", :default => 0, :null => false
192
190
  t.datetime "acquired_at"
193
191
  t.integer "bookstore_id"
194
192
  t.integer "budget_type_id"
@@ -196,8 +194,6 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
196
194
  end
197
195
 
198
196
  add_index "items", ["bookstore_id"], :name => "index_items_on_bookstore_id"
199
- add_index "items", ["checkout_type_id"], :name => "index_items_on_checkout_type_id"
200
- add_index "items", ["circulation_status_id"], :name => "index_items_on_circulation_status_id"
201
197
  add_index "items", ["item_identifier"], :name => "index_items_on_item_identifier"
202
198
  add_index "items", ["required_role_id"], :name => "index_items_on_required_role_id"
203
199
  add_index "items", ["shelf_id"], :name => "index_items_on_shelf_id"
Binary file
@@ -2,8 +2,6 @@
2
2
  item_00001:
3
3
  updated_at: 2007-08-24 23:46:00.484813 +09:00
4
4
  item_identifier: '00001'
5
- circulation_status_id: 2
6
- checkout_type_id: 1
7
5
  shelf_id: 1
8
6
  call_number:
9
7
  id: 1
@@ -12,8 +10,6 @@ item_00001:
12
10
  item_00002:
13
11
  updated_at: 2007-08-24 23:46:01.641413 +09:00
14
12
  item_identifier: '00002'
15
- circulation_status_id: 2
16
- checkout_type_id: 1
17
13
  shelf_id: 1
18
14
  call_number:
19
15
  id: 2
@@ -22,8 +18,6 @@ item_00002:
22
18
  item_00003:
23
19
  updated_at: 2007-08-24 23:46:02.502569 +09:00
24
20
  item_identifier: '00003'
25
- circulation_status_id: 2
26
- checkout_type_id: 2
27
21
  shelf_id: 1
28
22
  call_number:
29
23
  id: 3
@@ -32,8 +26,6 @@ item_00003:
32
26
  item_00004:
33
27
  updated_at: 2007-08-24 23:46:03.520781 +09:00
34
28
  item_identifier: '00004'
35
- circulation_status_id: 2
36
- checkout_type_id: 1
37
29
  shelf_id: 1
38
30
  call_number:
39
31
  id: 4
@@ -42,8 +34,6 @@ item_00004:
42
34
  item_00005:
43
35
  updated_at: 2007-08-24 23:46:04.538073 +09:00
44
36
  item_identifier: '00005'
45
- circulation_status_id: 2
46
- checkout_type_id: 2
47
37
  shelf_id: 1
48
38
  call_number:
49
39
  id: 5
@@ -52,8 +42,6 @@ item_00005:
52
42
  item_00006:
53
43
  updated_at: 2007-08-24 23:46:05.555353 +09:00
54
44
  item_identifier: '00006'
55
- circulation_status_id: 2
56
- checkout_type_id: 2
57
45
  shelf_id: 1
58
46
  call_number:
59
47
  id: 6
@@ -62,8 +50,6 @@ item_00006:
62
50
  item_00007:
63
51
  updated_at: 2007-08-24 23:46:06.572631 +09:00
64
52
  item_identifier: '00007'
65
- circulation_status_id: 2
66
- checkout_type_id: 1
67
53
  shelf_id: 1
68
54
  call_number:
69
55
  id: 7
@@ -72,8 +58,6 @@ item_00007:
72
58
  item_00008:
73
59
  updated_at: 2007-08-24 23:46:07.589909 +09:00
74
60
  item_identifier: '00008'
75
- circulation_status_id: 2
76
- checkout_type_id: 2
77
61
  shelf_id: 1
78
62
  call_number:
79
63
  id: 8
@@ -82,8 +66,6 @@ item_00008:
82
66
  item_00009:
83
67
  updated_at: 2007-08-24 23:46:08.607081 +09:00
84
68
  item_identifier: '00009'
85
- circulation_status_id: 2
86
- checkout_type_id: 1
87
69
  shelf_id: 4
88
70
  call_number:
89
71
  id: 9
@@ -92,8 +74,6 @@ item_00009:
92
74
  item_00010:
93
75
  updated_at: 2007-08-24 23:46:09.624281 +09:00
94
76
  item_identifier: '00010'
95
- circulation_status_id: 2
96
- checkout_type_id: 2
97
77
  shelf_id: 1
98
78
  call_number:
99
79
  id: 10
@@ -102,8 +82,6 @@ item_00010:
102
82
  item_00011:
103
83
  updated_at: 2007-08-24 23:46:10.484813 +09:00
104
84
  item_identifier: '00011'
105
- circulation_status_id: 2
106
- checkout_type_id: 1
107
85
  shelf_id: 1
108
86
  call_number:
109
87
  id: 11
@@ -112,8 +90,6 @@ item_00011:
112
90
  item_00012:
113
91
  updated_at: 2007-08-24 23:46:11.484813 +09:00
114
92
  item_identifier: '00012'
115
- circulation_status_id: 3
116
- checkout_type_id: 2
117
93
  shelf_id: 1
118
94
  call_number:
119
95
  id: 12
@@ -122,8 +98,6 @@ item_00012:
122
98
  item_00013:
123
99
  updated_at: 2007-08-24 23:46:12.484813 +09:00
124
100
  item_identifier: '00013'
125
- circulation_status_id: 10
126
- checkout_type_id: 1
127
101
  shelf_id: 1
128
102
  call_number:
129
103
  id: 13
@@ -132,8 +106,6 @@ item_00013:
132
106
  item_00014:
133
107
  updated_at: 2007-08-24 23:46:13.484813 +09:00
134
108
  item_identifier: '00014'
135
- circulation_status_id: 10
136
- checkout_type_id: 2
137
109
  shelf_id: 1
138
110
  call_number:
139
111
  id: 14
@@ -142,8 +114,6 @@ item_00014:
142
114
  item_00015:
143
115
  updated_at: 2007-08-24 23:46:14.484813 +09:00
144
116
  item_identifier: '00015'
145
- circulation_status_id: 10
146
- checkout_type_id: 3
147
117
  shelf_id: 1
148
118
  call_number:
149
119
  id: 15
@@ -152,8 +122,6 @@ item_00015:
152
122
  item_00016:
153
123
  updated_at: 2007-08-24 23:46:15.484813 +09:00
154
124
  item_identifier: '00016'
155
- circulation_status_id: 10
156
- checkout_type_id: 2
157
125
  shelf_id: 1
158
126
  call_number:
159
127
  id: 16
@@ -162,8 +130,6 @@ item_00016:
162
130
  item_00017:
163
131
  updated_at: 2007-08-24 23:46:16.484813 +09:00
164
132
  item_identifier: '00017'
165
- circulation_status_id: 10
166
- checkout_type_id: 3
167
133
  shelf_id: 1
168
134
  call_number:
169
135
  id: 17
@@ -172,8 +138,6 @@ item_00017:
172
138
  item_00018:
173
139
  updated_at: 2007-08-24 23:46:17.484813 +09:00
174
140
  item_identifier: '00018'
175
- circulation_status_id: 10
176
- checkout_type_id: 3
177
141
  shelf_id: 1
178
142
  call_number:
179
143
  id: 18
@@ -182,8 +146,6 @@ item_00018:
182
146
  item_00019:
183
147
  updated_at: 2007-08-24 23:46:18.484813 +09:00
184
148
  item_identifier: '00019'
185
- circulation_status_id: 2
186
- checkout_type_id: 3
187
149
  shelf_id: 1
188
150
  call_number:
189
151
  id: 19
@@ -192,8 +154,6 @@ item_00019:
192
154
  item_00020:
193
155
  updated_at: 2007-08-24 23:46:19.484813 +09:00
194
156
  item_identifier: '00020'
195
- circulation_status_id: 13
196
- checkout_type_id: 3
197
157
  shelf_id: 1
198
158
  call_number:
199
159
  id: 20
@@ -202,8 +162,6 @@ item_00020:
202
162
  item_00021:
203
163
  updated_at: 2007-08-24 23:46:20.484813 +09:00
204
164
  item_identifier: '00021'
205
- circulation_status_id: 2
206
- checkout_type_id: 3
207
165
  shelf_id: 1
208
166
  call_number:
209
167
  id: 21
@@ -212,8 +170,6 @@ item_00021:
212
170
  item_00022:
213
171
  updated_at: 2007-08-24 23:46:20.484813 +09:00
214
172
  item_identifier: '00022'
215
- circulation_status_id: 2
216
- checkout_type_id: 3
217
173
  shelf_id: 1
218
174
  call_number:
219
175
  id: 22
@@ -222,8 +178,6 @@ item_00022:
222
178
  item_00023:
223
179
  updated_at: 2007-08-24 23:46:20.484813 +09:00
224
180
  item_identifier: '00023'
225
- circulation_status_id: 15
226
- checkout_type_id: 3
227
181
  shelf_id: 2
228
182
  call_number:
229
183
  id: 23
@@ -238,14 +192,11 @@ item_00023:
238
192
  # id :integer not null, primary key
239
193
  # call_number :string(255)
240
194
  # item_identifier :string(255)
241
- # circulation_status_id :integer default(5), not null
242
- # checkout_type_id :integer default(1), not null
243
195
  # created_at :datetime not null
244
196
  # updated_at :datetime not null
245
197
  # deleted_at :datetime
246
198
  # shelf_id :integer default(1), not null
247
199
  # include_supplements :boolean default(FALSE), not null
248
- # checkouts_count :integer default(0), not null
249
200
  # owns_count :integer default(0), not null
250
201
  # note :text
251
202
  # url :string(255)