enju_message 0.2.0.beta.2 → 0.2.0.beta.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d2178282c88fc9d5f97467779f3519248e3fb48d
4
- data.tar.gz: a511d65452afb99d46cb088f03d19e6035eeec88
3
+ metadata.gz: 441aff9e7e5a976d1992b017a99b6e34e27368e6
4
+ data.tar.gz: f3c5686620152a6c18f1ae2f58c72885181a42fe
5
5
  SHA512:
6
- metadata.gz: dd44fff8d6efc15ad3be7212cc96af29863ec8b7871b4efeed4f836d66b14cd1285988522d61a412869d648b815726d084f2b18d8039aa32b14316bb92c09b84
7
- data.tar.gz: 76ed27dc928173f1e517e9c38f6c5f1e35d687c506a8d1d1eea742f33d1db1ebc1e7eb177822a30967a5926c6735b4d46285e67069cf6cfa473e11c83ee8b99d
6
+ metadata.gz: 6ab0afdb2ed3a8770103c969e01a636f6b19246b5cea7b7f48feac64f9fb0cbac541dfc48bf853a36a4dcc184c22f87f95d041944ee7d16b00607b13eb7d6064
7
+ data.tar.gz: cd2e727bd228bac06c5572a6fd200b8cf534cb5b65abedc951247d902afd7eb8f7a741503ce38d18beea38d2ac7cf64744c17e6d2c16a8c09c6b765978974184
@@ -10,11 +10,12 @@ end
10
10
  #
11
11
  # Table name: message_transitions
12
12
  #
13
- # id :integer not null, primary key
14
- # to_state :string
15
- # metadata :text default({})
16
- # sort_key :integer
17
- # message_id :integer
18
- # created_at :datetime
19
- # updated_at :datetime
13
+ # id :integer not null, primary key
14
+ # to_state :string
15
+ # metadata :text default({})
16
+ # sort_key :integer
17
+ # message_id :integer
18
+ # created_at :datetime
19
+ # updated_at :datetime
20
+ # most_recent :boolean
20
21
  #
@@ -1,3 +1,3 @@
1
1
  module EnjuMessage
2
- VERSION = "0.2.0.beta.2"
2
+ VERSION = "0.2.0.beta.3"
3
3
  end
@@ -16,9 +16,8 @@ namespace :enju_message do
16
16
 
17
17
  desc "upgrade enju_message"
18
18
  task :upgrade => :environment do
19
- MessageTemplate.transaction do
20
- update_message_template
21
- end
19
+ Rake::Task['statesman:backfill_most_recent'].invoke('Message')
20
+ Rake::Task['statesman:backfill_most_recent'].invoke('MessageRequest')
22
21
  puts 'enju_message: The upgrade completed successfully.'
23
22
  end
24
23
  end
@@ -6,6 +6,6 @@ class User < ActiveRecord::Base
6
6
  :lockable, :lock_strategy => :none, :unlock_strategy => :none
7
7
 
8
8
  # Setup accessible (or protected) attributes for your model
9
- include EnjuLeaf::EnjuUser
9
+ include EnjuSeed::EnjuUser
10
10
  include EnjuMessage::EnjuUser
11
11
  end
@@ -5,6 +5,8 @@ require 'rails/all'
5
5
  Bundler.require(*Rails.groups)
6
6
  require 'enju_message'
7
7
  require 'enju_leaf'
8
+ require 'globalize'
9
+ require 'globalize-accessors'
8
10
  require 'resque_mailer'
9
11
 
10
12
  module Dummy
@@ -6,7 +6,7 @@ class CreateUserImportFiles < ActiveRecord::Migration
6
6
  t.datetime :executed_at
7
7
  t.string :user_import_file_name
8
8
  t.string :user_import_content_type
9
- t.string :user_import_file_size
9
+ t.integer :user_import_file_size
10
10
  t.datetime :user_import_updated_at
11
11
  t.string :user_import_fingerprint
12
12
  t.string :edit_mode
@@ -0,0 +1,5 @@
1
+ class AddErrorMessageToUserImportResult < ActiveRecord::Migration
2
+ def change
3
+ add_column :user_import_results, :error_message, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddHtmlSnippetToLibraryGroup < ActiveRecord::Migration
2
+ def change
3
+ add_column :library_groups, :html_snippet, :text
4
+ end
5
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToUserImportFileTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :user_import_file_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :user_import_file_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToUserExportFileTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :user_export_file_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :user_export_file_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class AddEmailToLibraryGroup < ActiveRecord::Migration
2
+ def change
3
+ add_column :library_groups, :email, :string
4
+ end
5
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20160703185015) do
14
+ ActiveRecord::Schema.define(version: 20160813130535) do
15
15
 
16
16
  create_table "accepts", force: :cascade do |t|
17
17
  t.integer "basket_id"
@@ -460,6 +460,8 @@ ActiveRecord::Schema.define(version: 20160703185015) do
460
460
  t.text "admin_networks"
461
461
  t.string "url", default: "http://localhost:3000/"
462
462
  t.text "settings"
463
+ t.text "html_snippet"
464
+ t.string "email"
463
465
  end
464
466
 
465
467
  add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
@@ -933,6 +935,7 @@ ActiveRecord::Schema.define(version: 20160703185015) do
933
935
  t.integer "user_export_file_id"
934
936
  t.datetime "created_at"
935
937
  t.datetime "updated_at"
938
+ t.boolean "most_recent"
936
939
  end
937
940
 
938
941
  add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
@@ -978,6 +981,7 @@ ActiveRecord::Schema.define(version: 20160703185015) do
978
981
  t.integer "user_import_file_id"
979
982
  t.datetime "created_at"
980
983
  t.datetime "updated_at"
984
+ t.boolean "most_recent"
981
985
  end
982
986
 
983
987
  add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
@@ -989,7 +993,7 @@ ActiveRecord::Schema.define(version: 20160703185015) do
989
993
  t.datetime "executed_at"
990
994
  t.string "user_import_file_name"
991
995
  t.string "user_import_content_type"
992
- t.string "user_import_file_size"
996
+ t.integer "user_import_file_size"
993
997
  t.datetime "user_import_updated_at"
994
998
  t.string "user_import_fingerprint"
995
999
  t.string "edit_mode"
@@ -1007,6 +1011,7 @@ ActiveRecord::Schema.define(version: 20160703185015) do
1007
1011
  t.text "body"
1008
1012
  t.datetime "created_at"
1009
1013
  t.datetime "updated_at"
1014
+ t.text "error_message"
1010
1015
  end
1011
1016
 
1012
1017
  create_table "users", force: :cascade do |t|
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.2.0.beta.2
4
+ version: 0.2.0.beta.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-12 00:00:00.000000000 Z
11
+ date: 2016-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: enju_library
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.0.beta.3
19
+ version: 0.2.0.beta.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.0.beta.3
26
+ version: 0.2.0.beta.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: awesome_nested_set
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,42 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.2.0.beta.1
61
+ version: 0.2.0.beta.2
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.2.0.beta.1
68
+ version: 0.2.0.beta.2
69
+ - !ruby/object:Gem::Dependency
70
+ name: globalize
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: globalize-accessors
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: sqlite3
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -307,7 +335,6 @@ files:
307
335
  - spec/dummy/app/assets/stylesheets/application.css
308
336
  - spec/dummy/app/controllers/application_controller.rb
309
337
  - spec/dummy/app/helpers/application_helper.rb
310
- - spec/dummy/app/models/ability.rb
311
338
  - spec/dummy/app/models/user.rb
312
339
  - spec/dummy/app/views/layouts/application.html.erb
313
340
  - spec/dummy/bin/bundle
@@ -463,9 +490,14 @@ files:
463
490
  - spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb
464
491
  - spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb
465
492
  - spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb
493
+ - spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb
466
494
  - spec/dummy/db/migrate/20150924115059_create_withdraws.rb
467
495
  - spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
468
496
  - spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb
497
+ - spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb
498
+ - spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb
499
+ - spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb
500
+ - spec/dummy/db/migrate/20160813130535_add_email_to_library_group.rb
469
501
  - spec/dummy/db/schema.rb
470
502
  - spec/dummy/public/404.html
471
503
  - spec/dummy/public/422.html
@@ -525,7 +557,6 @@ test_files:
525
557
  - spec/dummy/app/assets/stylesheets/application.css
526
558
  - spec/dummy/app/controllers/application_controller.rb
527
559
  - spec/dummy/app/helpers/application_helper.rb
528
- - spec/dummy/app/models/ability.rb
529
560
  - spec/dummy/app/models/user.rb
530
561
  - spec/dummy/app/views/layouts/application.html.erb
531
562
  - spec/dummy/bin/bundle
@@ -681,9 +712,14 @@ test_files:
681
712
  - spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb
682
713
  - spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb
683
714
  - spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb
715
+ - spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb
684
716
  - spec/dummy/db/migrate/20150924115059_create_withdraws.rb
685
717
  - spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
686
718
  - spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb
719
+ - spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb
720
+ - spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb
721
+ - spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb
722
+ - spec/dummy/db/migrate/20160813130535_add_email_to_library_group.rb
687
723
  - spec/dummy/db/schema.rb
688
724
  - spec/dummy/public/404.html
689
725
  - spec/dummy/public/422.html
@@ -1,32 +0,0 @@
1
- #module EnjuMessage
2
- class Ability
3
- include CanCan::Ability
4
-
5
- def initialize(user, ip_address = nil)
6
- case user.try(:role).try(:name)
7
- when 'Administrator'
8
- can :manage, Message
9
- can [:read, :update, :destroy, :delete], MessageRequest
10
- can [:read, :update], MessageTemplate
11
- when 'Librarian'
12
- can [:index, :create], Message
13
- can [:update], Message do |message|
14
- message.sender == user
15
- end
16
- can [:show, :destroy, :delete], Message do |message|
17
- message.receiver == user
18
- end
19
- can [:read, :update, [:destroy, :delete]], MessageRequest
20
- can :read, MessageTemplate
21
- when 'User'
22
- can [:read, :destroy, :delete], Message do |message|
23
- message.receiver == user
24
- end
25
- can :index, Message
26
- can :show, Message do |message|
27
- message.receiver == user
28
- end
29
- end
30
- end
31
- end
32
- #end