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.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/export_files_controller.rb +1 -1
  3. data/app/models/export_file.rb +15 -0
  4. data/lib/enju_export/engine.rb +1 -1
  5. data/lib/enju_export/version.rb +1 -1
  6. data/spec/dummy/app/controllers/application_controller.rb +2 -19
  7. data/spec/dummy/config/application.rb +1 -0
  8. data/spec/dummy/config/initializers/devise.rb +2 -0
  9. data/spec/dummy/db/migrate/080_create_library_groups.rb +25 -0
  10. data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +9 -0
  11. data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +9 -0
  12. data/spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb +9 -0
  13. data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +9 -0
  14. data/spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb +11 -0
  15. data/spec/dummy/db/schema.rb +21 -0
  16. data/spec/dummy/db/test.sqlite3 +0 -0
  17. data/spec/dummy/log/test.log +440 -230
  18. data/spec/dummy/tmp/cache/assets/test/sprockets/4d9b06948a2ac8edcb3296d391db46b5 +0 -0
  19. data/spec/dummy/tmp/cache/assets/test/sprockets/8ce8cce74a1c4d65497a8177d7bf5b71 +0 -0
  20. data/spec/fixtures/library_groups.yml +33 -0
  21. data/spec/models/export_file_spec.rb +15 -0
  22. metadata +55 -30
  23. data/app/workers/patron_export_queue.rb +0 -7
  24. data/lib/generators/enju_export/setup/USAGE +0 -8
  25. data/lib/generators/enju_export/setup/setup_generator.rb +0 -12
  26. data/spec/dummy/app/models/role.rb +0 -47
  27. 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: 13898a1ac3f32f86bba7b13bc8862dd9a43d91d4
4
- data.tar.gz: dcfbcac8c37bd3b08b93b14f345ed6beeede3522
3
+ metadata.gz: eb62d3a18cfb66663bfd5631faf3ef3e8a88ef9d
4
+ data.tar.gz: 71f716efbd01724947723a5c920bc8b2baf90b07
5
5
  SHA512:
6
- metadata.gz: 4b8db88702ce648f1162aa7da850b18a7492797fcd78e6e29fb50d2457590f2681424d09045e5124c3d1dbf8396b71c9d181654ccaff1779e219bf3af02d0afc
7
- data.tar.gz: 8711bda254771e6f0e774c5314078c6b393259aed710523bc1170797c9375a1b2b5a9dbbb50b8052c87cf39d0acf461492154afa2eaff9d28787c24a57b34606
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
@@ -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
+
@@ -1,7 +1,7 @@
1
1
  require 'state_machine'
2
2
  require 'paperclip'
3
3
  require 'simple_form'
4
- require 'enju_core'
4
+ require 'enju_seed'
5
5
 
6
6
  module EnjuExport
7
7
  class Engine < ::Rails::Engine
@@ -1,3 +1,3 @@
1
1
  module EnjuExport
2
- VERSION = "0.1.1.pre4"
2
+ VERSION = "0.1.1.pre5"
3
3
  end
@@ -1,23 +1,6 @@
1
1
  class ApplicationController < ActionController::Base
2
2
  protect_from_forgery
3
3
 
4
- rescue_from CanCan::AccessDenied, :with => :render_403
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
@@ -57,3 +57,4 @@ module Dummy
57
57
  end
58
58
  end
59
59
 
60
+ require 'enju_leaf'
@@ -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 AddAdminNetworksToLibraryGroup < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :library_groups, :admin_networks, :text
4
+ end
5
+
6
+ def self.down
7
+ remove_column :library_groups, :admin_networks
8
+ end
9
+ 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,9 @@
1
+ class AddPositionToLibraryGroup < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :library_groups, :position, :integer
4
+ end
5
+
6
+ def self.down
7
+ remove_column :library_groups, :position
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddUrlToLibraryGroup < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :library_groups, :url, :string, :default => 'http://localhost:3000/'
4
+ end
5
+
6
+ def self.down
7
+ remove_column :library_groups, :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
@@ -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"
Binary file