enju_event 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/app/controllers/event_categories_controller.rb +1 -1
- data/app/controllers/event_import_files_controller.rb +15 -15
- data/app/controllers/event_import_results_controller.rb +1 -1
- data/app/controllers/events_controller.rb +15 -15
- data/lib/enju_event/version.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample1.tsv +5 -0
- data/spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample2.tsv +3 -0
- data/spec/dummy/private/system/event_imports/4/original/event_destroy_file.tsv +4 -0
- data/spec/dummy/private/system/event_imports/4/original/event_import_file_sample1.tsv +1 -1
- data/spec/dummy/private/system/event_imports/4/original/event_import_file_sample2.tsv +1 -1
- data/spec/dummy/private/system/event_imports/4/original/event_update_file.tsv +4 -0
- data/spec/dummy/solr/data/test/index/segments_1 +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- metadata +13 -3
data/Rakefile
CHANGED
@@ -2,18 +2,18 @@ class EventImportFilesController < ApplicationController
|
|
2
2
|
load_and_authorize_resource
|
3
3
|
|
4
4
|
# GET /event_import_files
|
5
|
-
# GET /event_import_files.
|
5
|
+
# GET /event_import_files.json
|
6
6
|
def index
|
7
7
|
@event_import_files = EventImportFile.page(params[:page])
|
8
8
|
|
9
9
|
respond_to do |format|
|
10
10
|
format.html # index.html.erb
|
11
|
-
format.
|
11
|
+
format.json { render :json => @event_import_files }
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
15
|
# GET /event_import_files/1
|
16
|
-
# GET /event_import_files/1.
|
16
|
+
# GET /event_import_files/1.json
|
17
17
|
def show
|
18
18
|
if @event_import_file.event_import.path
|
19
19
|
unless configatron.uploaded_file.storage == :s3
|
@@ -23,7 +23,7 @@ class EventImportFilesController < ApplicationController
|
|
23
23
|
|
24
24
|
respond_to do |format|
|
25
25
|
format.html # show.html.erb
|
26
|
-
format.
|
26
|
+
format.json { render :json => @event_import_file }
|
27
27
|
format.download {
|
28
28
|
if configatron.uploaded_file.storage == :s3
|
29
29
|
redirect_to @event_import_file.event_import.expiring_url(10)
|
@@ -35,13 +35,13 @@ class EventImportFilesController < ApplicationController
|
|
35
35
|
end
|
36
36
|
|
37
37
|
# GET /event_import_files/new
|
38
|
-
# GET /event_import_files/new.
|
38
|
+
# GET /event_import_files/new.json
|
39
39
|
def new
|
40
40
|
@event_import_file = EventImportFile.new
|
41
41
|
|
42
42
|
respond_to do |format|
|
43
43
|
format.html # new.html.erb
|
44
|
-
format.
|
44
|
+
format.json { render :json => @event_import_file }
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -50,7 +50,7 @@ class EventImportFilesController < ApplicationController
|
|
50
50
|
end
|
51
51
|
|
52
52
|
# POST /event_import_files
|
53
|
-
# POST /event_import_files.
|
53
|
+
# POST /event_import_files.json
|
54
54
|
def create
|
55
55
|
@event_import_file = EventImportFile.new(params[:event_import_file])
|
56
56
|
@event_import_file.user = current_user
|
@@ -59,37 +59,37 @@ class EventImportFilesController < ApplicationController
|
|
59
59
|
if @event_import_file.save
|
60
60
|
flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.event_import_file'))
|
61
61
|
format.html { redirect_to(@event_import_file) }
|
62
|
-
format.
|
62
|
+
format.json { render :json => @event_import_file, :status => :created, :location => @event_import_file }
|
63
63
|
else
|
64
64
|
format.html { render :action => "new" }
|
65
|
-
format.
|
65
|
+
format.json { render :json => @event_import_file.errors, :status => :unprocessable_entity }
|
66
66
|
end
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
70
|
# PUT /event_import_files/1
|
71
|
-
# PUT /event_import_files/1.
|
71
|
+
# PUT /event_import_files/1.json
|
72
72
|
def update
|
73
73
|
respond_to do |format|
|
74
74
|
if @event_import_file.update_attributes(params[:event_import_file])
|
75
75
|
flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.event_import_file'))
|
76
76
|
format.html { redirect_to(@event_import_file) }
|
77
|
-
format.
|
77
|
+
format.json { head :no_content }
|
78
78
|
else
|
79
79
|
format.html { render :action => "edit" }
|
80
|
-
format.
|
80
|
+
format.json { render :json => @event_import_file.errors, :status => :unprocessable_entity }
|
81
81
|
end
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
85
|
# DELETE /event_import_files/1
|
86
|
-
# DELETE /event_import_files/1.
|
86
|
+
# DELETE /event_import_files/1.json
|
87
87
|
def destroy
|
88
88
|
@event_import_file.destroy
|
89
89
|
|
90
90
|
respond_to do |format|
|
91
|
-
format.html { redirect_to
|
92
|
-
format.
|
91
|
+
format.html { redirect_to event_import_files_url }
|
92
|
+
format.json { head :no_content }
|
93
93
|
end
|
94
94
|
end
|
95
95
|
end
|
@@ -9,7 +9,7 @@ class EventsController < ApplicationController
|
|
9
9
|
after_filter :convert_charset, :only => :index
|
10
10
|
|
11
11
|
# GET /events
|
12
|
-
# GET /events.
|
12
|
+
# GET /events.json
|
13
13
|
def index
|
14
14
|
@count = {}
|
15
15
|
query = params[:query].to_s.strip
|
@@ -45,7 +45,7 @@ class EventsController < ApplicationController
|
|
45
45
|
|
46
46
|
respond_to do |format|
|
47
47
|
format.html # index.html.erb
|
48
|
-
format.
|
48
|
+
format.json { render :json => @events }
|
49
49
|
format.rss { render :layout => false }
|
50
50
|
format.csv
|
51
51
|
format.atom
|
@@ -54,18 +54,18 @@ class EventsController < ApplicationController
|
|
54
54
|
end
|
55
55
|
|
56
56
|
# GET /events/1
|
57
|
-
# GET /events/1.
|
57
|
+
# GET /events/1.json
|
58
58
|
def show
|
59
59
|
@event = Event.find(params[:id])
|
60
60
|
|
61
61
|
respond_to do |format|
|
62
62
|
format.html # show.html.erb
|
63
|
-
format.
|
63
|
+
format.json { render :json => @event }
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
67
|
# GET /events/new
|
68
|
-
# GET /events/new.
|
68
|
+
# GET /events/new.json
|
69
69
|
def new
|
70
70
|
prepare_options
|
71
71
|
if params[:date]
|
@@ -83,7 +83,7 @@ class EventsController < ApplicationController
|
|
83
83
|
|
84
84
|
respond_to do |format|
|
85
85
|
format.html # new.html.erb
|
86
|
-
format.
|
86
|
+
format.json { render :json => @event }
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
@@ -94,7 +94,7 @@ class EventsController < ApplicationController
|
|
94
94
|
end
|
95
95
|
|
96
96
|
# POST /events
|
97
|
-
# POST /events.
|
97
|
+
# POST /events.json
|
98
98
|
def create
|
99
99
|
@event = Event.new(params[:event])
|
100
100
|
@event.set_date
|
@@ -103,17 +103,17 @@ class EventsController < ApplicationController
|
|
103
103
|
if @event.save
|
104
104
|
flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.event'))
|
105
105
|
format.html { redirect_to(@event) }
|
106
|
-
format.
|
106
|
+
format.json { render :json => @event, :status => :created, :location => @event }
|
107
107
|
else
|
108
108
|
prepare_options
|
109
109
|
format.html { render :action => "new" }
|
110
|
-
format.
|
110
|
+
format.json { render :json => @event.errors, :status => :unprocessable_entity }
|
111
111
|
end
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
115
115
|
# PUT /events/1
|
116
|
-
# PUT /events/1.
|
116
|
+
# PUT /events/1.json
|
117
117
|
def update
|
118
118
|
@event = Event.find(params[:id])
|
119
119
|
@event.set_date
|
@@ -123,24 +123,24 @@ class EventsController < ApplicationController
|
|
123
123
|
|
124
124
|
flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.event'))
|
125
125
|
format.html { redirect_to(@event) }
|
126
|
-
format.
|
126
|
+
format.json { head :no_content }
|
127
127
|
else
|
128
128
|
prepare_options
|
129
129
|
format.html { render :action => "edit" }
|
130
|
-
format.
|
130
|
+
format.json { render :json => @event.errors, :status => :unprocessable_entity }
|
131
131
|
end
|
132
132
|
end
|
133
133
|
end
|
134
134
|
|
135
135
|
# DELETE /events/1
|
136
|
-
# DELETE /events/1.
|
136
|
+
# DELETE /events/1.json
|
137
137
|
def destroy
|
138
138
|
@event = Event.find(params[:id])
|
139
139
|
@event.destroy
|
140
140
|
|
141
141
|
respond_to do |format|
|
142
|
-
format.html { redirect_to
|
143
|
-
format.
|
142
|
+
format.html { redirect_to events_url }
|
143
|
+
format.json { head :no_content }
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
data/lib/enju_event/version.rb
CHANGED
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -68,7 +68,7 @@ ActiveRecord::Schema.define(:version => 20120415060342) do
|
|
68
68
|
t.string "event_import_fingerprint"
|
69
69
|
t.datetime "created_at", :null => false
|
70
70
|
t.datetime "updated_at", :null => false
|
71
|
-
t.string "
|
71
|
+
t.string "event_import_fingerprint"
|
72
72
|
t.text "error_message"
|
73
73
|
end
|
74
74
|
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -288,7 +288,7 @@ dependencies:
|
|
288
288
|
requirement: !ruby/object:Gem::Requirement
|
289
289
|
none: false
|
290
290
|
requirements:
|
291
|
-
- -
|
291
|
+
- - ! '>='
|
292
292
|
- !ruby/object:Gem::Version
|
293
293
|
version: 0.0.19
|
294
294
|
type: :runtime
|
@@ -296,7 +296,7 @@ dependencies:
|
|
296
296
|
version_requirements: !ruby/object:Gem::Requirement
|
297
297
|
none: false
|
298
298
|
requirements:
|
299
|
-
- -
|
299
|
+
- - ! '>='
|
300
300
|
- !ruby/object:Gem::Version
|
301
301
|
version: 0.0.19
|
302
302
|
- !ruby/object:Gem::Dependency
|
@@ -477,6 +477,7 @@ files:
|
|
477
477
|
- spec/dummy/config/locales/en.yml
|
478
478
|
- spec/dummy/config/routes.rb
|
479
479
|
- spec/dummy/config.ru
|
480
|
+
- spec/dummy/db/development.sqlite3
|
480
481
|
- spec/dummy/db/migrate/001_create_patrons.rb
|
481
482
|
- spec/dummy/db/migrate/059_create_libraries.rb
|
482
483
|
- spec/dummy/db/migrate/069_create_shelves.rb
|
@@ -503,12 +504,16 @@ files:
|
|
503
504
|
- spec/dummy/lib/enju_leaf/master_model.rb
|
504
505
|
- spec/dummy/lib/enju_leaf/url_validator.rb
|
505
506
|
- spec/dummy/lib/enju_leaf.rb
|
507
|
+
- spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample1.tsv
|
508
|
+
- spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample2.tsv
|
506
509
|
- spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_destroy_file.tsv
|
507
510
|
- spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample1.tsv
|
508
511
|
- spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample2.tsv
|
509
512
|
- spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_update_file.tsv
|
513
|
+
- spec/dummy/private/system/event_imports/4/original/event_destroy_file.tsv
|
510
514
|
- spec/dummy/private/system/event_imports/4/original/event_import_file_sample1.tsv
|
511
515
|
- spec/dummy/private/system/event_imports/4/original/event_import_file_sample2.tsv
|
516
|
+
- spec/dummy/private/system/event_imports/4/original/event_update_file.tsv
|
512
517
|
- spec/dummy/public/404.html
|
513
518
|
- spec/dummy/public/422.html
|
514
519
|
- spec/dummy/public/500.html
|
@@ -631,6 +636,7 @@ test_files:
|
|
631
636
|
- spec/dummy/config/locales/en.yml
|
632
637
|
- spec/dummy/config/routes.rb
|
633
638
|
- spec/dummy/config.ru
|
639
|
+
- spec/dummy/db/development.sqlite3
|
634
640
|
- spec/dummy/db/migrate/001_create_patrons.rb
|
635
641
|
- spec/dummy/db/migrate/059_create_libraries.rb
|
636
642
|
- spec/dummy/db/migrate/069_create_shelves.rb
|
@@ -657,12 +663,16 @@ test_files:
|
|
657
663
|
- spec/dummy/lib/enju_leaf/master_model.rb
|
658
664
|
- spec/dummy/lib/enju_leaf/url_validator.rb
|
659
665
|
- spec/dummy/lib/enju_leaf.rb
|
666
|
+
- spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample1.tsv
|
667
|
+
- spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample2.tsv
|
660
668
|
- spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_destroy_file.tsv
|
661
669
|
- spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample1.tsv
|
662
670
|
- spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample2.tsv
|
663
671
|
- spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_update_file.tsv
|
672
|
+
- spec/dummy/private/system/event_imports/4/original/event_destroy_file.tsv
|
664
673
|
- spec/dummy/private/system/event_imports/4/original/event_import_file_sample1.tsv
|
665
674
|
- spec/dummy/private/system/event_imports/4/original/event_import_file_sample2.tsv
|
675
|
+
- spec/dummy/private/system/event_imports/4/original/event_update_file.tsv
|
666
676
|
- spec/dummy/public/404.html
|
667
677
|
- spec/dummy/public/422.html
|
668
678
|
- spec/dummy/public/500.html
|