enju_flower 0.1.0.pre9 → 0.1.0.pre10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/enju_flower/version.rb +1 -1
  3. data/spec/dummy/app/controllers/application_controller.rb +1 -174
  4. data/spec/dummy/config/application.rb +1 -4
  5. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  6. data/spec/dummy/db/development.sqlite3 +0 -0
  7. data/spec/dummy/db/schema.rb +2 -1
  8. data/spec/dummy/db/test.sqlite3 +0 -0
  9. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  10. data/spec/dummy/solr/data/test/index/{segments_1in → segments_1wn} +0 -0
  11. metadata +56 -91
  12. data/app/controllers/resources_controller.rb +0 -5
  13. data/spec/dummy/app/models/role.rb +0 -46
  14. data/spec/dummy/app/models/user_group.rb +0 -40
  15. data/spec/dummy/app/models/user_has_role.rb +0 -5
  16. data/spec/dummy/lib/plugins/ext/event-calendar.rb +0 -38
  17. data/spec/dummy/lib/plugins/ext/sunspot/abstract_search.rb +0 -12
  18. data/spec/dummy/lib/plugins/ext/sunspot/dismax.rb +0 -41
  19. data/spec/dummy/lib/plugins/ext/sunspot/start_record.rb +0 -55
  20. data/spec/dummy/lib/plugins/ext/sunspot.rb +0 -3
  21. data/spec/dummy/lib/plugins/ext.rb +0 -1
  22. data/spec/dummy/lib/plugins.rb +0 -2
  23. /data/spec/dummy/solr/data/test/index/{_149.fdt → _1e9.fdt} +0 -0
  24. /data/spec/dummy/solr/data/test/index/{_149.fdx → _1e9.fdx} +0 -0
  25. /data/spec/dummy/solr/data/test/index/{_149.fnm → _1e9.fnm} +0 -0
  26. /data/spec/dummy/solr/data/test/index/{_149.frq → _1e9.frq} +0 -0
  27. /data/spec/dummy/solr/data/test/index/{_149.nrm → _1e9.nrm} +0 -0
  28. /data/spec/dummy/solr/data/test/index/{_149.prx → _1e9.prx} +0 -0
  29. /data/spec/dummy/solr/data/test/index/{_149.tii → _1e9.tii} +0 -0
  30. /data/spec/dummy/solr/data/test/index/{_149.tis → _1e9.tis} +0 -0
  31. /data/spec/dummy/solr/data/test/index/{_14a.fdt → _1ea.fdt} +0 -0
  32. /data/spec/dummy/solr/data/test/index/{_14a.fdx → _1ea.fdx} +0 -0
  33. /data/spec/dummy/solr/data/test/index/{_14a.fnm → _1ea.fnm} +0 -0
  34. /data/spec/dummy/solr/data/test/index/{_14a.frq → _1ea.frq} +0 -0
  35. /data/spec/dummy/solr/data/test/index/{_14a.nrm → _1ea.nrm} +0 -0
  36. /data/spec/dummy/solr/data/test/index/{_14a.prx → _1ea.prx} +0 -0
  37. /data/spec/dummy/solr/data/test/index/{_14a.tii → _1ea.tii} +0 -0
  38. /data/spec/dummy/solr/data/test/index/{_14a.tis → _1ea.tis} +0 -0
  39. /data/spec/dummy/solr/data/test/index/{_14b.fdt → _1eb.fdt} +0 -0
  40. /data/spec/dummy/solr/data/test/index/{_14b.fdx → _1eb.fdx} +0 -0
  41. /data/spec/dummy/solr/data/test/index/{_14b.fnm → _1eb.fnm} +0 -0
  42. /data/spec/dummy/solr/data/test/index/{_14b.frq → _1eb.frq} +0 -0
  43. /data/spec/dummy/solr/data/test/index/{_14b.nrm → _1eb.nrm} +0 -0
  44. /data/spec/dummy/solr/data/test/index/{_14b.prx → _1eb.prx} +0 -0
  45. /data/spec/dummy/solr/data/test/index/{_14b.tii → _1eb.tii} +0 -0
  46. /data/spec/dummy/solr/data/test/index/{_14b.tis → _1eb.tis} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d219740c049384714855ab42e2fbd9988e6c7ce1
4
- data.tar.gz: 9fd83af9454ec0429b78431cd4d57889fc25bf2a
3
+ metadata.gz: 162028debbfcc8d2d8de2bbe434442b7219a65fc
4
+ data.tar.gz: fd3504214d01e857abe3ae455fdbdc0708c03f87
5
5
  SHA512:
6
- metadata.gz: 189ef2b867373a42ac3f879ffced445ed668853be18a3fc0518f3317f4b4589681bf5c4644f45392e8909c13c808d156ef0a940fc4550125390fe845cf4d2031
7
- data.tar.gz: b7a8b02e78c71d7353b98bcb21381b472e4b3d826a5325e2a44f26294015cf53cc667e326804c42f87e083510484dc1178c847cec35b8f54ce690c0bb5197e80
6
+ metadata.gz: 0b50413fb80b1fbded9afe2e46bff93db2687050eaf07160ffc04161f8bc8fef7499c4c5d3913e09444167322bd55e8589a5919baedb14cdeccf183ea6598622
7
+ data.tar.gz: a21a62eac46550f7cbb458ae7acd5ca8c9892e271504308e5e01fa8ad3b5ce57b811480030d4173081e41dabb6d4791e3e26315a20208fe0dc2a2c53c4abcb7e
@@ -1,3 +1,3 @@
1
1
  module EnjuFlower
2
- VERSION = "0.1.0.pre9"
2
+ VERSION = "0.1.0.pre10"
3
3
  end
@@ -1,180 +1,7 @@
1
1
  class ApplicationController < ActionController::Base
2
2
  protect_from_forgery
3
3
 
4
- rescue_from CanCan::AccessDenied, :with => :render_403
5
- rescue_from ActiveRecord::RecordNotFound, :with => :render_404
6
-
7
- before_filter :get_library_group, :set_locale, :set_available_languages
8
-
4
+ enju_leaf
9
5
  enju_biblio
10
6
  enju_library
11
-
12
- private
13
- def render_403
14
- return if performed?
15
- if user_signed_in?
16
- respond_to do |format|
17
- format.html {render :template => 'page/403', :status => 403}
18
- format.xml {render :template => 'page/403', :status => 403}
19
- format.json
20
- end
21
- else
22
- respond_to do |format|
23
- format.html {redirect_to new_user_session_url}
24
- format.xml {render :template => 'page/403', :status => 403}
25
- format.json
26
- end
27
- end
28
- end
29
-
30
- def render_404
31
- return if performed?
32
- respond_to do |format|
33
- format.html {render :template => 'page/404', :status => 404}
34
- format.mobile {render :template => 'page/404', :status => 404}
35
- format.xml {render :template => 'page/404', :status => 404}
36
- format.json
37
- end
38
- end
39
-
40
- def access_denied
41
- raise CanCan::AccessDenied
42
- end
43
-
44
- def store_location
45
- if request.get? and request.format.try(:html?) and !request.xhr?
46
- session[:user_return_to] = request.fullpath
47
- end
48
- end
49
-
50
- def solr_commit
51
- Sunspot.commit
52
- end
53
-
54
- def move_position(resource, direction, redirect = true)
55
- if ['higher', 'lower'].include?(direction)
56
- resource.send("move_#{direction}")
57
- if redirect
58
- redirect_to url_for(:controller => resource.class.to_s.pluralize.underscore)
59
- return
60
- end
61
- end
62
- end
63
-
64
- def set_role_query(user, search)
65
- role = user.try(:role) || Role.default_role
66
- search.build do
67
- with(:required_role_id).less_than_or_equal_to role.id
68
- end
69
- end
70
-
71
- def get_version
72
- @version = params[:version_id].to_i if params[:version_id]
73
- @version = nil if @version == 0
74
- end
75
-
76
- def convert_charset
77
- case params[:format]
78
- when 'csv'
79
- return unless Setting.csv_charset_conversion
80
- # TODO: 他の言語
81
- if @locale.to_sym == :ja
82
- headers["Content-Type"] = "text/csv; charset=Shift_JIS"
83
- response.body = NKF::nkf('-Ws', response.body)
84
- end
85
- when 'xml'
86
- if @locale.to_sym == :ja
87
- headers["Content-Type"] = "application/xml; charset=Shift_JIS"
88
- response.body = NKF::nkf('-Ws', response.body)
89
- end
90
- end
91
- end
92
-
93
- def make_internal_query(search)
94
- # 内部的なクエリ
95
- set_role_query(current_user, search)
96
-
97
- unless params[:mode] == "add"
98
- expression = @expression
99
- patron = @patron
100
- manifestation = @manifestation
101
- reservable = @reservable
102
- carrier_type = params[:carrier_type]
103
- library = params[:library]
104
- language = params[:language]
105
- if defined?(EnjuSubject)
106
- subject = params[:subject]
107
- subject_by_term = Subject.where(:term => params[:subject]).first
108
- @subject_by_term = subject_by_term
109
- end
110
-
111
- search.build do
112
- with(:publisher_ids).equal_to patron.id if patron
113
- with(:original_manifestation_ids).equal_to manifestation.id if manifestation
114
- with(:reservable).equal_to reservable unless reservable.nil?
115
- unless carrier_type.blank?
116
- with(:carrier_type).equal_to carrier_type
117
- end
118
- unless library.blank?
119
- library_list = library.split.uniq
120
- library_list.each do |library|
121
- with(:library).equal_to library
122
- end
123
- end
124
- unless language.blank?
125
- language_list = language.split.uniq
126
- language_list.each do |language|
127
- with(:language).equal_to language
128
- end
129
- end
130
- if defined?(EnjuSubject)
131
- unless subject.blank?
132
- with(:subject).equal_to subject_by_term.term
133
- end
134
- end
135
- end
136
- end
137
- return search
138
- end
139
-
140
- def solr_commit
141
- Sunspot.commit
142
- end
143
-
144
- def clear_search_sessions
145
- session[:query] = nil
146
- session[:params] = nil
147
- session[:search_params] = nil
148
- session[:manifestation_ids] = nil
149
- end
150
-
151
- def set_locale
152
- if params[:locale]
153
- unless I18n.available_locales.include?(params[:locale].to_s.intern)
154
- raise InvalidLocaleError
155
- end
156
- end
157
- if user_signed_in?
158
- locale = params[:locale] || session[:locale] || current_user.locale.try(:to_sym)
159
- else
160
- locale = params[:locale] || session[:locale]
161
- end
162
- if locale
163
- I18n.locale = @locale = session[:locale] = locale.to_sym
164
- else
165
- I18n.locale = @locale = session[:locale] = I18n.default_locale
166
- end
167
- rescue InvalidLocaleError
168
- @locale = I18n.default_locale
169
- end
170
-
171
- def set_available_languages
172
- if Rails.env == 'production'
173
- @available_languages = Rails.cache.fetch('available_languages'){
174
- Language.where(:iso_639_1 => I18n.available_locales.map{|l| l.to_s}).select([:id, :iso_639_1, :name, :native_name, :display_name, :position]).all
175
- }
176
- else
177
- @available_languages = Language.where(:iso_639_1 => I18n.available_locales.map{|l| l.to_s})
178
- end
179
- end
180
7
  end
@@ -57,8 +57,5 @@ module Dummy
57
57
  end
58
58
  end
59
59
 
60
- require 'enju_biblio'
61
- require 'enju_library'
60
+ require 'enju_leaf'
62
61
  require 'enju_bookmark'
63
- require 'mobylette'
64
- require 'plugins'
@@ -3,8 +3,3 @@
3
3
  # Add new mime types for use in respond_to blocks:
4
4
  # Mime::Type.register "text/richtext", :rtf
5
5
  # Mime::Type.register_alias "text/html", :iphone
6
- Mime::Type.register "application/octet-stream", :download
7
- Mime::Type.register "application/rdf+xml", :rdf
8
- Mime::Type.register "application/xml", :sru
9
- Mime::Type.register "application/xml", :mods
10
- Mime::Type.register_alias "text/xml", :oai
Binary file
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20130506175834) do
14
+ ActiveRecord::Schema.define(:version => 20130509185724) do
15
15
 
16
16
  create_table "baskets", :force => true do |t|
17
17
  t.integer "user_id"
@@ -654,6 +654,7 @@ ActiveRecord::Schema.define(:version => 20130506175834) do
654
654
  t.boolean "fulltext_content"
655
655
  t.string "doi"
656
656
  t.boolean "periodical"
657
+ t.text "statement_of_responsibility"
657
658
  end
658
659
 
659
660
  add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_flower
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre9
4
+ version: 0.1.0.pre10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-14 00:00:00.000000000 Z
11
+ date: 2013-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -109,33 +109,19 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: 2.0.0
111
111
  - !ruby/object:Gem::Dependency
112
- name: enju_biblio
112
+ name: enju_leaf
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ~>
116
116
  - !ruby/object:Gem::Version
117
- version: 0.1.0.pre38
117
+ version: 1.1.0.rc3
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ~>
123
123
  - !ruby/object:Gem::Version
124
- version: 0.1.0.pre38
125
- - !ruby/object:Gem::Dependency
126
- name: enju_library
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ~>
130
- - !ruby/object:Gem::Version
131
- version: 0.1.0.pre22
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ~>
137
- - !ruby/object:Gem::Version
138
- version: 0.1.0.pre22
124
+ version: 1.1.0.rc3
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: enju_bookmark
141
127
  requirement: !ruby/object:Gem::Requirement
@@ -185,7 +171,6 @@ executables: []
185
171
  extensions: []
186
172
  extra_rdoc_files: []
187
173
  files:
188
- - app/controllers/resources_controller.rb
189
174
  - app/helpers/manifestations_helper.rb
190
175
  - app/views/layouts/manifestations.html.erb
191
176
  - app/views/layouts/manifestations.mobile.erb
@@ -279,11 +264,8 @@ files:
279
264
  - spec/dummy/app/mailers/notifier.rb
280
265
  - spec/dummy/app/models/ability.rb
281
266
  - spec/dummy/app/models/local_patron.rb
282
- - spec/dummy/app/models/role.rb
283
267
  - spec/dummy/app/models/setting.rb
284
268
  - spec/dummy/app/models/user.rb
285
- - spec/dummy/app/models/user_group.rb
286
- - spec/dummy/app/models/user_has_role.rb
287
269
  - spec/dummy/app/views/layouts/application.html.erb
288
270
  - spec/dummy/app/views/page/403.html.erb
289
271
  - spec/dummy/app/views/page/403.mobile.erb
@@ -470,13 +452,6 @@ files:
470
452
  - spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb
471
453
  - spec/dummy/db/schema.rb
472
454
  - spec/dummy/db/test.sqlite3
473
- - spec/dummy/lib/plugins/ext/event-calendar.rb
474
- - spec/dummy/lib/plugins/ext/sunspot/abstract_search.rb
475
- - spec/dummy/lib/plugins/ext/sunspot/dismax.rb
476
- - spec/dummy/lib/plugins/ext/sunspot/start_record.rb
477
- - spec/dummy/lib/plugins/ext/sunspot.rb
478
- - spec/dummy/lib/plugins/ext.rb
479
- - spec/dummy/lib/plugins.rb
480
455
  - spec/dummy/public/404.html
481
456
  - spec/dummy/public/422.html
482
457
  - spec/dummy/public/500.html
@@ -494,32 +469,32 @@ files:
494
469
  - spec/dummy/solr/conf/spellings.txt
495
470
  - spec/dummy/solr/conf/stopwords.txt
496
471
  - spec/dummy/solr/conf/synonyms.txt
497
- - spec/dummy/solr/data/test/index/_149.fdt
498
- - spec/dummy/solr/data/test/index/_149.fdx
499
- - spec/dummy/solr/data/test/index/_149.fnm
500
- - spec/dummy/solr/data/test/index/_149.frq
501
- - spec/dummy/solr/data/test/index/_149.nrm
502
- - spec/dummy/solr/data/test/index/_149.prx
503
- - spec/dummy/solr/data/test/index/_149.tii
504
- - spec/dummy/solr/data/test/index/_149.tis
505
- - spec/dummy/solr/data/test/index/_14a.fdt
506
- - spec/dummy/solr/data/test/index/_14a.fdx
507
- - spec/dummy/solr/data/test/index/_14a.fnm
508
- - spec/dummy/solr/data/test/index/_14a.frq
509
- - spec/dummy/solr/data/test/index/_14a.nrm
510
- - spec/dummy/solr/data/test/index/_14a.prx
511
- - spec/dummy/solr/data/test/index/_14a.tii
512
- - spec/dummy/solr/data/test/index/_14a.tis
513
- - spec/dummy/solr/data/test/index/_14b.fdt
514
- - spec/dummy/solr/data/test/index/_14b.fdx
515
- - spec/dummy/solr/data/test/index/_14b.fnm
516
- - spec/dummy/solr/data/test/index/_14b.frq
517
- - spec/dummy/solr/data/test/index/_14b.nrm
518
- - spec/dummy/solr/data/test/index/_14b.prx
519
- - spec/dummy/solr/data/test/index/_14b.tii
520
- - spec/dummy/solr/data/test/index/_14b.tis
472
+ - spec/dummy/solr/data/test/index/_1e9.fdt
473
+ - spec/dummy/solr/data/test/index/_1e9.fdx
474
+ - spec/dummy/solr/data/test/index/_1e9.fnm
475
+ - spec/dummy/solr/data/test/index/_1e9.frq
476
+ - spec/dummy/solr/data/test/index/_1e9.nrm
477
+ - spec/dummy/solr/data/test/index/_1e9.prx
478
+ - spec/dummy/solr/data/test/index/_1e9.tii
479
+ - spec/dummy/solr/data/test/index/_1e9.tis
480
+ - spec/dummy/solr/data/test/index/_1ea.fdt
481
+ - spec/dummy/solr/data/test/index/_1ea.fdx
482
+ - spec/dummy/solr/data/test/index/_1ea.fnm
483
+ - spec/dummy/solr/data/test/index/_1ea.frq
484
+ - spec/dummy/solr/data/test/index/_1ea.nrm
485
+ - spec/dummy/solr/data/test/index/_1ea.prx
486
+ - spec/dummy/solr/data/test/index/_1ea.tii
487
+ - spec/dummy/solr/data/test/index/_1ea.tis
488
+ - spec/dummy/solr/data/test/index/_1eb.fdt
489
+ - spec/dummy/solr/data/test/index/_1eb.fdx
490
+ - spec/dummy/solr/data/test/index/_1eb.fnm
491
+ - spec/dummy/solr/data/test/index/_1eb.frq
492
+ - spec/dummy/solr/data/test/index/_1eb.nrm
493
+ - spec/dummy/solr/data/test/index/_1eb.prx
494
+ - spec/dummy/solr/data/test/index/_1eb.tii
495
+ - spec/dummy/solr/data/test/index/_1eb.tis
521
496
  - spec/dummy/solr/data/test/index/segments.gen
522
- - spec/dummy/solr/data/test/index/segments_1in
497
+ - spec/dummy/solr/data/test/index/segments_1wn
523
498
  - spec/dummy/solr/data/test/spellchecker/segments.gen
524
499
  - spec/dummy/solr/data/test/spellchecker/segments_1
525
500
  - spec/dummy/tmp/cache/4F7/F90/default_role
@@ -625,7 +600,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
625
600
  version: 1.3.1
626
601
  requirements: []
627
602
  rubyforge_project:
628
- rubygems_version: 2.0.3
603
+ rubygems_version: 2.0.2
629
604
  signing_key:
630
605
  specification_version: 4
631
606
  summary: Next-L Enju Flower
@@ -638,11 +613,8 @@ test_files:
638
613
  - spec/dummy/app/mailers/notifier.rb
639
614
  - spec/dummy/app/models/ability.rb
640
615
  - spec/dummy/app/models/local_patron.rb
641
- - spec/dummy/app/models/role.rb
642
616
  - spec/dummy/app/models/setting.rb
643
617
  - spec/dummy/app/models/user.rb
644
- - spec/dummy/app/models/user_group.rb
645
- - spec/dummy/app/models/user_has_role.rb
646
618
  - spec/dummy/app/views/layouts/application.html.erb
647
619
  - spec/dummy/app/views/page/403.html.erb
648
620
  - spec/dummy/app/views/page/403.mobile.erb
@@ -829,13 +801,6 @@ test_files:
829
801
  - spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb
830
802
  - spec/dummy/db/schema.rb
831
803
  - spec/dummy/db/test.sqlite3
832
- - spec/dummy/lib/plugins/ext/event-calendar.rb
833
- - spec/dummy/lib/plugins/ext/sunspot/abstract_search.rb
834
- - spec/dummy/lib/plugins/ext/sunspot/dismax.rb
835
- - spec/dummy/lib/plugins/ext/sunspot/start_record.rb
836
- - spec/dummy/lib/plugins/ext/sunspot.rb
837
- - spec/dummy/lib/plugins/ext.rb
838
- - spec/dummy/lib/plugins.rb
839
804
  - spec/dummy/public/404.html
840
805
  - spec/dummy/public/422.html
841
806
  - spec/dummy/public/500.html
@@ -853,32 +818,32 @@ test_files:
853
818
  - spec/dummy/solr/conf/spellings.txt
854
819
  - spec/dummy/solr/conf/stopwords.txt
855
820
  - spec/dummy/solr/conf/synonyms.txt
856
- - spec/dummy/solr/data/test/index/_149.fdt
857
- - spec/dummy/solr/data/test/index/_149.fdx
858
- - spec/dummy/solr/data/test/index/_149.fnm
859
- - spec/dummy/solr/data/test/index/_149.frq
860
- - spec/dummy/solr/data/test/index/_149.nrm
861
- - spec/dummy/solr/data/test/index/_149.prx
862
- - spec/dummy/solr/data/test/index/_149.tii
863
- - spec/dummy/solr/data/test/index/_149.tis
864
- - spec/dummy/solr/data/test/index/_14a.fdt
865
- - spec/dummy/solr/data/test/index/_14a.fdx
866
- - spec/dummy/solr/data/test/index/_14a.fnm
867
- - spec/dummy/solr/data/test/index/_14a.frq
868
- - spec/dummy/solr/data/test/index/_14a.nrm
869
- - spec/dummy/solr/data/test/index/_14a.prx
870
- - spec/dummy/solr/data/test/index/_14a.tii
871
- - spec/dummy/solr/data/test/index/_14a.tis
872
- - spec/dummy/solr/data/test/index/_14b.fdt
873
- - spec/dummy/solr/data/test/index/_14b.fdx
874
- - spec/dummy/solr/data/test/index/_14b.fnm
875
- - spec/dummy/solr/data/test/index/_14b.frq
876
- - spec/dummy/solr/data/test/index/_14b.nrm
877
- - spec/dummy/solr/data/test/index/_14b.prx
878
- - spec/dummy/solr/data/test/index/_14b.tii
879
- - spec/dummy/solr/data/test/index/_14b.tis
821
+ - spec/dummy/solr/data/test/index/_1e9.fdt
822
+ - spec/dummy/solr/data/test/index/_1e9.fdx
823
+ - spec/dummy/solr/data/test/index/_1e9.fnm
824
+ - spec/dummy/solr/data/test/index/_1e9.frq
825
+ - spec/dummy/solr/data/test/index/_1e9.nrm
826
+ - spec/dummy/solr/data/test/index/_1e9.prx
827
+ - spec/dummy/solr/data/test/index/_1e9.tii
828
+ - spec/dummy/solr/data/test/index/_1e9.tis
829
+ - spec/dummy/solr/data/test/index/_1ea.fdt
830
+ - spec/dummy/solr/data/test/index/_1ea.fdx
831
+ - spec/dummy/solr/data/test/index/_1ea.fnm
832
+ - spec/dummy/solr/data/test/index/_1ea.frq
833
+ - spec/dummy/solr/data/test/index/_1ea.nrm
834
+ - spec/dummy/solr/data/test/index/_1ea.prx
835
+ - spec/dummy/solr/data/test/index/_1ea.tii
836
+ - spec/dummy/solr/data/test/index/_1ea.tis
837
+ - spec/dummy/solr/data/test/index/_1eb.fdt
838
+ - spec/dummy/solr/data/test/index/_1eb.fdx
839
+ - spec/dummy/solr/data/test/index/_1eb.fnm
840
+ - spec/dummy/solr/data/test/index/_1eb.frq
841
+ - spec/dummy/solr/data/test/index/_1eb.nrm
842
+ - spec/dummy/solr/data/test/index/_1eb.prx
843
+ - spec/dummy/solr/data/test/index/_1eb.tii
844
+ - spec/dummy/solr/data/test/index/_1eb.tis
880
845
  - spec/dummy/solr/data/test/index/segments.gen
881
- - spec/dummy/solr/data/test/index/segments_1in
846
+ - spec/dummy/solr/data/test/index/segments_1wn
882
847
  - spec/dummy/solr/data/test/spellchecker/segments.gen
883
848
  - spec/dummy/solr/data/test/spellchecker/segments_1
884
849
  - spec/dummy/tmp/cache/4F7/F90/default_role
@@ -1,5 +0,0 @@
1
- class ResourcesController < ApplicationController
2
- def index
3
- @resources = Manifestation.page(params[:page])
4
- end
5
- end
@@ -1,46 +0,0 @@
1
- class Role < ActiveRecord::Base
2
- include MasterModel
3
- default_scope :order => "roles.position"
4
- has_many :user_has_roles
5
- has_many :users, :through => :user_has_roles
6
- after_save :clear_all_cache
7
- after_destroy :clear_all_cache
8
-
9
- extend FriendlyId
10
- friendly_id :name
11
-
12
- def localized_name
13
- display_name.localize
14
- end
15
-
16
- def self.all_cache
17
- if Rails.env == 'production'
18
- Rails.cache.fetch('role_all'){Role.select(:name).all}
19
- else
20
- Role.select(:name)
21
- end
22
- end
23
-
24
- def clear_all_cache
25
- Rails.cache.delete('role_all')
26
- end
27
-
28
- def self.default_role
29
- Rails.cache.fetch('default_role'){Role.find('Guest')}
30
- end
31
- end
32
-
33
- # == Schema Information
34
- #
35
- # Table name: roles
36
- #
37
- # id :integer not null, primary key
38
- # name :string(255) not null
39
- # display_name :string(255)
40
- # note :text
41
- # created_at :datetime
42
- # updated_at :datetime
43
- # score :integer default(0), not null
44
- # position :integer
45
- #
46
-
@@ -1,40 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- class UserGroup < ActiveRecord::Base
3
- attr_accessible :name, :display_name, :note, :valid_period_for_new_user,
4
- :expired_at, :number_of_day_to_notify_overdue,
5
- :number_of_day_to_notify_overdue,
6
- :number_of_day_to_notify_due_date,
7
- :number_of_time_to_notify_overdue
8
-
9
- include MasterModel
10
- default_scope :order => "user_groups.position"
11
- has_many :users
12
-
13
- validates_numericality_of :valid_period_for_new_user,
14
- :greater_than_or_equal_to => 0,
15
- :allow_blank => true
16
-
17
- def self.per_page
18
- 10
19
- end
20
- end
21
-
22
- # == Schema Information
23
- #
24
- # Table name: user_groups
25
- #
26
- # id :integer not null, primary key
27
- # name :string(255)
28
- # display_name :text
29
- # note :text
30
- # position :integer
31
- # created_at :datetime
32
- # updated_at :datetime
33
- # deleted_at :datetime
34
- # valid_period_for_new_user :integer default(0), not null
35
- # expired_at :datetime
36
- # number_of_day_to_notify_overdue :integer default(1), not null
37
- # number_of_day_to_notify_due_date :integer default(7), not null
38
- # number_of_time_to_notify_overdue :integer default(3), not null
39
- #
40
-
@@ -1,5 +0,0 @@
1
- class UserHasRole < ActiveRecord::Base
2
- attr_accessible :user_id, :role_id
3
- belongs_to :user
4
- belongs_to :role
5
- end
@@ -1,38 +0,0 @@
1
- module EventCalendar
2
- module CalendarHelper
3
- private
4
-
5
- # calculate the height of each row
6
- # by default, it will be the height option minus the day names height,
7
- # divided by the total number of calendar rows
8
- # this gets tricky, however, if there are too many event rows to fit into the row's height
9
- # then we need to add additional height
10
- def cal_row_heights(options)
11
- # number of rows is the number of days in the event strips divided by 7
12
- num_cal_rows = (options[:event_strips].first.size / 7).to_i
13
- # the row will be at least this big
14
- min_height = ((options[:height] - options[:day_names_height]) / num_cal_rows).to_i
15
- row_heights = []
16
- num_event_rows = 0
17
- # for every day in the event strip...
18
- 1.upto(options[:event_strips].first.size+1) do |index|
19
- num_events = 0
20
- # get the largest event strip that has an event on this day
21
- options[:event_strips].each_with_index do |strip, strip_num|
22
- num_events = strip_num + 1 unless strip[index-1].blank?
23
- end
24
- # get the most event rows for this week
25
- num_event_rows = [num_event_rows, num_events].max
26
- # if we reached the end of the week, calculate this row's height
27
- if index % 7 == 0
28
- total_event_height = options[:event_height] + options[:event_margin]
29
- calc_row_height = (num_event_rows * total_event_height) + options[:day_nums_height] + options[:event_margin]
30
- row_height = [min_height, calc_row_height].max
31
- row_heights << row_height
32
- num_event_rows = 0
33
- end
34
- end
35
- row_heights
36
- end
37
- end
38
- end
@@ -1,12 +0,0 @@
1
- module Sunspot
2
- module Search #:nodoc:
3
- class AbstractSearch
4
- def execute
5
- reset
6
- params = @query.to_params
7
- @solr_result = @connection.post "#{request_handler}", :data => params, :headers => {'Content-Type' => 'application/x-www-form-urlencoded; charset=UTF-8'}
8
- self
9
- end
10
- end
11
- end
12
- end
@@ -1,41 +0,0 @@
1
- module Sunspot
2
- module Query
3
- class Dismax
4
- def to_params
5
- params = { :q => @keywords }
6
- params[:fl] = '* score'
7
- params[:qf] = @fulltext_fields.values.map { |field| field.to_boosted_field }.join(' ')
8
- params[:defType] = 'edismax'
9
- if @phrase_fields
10
- params[:pf] = @phrase_fields.map { |field| field.to_boosted_field }.join(' ')
11
- end
12
- unless @boost_queries.empty?
13
- params[:bq] = @boost_queries.map do |boost_query|
14
- boost_query.to_boolean_phrase
15
- end
16
- end
17
- unless @boost_functions.empty?
18
- params[:bf] = @boost_functions.map do |boost_function|
19
- boost_function.to_s
20
- end
21
- end
22
- if @minimum_match
23
- params[:mm] = @minimum_match
24
- end
25
- if @phrase_slop
26
- params[:ps] = @phrase_slop
27
- end
28
- if @query_phrase_slop
29
- params[:qs] = @query_phrase_slop
30
- end
31
- if @tie
32
- params[:tie] = @tie
33
- end
34
- @highlights.each do |highlight|
35
- Sunspot::Util.deep_merge!(params, highlight.to_params)
36
- end
37
- params
38
- end
39
- end
40
- end
41
- end
@@ -1,55 +0,0 @@
1
- module Sunspot
2
- module Query
3
- class StartRecord #:nodoc:
4
- attr_reader :start_record, :maximum_record
5
-
6
- def initialize(start_record = nil, maximum_record = nil)
7
- self.start_record, self.maximum_record = start_record, maximum_record
8
- end
9
-
10
- def to_params
11
- { :start => start, :rows => rows }
12
- end
13
-
14
- def start_record=(start_record)
15
- @start_record = start_record.to_i - 1 if start_record
16
- end
17
-
18
- def maximum_record=(maximum_record)
19
- @maximum_record = maximum_record.to_i if maximum_record
20
- end
21
-
22
- private
23
-
24
- def start
25
- @start_record
26
- end
27
-
28
- def rows
29
- @maximum_record
30
- end
31
- end
32
-
33
- class CommonQuery
34
- def start_record(start, maximum)
35
- if @start_record
36
- @start_record.start = start
37
- @start_record.maximum = maximum
38
- else
39
- @components << @start_record = StartRecord.new(start, maximum)
40
- end
41
- end
42
- end
43
- end
44
-
45
- module DSL #:nodoc:
46
- class Query < FieldQuery
47
- def start_record(options = {})
48
- start = options.delete(:start)
49
- maximum = options.delete(:maximum)
50
- raise ArgumentError, "unknown argument #{options.keys.first.inspect} passed to paginate" unless options.empty?
51
- @query.start_record(start, maximum)
52
- end
53
- end
54
- end
55
- end
@@ -1,3 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), 'sunspot', 'dismax'))
2
- require File.expand_path(File.join(File.dirname(__FILE__), 'sunspot', 'start_record'))
3
- require File.expand_path(File.join(File.dirname(__FILE__), 'sunspot', 'abstract_search'))
@@ -1 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), 'ext', 'sunspot'))
@@ -1,2 +0,0 @@
1
- # http://railspress.matake.jp/extend-plugin-gem-library-in-rails-project
2
- require File.expand_path(File.join(File.dirname(__FILE__), 'plugins', 'ext'))