enju_message 0.1.9 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -2
- data/app/models/message.rb +1 -1
- data/app/views/checked_items/_checkouts.html.erb +1 -1
- data/app/views/checked_items/_list.html.erb +1 -1
- data/app/views/checkins/_list.html.erb +1 -1
- data/app/views/checkouts/_list.html.erb +1 -1
- data/app/views/checkouts/edit.html.erb +1 -1
- data/app/views/checkouts/show.html.erb +1 -1
- data/app/views/lending_policies/show.html.erb +1 -1
- data/app/views/message_requests/index.html.erb +1 -1
- data/app/views/message_templates/index.html.erb +1 -1
- data/app/views/messages/index.html.erb +1 -1
- data/app/views/notifier/message_notification.en.text.erb +1 -1
- data/app/views/notifier/message_notification.ja.text.erb +1 -1
- data/app/views/reserves/index.html.erb +1 -1
- data/app/views/reserves/show.html.erb +1 -1
- data/lib/enju_message/engine.rb +1 -2
- data/lib/enju_message/version.rb +1 -1
- data/spec/controllers/messages_controller_spec.rb +4 -0
- data/spec/dummy/app/mailers/notifier.rb +7 -5
- data/spec/dummy/app/models/user.rb +4 -0
- data/spec/dummy/config/initializers/resque_mailer.rb +1 -0
- data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +31 -10
- data/spec/dummy/db/schema.rb +14 -5
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/_f.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_f.fdx +0 -0
- data/spec/dummy/solr/data/test/index/{_0.fnm → _f.fnm} +1 -1
- data/spec/dummy/solr/data/test/index/{_0.frq → _f.frq} +0 -0
- data/spec/dummy/solr/data/test/index/{_0.nrm → _f.nrm} +0 -0
- data/spec/dummy/solr/data/test/index/{_0.prx → _f.prx} +0 -0
- data/spec/dummy/solr/data/test/index/{_0.tii → _f.tii} +0 -0
- data/spec/dummy/solr/data/test/index/_f.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_x +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- data/spec/factories/message.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +35 -49
- data/spec/dummy/solr/data/test/index/_0.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_0.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_0.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments_2 +0 -0
data/README.rdoc
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
= EnjuMessage
|
1
|
+
= EnjuMessage {<img src="https://secure.travis-ci.org/nabeta/enju_message.png?branch=master" alt="Build Status" />}[http://travis-ci.org/nabeta/enju_message]
|
2
2
|
|
3
|
-
This project rocks and uses MIT-LICENSE.
|
3
|
+
This project rocks and uses MIT-LICENSE.
|
data/app/models/message.rb
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
<%= render 'manifestations/holding', :manifestation => checkout.item.manifestation -%>
|
15
15
|
</td>
|
16
16
|
<td><%= link_to checkout.item.item_identifier, checkout.item -%></td>
|
17
|
-
<td><%= l(checkout.due_date, :
|
17
|
+
<td><%= l(checkout.due_date, :formats => :only_date) -%></td>
|
18
18
|
</tr>
|
19
19
|
<%- end -%>
|
20
20
|
</table>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<%= render 'manifestations/show_index', :manifestation => checked_item.item.manifestation -%>
|
27
27
|
</td>
|
28
28
|
<td><%= link_to checked_item.item.item_identifier, checked_item.item -%></td>
|
29
|
-
<td><%= l(checked_item.due_date, :
|
29
|
+
<td><%= l(checked_item.due_date, :formats => :only_date) -%></td>
|
30
30
|
<td><%= link_to t('page.destroy'), checked_item, :confirm => t('page.are_you_sure'), :method => :delete -%></td>
|
31
31
|
</tr>
|
32
32
|
<%- end -%>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
(<%= link_to checkout.item.item_identifier, checkout.item -%>)
|
22
22
|
</td>
|
23
23
|
<td>
|
24
|
-
<%= l(checkout.due_date, :
|
24
|
+
<%= l(checkout.due_date, :formats => :only_date) -%>
|
25
25
|
<br />
|
26
26
|
<% if checkout.checkin %>
|
27
27
|
<strong><%= t('checkout.returned') %></strong>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<h3><%= t('checkout.renewal') -%></h3>
|
8
8
|
<%- if @checkout.checkout_renewable? -%>
|
9
9
|
<%= form_for(@checkout) do |f| -%>
|
10
|
-
<%= t('checkout.new_due_date') -%>: <%= l(@new_due_date, :
|
10
|
+
<%= t('checkout.new_due_date') -%>: <%= l(@new_due_date, :formats => :only_date) if @new_due_date -%>
|
11
11
|
<%= f.hidden_field :due_date, :value => @new_due_date -%>
|
12
12
|
<br />
|
13
13
|
<%= f.submit %>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
</p>
|
11
11
|
<p>
|
12
12
|
<strong><%= t('activerecord.attributes.checkout.due_date') -%></strong><br />
|
13
|
-
<%= l(@checkout.due_date, :
|
13
|
+
<%= l(@checkout.due_date, :formats => :only_date) if @checkout.due_date -%>
|
14
14
|
</p>
|
15
15
|
<%- if can? :destroy, @checkout -%>
|
16
16
|
<p>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
<p>
|
23
23
|
<strong><%= t('activerecord.attributes.lending_policy.fixed_due_date') -%>:</strong>
|
24
|
-
<%= l(@lending_policy.fixed_due_date, :
|
24
|
+
<%= l(@lending_policy.fixed_due_date, :formats => :only_date) if @lending_policy.fixed_due_date -%>
|
25
25
|
</p>
|
26
26
|
|
27
27
|
<p>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<h1 class="title"><%= t('page.listing', :model => t('activerecord.models.message_template')) -%></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.message_template.status') -%></th>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<%= render 'title', :reserve => reserve -%>
|
23
23
|
</td>
|
24
24
|
<td><%= i18n_state(reserve.state) -%></td>
|
25
|
-
<td><%= l(reserve.expired_at, :
|
25
|
+
<td><%= l(reserve.expired_at, :formats => :only_date) -%></td>
|
26
26
|
<%- if can? :destroy, reserve -%>
|
27
27
|
<td>
|
28
28
|
<%= link_to t('page.edit'), edit_reserve_path(reserve) -%>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
|
34
34
|
<p>
|
35
35
|
<strong><%= t('activerecord.attributes.reserve.expired_at') -%>:</strong>
|
36
|
-
<%= l(@reserve.expired_at, :
|
36
|
+
<%= l(@reserve.expired_at, :formats => :only_date) if @reserve.expired_at -%>
|
37
37
|
</p>
|
38
38
|
|
39
39
|
<p>
|
data/lib/enju_message/engine.rb
CHANGED
data/lib/enju_message/version.rb
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
class Notifier < ActionMailer::Base
|
2
|
+
include Resque::Mailer
|
2
3
|
if LibraryGroup.site_config.try(:url)
|
3
4
|
uri = Addressable::URI.parse(LibraryGroup.site_config.url)
|
4
5
|
default_url_options[:host] = uri.host
|
5
|
-
default_url_options[:port] = uri.port
|
6
|
+
default_url_options[:port] = uri.port
|
6
7
|
else
|
7
|
-
default_url_options[:host] =
|
8
|
-
default_url_options[:port] =
|
8
|
+
default_url_options[:host] = 'library.example.jp'
|
9
|
+
default_url_options[:port] = 80
|
9
10
|
end
|
10
11
|
|
11
|
-
def message_notification(
|
12
|
+
def message_notification(message_id)
|
13
|
+
message = Message.find(message_id)
|
12
14
|
I18n.locale = message.receiver.locale.try(:to_sym) || I18n.default_locale
|
13
15
|
from = "#{LibraryGroup.system_name(message.receiver.locale)} <#{LibraryGroup.site_config.email}>"
|
14
16
|
if message.subject
|
@@ -17,7 +19,7 @@ class Notifier < ActionMailer::Base
|
|
17
19
|
subject = I18n.t('message.new_message_from_library', :library => LibraryGroup.system_name(message.receiver.user.locale))
|
18
20
|
end
|
19
21
|
if message.sender
|
20
|
-
@sender_name = message.sender.
|
22
|
+
@sender_name = message.sender.full_name
|
21
23
|
else
|
22
24
|
@sender_name = LibraryGroup.system_name(message.receiver.locale)
|
23
25
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Resque::Mailer.excluded_environments = [:test, :cucumber]
|
@@ -1,19 +1,40 @@
|
|
1
1
|
class AddDeviseToUsers < ActiveRecord::Migration
|
2
2
|
def self.up
|
3
3
|
change_table(:users) do |t|
|
4
|
-
|
5
|
-
t.
|
6
|
-
t.
|
7
|
-
t.trackable
|
4
|
+
## Database authenticatable
|
5
|
+
t.string :email, :null => false, :default => ""
|
6
|
+
t.string :encrypted_password, :null => false, :default => ""
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
# t.token_authenticatable
|
8
|
+
## Recoverable
|
9
|
+
t.string :reset_password_token
|
10
|
+
t.datetime :reset_password_sent_at
|
13
11
|
|
12
|
+
## Rememberable
|
13
|
+
t.datetime :remember_created_at
|
14
14
|
|
15
|
-
|
16
|
-
|
15
|
+
## Trackable
|
16
|
+
t.integer :sign_in_count, :default => 0
|
17
|
+
t.datetime :current_sign_in_at
|
18
|
+
t.datetime :last_sign_in_at
|
19
|
+
t.string :current_sign_in_ip
|
20
|
+
t.string :last_sign_in_ip
|
21
|
+
|
22
|
+
## Encryptable
|
23
|
+
t.string :password_salt
|
24
|
+
|
25
|
+
## Confirmable
|
26
|
+
t.string :confirmation_token
|
27
|
+
t.datetime :confirmed_at
|
28
|
+
t.datetime :confirmation_sent_at
|
29
|
+
t.string :unconfirmed_email # Only if using reconfirmable
|
30
|
+
|
31
|
+
## Lockable
|
32
|
+
t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
33
|
+
t.string :unlock_token # Only if unlock strategy is :email or :both
|
34
|
+
t.datetime :locked_at
|
35
|
+
|
36
|
+
# Token authenticatable
|
37
|
+
t.string :authentication_token
|
17
38
|
end
|
18
39
|
|
19
40
|
add_index :users, :email #, :unique => true
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -207,18 +207,27 @@ ActiveRecord::Schema.define(:version => 20120213092115) do
|
|
207
207
|
t.text "note"
|
208
208
|
t.string "locale"
|
209
209
|
t.string "user_number"
|
210
|
-
t.datetime "created_at",
|
211
|
-
t.datetime "updated_at",
|
212
|
-
t.string "email",
|
213
|
-
t.string "encrypted_password", :
|
210
|
+
t.datetime "created_at", :null => false
|
211
|
+
t.datetime "updated_at", :null => false
|
212
|
+
t.string "email", :default => "", :null => false
|
213
|
+
t.string "encrypted_password", :default => "", :null => false
|
214
214
|
t.string "reset_password_token"
|
215
215
|
t.datetime "reset_password_sent_at"
|
216
216
|
t.datetime "remember_created_at"
|
217
|
-
t.integer "sign_in_count",
|
217
|
+
t.integer "sign_in_count", :default => 0
|
218
218
|
t.datetime "current_sign_in_at"
|
219
219
|
t.datetime "last_sign_in_at"
|
220
220
|
t.string "current_sign_in_ip"
|
221
221
|
t.string "last_sign_in_ip"
|
222
|
+
t.string "password_salt"
|
223
|
+
t.string "confirmation_token"
|
224
|
+
t.datetime "confirmed_at"
|
225
|
+
t.datetime "confirmation_sent_at"
|
226
|
+
t.string "unconfirmed_email"
|
227
|
+
t.integer "failed_attempts", :default => 0
|
228
|
+
t.string "unlock_token"
|
229
|
+
t.datetime "locked_at"
|
230
|
+
t.string "authentication_token"
|
222
231
|
end
|
223
232
|
|
224
233
|
add_index "users", ["email"], :name => "index_users_on_email"
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
Binary file
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/spec/factories/message.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_message
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
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-
|
12
|
+
date: 2012-07-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -44,23 +44,23 @@ dependencies:
|
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
47
|
+
name: awesome_nested_set
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '2.1'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
none: false
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '2.1'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
63
|
+
name: state_machine
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
@@ -76,23 +76,7 @@ dependencies:
|
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ~>
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '2.1'
|
86
|
-
type: :runtime
|
87
|
-
prerelease: false
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ~>
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '2.1'
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: state_machine
|
79
|
+
name: inherited_resources
|
96
80
|
requirement: !ruby/object:Gem::Requirement
|
97
81
|
none: false
|
98
82
|
requirements:
|
@@ -108,7 +92,7 @@ dependencies:
|
|
108
92
|
- !ruby/object:Gem::Version
|
109
93
|
version: '0'
|
110
94
|
- !ruby/object:Gem::Dependency
|
111
|
-
name:
|
95
|
+
name: enju_core
|
112
96
|
requirement: !ruby/object:Gem::Requirement
|
113
97
|
none: false
|
114
98
|
requirements:
|
@@ -124,7 +108,7 @@ dependencies:
|
|
124
108
|
- !ruby/object:Gem::Version
|
125
109
|
version: '0'
|
126
110
|
- !ruby/object:Gem::Dependency
|
127
|
-
name:
|
111
|
+
name: resque_mailer
|
128
112
|
requirement: !ruby/object:Gem::Requirement
|
129
113
|
none: false
|
130
114
|
requirements:
|
@@ -192,17 +176,17 @@ dependencies:
|
|
192
176
|
requirement: !ruby/object:Gem::Requirement
|
193
177
|
none: false
|
194
178
|
requirements:
|
195
|
-
- -
|
179
|
+
- - ~>
|
196
180
|
- !ruby/object:Gem::Version
|
197
|
-
version:
|
181
|
+
version: 2.0.0.pre.120720
|
198
182
|
type: :development
|
199
183
|
prerelease: false
|
200
184
|
version_requirements: !ruby/object:Gem::Requirement
|
201
185
|
none: false
|
202
186
|
requirements:
|
203
|
-
- -
|
187
|
+
- - ~>
|
204
188
|
- !ruby/object:Gem::Version
|
205
|
-
version:
|
189
|
+
version: 2.0.0.pre.120720
|
206
190
|
description: Message management for Next-L Enju
|
207
191
|
email:
|
208
192
|
- tanabe@mwr.mediacom.keio.ac.jp
|
@@ -406,6 +390,7 @@ files:
|
|
406
390
|
- spec/dummy/config/initializers/devise.rb
|
407
391
|
- spec/dummy/config/initializers/inflections.rb
|
408
392
|
- spec/dummy/config/initializers/mime_types.rb
|
393
|
+
- spec/dummy/config/initializers/resque_mailer.rb
|
409
394
|
- spec/dummy/config/initializers/secret_token.rb
|
410
395
|
- spec/dummy/config/initializers/session_store.rb
|
411
396
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
@@ -449,16 +434,16 @@ files:
|
|
449
434
|
- spec/dummy/solr/conf/spellings.txt
|
450
435
|
- spec/dummy/solr/conf/stopwords.txt
|
451
436
|
- spec/dummy/solr/conf/synonyms.txt
|
452
|
-
- spec/dummy/solr/data/test/index/
|
453
|
-
- spec/dummy/solr/data/test/index/
|
454
|
-
- spec/dummy/solr/data/test/index/
|
455
|
-
- spec/dummy/solr/data/test/index/
|
456
|
-
- spec/dummy/solr/data/test/index/
|
457
|
-
- spec/dummy/solr/data/test/index/
|
458
|
-
- spec/dummy/solr/data/test/index/
|
459
|
-
- spec/dummy/solr/data/test/index/
|
437
|
+
- spec/dummy/solr/data/test/index/_f.fdt
|
438
|
+
- spec/dummy/solr/data/test/index/_f.fdx
|
439
|
+
- spec/dummy/solr/data/test/index/_f.fnm
|
440
|
+
- spec/dummy/solr/data/test/index/_f.frq
|
441
|
+
- spec/dummy/solr/data/test/index/_f.nrm
|
442
|
+
- spec/dummy/solr/data/test/index/_f.prx
|
443
|
+
- spec/dummy/solr/data/test/index/_f.tii
|
444
|
+
- spec/dummy/solr/data/test/index/_f.tis
|
460
445
|
- spec/dummy/solr/data/test/index/segments.gen
|
461
|
-
- spec/dummy/solr/data/test/index/
|
446
|
+
- spec/dummy/solr/data/test/index/segments_x
|
462
447
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
463
448
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
464
449
|
- spec/factories/message.rb
|
@@ -539,6 +524,7 @@ test_files:
|
|
539
524
|
- spec/dummy/config/initializers/devise.rb
|
540
525
|
- spec/dummy/config/initializers/inflections.rb
|
541
526
|
- spec/dummy/config/initializers/mime_types.rb
|
527
|
+
- spec/dummy/config/initializers/resque_mailer.rb
|
542
528
|
- spec/dummy/config/initializers/secret_token.rb
|
543
529
|
- spec/dummy/config/initializers/session_store.rb
|
544
530
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
@@ -582,16 +568,16 @@ test_files:
|
|
582
568
|
- spec/dummy/solr/conf/spellings.txt
|
583
569
|
- spec/dummy/solr/conf/stopwords.txt
|
584
570
|
- spec/dummy/solr/conf/synonyms.txt
|
585
|
-
- spec/dummy/solr/data/test/index/
|
586
|
-
- spec/dummy/solr/data/test/index/
|
587
|
-
- spec/dummy/solr/data/test/index/
|
588
|
-
- spec/dummy/solr/data/test/index/
|
589
|
-
- spec/dummy/solr/data/test/index/
|
590
|
-
- spec/dummy/solr/data/test/index/
|
591
|
-
- spec/dummy/solr/data/test/index/
|
592
|
-
- spec/dummy/solr/data/test/index/
|
571
|
+
- spec/dummy/solr/data/test/index/_f.fdt
|
572
|
+
- spec/dummy/solr/data/test/index/_f.fdx
|
573
|
+
- spec/dummy/solr/data/test/index/_f.fnm
|
574
|
+
- spec/dummy/solr/data/test/index/_f.frq
|
575
|
+
- spec/dummy/solr/data/test/index/_f.nrm
|
576
|
+
- spec/dummy/solr/data/test/index/_f.prx
|
577
|
+
- spec/dummy/solr/data/test/index/_f.tii
|
578
|
+
- spec/dummy/solr/data/test/index/_f.tis
|
593
579
|
- spec/dummy/solr/data/test/index/segments.gen
|
594
|
-
- spec/dummy/solr/data/test/index/
|
580
|
+
- spec/dummy/solr/data/test/index/segments_x
|
595
581
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
596
582
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
597
583
|
- spec/factories/message.rb
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|