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 CHANGED
@@ -14,7 +14,7 @@ end
14
14
 
15
15
  RDoc::Task.new(:rdoc) do |rdoc|
16
16
  rdoc.rdoc_dir = 'rdoc'
17
- rdoc.title = 'EnjuSubject'
17
+ rdoc.title = 'EnjuEvent'
18
18
  rdoc.options << '--line-numbers'
19
19
  rdoc.rdoc_files.include('README.rdoc')
20
20
  rdoc.rdoc_files.include('lib/**/*.rb')
@@ -1,5 +1,5 @@
1
1
  class EventCategoriesController < InheritedResources::Base
2
- respond_to :html, :xml
2
+ respond_to :html, :json
3
3
  load_and_authorize_resource
4
4
 
5
5
  def update
@@ -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.xml
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.xml { render :xml => @event_import_files }
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.xml
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.xml { render :xml => @event_import_file }
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.xml
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.xml { render :xml => @event_import_file }
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.xml
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.xml { render :xml => @event_import_file, :status => :created, :location => @event_import_file }
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.xml { render :xml => @event_import_file.errors, :status => :unprocessable_entity }
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.xml
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.xml { head :ok }
77
+ format.json { head :no_content }
78
78
  else
79
79
  format.html { render :action => "edit" }
80
- format.xml { render :xml => @event_import_file.errors, :status => :unprocessable_entity }
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.xml
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(event_import_files_url) }
92
- format.xml { head :ok }
91
+ format.html { redirect_to event_import_files_url }
92
+ format.json { head :no_content }
93
93
  end
94
94
  end
95
95
  end
@@ -1,5 +1,5 @@
1
1
  class EventImportResultsController < InheritedResources::Base
2
- respond_to :html, :xml, :csv
2
+ respond_to :html, :json, :csv
3
3
  load_and_authorize_resource
4
4
  has_scope :file_id
5
5
  actions :index, :show, :destroy
@@ -9,7 +9,7 @@ class EventsController < ApplicationController
9
9
  after_filter :convert_charset, :only => :index
10
10
 
11
11
  # GET /events
12
- # GET /events.xml
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.xml { render :xml => @events }
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.xml
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.xml { render :xml => @event }
63
+ format.json { render :json => @event }
64
64
  end
65
65
  end
66
66
 
67
67
  # GET /events/new
68
- # GET /events/new.xml
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.xml { render :xml => @event }
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.xml
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.xml { render :xml => @event, :status => :created, :location => @event }
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.xml { render :xml => @event.errors, :status => :unprocessable_entity }
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.xml
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.xml { head :ok }
126
+ format.json { head :no_content }
127
127
  else
128
128
  prepare_options
129
129
  format.html { render :action => "edit" }
130
- format.xml { render :xml => @event.errors, :status => :unprocessable_entity }
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.xml
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(events_url) }
143
- format.xml { head :ok }
142
+ format.html { redirect_to events_url }
143
+ format.json { head :no_content }
144
144
  end
145
145
  end
146
146
 
@@ -1,3 +1,3 @@
1
1
  module EnjuEvent
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
Binary file
@@ -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 "event_fingerprint"
71
+ t.string "event_import_fingerprint"
72
72
  t.text "error_message"
73
73
  end
74
74
 
Binary file
@@ -0,0 +1,5 @@
1
+ "name" "category" "library_shortname" "start_at" "end_at" "dummy"
2
+ "イベント名" "カテゴリ。休館日の場合はclosed" "図書館名" "開始日" "終了日" "インポート省略"
3
+ "hogehoge" "おはなし会" "kamata" "2009-04-01" "2009-04-03"
4
+ "hogehoge" "hachioji"
5
+ "休館日" "closed" "kamata" "2011-04-01" "2011-04-03"
@@ -0,0 +1,3 @@
1
+ "name" "library_shortname" "start_at" "end_at"
2
+ "���{��̍Â���" "kamata" "2011-03-26" "2011-03-27"
3
+ "���{��̍Â���2" "kamata" "2011-03-26" "2011-03-27"
@@ -0,0 +1,4 @@
1
+ id dummy
2
+ 1
3
+ 2
4
+ 3 この行は無視される
@@ -1,4 +1,4 @@
1
- "name" "category" "library_shortname" "start_at" "end_at" "dummy"
1
+ "name" "category" "library" "start_at" "end_at" "dummy"
2
2
  "イベント名" "カテゴリ。休館日の場合はclosed" "図書館名" "開始日" "終了日" "インポート省略"
3
3
  "hogehoge" "おはなし会" "kamata" "2009-04-01" "2009-04-03"
4
4
  "hogehoge" "hachioji"
@@ -1,3 +1,3 @@
1
- "name" "library_shortname" "start_at" "end_at"
1
+ "name" "library" "start_at" "end_at"
2
2
  "���{��̍Â���" "kamata" "2011-03-26" "2011-03-27"
3
3
  "���{��̍Â���2" "kamata" "2011-03-26" "2011-03-27"
@@ -0,0 +1,4 @@
1
+ id name category library start_at end_at all_day note dummy
2
+ 1 変更後のイベント名 kamata 2012-04-01 2012-04-02
3
+ 2 mita 2012-04-03 FALSE
4
+ 3 変更後のイベント名 この行は無視される
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.17
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