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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb62d3a18cfb66663bfd5631faf3ef3e8a88ef9d
|
4
|
+
data.tar.gz: 71f716efbd01724947723a5c920bc8b2baf90b07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f0fee893eab8833679c0e5809c4862d5af1122bb453ca9c5d1654ca8f59af4e191362ab02d1e92d5c7ebbec2c483e445511b3afae4e6e504a622f3949ba32c5
|
7
|
+
data.tar.gz: db0761229a242c7a77b6b8c0aeb981abd0c980fed27725b18fb3dbd4dd5c0fcdb7960ab1a37878ade2d3c9042d52023ed6543fe9561be65f98f76b3c67f943a8
|
@@ -4,7 +4,7 @@ class ExportFilesController < ApplicationController
|
|
4
4
|
# GET /export_files
|
5
5
|
# GET /export_files.json
|
6
6
|
def index
|
7
|
-
@export_files = ExportFile.page(params[:page])
|
7
|
+
@export_files = ExportFile.order('id DESC').page(params[:page])
|
8
8
|
|
9
9
|
respond_to do |format|
|
10
10
|
format.html # index.html.erb
|
data/app/models/export_file.rb
CHANGED
@@ -27,3 +27,18 @@ class ExportFile < ActiveRecord::Base
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
|
+
|
31
|
+
# == Schema Information
|
32
|
+
#
|
33
|
+
# Table name: export_files
|
34
|
+
#
|
35
|
+
# id :integer not null, primary key
|
36
|
+
# export_file_name :string(255)
|
37
|
+
# export_content_type :string(255)
|
38
|
+
# export_file_size :string(255)
|
39
|
+
# state :string(255)
|
40
|
+
# created_at :datetime not null
|
41
|
+
# updated_at :datetime not null
|
42
|
+
# user_id :integer
|
43
|
+
#
|
44
|
+
|
data/lib/enju_export/engine.rb
CHANGED
data/lib/enju_export/version.rb
CHANGED
@@ -1,23 +1,6 @@
|
|
1
1
|
class ApplicationController < ActionController::Base
|
2
2
|
protect_from_forgery
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
private
|
7
|
-
def render_403
|
8
|
-
return if performed?
|
9
|
-
if user_signed_in?
|
10
|
-
respond_to do |format|
|
11
|
-
format.html {render :template => 'page/403', :status => 403}
|
12
|
-
format.xml {render :template => 'page/403', :status => 403}
|
13
|
-
format.json { render :text => '{"error": "forbidden"}' }
|
14
|
-
end
|
15
|
-
else
|
16
|
-
respond_to do |format|
|
17
|
-
format.html {redirect_to new_user_session_url}
|
18
|
-
format.xml {render :template => 'page/403', :status => 403}
|
19
|
-
format.json { render :text => '{"error": "forbidden"}' }
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
4
|
+
enju_leaf
|
5
|
+
enju_library
|
23
6
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# Use this hook to configure devise mailer, warden hooks and so forth.
|
2
2
|
# Many of these configuration options can be set straight in your model.
|
3
3
|
Devise.setup do |config|
|
4
|
+
config.secret_key = 'c3bfd545b6591892f4908e743c01ec6985028e4eb235379da75804e166fd914a319db9404346cfe842e3161666098191ea151a7814a13c32ebed01cec990783d'
|
5
|
+
|
4
6
|
# ==> Mailer Configuration
|
5
7
|
# Configure the e-mail address which will be shown in Devise::Mailer,
|
6
8
|
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class CreateLibraryGroups < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :library_groups do |t|
|
4
|
+
t.string :name, :null => false
|
5
|
+
t.text :display_name
|
6
|
+
t.string :short_name, :null => false
|
7
|
+
t.string :email
|
8
|
+
t.text :my_networks
|
9
|
+
t.boolean :use_dsbl, :default => false, :null => false
|
10
|
+
t.text :dsbl_list
|
11
|
+
t.text :login_banner
|
12
|
+
t.text :note
|
13
|
+
t.integer :valid_period_for_new_user, :default => 365, :null => false
|
14
|
+
t.boolean :post_to_union_catalog, :default => false, :null => false
|
15
|
+
t.integer :country_id
|
16
|
+
|
17
|
+
t.timestamps
|
18
|
+
end
|
19
|
+
add_index :library_groups, :short_name
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.down
|
23
|
+
drop_table :library_groups
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class AddAllowBookmarkExternalUrlToLibraryGroup < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :library_groups, :allow_bookmark_external_url, :boolean, :null => false, :default => false
|
4
|
+
end
|
5
|
+
|
6
|
+
def self.down
|
7
|
+
remove_column :library_groups, :allow_bookmark_external_url
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class RemoveDsblFromLibraryGroup < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
remove_column :library_groups, :use_dsbl
|
4
|
+
remove_column :library_groups, :dsbl_list
|
5
|
+
end
|
6
|
+
|
7
|
+
def down
|
8
|
+
add_column :library_groups, :dsbl_list, :text
|
9
|
+
add_column :library_groups, :use_dsbl, :boolean
|
10
|
+
end
|
11
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -25,6 +25,27 @@ ActiveRecord::Schema.define(:version => 20120621224846) do
|
|
25
25
|
|
26
26
|
add_index "export_files", ["user_id"], :name => "index_export_files_on_user_id"
|
27
27
|
|
28
|
+
create_table "library_groups", :force => true do |t|
|
29
|
+
t.string "name", :null => false
|
30
|
+
t.text "display_name"
|
31
|
+
t.string "short_name", :null => false
|
32
|
+
t.string "email"
|
33
|
+
t.text "my_networks"
|
34
|
+
t.text "login_banner"
|
35
|
+
t.text "note"
|
36
|
+
t.integer "valid_period_for_new_user", :default => 365, :null => false
|
37
|
+
t.boolean "post_to_union_catalog", :default => false, :null => false
|
38
|
+
t.integer "country_id"
|
39
|
+
t.datetime "created_at", :null => false
|
40
|
+
t.datetime "updated_at", :null => false
|
41
|
+
t.text "admin_networks"
|
42
|
+
t.boolean "allow_bookmark_external_url", :default => false, :null => false
|
43
|
+
t.integer "position"
|
44
|
+
t.string "url", :default => "http://localhost:3000/"
|
45
|
+
end
|
46
|
+
|
47
|
+
add_index "library_groups", ["short_name"], :name => "index_library_groups_on_short_name"
|
48
|
+
|
28
49
|
create_table "roles", :force => true do |t|
|
29
50
|
t.string "name"
|
30
51
|
t.text "display_name"
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|