message_train 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +20 -0
- data/.ruby-gemset +1 -1
- data/.scss-lint.yml +7 -0
- data/.simplecov +1 -1
- data/.travis.yml +1 -1
- data/Gemfile +6 -2
- data/LICENSE.txt +2 -2
- data/README.rdoc +5 -5
- data/Rakefile +22 -21
- data/VERSION +1 -1
- data/app/assets/javascripts/message_train.js +1 -1
- data/app/assets/stylesheets/message_train.scss +29 -19
- data/app/controllers/concerns/message_train_support.rb +41 -37
- data/app/controllers/message_train/application_controller.rb +1 -0
- data/app/controllers/message_train/boxes_controller.rb +5 -4
- data/app/controllers/message_train/conversations_controller.rb +8 -7
- data/app/controllers/message_train/messages_controller.rb +25 -22
- data/app/controllers/message_train/participants_controller.rb +27 -23
- data/app/controllers/message_train/unsubscribes_controller.rb +37 -23
- data/app/helpers/message_train/application_helper.rb +6 -8
- data/app/helpers/message_train/attachments_helper.rb +12 -4
- data/app/helpers/message_train/boxes_helper.rb +38 -11
- data/app/helpers/message_train/collectives_helper.rb +38 -12
- data/app/helpers/message_train/conversations_helper.rb +43 -35
- data/app/helpers/message_train/messages_helper.rb +32 -25
- data/app/mailers/message_train/application_mailer.rb +7 -4
- data/app/mailers/message_train/previews/receipt_mailer_preview.rb +2 -3
- data/app/mailers/message_train/receipt_mailer.rb +14 -4
- data/app/models/message_train/attachment.rb +41 -25
- data/app/models/message_train/box.rb +159 -122
- data/app/models/message_train/conversation.rb +84 -41
- data/app/models/message_train/ignore.rb +8 -2
- data/app/models/message_train/message.rb +72 -42
- data/app/models/message_train/receipt.rb +30 -17
- data/app/models/message_train/unsubscribe.rb +1 -0
- data/app/views/application/404.html.haml +1 -1
- data/app/views/layouts/mailer.html.haml +2 -2
- data/app/views/layouts/mailer.text.haml +1 -1
- data/app/views/message_train/application/_attachment_fields.html.haml +1 -1
- data/app/views/message_train/application/_widget.html.haml +1 -1
- data/app/views/message_train/application/results.json.jbuilder +1 -1
- data/app/views/message_train/boxes/_dropdown_list.html.haml +1 -1
- data/app/views/message_train/boxes/_list_item.html.haml +1 -1
- data/app/views/message_train/boxes/show.html.haml +1 -1
- data/app/views/message_train/collectives/_dropdown_list.html.haml +1 -1
- data/app/views/message_train/collectives/_list_item.html.haml +1 -1
- data/app/views/message_train/conversations/_deleted_toggle.html.haml +1 -1
- data/app/views/message_train/conversations/_ignored_toggle.html.haml +2 -2
- data/app/views/message_train/conversations/_read_toggle.html.haml +1 -1
- data/app/views/message_train/conversations/_toggle.html.haml +1 -1
- data/app/views/message_train/conversations/_trashed_toggle.html.haml +1 -1
- data/app/views/message_train/conversations/show.html.haml +2 -2
- data/app/views/message_train/conversations/show.json.jbuilder +5 -1
- data/app/views/message_train/messages/_form.html.haml +1 -1
- data/app/views/message_train/messages/_message.html.haml +6 -6
- data/app/views/message_train/messages/_toggle.html.haml +1 -1
- data/app/views/message_train/messages/show.json.jbuilder +5 -1
- data/app/views/message_train/participants/_participant.json.jbuilder +1 -1
- data/app/views/message_train/participants/index.json.jbuilder +1 -1
- data/app/views/message_train/participants/show.json.jbuilder +1 -1
- data/app/views/message_train/receipt_mailer/notification_email.html.haml +1 -1
- data/app/views/message_train/receipt_mailer/notification_email.text.haml +1 -1
- data/app/views/message_train/unsubscribes/index.html.haml +1 -1
- data/config/environment.rb +1 -1
- data/config/initializers/date_time.rb +2 -2
- data/config/locales/en.yml +1 -1
- data/config/routes.rb +37 -15
- data/lib/generators/message_train/install/install_generator.rb +26 -11
- data/lib/generators/message_train/install/templates/initializer.rb +0 -2
- data/lib/generators/message_train/utils.rb +11 -4
- data/lib/message_train/configuration.rb +4 -5
- data/lib/message_train/engine.rb +1 -7
- data/lib/message_train/localization.rb +14 -18
- data/lib/message_train/mixin.rb +211 -150
- data/lib/message_train/version.rb +1 -0
- data/lib/message_train.rb +7 -6
- data/message_train.gemspec +24 -11
- data/spec/controllers/message_train/boxes_controller_spec.rb +63 -15
- data/spec/controllers/message_train/concerns_spec.rb +17 -13
- data/spec/controllers/message_train/conversations_controller_spec.rb +44 -12
- data/spec/controllers/message_train/messages_controller_spec.rb +87 -40
- data/spec/controllers/message_train/participants_controller_spec.rb +10 -4
- data/spec/controllers/message_train/unsubscribes_controller_spec.rb +43 -13
- data/spec/dummy/Rakefile +2 -1
- data/spec/dummy/app/assets/stylesheets/application.css.scss +7 -23
- data/spec/dummy/app/controllers/application_controller.rb +7 -7
- data/spec/dummy/app/models/group.rb +1 -1
- data/spec/dummy/app/models/role.rb +11 -7
- data/spec/dummy/app/models/user.rb +6 -5
- data/spec/dummy/app/views/layouts/_top_navigation.html.haml +1 -1
- data/spec/dummy/app/views/layouts/application.html.haml +1 -1
- data/spec/dummy/app/views/pages/index.html.haml +1 -1
- data/spec/dummy/config/application.rb +23 -17
- data/spec/dummy/config/environments/development.rb +5 -4
- data/spec/dummy/config/environments/production.rb +10 -6
- data/spec/dummy/config/environments/test.rb +4 -3
- data/spec/dummy/config/initializers/assets.rb +2 -1
- data/spec/dummy/config/initializers/backtrace_silencers.rb +4 -2
- data/spec/dummy/config/initializers/bootstrap_leather.rb +1 -1
- data/spec/dummy/config/initializers/devise.rb +63 -44
- data/spec/dummy/config/initializers/high_voltage.rb +1 -1
- data/spec/dummy/config/initializers/message_train.rb +5 -2
- data/spec/dummy/config/initializers/mime_types.rb +1 -1
- data/spec/dummy/config/initializers/paperclip.rb +5 -2
- data/spec/dummy/config/initializers/rolify.rb +3 -2
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -1
- data/spec/dummy/config/routes.rb +1 -3
- data/spec/dummy/config/settings.yml +1 -1
- data/spec/dummy/db/schema.rb +98 -98
- data/spec/dummy/db/seeds/conversations.seeds.rb +160 -160
- data/spec/dummy/db/seeds/development/conversations.seeds.rb +6 -2
- data/spec/dummy/db/seeds/groups.seeds.rb +11 -12
- data/spec/dummy/db/seeds/test/attachments.seeds.rb +13 -3
- data/spec/dummy/db/seeds/test/conversations.seeds.rb +6 -2
- data/spec/dummy/db/seeds/unsubscribes.seeds.rb +1 -1
- data/spec/dummy/db/seeds/users.seeds.rb +47 -42
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/factories/attachment.rb +6 -2
- data/spec/factories/group.rb +1 -4
- data/spec/factories/message.rb +29 -23
- data/spec/factories/user.rb +6 -4
- data/spec/features/boxes_spec.rb +76 -24
- data/spec/features/conversations_spec.rb +19 -7
- data/spec/features/messages_spec.rb +24 -5
- data/spec/features/unsubscribes_spec.rb +36 -9
- data/spec/helpers/message_train/application_helper_spec.rb +1 -1
- data/spec/helpers/message_train/attachment_helper_spec.rb +27 -12
- data/spec/helpers/message_train/boxes_helper_spec.rb +1 -1
- data/spec/helpers/message_train/collectives_helper_spec.rb +25 -9
- data/spec/helpers/message_train/conversations_helper_spec.rb +239 -120
- data/spec/helpers/message_train/messages_helper_spec.rb +137 -81
- data/spec/message_train_spec.rb +3 -2
- data/spec/models/group_spec.rb +12 -9
- data/spec/models/message_train/attachment_spec.rb +33 -30
- data/spec/models/message_train/box_spec.rb +243 -60
- data/spec/models/message_train/conversation_spec.rb +16 -12
- data/spec/models/message_train/ignore_spec.rb +3 -1
- data/spec/models/message_train/message_spec.rb +22 -7
- data/spec/models/message_train/receipt_spec.rb +14 -4
- data/spec/models/role_spec.rb +10 -6
- data/spec/models/user_spec.rb +74 -22
- data/spec/rails_helper.rb +9 -4
- data/spec/spec_helper.rb +6 -54
- data/spec/support/controller_behaviors.rb +8 -5
- data/spec/support/controller_macros.rb +2 -2
- data/spec/support/factory_girl.rb +1 -1
- data/spec/support/feature_behaviors.rb +42 -13
- data/spec/support/loaded_site/attachments.rb +8 -0
- data/spec/support/loaded_site/conversations.rb +73 -0
- data/spec/support/{groups.rb → loaded_site/groups.rb} +1 -1
- data/spec/support/{loaded_site.rb → loaded_site/loaded_site.rb} +1 -1
- data/spec/support/{messages.rb → loaded_site/messages.rb} +13 -5
- data/spec/support/{roles.rb → loaded_site/roles.rb} +1 -1
- data/spec/support/{users.rb → loaded_site/users.rb} +1 -1
- data/spec/support/shared_connection.rb +8 -6
- data/spec/support/utilities.rb +10 -10
- metadata +67 -10
- data/spec/dummy/config/unused/temporary_i18n_debugging.rb +0 -12
- data/spec/support/attachments.rb +0 -4
- data/spec/support/conversations.rb +0 -23
@@ -0,0 +1,73 @@
|
|
1
|
+
shared_context 'conversations' do
|
2
|
+
let(:sent_conversation) do
|
3
|
+
MessageTrain::Conversation.find_by_subject('Sent Conversation')
|
4
|
+
end
|
5
|
+
let(:unread_conversation) do
|
6
|
+
MessageTrain::Conversation.find_by_subject('Unread Conversation')
|
7
|
+
end
|
8
|
+
let(:to_many_conversation) do
|
9
|
+
MessageTrain::Conversation.find_by_subject('To Many Conversation')
|
10
|
+
end
|
11
|
+
let(:ignored_conversation) do
|
12
|
+
MessageTrain::Conversation.find_by_subject('Ignored Conversation')
|
13
|
+
end
|
14
|
+
let(:trashed_conversation) do
|
15
|
+
MessageTrain::Conversation.find_by_subject('Trashed Conversation')
|
16
|
+
end
|
17
|
+
let(:read_conversation) do
|
18
|
+
MessageTrain::Conversation.find_by_subject('Read Conversation')
|
19
|
+
end
|
20
|
+
let(:attachment_conversation) do
|
21
|
+
MessageTrain::Conversation.find_by_subject('Attachment Conversation')
|
22
|
+
end
|
23
|
+
let(:deleted_conversation) do
|
24
|
+
MessageTrain::Conversation.find_by_subject('Deleted Conversation')
|
25
|
+
end
|
26
|
+
let(:group_conversation) do
|
27
|
+
MessageTrain::Conversation.find_by_subject('Group Announcement')
|
28
|
+
end
|
29
|
+
let(:membered_group_conversation) do
|
30
|
+
MessageTrain::Conversation.find_by_subject('Membered Group Announcement')
|
31
|
+
end
|
32
|
+
let(:membered_group_trashed_conversation) do
|
33
|
+
MessageTrain::Conversation.find_by_subject(
|
34
|
+
'Membered Group Trashed Conversation'
|
35
|
+
)
|
36
|
+
end
|
37
|
+
let(:membered_group_read_conversation) do
|
38
|
+
MessageTrain::Conversation.find_by_subject(
|
39
|
+
'Membered Group Read Conversation'
|
40
|
+
)
|
41
|
+
end
|
42
|
+
let(:membered_group_ignored_conversation) do
|
43
|
+
MessageTrain::Conversation.find_by_subject(
|
44
|
+
'Membered Group Ignored Conversation'
|
45
|
+
)
|
46
|
+
end
|
47
|
+
let(:membered_group_deleted_conversation) do
|
48
|
+
MessageTrain::Conversation.find_by_subject(
|
49
|
+
'Membered Group Deleted Conversation'
|
50
|
+
)
|
51
|
+
end
|
52
|
+
let(:membered_group_draft) do
|
53
|
+
MessageTrain::Conversation.find_by_subject('Membered Group Draft')
|
54
|
+
end
|
55
|
+
let(:owned_group_draft) do
|
56
|
+
MessageTrain::Conversation.find_by_subject('Owned Group Draft')
|
57
|
+
end
|
58
|
+
let(:someone_elses_conversation) do
|
59
|
+
MessageTrain::Conversation.find_by_subject("Someone Else's Conversation")
|
60
|
+
end
|
61
|
+
let(:draft_conversation) do
|
62
|
+
MessageTrain::Conversation.find_by_subject('This should turn into a draft')
|
63
|
+
end
|
64
|
+
let(:long_conversation) do
|
65
|
+
MessageTrain::Conversation.find_by_subject('Long Conversation')
|
66
|
+
end
|
67
|
+
let(:role_conversation) do
|
68
|
+
MessageTrain::Conversation.find_by_subject('Role Conversation')
|
69
|
+
end
|
70
|
+
let(:role_draft) do
|
71
|
+
MessageTrain::Conversation.find_by_subject('Role Draft')
|
72
|
+
end
|
73
|
+
end
|
@@ -9,10 +9,18 @@ shared_context 'messages' do
|
|
9
9
|
let(:deleted_message) { deleted_conversation.messages.first }
|
10
10
|
let(:group_message) { group_conversation.messages.first }
|
11
11
|
let(:membered_group_message) { membered_group_conversation.messages.first }
|
12
|
-
let(:membered_group_trashed_message)
|
13
|
-
|
14
|
-
|
15
|
-
let(:
|
12
|
+
let(:membered_group_trashed_message) do
|
13
|
+
membered_group_trashed_conversation.messages.first
|
14
|
+
end
|
15
|
+
let(:membered_group_read_message) do
|
16
|
+
membered_group_read_conversation.messages.first
|
17
|
+
end
|
18
|
+
let(:membered_group_ignored_message) do
|
19
|
+
membered_group_ignored_conversation.messages.first
|
20
|
+
end
|
21
|
+
let(:membered_group_deleted_message) do
|
22
|
+
membered_group_deleted_conversation.messages.first
|
23
|
+
end
|
16
24
|
let(:membered_group_draft_message) { membered_group_draft.messages.first }
|
17
25
|
let(:owned_group_draft_message) { owned_group_draft.messages.first }
|
18
26
|
let(:someone_elses_message) { someone_elses_conversation.messages.first }
|
@@ -20,4 +28,4 @@ shared_context 'messages' do
|
|
20
28
|
let(:long_message) { long_conversation.messages.first }
|
21
29
|
let(:role_message) { role_conversation.messages.first }
|
22
30
|
let(:role_draft_message) { role_draft.messages.first }
|
23
|
-
end
|
31
|
+
end
|
@@ -1,12 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
module ActiveRecord
|
2
|
+
class Base
|
3
|
+
mattr_accessor :shared_connection
|
4
|
+
@@shared_connection = nil
|
4
5
|
|
5
|
-
|
6
|
-
|
6
|
+
def self.connection
|
7
|
+
@@shared_connection || retrieve_connection
|
8
|
+
end
|
7
9
|
end
|
8
10
|
end
|
9
11
|
|
10
12
|
# Forces all threads to share the same connection. This works on
|
11
13
|
# Capybara because it starts the web server in a thread.
|
12
|
-
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
|
14
|
+
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
|
data/spec/support/utilities.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
def path_to_url(path)
|
2
|
-
"#{request.protocol}#{request.host_with_port.sub(/:80$/,
|
2
|
+
"#{request.protocol}#{request.host_with_port.sub(/:80$/, '')}/"\
|
3
|
+
"#{path.sub(%r{^/}, '')}"
|
3
4
|
end
|
4
5
|
|
5
6
|
def show_page
|
6
|
-
save_page Rails.root.join(
|
7
|
-
|
7
|
+
save_page Rails.root.join('public', 'capybara.html')
|
8
|
+
`launchy http://localhost:3000/capybara.html`
|
8
9
|
end
|
9
10
|
|
10
11
|
def submit_via_button(button_name)
|
@@ -29,12 +30,11 @@ def fill_in_autocomplete(field, options = {})
|
|
29
30
|
field = find_field_by_label(field)
|
30
31
|
fill_in field, with: options[:with]
|
31
32
|
|
32
|
-
page.execute_script
|
33
|
-
page.execute_script
|
34
|
-
selector = %Q{.tt-menu .tt-suggestion:contains("#{options[:with]}")}
|
35
|
-
|
33
|
+
page.execute_script "$('##{field}').trigger('focus')"
|
34
|
+
page.execute_script "$('##{field}').trigger('keydown')"
|
36
35
|
if page.has_selector?('.tt-menu .tt-suggestion')
|
37
|
-
|
36
|
+
selector = ".tt-menu .tt-suggestion:contains('#{options[:with]}')"
|
37
|
+
page.execute_script '$("' + selector + '").trigger("mouseenter").click()'
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -54,6 +54,6 @@ def wait_until(delay = 1)
|
|
54
54
|
end
|
55
55
|
unless yield
|
56
56
|
puts "Waited for #{Capybara.default_max_wait_time} seconds."
|
57
|
-
puts "{#{yield}} did not become true, continuing."
|
57
|
+
puts "{ #{yield} } did not become true, continuing."
|
58
58
|
end
|
59
|
-
end
|
59
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: message_train
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karen Lundgren
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -304,6 +304,62 @@ dependencies:
|
|
304
304
|
- - "~>"
|
305
305
|
- !ruby/object:Gem::Version
|
306
306
|
version: '2.0'
|
307
|
+
- !ruby/object:Gem::Dependency
|
308
|
+
name: pre-commit
|
309
|
+
requirement: !ruby/object:Gem::Requirement
|
310
|
+
requirements:
|
311
|
+
- - "~>"
|
312
|
+
- !ruby/object:Gem::Version
|
313
|
+
version: '0.27'
|
314
|
+
type: :development
|
315
|
+
prerelease: false
|
316
|
+
version_requirements: !ruby/object:Gem::Requirement
|
317
|
+
requirements:
|
318
|
+
- - "~>"
|
319
|
+
- !ruby/object:Gem::Version
|
320
|
+
version: '0.27'
|
321
|
+
- !ruby/object:Gem::Dependency
|
322
|
+
name: rubocop
|
323
|
+
requirement: !ruby/object:Gem::Requirement
|
324
|
+
requirements:
|
325
|
+
- - "~>"
|
326
|
+
- !ruby/object:Gem::Version
|
327
|
+
version: '0.37'
|
328
|
+
type: :development
|
329
|
+
prerelease: false
|
330
|
+
version_requirements: !ruby/object:Gem::Requirement
|
331
|
+
requirements:
|
332
|
+
- - "~>"
|
333
|
+
- !ruby/object:Gem::Version
|
334
|
+
version: '0.37'
|
335
|
+
- !ruby/object:Gem::Dependency
|
336
|
+
name: coffeelint
|
337
|
+
requirement: !ruby/object:Gem::Requirement
|
338
|
+
requirements:
|
339
|
+
- - "~>"
|
340
|
+
- !ruby/object:Gem::Version
|
341
|
+
version: '1.14'
|
342
|
+
type: :development
|
343
|
+
prerelease: false
|
344
|
+
version_requirements: !ruby/object:Gem::Requirement
|
345
|
+
requirements:
|
346
|
+
- - "~>"
|
347
|
+
- !ruby/object:Gem::Version
|
348
|
+
version: '1.14'
|
349
|
+
- !ruby/object:Gem::Dependency
|
350
|
+
name: scss_lint
|
351
|
+
requirement: !ruby/object:Gem::Requirement
|
352
|
+
requirements:
|
353
|
+
- - "~>"
|
354
|
+
- !ruby/object:Gem::Version
|
355
|
+
version: 0.47.0
|
356
|
+
type: :development
|
357
|
+
prerelease: false
|
358
|
+
version_requirements: !ruby/object:Gem::Requirement
|
359
|
+
requirements:
|
360
|
+
- - "~>"
|
361
|
+
- !ruby/object:Gem::Version
|
362
|
+
version: 0.47.0
|
307
363
|
- !ruby/object:Gem::Dependency
|
308
364
|
name: sqlite3
|
309
365
|
requirement: !ruby/object:Gem::Requirement
|
@@ -469,8 +525,10 @@ extra_rdoc_files:
|
|
469
525
|
files:
|
470
526
|
- ".document"
|
471
527
|
- ".rspec"
|
528
|
+
- ".rubocop.yml"
|
472
529
|
- ".ruby-gemset"
|
473
530
|
- ".ruby-version"
|
531
|
+
- ".scss-lint.yml"
|
474
532
|
- ".simplecov"
|
475
533
|
- ".travis.yml"
|
476
534
|
- Gemfile
|
@@ -650,7 +708,6 @@ files:
|
|
650
708
|
- spec/dummy/config/routes.rb
|
651
709
|
- spec/dummy/config/secrets.yml
|
652
710
|
- spec/dummy/config/settings.yml
|
653
|
-
- spec/dummy/config/unused/temporary_i18n_debugging.rb
|
654
711
|
- spec/dummy/db/migrate/20150721140013_devise_create_users.rb
|
655
712
|
- spec/dummy/db/migrate/20150721141009_rolify_create_roles.rb
|
656
713
|
- spec/dummy/db/migrate/20150721141128_create_groups.rb
|
@@ -706,18 +763,18 @@ files:
|
|
706
763
|
- spec/models/user_spec.rb
|
707
764
|
- spec/rails_helper.rb
|
708
765
|
- spec/spec_helper.rb
|
709
|
-
- spec/support/attachments.rb
|
710
766
|
- spec/support/controller_behaviors.rb
|
711
767
|
- spec/support/controller_macros.rb
|
712
|
-
- spec/support/conversations.rb
|
713
768
|
- spec/support/factory_girl.rb
|
714
769
|
- spec/support/feature_behaviors.rb
|
715
|
-
- spec/support/
|
716
|
-
- spec/support/loaded_site.rb
|
717
|
-
- spec/support/
|
718
|
-
- spec/support/
|
770
|
+
- spec/support/loaded_site/attachments.rb
|
771
|
+
- spec/support/loaded_site/conversations.rb
|
772
|
+
- spec/support/loaded_site/groups.rb
|
773
|
+
- spec/support/loaded_site/loaded_site.rb
|
774
|
+
- spec/support/loaded_site/messages.rb
|
775
|
+
- spec/support/loaded_site/roles.rb
|
776
|
+
- spec/support/loaded_site/users.rb
|
719
777
|
- spec/support/shared_connection.rb
|
720
|
-
- spec/support/users.rb
|
721
778
|
- spec/support/utilities.rb
|
722
779
|
homepage: http://www.gemvein.com/museum/cases/message_train
|
723
780
|
licenses:
|
@@ -1,12 +0,0 @@
|
|
1
|
-
module I18n
|
2
|
-
module Registry
|
3
|
-
protected
|
4
|
-
def lookup(locale, key, scope = [], options = {})
|
5
|
-
@log ||= Logger.new(File.join(Rails.root, 'log', 'i18n_registry.log'))
|
6
|
-
@log.info key
|
7
|
-
super
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
I18n::Backend::Simple.send :include, I18n::Registry
|
data/spec/support/attachments.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
shared_context 'conversations' do
|
2
|
-
let(:sent_conversation) { MessageTrain::Conversation.find_by_subject('Sent Conversation') }
|
3
|
-
let(:unread_conversation) { MessageTrain::Conversation.find_by_subject('Unread Conversation') }
|
4
|
-
let(:to_many_conversation) { MessageTrain::Conversation.find_by_subject('To Many Conversation') }
|
5
|
-
let(:ignored_conversation) { MessageTrain::Conversation.find_by_subject('Ignored Conversation') }
|
6
|
-
let(:trashed_conversation) { MessageTrain::Conversation.find_by_subject('Trashed Conversation') }
|
7
|
-
let(:read_conversation) { MessageTrain::Conversation.find_by_subject('Read Conversation') }
|
8
|
-
let(:attachment_conversation) { MessageTrain::Conversation.find_by_subject('Attachment Conversation') }
|
9
|
-
let(:deleted_conversation) { MessageTrain::Conversation.find_by_subject('Deleted Conversation') }
|
10
|
-
let(:group_conversation) { MessageTrain::Conversation.find_by_subject('Group Announcement') }
|
11
|
-
let(:membered_group_conversation) { MessageTrain::Conversation.find_by_subject('Membered Group Announcement') }
|
12
|
-
let(:membered_group_trashed_conversation) { MessageTrain::Conversation.find_by_subject('Membered Group Trashed Conversation') }
|
13
|
-
let(:membered_group_read_conversation) { MessageTrain::Conversation.find_by_subject('Membered Group Read Conversation') }
|
14
|
-
let(:membered_group_ignored_conversation) { MessageTrain::Conversation.find_by_subject('Membered Group Ignored Conversation') }
|
15
|
-
let(:membered_group_deleted_conversation) { MessageTrain::Conversation.find_by_subject('Membered Group Deleted Conversation') }
|
16
|
-
let(:membered_group_draft) { MessageTrain::Conversation.find_by_subject('Membered Group Draft') }
|
17
|
-
let(:owned_group_draft) { MessageTrain::Conversation.find_by_subject('Owned Group Draft') }
|
18
|
-
let(:someone_elses_conversation) { MessageTrain::Conversation.find_by_subject("Someone Else's Conversation") }
|
19
|
-
let(:draft_conversation) { MessageTrain::Conversation.find_by_subject('This should turn into a draft')}
|
20
|
-
let(:long_conversation) { MessageTrain::Conversation.find_by_subject('Long Conversation')}
|
21
|
-
let(:role_conversation) { MessageTrain::Conversation.find_by_subject('Role Conversation')}
|
22
|
-
let(:role_draft) { MessageTrain::Conversation.find_by_subject('Role Draft')}
|
23
|
-
end
|