enju_message 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 +4 -4
- data/app/models/message_request_transition.rb +1 -0
- data/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +9 -0
- data/lib/enju_message/version.rb +1 -1
- data/spec/controllers/message_requests_controller_spec.rb +1 -1
- data/spec/controllers/message_templates_controller_spec.rb +1 -1
- data/spec/controllers/messages_controller_spec.rb +1 -1
- data/spec/dummy/config/application.rb +0 -1
- data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +5 -0
- data/spec/dummy/db/schema.rb +10 -5
- data/spec/fixtures/library_groups.yml +1 -2
- data/spec/models/message_request_spec.rb +1 -2
- data/spec/models/message_spec.rb +1 -1
- data/spec/models/message_template_spec.rb +1 -2
- data/spec/rails_helper.rb +54 -0
- data/spec/spec_helper.rb +82 -44
- metadata +22 -13
- data/spec/dummy/db/migrate/20160813130535_add_email_to_library_group.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22f96eed9ae868cb72b8506a371c24a712874464
|
4
|
+
data.tar.gz: 114e145c37608c1eb42b8489e2aa8aa73ebfffcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5bffb5b574e5da28cf561121cee982f65a51e5421c779381175b34d1f8dab067634dc4973504ab6d0f7ce5b96f437dc1fe5b0f8d493e5d34d4890c3c9f5fd36
|
7
|
+
data.tar.gz: 0aac846b7be1a56dd2182a099891c203c82927d9306087be4e62de35bbd517b824d2e5edaffdebb849dea0315ce3ca922be64b2e53a7ffb7105141416604e320
|
data/lib/enju_message/version.rb
CHANGED
data/spec/dummy/db/schema.rb
CHANGED
@@ -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:
|
14
|
+
ActiveRecord::Schema.define(version: 20160814165332) do
|
15
15
|
|
16
16
|
create_table "accepts", force: :cascade do |t|
|
17
17
|
t.integer "basket_id"
|
@@ -447,9 +447,9 @@ ActiveRecord::Schema.define(version: 20160813130535) do
|
|
447
447
|
add_index "library_group_translations", ["locale"], name: "index_library_group_translations_on_locale"
|
448
448
|
|
449
449
|
create_table "library_groups", force: :cascade do |t|
|
450
|
-
t.string "name",
|
450
|
+
t.string "name", null: false
|
451
451
|
t.text "display_name"
|
452
|
-
t.string "short_name",
|
452
|
+
t.string "short_name", null: false
|
453
453
|
t.text "my_networks"
|
454
454
|
t.text "login_banner"
|
455
455
|
t.text "note"
|
@@ -458,13 +458,17 @@ ActiveRecord::Schema.define(version: 20160813130535) do
|
|
458
458
|
t.datetime "created_at"
|
459
459
|
t.datetime "updated_at"
|
460
460
|
t.text "admin_networks"
|
461
|
-
t.string "url",
|
461
|
+
t.string "url", default: "http://localhost:3000/"
|
462
462
|
t.text "settings"
|
463
463
|
t.text "html_snippet"
|
464
|
-
t.
|
464
|
+
t.integer "max_number_of_results", default: 500
|
465
|
+
t.boolean "family_name_first", default: true
|
466
|
+
t.integer "pub_year_facet_range_interval", default: 10
|
467
|
+
t.integer "user_id"
|
465
468
|
end
|
466
469
|
|
467
470
|
add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
|
471
|
+
add_index "library_groups", ["user_id"], name: "index_library_groups_on_user_id"
|
468
472
|
|
469
473
|
create_table "licenses", force: :cascade do |t|
|
470
474
|
t.string "name", null: false
|
@@ -579,6 +583,7 @@ ActiveRecord::Schema.define(version: 20160813130535) do
|
|
579
583
|
t.integer "message_request_id"
|
580
584
|
t.datetime "created_at"
|
581
585
|
t.datetime "updated_at"
|
586
|
+
t.boolean "most_recent"
|
582
587
|
end
|
583
588
|
|
584
589
|
add_index "message_request_transitions", ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
|
@@ -10,8 +10,7 @@ one:
|
|
10
10
|
position: 1
|
11
11
|
login_banner: "*Next-L Enju*"
|
12
12
|
admin_networks: 0.0.0.0/0
|
13
|
-
|
14
|
-
"{\"max_number_of_results\":200,\"family_name_first\":true,\"book_jacket_source\":\"google\",\"screenshot_generator\":\"mozshot\"}"
|
13
|
+
user_id: 1
|
15
14
|
|
16
15
|
# == Schema Information
|
17
16
|
#
|
data/spec/models/message_spec.rb
CHANGED
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
require 'coveralls'
|
3
|
+
SimpleCov.start 'rails'
|
4
|
+
Coveralls.wear!
|
5
|
+
|
6
|
+
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
7
|
+
ENV["RAILS_ENV"] ||= 'test'
|
8
|
+
require File.expand_path("../dummy/config/environment", __FILE__)
|
9
|
+
require 'rspec/rails'
|
10
|
+
require 'factory_girl'
|
11
|
+
require 'sunspot-rails-tester'
|
12
|
+
require 'rspec/active_model/mocks'
|
13
|
+
|
14
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
15
|
+
# in spec/support/ and its subdirectories.
|
16
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
17
|
+
|
18
|
+
RSpec.configure do |config|
|
19
|
+
# == Mock Framework
|
20
|
+
#
|
21
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
22
|
+
#
|
23
|
+
# config.mock_with :mocha
|
24
|
+
# config.mock_with :flexmock
|
25
|
+
# config.mock_with :rr
|
26
|
+
config.mock_with :rspec
|
27
|
+
|
28
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
29
|
+
config.fixture_path = "#{::Rails.root}/../../spec/fixtures"
|
30
|
+
|
31
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
32
|
+
# examples within a transaction, remove the following line or assign false
|
33
|
+
# instead of true.
|
34
|
+
config.use_transactional_fixtures = true
|
35
|
+
|
36
|
+
config.extend ControllerMacros, :type => :controller
|
37
|
+
|
38
|
+
$original_sunspot_session = Sunspot.session
|
39
|
+
|
40
|
+
config.before do
|
41
|
+
Sunspot.session = Sunspot::Rails::StubSessionProxy.new($original_sunspot_session)
|
42
|
+
end
|
43
|
+
|
44
|
+
config.before :each, :solr => true do
|
45
|
+
Sunspot::Rails::Tester.start_original_sunspot_session
|
46
|
+
Sunspot.session = $original_sunspot_session
|
47
|
+
Sunspot.remove_all!
|
48
|
+
end
|
49
|
+
|
50
|
+
config.infer_spec_type_from_file_location!
|
51
|
+
end
|
52
|
+
|
53
|
+
FactoryGirl.definition_file_paths << "#{::Rails.root}/../../spec/factories"
|
54
|
+
FactoryGirl.find_definitions
|
data/spec/spec_helper.rb
CHANGED
@@ -1,54 +1,92 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
#
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
require
|
13
|
-
|
14
|
-
#
|
15
|
-
#
|
16
|
-
|
17
|
-
|
1
|
+
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
4
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
5
|
+
# files.
|
6
|
+
#
|
7
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
8
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
9
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
10
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
11
|
+
# a separate helper file that requires the additional dependencies and performs
|
12
|
+
# the additional setup, and require it from the spec files that actually need
|
13
|
+
# it.
|
14
|
+
#
|
15
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
16
|
+
# users commonly want.
|
17
|
+
#
|
18
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
18
19
|
RSpec.configure do |config|
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
# rspec-expectations config goes here. You can use an alternate
|
21
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
22
|
+
# assertions if you prefer.
|
23
|
+
config.expect_with :rspec do |expectations|
|
24
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
25
|
+
# and `failure_message` of custom matchers include text for helper methods
|
26
|
+
# defined using `chain`, e.g.:
|
27
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
28
|
+
# # => "be bigger than 2 and smaller than 4"
|
29
|
+
# ...rather than:
|
30
|
+
# # => "be bigger than 2"
|
31
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
32
|
+
end
|
27
33
|
|
28
|
-
#
|
29
|
-
|
34
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
35
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
36
|
+
config.mock_with :rspec do |mocks|
|
37
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
38
|
+
# a real object. This is generally recommended, and will default to
|
39
|
+
# `true` in RSpec 4.
|
40
|
+
mocks.verify_partial_doubles = false
|
41
|
+
end
|
30
42
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
43
|
+
# The settings below are suggested to provide a good initial experience
|
44
|
+
# with RSpec, but feel free to customize to your heart's content.
|
45
|
+
=begin
|
46
|
+
# These two settings work together to allow you to limit a spec run
|
47
|
+
# to individual examples or groups you care about by tagging them with
|
48
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
49
|
+
# get run.
|
50
|
+
config.filter_run :focus
|
51
|
+
config.run_all_when_everything_filtered = true
|
35
52
|
|
36
|
-
|
53
|
+
# Allows RSpec to persist some state between runs in order to support
|
54
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
55
|
+
# you configure your source control system to ignore this file.
|
56
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
37
57
|
|
38
|
-
|
58
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
59
|
+
# recommended. For more details, see:
|
60
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
61
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
62
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
63
|
+
config.disable_monkey_patching!
|
39
64
|
|
40
|
-
|
41
|
-
|
65
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
66
|
+
# file, and it's useful to allow more verbose output when running an
|
67
|
+
# individual spec file.
|
68
|
+
if config.files_to_run.one?
|
69
|
+
# Use the documentation formatter for detailed output,
|
70
|
+
# unless a formatter has already been configured
|
71
|
+
# (e.g. via a command-line flag).
|
72
|
+
config.default_formatter = 'doc'
|
42
73
|
end
|
43
74
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
end
|
75
|
+
# Print the 10 slowest examples and example groups at the
|
76
|
+
# end of the spec run, to help surface which specs are running
|
77
|
+
# particularly slow.
|
78
|
+
config.profile_examples = 10
|
49
79
|
|
50
|
-
|
51
|
-
|
80
|
+
# Run specs in random order to surface order dependencies. If you find an
|
81
|
+
# order dependency and want to debug it, you can fix the order by providing
|
82
|
+
# the seed, which is printed after each run.
|
83
|
+
# --seed 1234
|
84
|
+
config.order = :random
|
52
85
|
|
53
|
-
|
54
|
-
|
86
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
87
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
88
|
+
# test failures related to randomization by passing the same `--seed` value
|
89
|
+
# as the one that triggered the failure.
|
90
|
+
Kernel.srand config.seed
|
91
|
+
=end
|
92
|
+
end
|
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.
|
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-
|
11
|
+
date: 2016-08-14 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.
|
19
|
+
version: 0.2.0.beta.9
|
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.
|
26
|
+
version: 0.2.0.beta.9
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: awesome_nested_set
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.2.0.beta.
|
47
|
+
version: 1.2.0.beta.3
|
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: 1.2.0.beta.
|
54
|
+
version: 1.2.0.beta.3
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: enju_event
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: globalize
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 5.0.1
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 5.0.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: globalize-accessors
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -249,7 +249,7 @@ dependencies:
|
|
249
249
|
- !ruby/object:Gem::Version
|
250
250
|
version: '0'
|
251
251
|
- !ruby/object:Gem::Dependency
|
252
|
-
name:
|
252
|
+
name: appraisal
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
254
254
|
requirements:
|
255
255
|
- - ">="
|
@@ -319,6 +319,7 @@ files:
|
|
319
319
|
- db/migrate/20140518111006_create_message_transitions.rb
|
320
320
|
- db/migrate/20140518135713_create_message_request_transitions.rb
|
321
321
|
- db/migrate/20160703185015_add_most_recent_to_message_transitions.rb
|
322
|
+
- db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb
|
322
323
|
- lib/enju_message.rb
|
323
324
|
- lib/enju_message/engine.rb
|
324
325
|
- lib/enju_message/version.rb
|
@@ -497,7 +498,10 @@ files:
|
|
497
498
|
- spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb
|
498
499
|
- spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb
|
499
500
|
- spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb
|
500
|
-
- spec/dummy/db/migrate/
|
501
|
+
- spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb
|
502
|
+
- spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb
|
503
|
+
- spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb
|
504
|
+
- spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb
|
501
505
|
- spec/dummy/db/schema.rb
|
502
506
|
- spec/dummy/public/404.html
|
503
507
|
- spec/dummy/public/422.html
|
@@ -523,6 +527,7 @@ files:
|
|
523
527
|
- spec/models/message_request_spec.rb
|
524
528
|
- spec/models/message_spec.rb
|
525
529
|
- spec/models/message_template_spec.rb
|
530
|
+
- spec/rails_helper.rb
|
526
531
|
- spec/spec_helper.rb
|
527
532
|
- spec/support/controller_macros.rb
|
528
533
|
- spec/support/devise.rb
|
@@ -719,7 +724,10 @@ test_files:
|
|
719
724
|
- spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb
|
720
725
|
- spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb
|
721
726
|
- spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb
|
722
|
-
- spec/dummy/db/migrate/
|
727
|
+
- spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb
|
728
|
+
- spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb
|
729
|
+
- spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb
|
730
|
+
- spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb
|
723
731
|
- spec/dummy/db/schema.rb
|
724
732
|
- spec/dummy/public/404.html
|
725
733
|
- spec/dummy/public/422.html
|
@@ -746,6 +754,7 @@ test_files:
|
|
746
754
|
- spec/models/message_request_spec.rb
|
747
755
|
- spec/models/message_spec.rb
|
748
756
|
- spec/models/message_template_spec.rb
|
757
|
+
- spec/rails_helper.rb
|
749
758
|
- spec/spec_helper.rb
|
750
759
|
- spec/support/controller_macros.rb
|
751
760
|
- spec/support/devise.rb
|