enju_message 0.1.14.pre14 → 0.1.14.pre15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/message_requests_controller.rb +5 -5
- data/app/controllers/messages_controller.rb +17 -17
- data/app/models/message.rb +34 -24
- data/app/models/message_request.rb +25 -30
- data/app/models/message_request_state_machine.rb +12 -0
- data/app/models/message_request_transition.rb +20 -0
- data/app/models/message_state_machine.rb +24 -0
- data/app/models/message_template.rb +3 -3
- data/app/models/message_transition.rb +20 -0
- data/app/views/layouts/messages.html.erb +3 -3
- data/app/views/message_requests/edit.html.erb +1 -1
- data/app/views/message_requests/index.html.erb +8 -8
- data/app/views/message_requests/new.html.erb +2 -2
- data/app/views/message_requests/show.html.erb +2 -2
- data/app/views/message_templates/_form.html.erb +4 -4
- data/app/views/message_templates/edit.html.erb +1 -1
- data/app/views/message_templates/index.html.erb +3 -3
- data/app/views/message_templates/new.html.erb +1 -1
- data/app/views/message_templates/show.html.erb +1 -1
- data/app/views/messages/_form.html.erb +0 -4
- data/app/views/messages/edit.html.erb +5 -5
- data/app/views/messages/index.atom.builder +2 -2
- data/app/views/messages/index.html.erb +7 -7
- data/app/views/messages/index.rss.builder +9 -9
- data/app/views/messages/new.html.erb +7 -7
- data/app/views/messages/show.html.erb +5 -5
- data/app/views/notifier/message_notification.en.text.erb +1 -1
- data/app/views/notifier/message_notification.ja.text.erb +1 -1
- data/config/initializers/statesman.rb +3 -0
- data/db/migrate/154_create_messages.rb +0 -1
- data/db/migrate/20080819181903_create_message_requests.rb +0 -2
- data/db/migrate/20140518111006_create_message_transitions.rb +14 -0
- data/db/migrate/20140518135713_create_message_request_transitions.rb +14 -0
- data/lib/enju_message/engine.rb +1 -1
- data/lib/enju_message/user.rb +2 -2
- data/lib/enju_message/version.rb +1 -1
- data/lib/generators/enju_message/setup/setup_generator.rb +2 -0
- data/lib/generators/enju_message/setup/templates/db/fixtures/message_templates.yml +41 -20
- data/lib/tasks/enju_message_tasks.rake +10 -0
- data/lib/tasks/message_template.rb +13 -0
- data/spec/controllers/message_requests_controller_spec.rb +15 -15
- data/spec/controllers/message_templates_controller_spec.rb +21 -21
- data/spec/controllers/messages_controller_spec.rb +7 -13
- data/spec/dummy/app/mailers/notifier.rb +6 -6
- data/spec/dummy/db/migrate/001_create_agents.rb +0 -2
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +18 -0
- data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +11 -0
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +20 -0
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
- data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +11 -0
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +5 -0
- data/spec/dummy/db/schema.rb +105 -8
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/default/data/index/_oj.fdt +0 -0
- data/spec/dummy/solr/default/data/index/{_n.si → _oj.si} +0 -0
- data/spec/dummy/solr/default/data/index/{_n_Lucene41_0.tim → _oj_Lucene41_0.tim} +0 -0
- data/spec/dummy/solr/default/data/index/segments.gen +0 -0
- data/spec/dummy/solr/default/data/index/segments_14v +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001460 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001461 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001462 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001463 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001464 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001465 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001466 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001467 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001468 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001469 +0 -0
- data/spec/factories/message.rb +2 -2
- data/spec/factories/profile.rb +10 -0
- data/spec/fixtures/agents.yml +0 -12
- data/spec/fixtures/message_requests.yml +0 -3
- data/spec/fixtures/messages.yml +0 -5
- data/spec/fixtures/profiles.yml +98 -0
- data/spec/fixtures/users.yml +3 -23
- data/spec/models/message_request_spec.rb +0 -2
- data/spec/models/message_spec.rb +2 -4
- data/spec/spec_helper.rb +3 -0
- metadata +95 -47
- data/spec/dummy/solr/default/data/index/_n.fdt +0 -0
- data/spec/dummy/solr/default/data/index/segments_15 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000030 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000031 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000032 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000033 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000034 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000035 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000036 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000037 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000038 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000039 +0 -0
- /data/spec/dummy/solr/default/data/index/{_n.fdx → _oj.fdx} +0 -0
- /data/spec/dummy/solr/default/data/index/{_n.fnm → _oj.fnm} +0 -0
- /data/spec/dummy/solr/default/data/index/{_n.nvd → _oj.nvd} +0 -0
- /data/spec/dummy/solr/default/data/index/{_n.nvm → _oj.nvm} +0 -0
- /data/spec/dummy/solr/default/data/index/{_n_Lucene41_0.doc → _oj_Lucene41_0.doc} +0 -0
- /data/spec/dummy/solr/default/data/index/{_n_Lucene41_0.pos → _oj_Lucene41_0.pos} +0 -0
- /data/spec/dummy/solr/default/data/index/{_n_Lucene41_0.tip → _oj_Lucene41_0.tip} +0 -0
data/spec/factories/message.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
FactoryGirl.define do
|
2
2
|
factory :message do |f|
|
3
|
-
f.recipient{FactoryGirl.create(:
|
4
|
-
f.sender{FactoryGirl.create(:user
|
3
|
+
f.recipient{FactoryGirl.create(:profile).user.username}
|
4
|
+
f.sender{FactoryGirl.create(:profile).user}
|
5
5
|
f.subject 'new message'
|
6
6
|
f.body 'new message body is really short'
|
7
7
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
FactoryGirl.define do
|
2
|
+
factory :profile, :class => Profile do |f|
|
3
|
+
f.user_group_id {UserGroup.first.id}
|
4
|
+
f.required_role_id {Role.where(name: 'User').first.id}
|
5
|
+
f.sequence(:user_number){|n| "user_number_#{n}"}
|
6
|
+
f.library_id 2
|
7
|
+
f.locale "ja"
|
8
|
+
f.user{FactoryGirl.create(:user)}
|
9
|
+
end
|
10
|
+
end
|
data/spec/fixtures/agents.yml
CHANGED
@@ -15,7 +15,6 @@ agent_00001:
|
|
15
15
|
agent_type_id: 1
|
16
16
|
required_role_id: 1
|
17
17
|
created_at: 2007-11-19 17:06:06.507237 +09:00
|
18
|
-
user_id: 1
|
19
18
|
agent_00002:
|
20
19
|
place: ""
|
21
20
|
last_name: Librarian1
|
@@ -32,7 +31,6 @@ agent_00002:
|
|
32
31
|
agent_type_id: 1
|
33
32
|
required_role_id: 4
|
34
33
|
created_at: 2007-11-19 17:06:07.724517 +09:00
|
35
|
-
user_id: 2
|
36
34
|
agent_00003:
|
37
35
|
place:
|
38
36
|
last_name: Kosuke
|
@@ -49,7 +47,6 @@ agent_00003:
|
|
49
47
|
agent_type_id: 1
|
50
48
|
required_role_id: 3
|
51
49
|
created_at: 2007-12-04 16:25:01.523618 +09:00
|
52
|
-
user_id: 3
|
53
50
|
agent_00004:
|
54
51
|
place:
|
55
52
|
last_name: Librarian2
|
@@ -66,7 +63,6 @@ agent_00004:
|
|
66
63
|
agent_type_id: 1
|
67
64
|
required_role_id: 1
|
68
65
|
created_at: 2007-12-04 16:25:01.785027 +09:00
|
69
|
-
user_id: 4
|
70
66
|
agent_00005:
|
71
67
|
place: ""
|
72
68
|
last_name: User2
|
@@ -83,7 +79,6 @@ agent_00005:
|
|
83
79
|
agent_type_id: 1
|
84
80
|
required_role_id: 2
|
85
81
|
created_at: 2007-11-19 17:24:50.153417 +09:00
|
86
|
-
user_id: 5
|
87
82
|
agent_00006:
|
88
83
|
place: ""
|
89
84
|
last_name: New agent 1
|
@@ -180,7 +175,6 @@ agent_00011:
|
|
180
175
|
agent_type_id: 1
|
181
176
|
required_role_id: 1
|
182
177
|
created_at: 2007-11-19 17:24:50.153417 +09:00
|
183
|
-
user_id: 6
|
184
178
|
agent_00101:
|
185
179
|
place: ""
|
186
180
|
last_name: テスト名字
|
@@ -278,17 +272,11 @@ agent_00202:
|
|
278
272
|
required_role_id: 1
|
279
273
|
created_at: 2010-03-15 17:00:00.579396 +09:00
|
280
274
|
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
275
|
# == Schema Information
|
287
276
|
#
|
288
277
|
# Table name: agents
|
289
278
|
#
|
290
279
|
# id :integer not null, primary key
|
291
|
-
# user_id :integer
|
292
280
|
# last_name :string(255)
|
293
281
|
# middle_name :string(255)
|
294
282
|
# first_name :string(255)
|
@@ -4,13 +4,11 @@ one:
|
|
4
4
|
sender_id: 1
|
5
5
|
receiver_id: 1
|
6
6
|
message_template_id: 1
|
7
|
-
state: pending
|
8
7
|
|
9
8
|
two:
|
10
9
|
sender_id: 1
|
11
10
|
receiver_id: 1
|
12
11
|
message_template_id: 1
|
13
|
-
state: pending
|
14
12
|
|
15
13
|
# == Schema Information
|
16
14
|
#
|
@@ -23,7 +21,6 @@ two:
|
|
23
21
|
# sent_at :datetime
|
24
22
|
# deleted_at :datetime
|
25
23
|
# body :text
|
26
|
-
# state :string(255)
|
27
24
|
# created_at :datetime not null
|
28
25
|
# updated_at :datetime not null
|
29
26
|
#
|
data/spec/fixtures/messages.yml
CHANGED
@@ -6,7 +6,6 @@ user1_to_user2_1:
|
|
6
6
|
body: 'Abby, you get the first message'
|
7
7
|
created_at: 2007-07-04 12:10:47.0
|
8
8
|
read_at: <%= 3.days.ago.to_s :db %>
|
9
|
-
state: unread
|
10
9
|
lft: 1
|
11
10
|
rgt: 2
|
12
11
|
user2_to_user1_1:
|
@@ -16,7 +15,6 @@ user2_to_user1_1:
|
|
16
15
|
subject: 'RE: First Message'
|
17
16
|
body: 'Thanks Dad! You are the coolest!'
|
18
17
|
created_at: <%= 2.days.ago.to_s :db %>
|
19
|
-
state: unread
|
20
18
|
lft: 3
|
21
19
|
rgt: 4
|
22
20
|
user1_to_librarian_2:
|
@@ -26,7 +24,6 @@ user1_to_librarian_2:
|
|
26
24
|
subject: 'Second Message'
|
27
25
|
body: 'Catie, you get the 2nd message'
|
28
26
|
created_at: <%= 1.days.ago.to_s :db %>
|
29
|
-
state: unread
|
30
27
|
lft: 5
|
31
28
|
rgt: 6
|
32
29
|
librarian2_to_user2:
|
@@ -36,7 +33,6 @@ librarian2_to_user2:
|
|
36
33
|
subject: 'Dad!'
|
37
34
|
body: 'He is sucha dork.'
|
38
35
|
created_at: <%= 2.days.ago.to_s :db %>
|
39
|
-
state: unread
|
40
36
|
lft: 7
|
41
37
|
rgt: 8
|
42
38
|
|
@@ -51,7 +47,6 @@ librarian2_to_user2:
|
|
51
47
|
# subject :string(255) not null
|
52
48
|
# body :text
|
53
49
|
# message_request_id :integer
|
54
|
-
# state :string(255)
|
55
50
|
# parent_id :integer
|
56
51
|
# created_at :datetime not null
|
57
52
|
# updated_at :datetime not null
|
@@ -0,0 +1,98 @@
|
|
1
|
+
---
|
2
|
+
admin:
|
3
|
+
updated_at: 2008-05-31 13:16:30.163731 +09:00
|
4
|
+
user_group_id: 2
|
5
|
+
id: 1
|
6
|
+
user_id: 1
|
7
|
+
note:
|
8
|
+
library_id: 2
|
9
|
+
created_at: 2007-11-19 16:58:32.111941 +09:00
|
10
|
+
required_role_id: 4
|
11
|
+
user_number: "00001"
|
12
|
+
locale: "ja"
|
13
|
+
librarian1:
|
14
|
+
updated_at: 2008-05-31 12:41:16.337474 +09:00
|
15
|
+
user_group_id: 1
|
16
|
+
id: 2
|
17
|
+
user_id: 2
|
18
|
+
note:
|
19
|
+
library_id: 1
|
20
|
+
created_at: 2007-11-19 16:58:33.172441 +09:00
|
21
|
+
required_role_id: 1
|
22
|
+
user_number: "00002"
|
23
|
+
locale: "ja"
|
24
|
+
user1:
|
25
|
+
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
26
|
+
user_group_id: 1
|
27
|
+
id: 3
|
28
|
+
user_id: 3
|
29
|
+
note:
|
30
|
+
library_id: 2
|
31
|
+
created_at: 2007-11-19 16:58:34.637413 +09:00
|
32
|
+
required_role_id: 3
|
33
|
+
user_number: "00003"
|
34
|
+
locale: "ja"
|
35
|
+
librarian2:
|
36
|
+
updated_at: 2008-05-31 12:42:23.340575 +09:00
|
37
|
+
user_group_id: 1
|
38
|
+
id: 4
|
39
|
+
user_id: 4
|
40
|
+
note:
|
41
|
+
library_id: 2
|
42
|
+
created_at: 2008-01-18 12:24:04.222344 +09:00
|
43
|
+
required_role_id: 1
|
44
|
+
user_number: "00004"
|
45
|
+
locale: "ja"
|
46
|
+
user2:
|
47
|
+
updated_at: 2008-05-31 12:42:44.711117 +09:00
|
48
|
+
user_group_id: 1
|
49
|
+
id: 5
|
50
|
+
user_id: 5
|
51
|
+
note:
|
52
|
+
library_id: 1
|
53
|
+
created_at: 2008-01-18 13:29:06.922728 +09:00
|
54
|
+
required_role_id: 2
|
55
|
+
# user_number: '00005'
|
56
|
+
locale: "ja"
|
57
|
+
user3:
|
58
|
+
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
59
|
+
user_group_id: 1
|
60
|
+
id: 6
|
61
|
+
user_id: 6
|
62
|
+
note:
|
63
|
+
library_id: 2
|
64
|
+
created_at: 2007-11-19 16:58:34.637413 +09:00
|
65
|
+
required_role_id: 3
|
66
|
+
user_number: "00006"
|
67
|
+
locale: "ja"
|
68
|
+
user4:
|
69
|
+
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
70
|
+
user_group_id: 1
|
71
|
+
id: 7
|
72
|
+
user_id: 7
|
73
|
+
note:
|
74
|
+
library_id: 2
|
75
|
+
created_at: 2007-11-19 16:58:34.637413 +09:00
|
76
|
+
required_role_id: 3
|
77
|
+
user_number: "00007"
|
78
|
+
locale: "ja"
|
79
|
+
|
80
|
+
# == Schema Information
|
81
|
+
#
|
82
|
+
# Table name: profiles
|
83
|
+
#
|
84
|
+
# id :integer not null, primary key
|
85
|
+
# user_id :integer
|
86
|
+
# user_group_id :integer
|
87
|
+
# library_id :integer
|
88
|
+
# locale :string(255)
|
89
|
+
# user_number :string(255)
|
90
|
+
# full_name :text
|
91
|
+
# note :text
|
92
|
+
# keyword_list :text
|
93
|
+
# required_role_id :integer
|
94
|
+
# created_at :datetime not null
|
95
|
+
# updated_at :datetime not null
|
96
|
+
# checkout_icalendar_token :string(255)
|
97
|
+
# save_checkout_history :boolean default(FALSE), not null
|
98
|
+
#
|
data/spec/fixtures/users.yml
CHANGED
@@ -2,70 +2,50 @@
|
|
2
2
|
admin:
|
3
3
|
updated_at: 2008-05-31 13:16:30.163731 +09:00
|
4
4
|
encrypted_password: $2a$10$vHohD1WflnTIqAa8zMkF9evwAgIZRw3XuR4d3bi29M.jph/MB/AJi
|
5
|
-
user_group_id: 2
|
6
5
|
id: 1
|
7
|
-
note:
|
8
6
|
username: admin
|
9
7
|
email: tanabe@kamata.lib.teu.ac.jp
|
10
8
|
created_at: 2007-11-19 16:58:32.111941 +09:00
|
11
|
-
required_role_id: 4
|
12
9
|
librarian1:
|
13
10
|
updated_at: 2008-05-31 12:41:16.337474 +09:00
|
14
11
|
encrypted_password: $2a$10$9O2VuTccN4gHq36ARg0QReSrb1D7WrBBhZZ759RM9moHbB0W5zCzS
|
15
|
-
user_group_id: 1
|
16
12
|
id: 2
|
17
|
-
note:
|
18
13
|
username: librarian1
|
19
14
|
email: librarian1@kamata.lib.teu.ac.jp
|
20
15
|
created_at: 2007-11-19 16:58:33.172441 +09:00
|
21
|
-
required_role_id: 1
|
22
16
|
user1:
|
23
17
|
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
24
18
|
encrypted_password: $2a$10$JthS59A0BNkDOoFpCXM0V.GhhffKaoWKbzpPahYp/vTFrOyM7h/uW
|
25
|
-
user_group_id: 1
|
26
19
|
id: 3
|
27
|
-
note:
|
28
20
|
username: user1
|
29
21
|
email: user1@kamata.lib.teu.ac.jp
|
30
22
|
created_at: 2007-11-19 16:58:34.637413 +09:00
|
31
|
-
required_role_id: 3
|
32
23
|
librarian2:
|
33
24
|
updated_at: 2008-05-31 12:42:23.340575 +09:00
|
34
25
|
encrypted_password: $2a$10$YmmTGrYQ1Ir6oc7wXnp.GuNeO1eYLoP3sv8wMSIrTdaGw2BPwRrpS
|
35
|
-
user_group_id: 1
|
36
26
|
id: 4
|
37
|
-
note:
|
38
27
|
username: librarian2
|
39
|
-
email: librarian2@
|
28
|
+
email: librarian2@library.example.jp
|
40
29
|
created_at: 2008-01-18 12:24:04.222344 +09:00
|
41
|
-
required_role_id: 1
|
42
30
|
user2:
|
43
31
|
updated_at: 2008-05-31 12:42:44.711117 +09:00
|
44
32
|
encrypted_password: $2a$10$i7UjJhLVrJM/J7qaTwW39OXw1NiwowUEbtNHVDV0sqMLjX9.UO9ca
|
45
|
-
user_group_id: 1
|
46
33
|
id: 5
|
47
|
-
note:
|
48
34
|
username: user2
|
49
|
-
email: user2@
|
35
|
+
email: user2@library.example.jp
|
50
36
|
created_at: 2008-01-18 13:29:06.922728 +09:00
|
51
|
-
required_role_id: 2
|
52
37
|
user3:
|
53
38
|
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
54
39
|
encrypted_password: cc53de0c2d9a1a228daa9a673ec824473747e17507a6c3c4f7e5eff8821f531d4b9e23616b3ddc66fe17006b2298a556fbd567ac080e87f00f37eef8cee6c417
|
55
|
-
user_group_id: 1
|
56
40
|
id: 6
|
57
|
-
note:
|
58
41
|
username: user3
|
59
42
|
email: user3@kamata.lib.teu.ac.jp
|
60
43
|
created_at: 2007-11-19 16:58:34.637413 +09:00
|
61
|
-
required_role_id: 3
|
62
44
|
user4:
|
63
45
|
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
64
46
|
encrypted_password: cc53de0c2d9a1a228daa9a673ec824473747e17507a6c3c4f7e5eff8821f531d4b9e23616b3ddc66fe17006b2298a556fbd567ac080e87f00f37eef8cee6c417
|
65
|
-
user_group_id: 1
|
66
47
|
id: 7
|
67
|
-
note:
|
68
48
|
username: user4
|
69
49
|
email: user4@kamata.lib.teu.ac.jp
|
70
50
|
created_at: 2007-11-19 16:58:34.637413 +09:00
|
71
|
-
|
51
|
+
locked_at: <%= 1.day.ago %>
|
data/spec/models/message_spec.rb
CHANGED
@@ -30,10 +30,10 @@ describe Message do
|
|
30
30
|
|
31
31
|
it "should set read_at" do
|
32
32
|
message = messages(:user2_to_user1_1)
|
33
|
-
message.
|
33
|
+
message.transition_to!(:read)
|
34
34
|
message.read_at.should be_truthy
|
35
35
|
message.read?.should be_truthy
|
36
|
-
message.
|
36
|
+
message.current_state.should eq 'read'
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -48,7 +48,6 @@ end
|
|
48
48
|
# subject :string(255) not null
|
49
49
|
# body :text
|
50
50
|
# message_request_id :integer
|
51
|
-
# state :string(255)
|
52
51
|
# parent_id :integer
|
53
52
|
# created_at :datetime not null
|
54
53
|
# updated_at :datetime not null
|
@@ -56,4 +55,3 @@ end
|
|
56
55
|
# rgt :integer
|
57
56
|
# depth :integer
|
58
57
|
#
|
59
|
-
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_message
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.14.
|
4
|
+
version: 0.1.14.pre15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kosuke Tanabe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: enju_seed
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: statesman
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.1.0.
|
131
|
+
version: 1.1.0.rc13
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.1.0.
|
138
|
+
version: 1.1.0.rc13
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rspec-rails
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,6 +206,20 @@ dependencies:
|
|
206
206
|
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: annotate
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
209
223
|
- !ruby/object:Gem::Dependency
|
210
224
|
name: rspec-activemodel-mocks
|
211
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -237,7 +251,11 @@ files:
|
|
237
251
|
- app/models/enju_message/ability.rb
|
238
252
|
- app/models/message.rb
|
239
253
|
- app/models/message_request.rb
|
254
|
+
- app/models/message_request_state_machine.rb
|
255
|
+
- app/models/message_request_transition.rb
|
256
|
+
- app/models/message_state_machine.rb
|
240
257
|
- app/models/message_template.rb
|
258
|
+
- app/models/message_transition.rb
|
241
259
|
- app/views/layouts/messages.html.erb
|
242
260
|
- app/views/message_requests/edit.html.erb
|
243
261
|
- app/views/message_requests/index.html.erb
|
@@ -257,6 +275,7 @@ files:
|
|
257
275
|
- app/views/messages/show.html.erb
|
258
276
|
- app/views/notifier/message_notification.en.text.erb
|
259
277
|
- app/views/notifier/message_notification.ja.text.erb
|
278
|
+
- config/initializers/statesman.rb
|
260
279
|
- config/locales/translation_en.yml
|
261
280
|
- config/locales/translation_ja.yml
|
262
281
|
- config/routes.rb
|
@@ -266,6 +285,8 @@ files:
|
|
266
285
|
- db/migrate/20080819181903_create_message_requests.rb
|
267
286
|
- db/migrate/20110913115320_add_lft_and_rgt_to_message.rb
|
268
287
|
- db/migrate/20120125050502_add_depth_to_message.rb
|
288
|
+
- db/migrate/20140518111006_create_message_transitions.rb
|
289
|
+
- db/migrate/20140518135713_create_message_request_transitions.rb
|
269
290
|
- lib/enju_message.rb
|
270
291
|
- lib/enju_message/engine.rb
|
271
292
|
- lib/enju_message/user.rb
|
@@ -274,6 +295,7 @@ files:
|
|
274
295
|
- lib/generators/enju_message/setup/setup_generator.rb
|
275
296
|
- lib/generators/enju_message/setup/templates/db/fixtures/message_templates.yml
|
276
297
|
- lib/tasks/enju_message_tasks.rake
|
298
|
+
- lib/tasks/message_template.rb
|
277
299
|
- spec/controllers/message_requests_controller_spec.rb
|
278
300
|
- spec/controllers/message_templates_controller_spec.rb
|
279
301
|
- spec/controllers/messages_controller_spec.rb
|
@@ -339,6 +361,17 @@ files:
|
|
339
361
|
- spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb
|
340
362
|
- spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb
|
341
363
|
- spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb
|
364
|
+
- spec/dummy/db/migrate/20140110122216_create_user_import_files.rb
|
365
|
+
- spec/dummy/db/migrate/20140110131010_create_user_import_results.rb
|
366
|
+
- spec/dummy/db/migrate/20140122054321_create_profiles.rb
|
367
|
+
- spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb
|
368
|
+
- spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb
|
369
|
+
- spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb
|
370
|
+
- spec/dummy/db/migrate/20140709113413_create_user_export_files.rb
|
371
|
+
- spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb
|
372
|
+
- spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb
|
373
|
+
- spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb
|
374
|
+
- spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb
|
342
375
|
- spec/dummy/db/schema.rb
|
343
376
|
- spec/dummy/db/test.sqlite3
|
344
377
|
- spec/dummy/public/404.html
|
@@ -357,28 +390,28 @@ files:
|
|
357
390
|
- spec/dummy/solr/conf/spellings.txt
|
358
391
|
- spec/dummy/solr/conf/stopwords.txt
|
359
392
|
- spec/dummy/solr/conf/synonyms.txt
|
360
|
-
- spec/dummy/solr/default/data/index/
|
361
|
-
- spec/dummy/solr/default/data/index/
|
362
|
-
- spec/dummy/solr/default/data/index/
|
363
|
-
- spec/dummy/solr/default/data/index/
|
364
|
-
- spec/dummy/solr/default/data/index/
|
365
|
-
- spec/dummy/solr/default/data/index/
|
366
|
-
- spec/dummy/solr/default/data/index/
|
367
|
-
- spec/dummy/solr/default/data/index/
|
368
|
-
- spec/dummy/solr/default/data/index/
|
369
|
-
- spec/dummy/solr/default/data/index/
|
393
|
+
- spec/dummy/solr/default/data/index/_oj.fdt
|
394
|
+
- spec/dummy/solr/default/data/index/_oj.fdx
|
395
|
+
- spec/dummy/solr/default/data/index/_oj.fnm
|
396
|
+
- spec/dummy/solr/default/data/index/_oj.nvd
|
397
|
+
- spec/dummy/solr/default/data/index/_oj.nvm
|
398
|
+
- spec/dummy/solr/default/data/index/_oj.si
|
399
|
+
- spec/dummy/solr/default/data/index/_oj_Lucene41_0.doc
|
400
|
+
- spec/dummy/solr/default/data/index/_oj_Lucene41_0.pos
|
401
|
+
- spec/dummy/solr/default/data/index/_oj_Lucene41_0.tim
|
402
|
+
- spec/dummy/solr/default/data/index/_oj_Lucene41_0.tip
|
370
403
|
- spec/dummy/solr/default/data/index/segments.gen
|
371
|
-
- spec/dummy/solr/default/data/index/
|
372
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
373
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
374
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
375
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
376
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
377
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
378
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
379
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
380
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
381
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
404
|
+
- spec/dummy/solr/default/data/index/segments_14v
|
405
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001460
|
406
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001461
|
407
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001462
|
408
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001463
|
409
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001464
|
410
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001465
|
411
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001466
|
412
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001467
|
413
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001468
|
414
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001469
|
382
415
|
- spec/dummy/solr/development/data/index/segments.gen
|
383
416
|
- spec/dummy/solr/development/data/index/segments_1
|
384
417
|
- spec/dummy/solr/solr.xml
|
@@ -388,6 +421,7 @@ files:
|
|
388
421
|
- spec/factories/message.rb
|
389
422
|
- spec/factories/message_request.rb
|
390
423
|
- spec/factories/message_template.rb
|
424
|
+
- spec/factories/profile.rb
|
391
425
|
- spec/factories/user.rb
|
392
426
|
- spec/fixtures/agents.yml
|
393
427
|
- spec/fixtures/libraries.yml
|
@@ -395,6 +429,7 @@ files:
|
|
395
429
|
- spec/fixtures/message_requests.yml
|
396
430
|
- spec/fixtures/message_templates.yml
|
397
431
|
- spec/fixtures/messages.yml
|
432
|
+
- spec/fixtures/profiles.yml
|
398
433
|
- spec/fixtures/roles.yml
|
399
434
|
- spec/fixtures/user_groups.yml
|
400
435
|
- spec/fixtures/user_has_roles.yml
|
@@ -493,6 +528,17 @@ test_files:
|
|
493
528
|
- spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb
|
494
529
|
- spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb
|
495
530
|
- spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb
|
531
|
+
- spec/dummy/db/migrate/20140110122216_create_user_import_files.rb
|
532
|
+
- spec/dummy/db/migrate/20140110131010_create_user_import_results.rb
|
533
|
+
- spec/dummy/db/migrate/20140122054321_create_profiles.rb
|
534
|
+
- spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb
|
535
|
+
- spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb
|
536
|
+
- spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb
|
537
|
+
- spec/dummy/db/migrate/20140709113413_create_user_export_files.rb
|
538
|
+
- spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb
|
539
|
+
- spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb
|
540
|
+
- spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb
|
541
|
+
- spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb
|
496
542
|
- spec/dummy/db/schema.rb
|
497
543
|
- spec/dummy/db/test.sqlite3
|
498
544
|
- spec/dummy/public/404.html
|
@@ -512,28 +558,28 @@ test_files:
|
|
512
558
|
- spec/dummy/solr/conf/spellings.txt
|
513
559
|
- spec/dummy/solr/conf/stopwords.txt
|
514
560
|
- spec/dummy/solr/conf/synonyms.txt
|
515
|
-
- spec/dummy/solr/default/data/index/
|
516
|
-
- spec/dummy/solr/default/data/index/
|
517
|
-
- spec/dummy/solr/default/data/index/
|
518
|
-
- spec/dummy/solr/default/data/index/
|
519
|
-
- spec/dummy/solr/default/data/index/
|
520
|
-
- spec/dummy/solr/default/data/index/
|
521
|
-
- spec/dummy/solr/default/data/index/
|
522
|
-
- spec/dummy/solr/default/data/index/
|
523
|
-
- spec/dummy/solr/default/data/index/
|
524
|
-
- spec/dummy/solr/default/data/index/
|
561
|
+
- spec/dummy/solr/default/data/index/_oj.fdt
|
562
|
+
- spec/dummy/solr/default/data/index/_oj.fdx
|
563
|
+
- spec/dummy/solr/default/data/index/_oj.fnm
|
564
|
+
- spec/dummy/solr/default/data/index/_oj.nvd
|
565
|
+
- spec/dummy/solr/default/data/index/_oj.nvm
|
566
|
+
- spec/dummy/solr/default/data/index/_oj.si
|
567
|
+
- spec/dummy/solr/default/data/index/_oj_Lucene41_0.doc
|
568
|
+
- spec/dummy/solr/default/data/index/_oj_Lucene41_0.pos
|
569
|
+
- spec/dummy/solr/default/data/index/_oj_Lucene41_0.tim
|
570
|
+
- spec/dummy/solr/default/data/index/_oj_Lucene41_0.tip
|
525
571
|
- spec/dummy/solr/default/data/index/segments.gen
|
526
|
-
- spec/dummy/solr/default/data/index/
|
527
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
528
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
529
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
530
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
531
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
532
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
533
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
534
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
535
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
536
|
-
- spec/dummy/solr/default/data/tlog/tlog.
|
572
|
+
- spec/dummy/solr/default/data/index/segments_14v
|
573
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001460
|
574
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001461
|
575
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001462
|
576
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001463
|
577
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001464
|
578
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001465
|
579
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001466
|
580
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001467
|
581
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001468
|
582
|
+
- spec/dummy/solr/default/data/tlog/tlog.0000000000000001469
|
537
583
|
- spec/dummy/solr/development/data/index/segments.gen
|
538
584
|
- spec/dummy/solr/development/data/index/segments_1
|
539
585
|
- spec/dummy/solr/solr.xml
|
@@ -543,6 +589,7 @@ test_files:
|
|
543
589
|
- spec/factories/message.rb
|
544
590
|
- spec/factories/message_request.rb
|
545
591
|
- spec/factories/message_template.rb
|
592
|
+
- spec/factories/profile.rb
|
546
593
|
- spec/factories/user.rb
|
547
594
|
- spec/fixtures/agents.yml
|
548
595
|
- spec/fixtures/libraries.yml
|
@@ -550,6 +597,7 @@ test_files:
|
|
550
597
|
- spec/fixtures/message_requests.yml
|
551
598
|
- spec/fixtures/message_templates.yml
|
552
599
|
- spec/fixtures/messages.yml
|
600
|
+
- spec/fixtures/profiles.yml
|
553
601
|
- spec/fixtures/roles.yml
|
554
602
|
- spec/fixtures/user_groups.yml
|
555
603
|
- spec/fixtures/user_has_roles.yml
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|