enju_subject 0.2.0.beta.3 → 0.2.0.beta.4

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: 794e5bc5c6cfb74496167d52cd6daa692b5d59dc
4
- data.tar.gz: fe40e33d687169d398d6a5189defe46229483e56
3
+ metadata.gz: 5971bea8171cb14e32272cd3add00385511f16a0
4
+ data.tar.gz: 846e260f07a40da0c6dab1932ed6b6d3b18e9e52
5
5
  SHA512:
6
- metadata.gz: 8e0f10fc7fd783b693b72b9fd6eb5fe9ee9e15fcfce945e99b2dce67666cd07d6c67497a8cc10a8c85a236e3f5672b5bd90490a42129dd03d44b56c93079008b
7
- data.tar.gz: 63e51fcd918313090f54e21fc9de6fc367ebc826076f02bde3fd97f4e104dc70c1a54a7a6be32979af7739ca63d67bfc0446c5308238f0cd6a0fd08ecea32006
6
+ metadata.gz: 965017ebdbccebd46e8393163730a881ed6bd5fb62a2c7ae453a8cca998689ba82a51f2bff2dcb1db278a0f12ae7fed79be2145806a99c38c81dafef0b1031f6
7
+ data.tar.gz: 812e54dab201fc037086090a3d0e524ceefb270bbb8766172ff9eb990a3c1a617c2c0590f6afa630866ddef63ce21eb126daf0e18fe6d6a018c6396daaac5b32
@@ -1,3 +1,3 @@
1
1
  module EnjuSubject
2
- VERSION = "0.2.0.beta.3"
2
+ VERSION = "0.2.0.beta.4"
3
3
  end
@@ -6,7 +6,7 @@ class EnjuSubject::SetupGenerator < Rails::Generators::Base
6
6
  rake("enju_subject_engine:install:migrations")
7
7
  inject_into_file 'app/controllers/application_controller.rb',
8
8
  " include EnjuSubject::Controller\n", after: "EnjuLibrary::Controller\n"
9
- append_to_file("config/initializers/enju_leaf.rb") do
9
+ append_to_file("app/models/user.rb") do
10
10
  <<"EOS"
11
11
  Manifestation.include(EnjuSubject::EnjuManifestation)
12
12
  EOS
@@ -5,3 +5,5 @@ class User < ActiveRecord::Base
5
5
 
6
6
  include EnjuSeed::EnjuUser
7
7
  end
8
+
9
+ Manifestation.include(EnjuSubject::EnjuManifestation)
@@ -0,0 +1,18 @@
1
+ class CreateMessageTemplates < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :message_templates do |t|
4
+ t.string :status, :null => false
5
+ t.text :title, :null => false
6
+ t.text :body, :null => false
7
+ t.integer :position
8
+ t.string :locale, :default => I18n.default_locale.to_s
9
+
10
+ t.timestamps
11
+ end
12
+ add_index :message_templates, :status, :unique => true
13
+ end
14
+
15
+ def self.down
16
+ drop_table :message_templates
17
+ end
18
+ end
@@ -0,0 +1,23 @@
1
+ class CreateMessages < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :messages, :force => true do |t|
4
+ t.datetime :read_at
5
+ t.integer :receiver_id, :sender_id
6
+ t.string :subject, :null => false
7
+ t.text :body
8
+ t.integer :message_request_id
9
+ t.integer :parent_id
10
+
11
+ t.timestamps
12
+ end
13
+
14
+ add_index :messages, :sender_id
15
+ add_index :messages, :receiver_id
16
+ add_index :messages, :message_request_id
17
+ add_index :messages, :parent_id
18
+ end
19
+
20
+ def self.down
21
+ drop_table :messages
22
+ end
23
+ end
@@ -0,0 +1,18 @@
1
+ class CreateMessageRequests < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :message_requests do |t|
4
+ t.integer :sender_id
5
+ t.integer :receiver_id
6
+ t.integer :message_template_id
7
+ t.datetime :sent_at
8
+ t.datetime :deleted_at
9
+ t.text :body
10
+
11
+ t.timestamps
12
+ end
13
+ end
14
+
15
+ def self.down
16
+ drop_table :message_requests
17
+ end
18
+ end
@@ -0,0 +1,11 @@
1
+ class AddLftAndRgtToMessage < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :messages, :lft, :integer
4
+ add_column :messages, :rgt, :integer
5
+ end
6
+
7
+ def self.down
8
+ remove_column :messages, :rgt
9
+ remove_column :messages, :lft
10
+ end
11
+ end
@@ -0,0 +1,6 @@
1
+ class AddDepthToMessage < ActiveRecord::Migration
2
+ def change
3
+ add_column :messages, :depth, :integer
4
+
5
+ end
6
+ end
@@ -0,0 +1,18 @@
1
+ class CreateMessageTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :message_transitions do |t|
4
+ t.string :to_state
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
10
+ t.integer :sort_key
11
+ t.integer :message_id
12
+ t.timestamps
13
+ end
14
+
15
+ add_index :message_transitions, :message_id
16
+ add_index :message_transitions, [:sort_key, :message_id], unique: true
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ class CreateMessageRequestTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :message_request_transitions do |t|
4
+ t.string :to_state
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
10
+ t.integer :sort_key
11
+ t.integer :message_request_id
12
+ t.timestamps
13
+ end
14
+
15
+ add_index :message_request_transitions, :message_request_id
16
+ add_index :message_request_transitions, [:sort_key, :message_request_id], unique: true, name: "index_message_request_transitions_on_sort_key_and_request_id"
17
+ end
18
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToMessageTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :message_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :message_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToMessageRequestTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :message_request_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :message_request_transitions, :most_recent
8
+ end
9
+ 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: 20160813203039) do
14
+ ActiveRecord::Schema.define(version: 20160814165332) do
15
15
 
16
16
  create_table "accepts", force: :cascade do |t|
17
17
  t.integer "basket_id"
@@ -605,6 +605,75 @@ ActiveRecord::Schema.define(version: 20160813203039) do
605
605
  t.datetime "updated_at"
606
606
  end
607
607
 
608
+ create_table "message_request_transitions", force: :cascade do |t|
609
+ t.string "to_state"
610
+ t.text "metadata", default: "{}"
611
+ t.integer "sort_key"
612
+ t.integer "message_request_id"
613
+ t.datetime "created_at"
614
+ t.datetime "updated_at"
615
+ t.boolean "most_recent"
616
+ end
617
+
618
+ add_index "message_request_transitions", ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
619
+ add_index "message_request_transitions", ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
620
+
621
+ create_table "message_requests", force: :cascade do |t|
622
+ t.integer "sender_id"
623
+ t.integer "receiver_id"
624
+ t.integer "message_template_id"
625
+ t.datetime "sent_at"
626
+ t.datetime "deleted_at"
627
+ t.text "body"
628
+ t.datetime "created_at"
629
+ t.datetime "updated_at"
630
+ end
631
+
632
+ create_table "message_templates", force: :cascade do |t|
633
+ t.string "status", null: false
634
+ t.text "title", null: false
635
+ t.text "body", null: false
636
+ t.integer "position"
637
+ t.string "locale", default: "en"
638
+ t.datetime "created_at"
639
+ t.datetime "updated_at"
640
+ end
641
+
642
+ add_index "message_templates", ["status"], name: "index_message_templates_on_status", unique: true
643
+
644
+ create_table "message_transitions", force: :cascade do |t|
645
+ t.string "to_state"
646
+ t.text "metadata", default: "{}"
647
+ t.integer "sort_key"
648
+ t.integer "message_id"
649
+ t.datetime "created_at"
650
+ t.datetime "updated_at"
651
+ t.boolean "most_recent"
652
+ end
653
+
654
+ add_index "message_transitions", ["message_id"], name: "index_message_transitions_on_message_id"
655
+ add_index "message_transitions", ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
656
+
657
+ create_table "messages", force: :cascade do |t|
658
+ t.datetime "read_at"
659
+ t.integer "receiver_id"
660
+ t.integer "sender_id"
661
+ t.string "subject", null: false
662
+ t.text "body"
663
+ t.integer "message_request_id"
664
+ t.integer "parent_id"
665
+ t.datetime "created_at"
666
+ t.datetime "updated_at"
667
+ t.integer "lft"
668
+ t.integer "rgt"
669
+ t.integer "depth"
670
+ end
671
+
672
+ add_index "messages", ["message_request_id"], name: "index_messages_on_message_request_id"
673
+ add_index "messages", ["parent_id"], name: "index_messages_on_parent_id"
674
+ add_index "messages", ["receiver_id"], name: "index_messages_on_receiver_id"
675
+ add_index "messages", ["sender_id"], name: "index_messages_on_sender_id"
676
+
608
677
  create_table "owns", force: :cascade do |t|
609
678
  t.integer "agent_id", null: false
610
679
  t.integer "item_id", null: false
@@ -7,7 +7,7 @@ describe EnjuSubject::SetupGenerator, type: :generator do
7
7
  destination File.expand_path("tmp", Rails.root)
8
8
  before(:each) do
9
9
  prepare_destination
10
- %w( app/controllers/application_controller.rb config/initializers/enju_leaf.rb ).each do |f|
10
+ %w( app/controllers/application_controller.rb app/models/user.rb ).each do |f|
11
11
  dist_file = "#{Rails.root}/tmp/#{f}"
12
12
  dist_dir = File.dirname(dist_file)
13
13
  mkdir_p dist_dir
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_subject
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.beta.3
4
+ version: 0.2.0.beta.4
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-14 00:00:00.000000000 Z
11
+ date: 2016-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: enju_biblio
@@ -25,47 +25,47 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.2.0.beta.3
27
27
  - !ruby/object:Gem::Dependency
28
- name: globalize
28
+ name: enju_leaf
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 5.0.1
33
+ version: 1.2.0.beta.3
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 5.0.1
40
+ version: 1.2.0.beta.3
41
41
  - !ruby/object:Gem::Dependency
42
- name: globalize-accessors
42
+ name: globalize
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 5.0.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 5.0.1
55
55
  - !ruby/object:Gem::Dependency
56
- name: enju_leaf
56
+ name: globalize-accessors
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 1.2.0.beta.2
61
+ version: '0'
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: 1.2.0.beta.2
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sqlite3
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -220,6 +220,20 @@ dependencies:
220
220
  - - ">="
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: appraisal
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
223
237
  description: Subject and classification management for Next-L Enju
224
238
  email:
225
239
  - nabeta@fastmail.fm
@@ -337,7 +351,6 @@ files:
337
351
  - spec/dummy/config/environments/test.rb
338
352
  - spec/dummy/config/initializers/backtrace_silencers.rb
339
353
  - spec/dummy/config/initializers/devise.rb
340
- - spec/dummy/config/initializers/enju_leaf.rb
341
354
  - spec/dummy/config/initializers/inflections.rb
342
355
  - spec/dummy/config/initializers/mime_types.rb
343
356
  - spec/dummy/config/initializers/secret_token.rb
@@ -370,6 +383,9 @@ files:
370
383
  - spec/dummy/db/migrate/131_create_request_types.rb
371
384
  - spec/dummy/db/migrate/133_create_agent_merges.rb
372
385
  - spec/dummy/db/migrate/134_create_agent_merge_lists.rb
386
+ - spec/dummy/db/migrate/149_create_message_templates.rb
387
+ - spec/dummy/db/migrate/154_create_messages.rb
388
+ - spec/dummy/db/migrate/20080819181903_create_message_requests.rb
373
389
  - spec/dummy/db/migrate/20080830154109_create_realizes.rb
374
390
  - spec/dummy/db/migrate/20080830172106_create_exemplifies.rb
375
391
  - spec/dummy/db/migrate/20080905191442_create_agent_types.rb
@@ -413,6 +429,7 @@ files:
413
429
  - spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb
414
430
  - spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb
415
431
  - spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb
432
+ - spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb
416
433
  - spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb
417
434
  - spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb
418
435
  - spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb
@@ -421,6 +438,7 @@ files:
421
438
  - spec/dummy/db/migrate/20111124110355_create_produce_types.rb
422
439
  - spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb
423
440
  - spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb
441
+ - spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb
424
442
  - spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb
425
443
  - spec/dummy/db/migrate/20120129014038_create_budget_types.rb
426
444
  - spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb
@@ -452,6 +470,8 @@ files:
452
470
  - spec/dummy/db/migrate/20140110122216_create_user_import_files.rb
453
471
  - spec/dummy/db/migrate/20140110131010_create_user_import_results.rb
454
472
  - spec/dummy/db/migrate/20140122054321_create_profiles.rb
473
+ - spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
474
+ - spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb
455
475
  - spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
456
476
  - spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
457
477
  - spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb
@@ -486,10 +506,12 @@ files:
486
506
  - spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb
487
507
  - spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb
488
508
  - spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb
509
+ - spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb
489
510
  - spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb
490
511
  - spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb
491
512
  - spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb
492
513
  - spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb
514
+ - spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb
493
515
  - spec/dummy/db/schema.rb
494
516
  - spec/dummy/db/seeds.rb
495
517
  - spec/dummy/public/404.html
@@ -584,7 +606,6 @@ test_files:
584
606
  - spec/dummy/config/environments/test.rb
585
607
  - spec/dummy/config/initializers/backtrace_silencers.rb
586
608
  - spec/dummy/config/initializers/devise.rb
587
- - spec/dummy/config/initializers/enju_leaf.rb
588
609
  - spec/dummy/config/initializers/inflections.rb
589
610
  - spec/dummy/config/initializers/mime_types.rb
590
611
  - spec/dummy/config/initializers/secret_token.rb
@@ -618,6 +639,9 @@ test_files:
618
639
  - spec/dummy/db/migrate/131_create_request_types.rb
619
640
  - spec/dummy/db/migrate/133_create_agent_merges.rb
620
641
  - spec/dummy/db/migrate/134_create_agent_merge_lists.rb
642
+ - spec/dummy/db/migrate/149_create_message_templates.rb
643
+ - spec/dummy/db/migrate/154_create_messages.rb
644
+ - spec/dummy/db/migrate/20080819181903_create_message_requests.rb
621
645
  - spec/dummy/db/migrate/20080830154109_create_realizes.rb
622
646
  - spec/dummy/db/migrate/20080830172106_create_exemplifies.rb
623
647
  - spec/dummy/db/migrate/20080905191442_create_agent_types.rb
@@ -661,6 +685,7 @@ test_files:
661
685
  - spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb
662
686
  - spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb
663
687
  - spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb
688
+ - spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb
664
689
  - spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb
665
690
  - spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb
666
691
  - spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb
@@ -669,6 +694,7 @@ test_files:
669
694
  - spec/dummy/db/migrate/20111124110355_create_produce_types.rb
670
695
  - spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb
671
696
  - spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb
697
+ - spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb
672
698
  - spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb
673
699
  - spec/dummy/db/migrate/20120129014038_create_budget_types.rb
674
700
  - spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb
@@ -700,6 +726,8 @@ test_files:
700
726
  - spec/dummy/db/migrate/20140110122216_create_user_import_files.rb
701
727
  - spec/dummy/db/migrate/20140110131010_create_user_import_results.rb
702
728
  - spec/dummy/db/migrate/20140122054321_create_profiles.rb
729
+ - spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
730
+ - spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb
703
731
  - spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
704
732
  - spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
705
733
  - spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb
@@ -734,10 +762,12 @@ test_files:
734
762
  - spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb
735
763
  - spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb
736
764
  - spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb
765
+ - spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb
737
766
  - spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb
738
767
  - spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb
739
768
  - spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb
740
769
  - spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb
770
+ - spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb
741
771
  - spec/dummy/db/schema.rb
742
772
  - spec/dummy/db/seeds.rb
743
773
  - spec/dummy/public/404.html
@@ -1 +0,0 @@
1
- Manifestation.include(EnjuSubject::EnjuManifestation)