enju_event 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/README.rdoc +2 -2
  2. data/app/controllers/calendar_controller.rb +1 -1
  3. data/app/controllers/events_controller.rb +1 -1
  4. data/app/models/event_import_file.rb +4 -4
  5. data/app/views/event_categories/index.html.erb +1 -1
  6. data/app/views/event_import_files/index.html.erb +1 -1
  7. data/app/views/event_import_results/index.html.erb +1 -1
  8. data/app/views/events/_form.html.erb +1 -1
  9. data/app/views/events/index.html.erb +1 -1
  10. data/app/views/events/show.html.erb +1 -1
  11. data/app/views/events/show.mobile.erb +1 -1
  12. data/app/views/participates/index.html.erb +1 -1
  13. data/lib/enju_event/version.rb +1 -1
  14. data/spec/controllers/calendar_controller_spec.rb +4 -0
  15. data/spec/controllers/events_controller_spec.rb +4 -0
  16. data/spec/dummy/db/test.sqlite3 +0 -0
  17. data/spec/dummy/solr/data/test/index/_5l.fdt +0 -0
  18. data/spec/dummy/solr/data/test/index/{_2s.fdx → _5l.fdx} +0 -0
  19. data/spec/dummy/solr/data/test/index/_5l.fnm +4 -0
  20. data/spec/dummy/solr/data/test/index/_5l.frq +0 -0
  21. data/spec/dummy/solr/data/test/index/_5l.nrm +1 -0
  22. data/spec/dummy/solr/data/test/index/_5l.prx +0 -0
  23. data/spec/dummy/solr/data/test/index/{_2s.tii → _5l.tii} +0 -0
  24. data/spec/dummy/solr/data/test/index/_5l.tis +0 -0
  25. data/spec/dummy/solr/data/test/index/_5l_1.del +0 -0
  26. data/spec/dummy/solr/data/test/index/_5m.fdt +0 -0
  27. data/spec/dummy/solr/data/test/index/_5m.fdx +0 -0
  28. data/spec/dummy/solr/data/test/index/_5m.fnm +4 -0
  29. data/spec/dummy/solr/data/test/index/_5m.frq +0 -0
  30. data/spec/dummy/solr/data/test/index/_5m.nrm +1 -0
  31. data/spec/dummy/solr/data/test/index/_5m.prx +0 -0
  32. data/spec/dummy/solr/data/test/index/_5m.tii +0 -0
  33. data/spec/dummy/solr/data/test/index/_5m.tis +0 -0
  34. data/spec/dummy/solr/data/test/index/_5m_1.del +0 -0
  35. data/spec/dummy/solr/data/test/index/_5n.fdt +0 -0
  36. data/spec/dummy/solr/data/test/index/_5n.fdx +0 -0
  37. data/spec/dummy/solr/data/test/index/_5n.fnm +4 -0
  38. data/spec/dummy/solr/data/test/index/_5n.frq +0 -0
  39. data/spec/dummy/solr/data/test/index/_5n.nrm +1 -0
  40. data/spec/dummy/solr/data/test/index/_5n.prx +0 -0
  41. data/spec/dummy/solr/data/test/index/_5n.tii +0 -0
  42. data/spec/dummy/solr/data/test/index/_5n.tis +0 -0
  43. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  44. data/spec/dummy/solr/data/test/index/segments_6l +0 -0
  45. data/spec/spec_helper.rb +1 -1
  46. metadata +56 -20
  47. data/spec/dummy/solr/data/test/index/_2s.fdt +0 -0
  48. data/spec/dummy/solr/data/test/index/_2s.fnm +0 -4
  49. data/spec/dummy/solr/data/test/index/_2s.frq +0 -0
  50. data/spec/dummy/solr/data/test/index/_2s.nrm +0 -1
  51. data/spec/dummy/solr/data/test/index/_2s.prx +0 -0
  52. data/spec/dummy/solr/data/test/index/_2s.tis +0 -0
  53. data/spec/dummy/solr/data/test/index/segments_2k +0 -0
@@ -1,3 +1,3 @@
1
- = EnjuEvent
1
+ = EnjuEvent {<img src="https://secure.travis-ci.org/nabeta/enju_event.png?branch=master" alt="Build Status" />}[http://travis-ci.org/nabeta/enju_event]
2
2
 
3
- This project rocks and uses MIT-LICENSE.
3
+ This project rocks and uses MIT-LICENSE.
@@ -23,7 +23,7 @@ class CalendarController < ApplicationController
23
23
  date = Time.zone.local(params[:year].to_i, params[:month].to_i, params[:day].to_i) rescue Time.zone.now
24
24
  date_string = date.strftime('%Y/%m/%d')
25
25
  if Event.search do
26
- with(:start_at).less_than date
26
+ with(:start_at).less_than_or_equal_to date
27
27
  with(:end_at).greater_than date
28
28
  end.results.empty?
29
29
  redirect_to new_event_path(:date => date_string)
@@ -26,7 +26,7 @@ class EventsController < ApplicationController
26
26
  with(:library_id).equal_to library.id if library
27
27
  #with(:tag).equal_to tag
28
28
  if date
29
- with(:start_at).less_than Time.zone.parse(date)
29
+ with(:start_at).less_than_or_equal_to Time.zone.parse(date)
30
30
  with(:end_at).greater_than Time.zone.parse(date)
31
31
  end
32
32
  case mode
@@ -7,10 +7,10 @@ class EventImportFile < ActiveRecord::Base
7
7
 
8
8
  if configatron.uploaded_file.storage == :s3
9
9
  has_attached_file :event_import, :storage => :s3, :s3_credentials => "#{Rails.root.to_s}/config/s3.yml",
10
- :path => "event_import_files/:id/:filename",
11
10
  :s3_permissions => :private
12
11
  else
13
- has_attached_file :event_import, :path => ":rails_root/private:url"
12
+ has_attached_file :event_import,
13
+ :path => ":rails_root/private/system/:class/:attachment/:id_partition/:style/:filename"
14
14
  end
15
15
  validates_attachment_content_type :event_import, :content_type => ['text/csv', 'text/plain', 'text/tab-separated-values', 'application/octet-stream']
16
16
  validates_attachment_presence :event_import
@@ -64,7 +64,7 @@ class EventImportFile < ActiveRecord::Base
64
64
  rows.each do |row|
65
65
  next if row['dummy'].to_s.strip.present?
66
66
  event_import_result = EventImportResult.new
67
- event_import_result.assign_attributes({:event_import_file_id => self.id, :body => row.fields.join("\t")}, :as => :admin)
67
+ event_import_result.assign_attributes({:event_import_file_id => id, :body => row.fields.join("\t")}, :as => :admin)
68
68
  event_import_result.save!
69
69
 
70
70
  event = Event.new
@@ -183,7 +183,7 @@ class EventImportFile < ActiveRecord::Base
183
183
  header = file.first
184
184
  rows = CSV.open(tempfile, :headers => header, :col_sep => "\t")
185
185
  event_import_result = EventImportResult.new
186
- event_import_result.assign_attributes({:event_import_file_id => self.id, :body => header.join("\t")}, :as => :admin)
186
+ event_import_result.assign_attributes({:event_import_file_id => id, :body => header.join("\t")}, :as => :admin)
187
187
  event_import_result.save!
188
188
  tempfile.close(true)
189
189
  file.close
@@ -2,7 +2,7 @@
2
2
  <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.event_category')) -%></h1>
3
3
  <div id="content_list">
4
4
 
5
- <table class="index">
5
+ <table class="table table-striped index">
6
6
  <tr>
7
7
  <th id="position"></th>
8
8
  <th><%= t('activerecord.attributes.event_category.name') -%></th>
@@ -2,7 +2,7 @@
2
2
  <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.event_import_file')) -%></h1>
3
3
  <div id="content_list">
4
4
 
5
- <table class="index">
5
+ <table class="table table-striped index">
6
6
  <tr>
7
7
  <th>Id</th>
8
8
  <th><%= t('activerecord.attributes.event_import_file.event_import_file_name') -%></th>
@@ -7,7 +7,7 @@
7
7
  </h2>
8
8
  <% end %>
9
9
 
10
- <table class="index">
10
+ <table class="table table-striped index">
11
11
  <tr>
12
12
  <th><%= t('activerecord.models.event_import_file') %></th>
13
13
  <th><%= t('activerecord.models.event') %></th>
@@ -1,5 +1,5 @@
1
1
  <%= simple_form_for(@event, :validate => true) do |f| -%>
2
- <%= f.error_notification %>
2
+ <%= f.error_messages %>
3
3
 
4
4
  <div class="field">
5
5
  <%= f.label t('activerecord.models.event_category') -%><br />
@@ -32,7 +32,7 @@
32
32
  <%- end -%>
33
33
  </p>
34
34
 
35
- <table class="index">
35
+ <table class="table table-striped index">
36
36
  <tr>
37
37
  <th><%= t('activerecord.models.library') -%></th>
38
38
  <th><%= t('activerecord.attributes.event.name') -%></th>
@@ -20,7 +20,7 @@
20
20
  <%- if @event.all_day -%>
21
21
  <p>
22
22
  <strong><%= t('activerecord.attributes.event.all_day') -%>:</strong>
23
- <%= l(@event.start_at, :format => :only_date) -%>
23
+ <%= l(@event.start_at, :formats => :only_date) -%>
24
24
  </p>
25
25
  <%- else -%>
26
26
  <p>
@@ -20,7 +20,7 @@
20
20
  <%- if @event.all_day -%>
21
21
  <p>
22
22
  <strong><%= t('activerecord.attributes.event.all_day') -%>:</strong>
23
- <%= l(@event.start_at, :format => :only_date) -%>
23
+ <%= l(@event.start_at, :formats => :only_date) -%>
24
24
  </p>
25
25
  <%- else -%>
26
26
  <p>
@@ -2,7 +2,7 @@
2
2
  <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.participate')) -%></h1>
3
3
  <div id="content_list">
4
4
 
5
- <table class="index">
5
+ <table class="table table-striped index">
6
6
  <tr>
7
7
  <th><%= t('activerecord.models.patron') -%></th>
8
8
  <th><%= t('activerecord.models.event') -%></th>
@@ -1,3 +1,3 @@
1
1
  module EnjuEvent
2
- VERSION = "0.1.12"
2
+ VERSION = "0.1.13"
3
3
  end
@@ -4,6 +4,10 @@ describe CalendarController do
4
4
  fixtures :all
5
5
 
6
6
  describe "GET index", :solr => true do
7
+ before do
8
+ Event.reindex
9
+ end
10
+
7
11
  describe "When logged in as Administrator" do
8
12
  login_admin
9
13
 
@@ -4,6 +4,10 @@ describe EventsController do
4
4
  fixtures :all
5
5
 
6
6
  describe "GET index", :solr => true do
7
+ before do
8
+ Event.reindex
9
+ end
10
+
7
11
  before(:each) do
8
12
  FactoryGirl.create(:event)
9
13
  end
Binary file
@@ -0,0 +1,4 @@
1
+ ����idtype
2
+ class_name library_id_i created_at_d updated_at_d
3
+ start_at_dend_at_d name_text note_textname_s library_s
4
+ position_idisplay_name_text address_text
@@ -0,0 +1 @@
1
+ NRM�xxvx|u||v||ut�u��||||||||||||||y||||||||||�|
@@ -0,0 +1,4 @@
1
+ ����idtype
2
+ class_namename_s library_s
3
+ position_i name_text created_at_d updated_at_ddisplay_name_text address_text library_id_i
4
+ start_at_dend_at_d
@@ -0,0 +1 @@
1
+ NRM�v|||y||�|
@@ -0,0 +1,4 @@
1
+ ����idtype
2
+ class_namename_s library_s
3
+ position_i name_text created_at_d updated_at_ddisplay_name_text address_text library_id_i
4
+ start_at_dend_at_d
@@ -0,0 +1 @@
1
+ NRM�v|||y||�|
@@ -38,7 +38,7 @@ RSpec.configure do |config|
38
38
  config.before :each, :solr => true do
39
39
  Sunspot::Rails::Tester.start_original_sunspot_session
40
40
  Sunspot.session = $original_sunspot_session
41
- #Sunspot.remove_all!
41
+ Sunspot.remove_all!
42
42
  end
43
43
  end
44
44
 
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.1.12
4
+ version: 0.1.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-25 00:00:00.000000000 Z
12
+ date: 2012-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -506,16 +506,34 @@ files:
506
506
  - spec/dummy/solr/conf/spellings.txt
507
507
  - spec/dummy/solr/conf/stopwords.txt
508
508
  - spec/dummy/solr/conf/synonyms.txt
509
- - spec/dummy/solr/data/test/index/_2s.fdt
510
- - spec/dummy/solr/data/test/index/_2s.fdx
511
- - spec/dummy/solr/data/test/index/_2s.fnm
512
- - spec/dummy/solr/data/test/index/_2s.frq
513
- - spec/dummy/solr/data/test/index/_2s.nrm
514
- - spec/dummy/solr/data/test/index/_2s.prx
515
- - spec/dummy/solr/data/test/index/_2s.tii
516
- - spec/dummy/solr/data/test/index/_2s.tis
509
+ - spec/dummy/solr/data/test/index/_5l.fdt
510
+ - spec/dummy/solr/data/test/index/_5l.fdx
511
+ - spec/dummy/solr/data/test/index/_5l.fnm
512
+ - spec/dummy/solr/data/test/index/_5l.frq
513
+ - spec/dummy/solr/data/test/index/_5l.nrm
514
+ - spec/dummy/solr/data/test/index/_5l.prx
515
+ - spec/dummy/solr/data/test/index/_5l.tii
516
+ - spec/dummy/solr/data/test/index/_5l.tis
517
+ - spec/dummy/solr/data/test/index/_5l_1.del
518
+ - spec/dummy/solr/data/test/index/_5m.fdt
519
+ - spec/dummy/solr/data/test/index/_5m.fdx
520
+ - spec/dummy/solr/data/test/index/_5m.fnm
521
+ - spec/dummy/solr/data/test/index/_5m.frq
522
+ - spec/dummy/solr/data/test/index/_5m.nrm
523
+ - spec/dummy/solr/data/test/index/_5m.prx
524
+ - spec/dummy/solr/data/test/index/_5m.tii
525
+ - spec/dummy/solr/data/test/index/_5m.tis
526
+ - spec/dummy/solr/data/test/index/_5m_1.del
527
+ - spec/dummy/solr/data/test/index/_5n.fdt
528
+ - spec/dummy/solr/data/test/index/_5n.fdx
529
+ - spec/dummy/solr/data/test/index/_5n.fnm
530
+ - spec/dummy/solr/data/test/index/_5n.frq
531
+ - spec/dummy/solr/data/test/index/_5n.nrm
532
+ - spec/dummy/solr/data/test/index/_5n.prx
533
+ - spec/dummy/solr/data/test/index/_5n.tii
534
+ - spec/dummy/solr/data/test/index/_5n.tis
517
535
  - spec/dummy/solr/data/test/index/segments.gen
518
- - spec/dummy/solr/data/test/index/segments_2k
536
+ - spec/dummy/solr/data/test/index/segments_6l
519
537
  - spec/dummy/solr/data/test/spellchecker/segments.gen
520
538
  - spec/dummy/solr/data/test/spellchecker/segments_1
521
539
  - spec/factories/country.rb
@@ -729,16 +747,34 @@ test_files:
729
747
  - spec/dummy/solr/conf/spellings.txt
730
748
  - spec/dummy/solr/conf/stopwords.txt
731
749
  - spec/dummy/solr/conf/synonyms.txt
732
- - spec/dummy/solr/data/test/index/_2s.fdt
733
- - spec/dummy/solr/data/test/index/_2s.fdx
734
- - spec/dummy/solr/data/test/index/_2s.fnm
735
- - spec/dummy/solr/data/test/index/_2s.frq
736
- - spec/dummy/solr/data/test/index/_2s.nrm
737
- - spec/dummy/solr/data/test/index/_2s.prx
738
- - spec/dummy/solr/data/test/index/_2s.tii
739
- - spec/dummy/solr/data/test/index/_2s.tis
750
+ - spec/dummy/solr/data/test/index/_5l.fdt
751
+ - spec/dummy/solr/data/test/index/_5l.fdx
752
+ - spec/dummy/solr/data/test/index/_5l.fnm
753
+ - spec/dummy/solr/data/test/index/_5l.frq
754
+ - spec/dummy/solr/data/test/index/_5l.nrm
755
+ - spec/dummy/solr/data/test/index/_5l.prx
756
+ - spec/dummy/solr/data/test/index/_5l.tii
757
+ - spec/dummy/solr/data/test/index/_5l.tis
758
+ - spec/dummy/solr/data/test/index/_5l_1.del
759
+ - spec/dummy/solr/data/test/index/_5m.fdt
760
+ - spec/dummy/solr/data/test/index/_5m.fdx
761
+ - spec/dummy/solr/data/test/index/_5m.fnm
762
+ - spec/dummy/solr/data/test/index/_5m.frq
763
+ - spec/dummy/solr/data/test/index/_5m.nrm
764
+ - spec/dummy/solr/data/test/index/_5m.prx
765
+ - spec/dummy/solr/data/test/index/_5m.tii
766
+ - spec/dummy/solr/data/test/index/_5m.tis
767
+ - spec/dummy/solr/data/test/index/_5m_1.del
768
+ - spec/dummy/solr/data/test/index/_5n.fdt
769
+ - spec/dummy/solr/data/test/index/_5n.fdx
770
+ - spec/dummy/solr/data/test/index/_5n.fnm
771
+ - spec/dummy/solr/data/test/index/_5n.frq
772
+ - spec/dummy/solr/data/test/index/_5n.nrm
773
+ - spec/dummy/solr/data/test/index/_5n.prx
774
+ - spec/dummy/solr/data/test/index/_5n.tii
775
+ - spec/dummy/solr/data/test/index/_5n.tis
740
776
  - spec/dummy/solr/data/test/index/segments.gen
741
- - spec/dummy/solr/data/test/index/segments_2k
777
+ - spec/dummy/solr/data/test/index/segments_6l
742
778
  - spec/dummy/solr/data/test/spellchecker/segments.gen
743
779
  - spec/dummy/solr/data/test/spellchecker/segments_1
744
780
  - spec/factories/country.rb
@@ -1,4 +0,0 @@
1
- ����idtype
2
- class_name created_at_d updated_at_drequired_role_id_ipatron_type_id_i name_text
3
- position_idisplay_name_text address_text library_id_i
4
- start_at_dend_at_d note_text
@@ -1 +0,0 @@
1
- NRM�xxvx|u|||||||||||||||||||||||||�|ut�u��|||||