enju_export 0.1.1.pre4 → 0.1.1.pre5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/export_files_controller.rb +1 -1
- data/app/models/export_file.rb +15 -0
- data/lib/enju_export/engine.rb +1 -1
- data/lib/enju_export/version.rb +1 -1
- data/spec/dummy/app/controllers/application_controller.rb +2 -19
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/config/initializers/devise.rb +2 -0
- data/spec/dummy/db/migrate/080_create_library_groups.rb +25 -0
- data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb +11 -0
- data/spec/dummy/db/schema.rb +21 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +440 -230
- data/spec/dummy/tmp/cache/assets/test/sprockets/4d9b06948a2ac8edcb3296d391db46b5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8ce8cce74a1c4d65497a8177d7bf5b71 +0 -0
- data/spec/fixtures/library_groups.yml +33 -0
- data/spec/models/export_file_spec.rb +15 -0
- metadata +55 -30
- data/app/workers/patron_export_queue.rb +0 -7
- data/lib/generators/enju_export/setup/USAGE +0 -8
- data/lib/generators/enju_export/setup/setup_generator.rb +0 -12
- data/spec/dummy/app/models/role.rb +0 -47
- data/spec/dummy/app/models/user_has_role.rb +0 -4
@@ -0,0 +1,33 @@
|
|
1
|
+
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
2
|
+
one:
|
3
|
+
id: 1
|
4
|
+
name: enju_library
|
5
|
+
display_name: "<%= I18n.locale %>: Enju Library"
|
6
|
+
short_name: enju
|
7
|
+
email: next-l@library.example.jp
|
8
|
+
note:
|
9
|
+
my_networks: 0.0.0.0/0
|
10
|
+
url: "http://localhost:3000/"
|
11
|
+
|
12
|
+
|
13
|
+
# == Schema Information
|
14
|
+
#
|
15
|
+
# Table name: library_groups
|
16
|
+
#
|
17
|
+
# id :integer not null, primary key
|
18
|
+
# name :string(255) not null
|
19
|
+
# display_name :text
|
20
|
+
# short_name :string(255) not null
|
21
|
+
# email :string(255)
|
22
|
+
# my_networks :text
|
23
|
+
# login_banner :text
|
24
|
+
# note :text
|
25
|
+
# country_id :integer
|
26
|
+
# created_at :datetime not null
|
27
|
+
# updated_at :datetime not null
|
28
|
+
# admin_networks :text
|
29
|
+
# allow_bookmark_external_url :boolean default(FALSE), not null
|
30
|
+
# position :integer
|
31
|
+
# url :string(255) default("http://localhost:3000/")
|
32
|
+
#
|
33
|
+
|
@@ -3,3 +3,18 @@ require 'spec_helper'
|
|
3
3
|
describe ExportFile do
|
4
4
|
# pending "add some examples to (or delete) #{__FILE__}"
|
5
5
|
end
|
6
|
+
|
7
|
+
# == Schema Information
|
8
|
+
#
|
9
|
+
# Table name: export_files
|
10
|
+
#
|
11
|
+
# id :integer not null, primary key
|
12
|
+
# export_file_name :string(255)
|
13
|
+
# export_content_type :string(255)
|
14
|
+
# export_file_size :string(255)
|
15
|
+
# state :string(255)
|
16
|
+
# created_at :datetime not null
|
17
|
+
# updated_at :datetime not null
|
18
|
+
# user_id :integer
|
19
|
+
#
|
20
|
+
|
metadata
CHANGED
@@ -1,78 +1,95 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_export
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.1.
|
4
|
+
version: 0.1.1.pre5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kosuke Tanabe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: enju_biblio
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1.0.
|
19
|
+
version: 0.1.0.pre50
|
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.1.0.
|
26
|
+
version: 0.1.0.pre50
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: state_machine
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: sqlite3
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec-rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: enju_leaf
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.1.0.rc7
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.1.0.rc7
|
69
83
|
description: Exporting records of Next-L Enju
|
70
84
|
email:
|
71
|
-
-
|
85
|
+
- kosuke@e23.jp
|
72
86
|
executables: []
|
73
87
|
extensions: []
|
74
88
|
extra_rdoc_files: []
|
75
89
|
files:
|
90
|
+
- MIT-LICENSE
|
91
|
+
- README.rdoc
|
92
|
+
- Rakefile
|
76
93
|
- app/controllers/export_files_controller.rb
|
77
94
|
- app/models/enju_export/ability.rb
|
78
95
|
- app/models/export_file.rb
|
@@ -83,31 +100,25 @@ files:
|
|
83
100
|
- app/views/export_files/new.html.erb
|
84
101
|
- app/views/export_files/show.html.erb
|
85
102
|
- app/views/export_files/show.js.erb
|
86
|
-
- app/workers/patron_export_queue.rb
|
87
103
|
- config/locales/translation_en.yml
|
88
104
|
- config/locales/translation_ja.yml
|
89
105
|
- config/routes.rb
|
90
106
|
- db/migrate/20120610075759_create_export_files.rb
|
91
107
|
- db/migrate/20120621224846_add_user_id_to_export_file.rb
|
108
|
+
- lib/enju_export.rb
|
92
109
|
- lib/enju_export/engine.rb
|
93
110
|
- lib/enju_export/version.rb
|
94
|
-
- lib/enju_export.rb
|
95
|
-
- lib/generators/enju_export/setup/setup_generator.rb
|
96
|
-
- lib/generators/enju_export/setup/USAGE
|
97
111
|
- lib/tasks/enju_export_tasks.rake
|
98
|
-
- MIT-LICENSE
|
99
|
-
- Rakefile
|
100
|
-
- README.rdoc
|
101
112
|
- spec/controllers/export_files_controller_spec.rb
|
113
|
+
- spec/dummy/README.rdoc
|
114
|
+
- spec/dummy/Rakefile
|
102
115
|
- spec/dummy/app/assets/javascripts/application.js
|
103
116
|
- spec/dummy/app/assets/stylesheets/application.css
|
104
117
|
- spec/dummy/app/controllers/application_controller.rb
|
105
118
|
- spec/dummy/app/helpers/application_helper.rb
|
106
119
|
- spec/dummy/app/models/ability.rb
|
107
|
-
- spec/dummy/app/models/role.rb
|
108
120
|
- spec/dummy/app/models/setting.rb
|
109
121
|
- spec/dummy/app/models/user.rb
|
110
|
-
- spec/dummy/app/models/user_has_role.rb
|
111
122
|
- spec/dummy/app/views/layouts/application.html.erb
|
112
123
|
- spec/dummy/app/views/page/403.html.erb
|
113
124
|
- spec/dummy/app/views/page/403.mobile.erb
|
@@ -115,6 +126,7 @@ files:
|
|
115
126
|
- spec/dummy/app/views/page/404.html.erb
|
116
127
|
- spec/dummy/app/views/page/404.mobile.erb
|
117
128
|
- spec/dummy/app/views/page/404.xml.erb
|
129
|
+
- spec/dummy/config.ru
|
118
130
|
- spec/dummy/config/application.rb
|
119
131
|
- spec/dummy/config/application.yml
|
120
132
|
- spec/dummy/config/boot.rb
|
@@ -132,7 +144,12 @@ files:
|
|
132
144
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
133
145
|
- spec/dummy/config/locales/en.yml
|
134
146
|
- spec/dummy/config/routes.rb
|
135
|
-
- spec/dummy/
|
147
|
+
- spec/dummy/db/migrate/080_create_library_groups.rb
|
148
|
+
- spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb
|
149
|
+
- spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb
|
150
|
+
- spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb
|
151
|
+
- spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb
|
152
|
+
- spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb
|
136
153
|
- spec/dummy/db/migrate/20111201121844_create_roles.rb
|
137
154
|
- spec/dummy/db/migrate/20111201155456_create_users.rb
|
138
155
|
- spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb
|
@@ -144,9 +161,10 @@ files:
|
|
144
161
|
- spec/dummy/public/422.html
|
145
162
|
- spec/dummy/public/500.html
|
146
163
|
- spec/dummy/public/favicon.ico
|
147
|
-
- spec/dummy/Rakefile
|
148
|
-
- spec/dummy/README.rdoc
|
149
164
|
- spec/dummy/script/rails
|
165
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/4d9b06948a2ac8edcb3296d391db46b5
|
166
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/8ce8cce74a1c4d65497a8177d7bf5b71
|
167
|
+
- spec/fixtures/library_groups.yml
|
150
168
|
- spec/fixtures/roles.yml
|
151
169
|
- spec/fixtures/user_has_roles.yml
|
152
170
|
- spec/fixtures/users.yml
|
@@ -169,17 +187,17 @@ require_paths:
|
|
169
187
|
- lib
|
170
188
|
required_ruby_version: !ruby/object:Gem::Requirement
|
171
189
|
requirements:
|
172
|
-
- -
|
190
|
+
- - ">="
|
173
191
|
- !ruby/object:Gem::Version
|
174
192
|
version: '0'
|
175
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
194
|
requirements:
|
177
|
-
- -
|
195
|
+
- - ">"
|
178
196
|
- !ruby/object:Gem::Version
|
179
197
|
version: 1.3.1
|
180
198
|
requirements: []
|
181
199
|
rubyforge_project:
|
182
|
-
rubygems_version: 2.
|
200
|
+
rubygems_version: 2.2.0
|
183
201
|
signing_key:
|
184
202
|
specification_version: 4
|
185
203
|
summary: enju_export plugin
|
@@ -190,10 +208,8 @@ test_files:
|
|
190
208
|
- spec/dummy/app/controllers/application_controller.rb
|
191
209
|
- spec/dummy/app/helpers/application_helper.rb
|
192
210
|
- spec/dummy/app/models/ability.rb
|
193
|
-
- spec/dummy/app/models/role.rb
|
194
211
|
- spec/dummy/app/models/setting.rb
|
195
212
|
- spec/dummy/app/models/user.rb
|
196
|
-
- spec/dummy/app/models/user_has_role.rb
|
197
213
|
- spec/dummy/app/views/layouts/application.html.erb
|
198
214
|
- spec/dummy/app/views/page/403.html.erb
|
199
215
|
- spec/dummy/app/views/page/403.mobile.erb
|
@@ -219,6 +235,12 @@ test_files:
|
|
219
235
|
- spec/dummy/config/locales/en.yml
|
220
236
|
- spec/dummy/config/routes.rb
|
221
237
|
- spec/dummy/config.ru
|
238
|
+
- spec/dummy/db/migrate/080_create_library_groups.rb
|
239
|
+
- spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb
|
240
|
+
- spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb
|
241
|
+
- spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb
|
242
|
+
- spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb
|
243
|
+
- spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb
|
222
244
|
- spec/dummy/db/migrate/20111201121844_create_roles.rb
|
223
245
|
- spec/dummy/db/migrate/20111201155456_create_users.rb
|
224
246
|
- spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb
|
@@ -233,6 +255,9 @@ test_files:
|
|
233
255
|
- spec/dummy/Rakefile
|
234
256
|
- spec/dummy/README.rdoc
|
235
257
|
- spec/dummy/script/rails
|
258
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/4d9b06948a2ac8edcb3296d391db46b5
|
259
|
+
- spec/dummy/tmp/cache/assets/test/sprockets/8ce8cce74a1c4d65497a8177d7bf5b71
|
260
|
+
- spec/fixtures/library_groups.yml
|
236
261
|
- spec/fixtures/roles.yml
|
237
262
|
- spec/fixtures/user_has_roles.yml
|
238
263
|
- spec/fixtures/users.yml
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class EnjuExport::SetupGenerator < Rails::Generators::Base
|
2
|
-
source_root File.expand_path('../templates', __FILE__)
|
3
|
-
|
4
|
-
def setup
|
5
|
-
inject_into_class 'app/models/manifestation.rb', Manifestation,
|
6
|
-
" enju_export\n"
|
7
|
-
inject_into_class 'app/models/item.rb', Item,
|
8
|
-
" enju_export\n"
|
9
|
-
inject_into_class 'app/models/patron.rb', Patron,
|
10
|
-
" enju_export\n"
|
11
|
-
end
|
12
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
class Role < ActiveRecord::Base
|
2
|
-
attr_accessible :name, :display_name, :note
|
3
|
-
include MasterModel
|
4
|
-
default_scope :order => "roles.position"
|
5
|
-
has_many :user_has_roles
|
6
|
-
has_many :users, :through => :user_has_roles
|
7
|
-
after_save :clear_all_cache
|
8
|
-
after_destroy :clear_all_cache
|
9
|
-
|
10
|
-
extend FriendlyId
|
11
|
-
friendly_id :name
|
12
|
-
|
13
|
-
def localized_name
|
14
|
-
display_name.localize
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.all_cache
|
18
|
-
if Rails.env == 'production'
|
19
|
-
Rails.cache.fetch('role_all'){Role.select(:name).all}
|
20
|
-
else
|
21
|
-
Role.select(:name)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def clear_all_cache
|
26
|
-
Rails.cache.delete('role_all')
|
27
|
-
end
|
28
|
-
|
29
|
-
def self.default_role
|
30
|
-
Rails.cache.fetch('default_role'){Role.find('Guest')}
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
# == Schema Information
|
35
|
-
#
|
36
|
-
# Table name: roles
|
37
|
-
#
|
38
|
-
# id :integer not null, primary key
|
39
|
-
# name :string(255) not null
|
40
|
-
# display_name :string(255)
|
41
|
-
# note :text
|
42
|
-
# created_at :datetime
|
43
|
-
# updated_at :datetime
|
44
|
-
# score :integer default(0), not null
|
45
|
-
# position :integer
|
46
|
-
#
|
47
|
-
|