enju_message 0.1.14.pre19 → 0.1.14.pre20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +8 -1
- data/app/models/message_state_machine.rb +0 -2
- data/app/views/messages/index.html.erb +2 -2
- data/db/migrate/20140518111006_create_message_transitions.rb +5 -1
- data/db/migrate/20140518135713_create_message_request_transitions.rb +5 -1
- data/lib/enju_message/version.rb +1 -1
- data/spec/dummy/config/database.yml +23 -18
- data/spec/dummy/db/migrate/005_create_manifestations.rb +0 -1
- data/spec/dummy/db/migrate/133_create_agent_merges.rb +15 -0
- data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +13 -0
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +5 -0
- data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +9 -0
- data/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +5 -0
- data/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +5 -0
- data/spec/dummy/db/schema.rb +424 -404
- data/spec/fixtures/users.yml +1 -1
- data/spec/spec_helper.rb +2 -0
- metadata +46 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a89375d60e98cd4b956c6326f1cc9834c8b944f
|
4
|
+
data.tar.gz: 8401a570eb7ef8bd629d3d9c64a42f0fdbd6b6e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 625319cce7e711b33e6149c9149c278b8aad3f5acd47967327dd3aa95ab4ec395d46c88501e2c00d0108cd838af062e800fa3ec6ba81e784bfc199540b06d952
|
7
|
+
data.tar.gz: f3e399c7b883941c3dd8ecbc6c1f1741bf51114597d89ebe6114383cae1ee38549056acf2c593fbd8330047d7cc47782314971e2daba9a4ffdcac5bb11aa78bb
|
data/README.rdoc
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
-
= EnjuMessage
|
1
|
+
= EnjuMessage
|
2
|
+
{<img src="https://secure.travis-ci.org/next-l/enju_message.png?branch=1.1" alt="Build Status" />}[http://travis-ci.org/next-l/enju_message]
|
3
|
+
{<img src="https://coveralls.io/repos/next-l/enju_message/badge.png?branch=1.1" alt="Coverage Status" />}[https://coveralls.io/r/next-l/enju_message?branch=1.1]
|
4
|
+
{<img src="https://hakiri.io/github/next-l/enju_message/1.1.svg" alt="security" />}[https://hakiri.io/github/next-l/enju_message/1.1]
|
2
5
|
|
3
6
|
This project rocks and uses MIT-LICENSE.
|
7
|
+
|
8
|
+
== 製作者・貢献者 (Authors and contributors)
|
9
|
+
* {TANABE, Kosuke}[https://github.com/nabeta] ({@nabeta}[https://twitter.com/nabeta])
|
10
|
+
* {Project Next-L}[http://www.next-l.jp] ({@ProjectNextL}[https://twitter.com/ProjectNextL])
|
@@ -16,12 +16,10 @@ class MessageStateMachine
|
|
16
16
|
|
17
17
|
before_transition(from: :unread, to: :read) do |message|
|
18
18
|
message.read_at = Time.zone.now unless message.read_at
|
19
|
-
message.index!
|
20
19
|
end
|
21
20
|
|
22
21
|
before_transition(from: :read, to: :unread) do |message|
|
23
22
|
message.read_at = nil
|
24
|
-
message.index!
|
25
23
|
end
|
26
24
|
|
27
25
|
after_transition(from: :pending, to: :read) do |message|
|
@@ -49,13 +49,13 @@
|
|
49
49
|
<li>
|
50
50
|
<%- if mode == 'unread' -%><strong><%- end -%>
|
51
51
|
<%= link_to t('message.unread'), url_for(params.merge(page: nil, mode: 'unread', only_path: true)) -%>
|
52
|
-
(<%= @message_facet['false'] -%>)
|
52
|
+
(<%= @message_facet['false'].to_i -%>)
|
53
53
|
<%- if mode == 'unread' -%></strong><%- end -%>
|
54
54
|
</li>
|
55
55
|
<li>
|
56
56
|
<%- if mode == 'read' -%><strong><%- end -%>
|
57
57
|
<%= link_to t('message.read'), url_for(params.merge(page: nil, mode: 'read', only_path: true)) -%>
|
58
|
-
(<%= @message_facet['true'] -%>)
|
58
|
+
(<%= @message_facet['true'].to_i -%>)
|
59
59
|
<%- if mode == 'read' -%></strong><%- end -%>
|
60
60
|
</li>
|
61
61
|
<% if mode.present? %>
|
@@ -2,7 +2,11 @@ class CreateMessageTransitions < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :message_transitions do |t|
|
4
4
|
t.string :to_state
|
5
|
-
|
5
|
+
if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
|
6
|
+
t.text :metadata
|
7
|
+
else
|
8
|
+
t.text :metadata, default: "{}"
|
9
|
+
end
|
6
10
|
t.integer :sort_key
|
7
11
|
t.integer :message_id
|
8
12
|
t.timestamps
|
@@ -2,7 +2,11 @@ class CreateMessageRequestTransitions < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :message_request_transitions do |t|
|
4
4
|
t.string :to_state
|
5
|
-
|
5
|
+
if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
|
6
|
+
t.text :metadata
|
7
|
+
else
|
8
|
+
t.text :metadata, default: "{}"
|
9
|
+
end
|
6
10
|
t.integer :sort_key
|
7
11
|
t.integer :message_request_id
|
8
12
|
t.timestamps
|
data/lib/enju_message/version.rb
CHANGED
@@ -1,25 +1,30 @@
|
|
1
|
-
|
2
|
-
# gem install sqlite3
|
3
|
-
#
|
4
|
-
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
-
# gem 'sqlite3'
|
6
|
-
development:
|
1
|
+
sqlite: &sqlite
|
7
2
|
adapter: sqlite3
|
8
|
-
database: db
|
3
|
+
database: db/<%= Rails.env %>.sqlite3
|
4
|
+
|
5
|
+
mysql: &mysql
|
6
|
+
adapter: mysql2
|
7
|
+
username: root
|
8
|
+
password:
|
9
|
+
database: enju_<%= Rails.env %>
|
10
|
+
|
11
|
+
postgresql: &postgresql
|
12
|
+
adapter: postgresql
|
13
|
+
username: postgres
|
14
|
+
password:
|
15
|
+
database: enju_<%= Rails.env %>
|
16
|
+
|
17
|
+
defaults: &defaults
|
9
18
|
pool: 5
|
10
19
|
timeout: 5000
|
20
|
+
host: localhost
|
21
|
+
<<: *<%= ENV['DB'] || "sqlite" %>
|
22
|
+
|
23
|
+
development:
|
24
|
+
<<: *defaults
|
11
25
|
|
12
|
-
# Warning: The database defined as "test" will be erased and
|
13
|
-
# re-generated from your development database when you run "rake".
|
14
|
-
# Do not set this db to the same as development or production.
|
15
26
|
test:
|
16
|
-
|
17
|
-
database: db/test.sqlite3
|
18
|
-
pool: 5
|
19
|
-
timeout: 5000
|
27
|
+
<<: *defaults
|
20
28
|
|
21
29
|
production:
|
22
|
-
|
23
|
-
database: db/production.sqlite3
|
24
|
-
pool: 5
|
25
|
-
timeout: 5000
|
30
|
+
<<: *defaults
|
@@ -13,7 +13,6 @@ class CreateManifestations < ActiveRecord::Migration
|
|
13
13
|
t.string :access_address
|
14
14
|
t.integer :language_id, :default => 1, :null => false
|
15
15
|
t.integer :carrier_type_id, :default => 1, :null => false
|
16
|
-
t.integer :extent_id, :default => 1, :null => false
|
17
16
|
t.integer :start_page
|
18
17
|
t.integer :end_page
|
19
18
|
t.integer :height
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateAgentMerges < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :agent_merges do |t|
|
4
|
+
t.integer :agent_id, :agent_merge_list_id, :null => false
|
5
|
+
|
6
|
+
t.timestamps
|
7
|
+
end
|
8
|
+
add_index :agent_merges, :agent_id
|
9
|
+
add_index :agent_merges, :agent_merge_list_id
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.down
|
13
|
+
drop_table :agent_merges
|
14
|
+
end
|
15
|
+
end
|
@@ -2,7 +2,11 @@ class CreateResourceImportFileTransitions < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :resource_import_file_transitions do |t|
|
4
4
|
t.string :to_state
|
5
|
-
|
5
|
+
if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
|
6
|
+
t.text :metadata
|
7
|
+
else
|
8
|
+
t.text :metadata, default: "{}"
|
9
|
+
end
|
6
10
|
t.integer :sort_key
|
7
11
|
t.integer :resource_import_file_id
|
8
12
|
t.timestamps
|
@@ -2,7 +2,11 @@ class CreateImportRequestTransitions < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :import_request_transitions do |t|
|
4
4
|
t.string :to_state
|
5
|
-
|
5
|
+
if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
|
6
|
+
t.text :metadata
|
7
|
+
else
|
8
|
+
t.text :metadata, default: "{}"
|
9
|
+
end
|
6
10
|
t.integer :sort_key
|
7
11
|
t.integer :import_request_id
|
8
12
|
t.timestamps
|
@@ -2,7 +2,11 @@ class CreateAgentImportFileTransitions < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :agent_import_file_transitions do |t|
|
4
4
|
t.string :to_state
|
5
|
-
|
5
|
+
if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
|
6
|
+
t.text :metadata
|
7
|
+
else
|
8
|
+
t.text :metadata, default: "{}"
|
9
|
+
end
|
6
10
|
t.integer :sort_key
|
7
11
|
t.integer :agent_import_file_id
|
8
12
|
t.timestamps
|
@@ -2,7 +2,11 @@ class CreateUserImportFileTransitions < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :user_import_file_transitions do |t|
|
4
4
|
t.string :to_state
|
5
|
-
|
5
|
+
if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
|
6
|
+
t.text :metadata
|
7
|
+
else
|
8
|
+
t.text :metadata, default: "{}"
|
9
|
+
end
|
6
10
|
t.integer :sort_key
|
7
11
|
t.integer :user_import_file_id
|
8
12
|
t.timestamps
|
@@ -2,7 +2,11 @@ class CreateResourceExportFileTransitions < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :resource_export_file_transitions do |t|
|
4
4
|
t.string :to_state
|
5
|
-
|
5
|
+
if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
|
6
|
+
t.text :metadata
|
7
|
+
else
|
8
|
+
t.text :metadata, default: "{}"
|
9
|
+
end
|
6
10
|
t.integer :sort_key
|
7
11
|
t.integer :resource_export_file_id
|
8
12
|
t.timestamps
|
@@ -2,7 +2,11 @@ class CreateUserExportFileTransitions < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :user_export_file_transitions do |t|
|
4
4
|
t.string :to_state
|
5
|
-
|
5
|
+
if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
|
6
|
+
t.text :metadata
|
7
|
+
else
|
8
|
+
t.text :metadata, default: "{}"
|
9
|
+
end
|
6
10
|
t.integer :sort_key
|
7
11
|
t.integer :user_export_file_id
|
8
12
|
t.timestamps
|