acts_as_commentable_more 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/acts_as_commentable_more.rb +5 -2
- data/lib/{comment_methods.rb → acts_as_commentable_more/comment_methods.rb} +0 -0
- data/lib/acts_as_commentable_more/commentable_methods.rb +64 -0
- data/lib/acts_as_commentable_more/helpers/comment/callbacks_helper.rb +59 -0
- data/lib/acts_as_commentable_more/helpers/comment/methods_helper.rb +44 -0
- data/lib/acts_as_commentable_more/helpers/post/associations_helper.rb +30 -0
- data/lib/acts_as_commentable_more/helpers/post/methods_helper.rb +18 -0
- data/lib/acts_as_commentable_more/helpers/post/scopes_helper.rb +19 -0
- data/lib/acts_as_commentable_more/version.rb +1 -1
- data/lib/generators/commentable/templates/comment.rb +1 -1
- data/test/dummy/spec/models/letter_spec.rb +2 -1
- data/test/dummy/spec/models/main_model_spec.rb +5 -0
- data/test/dummy/spec/models/note_custom_asso_name_spec.rb +2 -1
- data/test/dummy/spec/models/note_spec.rb +2 -1
- data/test/dummy/spec/models/post_custom_asso_name_spec.rb +1 -1
- data/test/dummy/spec/models/post_disable_cache_spec.rb +5 -0
- data/test/dummy/spec/models/post_spec.rb +2 -1
- data/test/dummy/spec/models/topic_spec.rb +1 -1
- metadata +13 -165
- data/.coveralls.yml +0 -1
- data/.gitignore +0 -48
- data/.travis.yml +0 -22
- data/CHANGELOG.md +0 -12
- data/Gemfile +0 -40
- data/Gemfile.lock +0 -212
- data/LICENSE +0 -22
- data/README.md +0 -125
- data/acts_as_commentable_more.gemspec +0 -36
- data/lib/commentable_methods.rb +0 -118
- data/test/acts_as_commentable_more_test.rb +0 -7
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/Rakefile +0 -17
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/assets/stylesheets/application.css +0 -15
- data/test/dummy/app/controllers/application_controller.rb +0 -5
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/mailers/.keep +0 -0
- data/test/dummy/app/models/.keep +0 -0
- data/test/dummy/app/models/admin.rb +0 -2
- data/test/dummy/app/models/comment.rb +0 -17
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/models/custom_comment.rb +0 -17
- data/test/dummy/app/models/letter.rb +0 -3
- data/test/dummy/app/models/note.rb +0 -3
- data/test/dummy/app/models/note_custom_asso_name.rb +0 -3
- data/test/dummy/app/models/post.rb +0 -4
- data/test/dummy/app/models/post_custom_asso_name.rb +0 -5
- data/test/dummy/app/models/topic.rb +0 -3
- data/test/dummy/app/models/user.rb +0 -2
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -35
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/database.travis.yml +0 -18
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -37
- data/test/dummy/config/environments/production.rb +0 -78
- data/test/dummy/config/environments/test.rb +0 -39
- data/test/dummy/config/initializers/assets.rb +0 -8
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -23
- data/test/dummy/config/routes.rb +0 -56
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/db/migrate/20150113045806_create_posts.rb +0 -9
- data/test/dummy/db/migrate/20150113045817_create_admins.rb +0 -9
- data/test/dummy/db/migrate/20150113045831_create_users.rb +0 -9
- data/test/dummy/db/migrate/20150113065948_create_notes.rb +0 -9
- data/test/dummy/db/migrate/20150113074249_create_topics.rb +0 -9
- data/test/dummy/db/migrate/20150114052120_create_letters.rb +0 -9
- data/test/dummy/db/migrate/20150114100411_create_comments.rb +0 -18
- data/test/dummy/db/migrate/20150114100422_create_custom_comments.rb +0 -18
- data/test/dummy/db/migrate/20150115094241_create_post_custom_asso_names.rb +0 -9
- data/test/dummy/db/migrate/20150115100013_create_note_custom_asso_names.rb +0 -9
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +0 -67
- data/test/dummy/public/422.html +0 -67
- data/test/dummy/public/500.html +0 -66
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/spec/acts_as_commentable_more_spec.rb +0 -275
- data/test/dummy/spec/factories/admins.rb +0 -7
- data/test/dummy/spec/factories/comments.rb +0 -7
- data/test/dummy/spec/factories/custom_comments.rb +0 -7
- data/test/dummy/spec/factories/letters.rb +0 -7
- data/test/dummy/spec/factories/note_custom_asso_names.rb +0 -7
- data/test/dummy/spec/factories/notes.rb +0 -7
- data/test/dummy/spec/factories/post_custom_asso_names.rb +0 -7
- data/test/dummy/spec/factories/posts.rb +0 -7
- data/test/dummy/spec/factories/topics.rb +0 -7
- data/test/dummy/spec/factories/users.rb +0 -7
- data/test/dummy/spec/rails_helper.rb +0 -61
- data/test/dummy/spec/spec_helper.rb +0 -85
- data/test/test_helper.rb +0 -16
@@ -1,61 +0,0 @@
|
|
1
|
-
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
|
-
ENV["RAILS_ENV"] ||= 'test'
|
3
|
-
require 'spec_helper'
|
4
|
-
require File.expand_path("../../config/environment", __FILE__)
|
5
|
-
require 'rspec/rails'
|
6
|
-
# Add additional requires below this line. Rails is not loaded until this point!
|
7
|
-
require 'acts_as_commentable_more'
|
8
|
-
|
9
|
-
require "factory_girl_rails"
|
10
|
-
require "codeclimate-test-reporter"
|
11
|
-
CodeClimate::TestReporter.start
|
12
|
-
|
13
|
-
require 'coveralls'
|
14
|
-
Coveralls.wear!
|
15
|
-
|
16
|
-
# Requires supporting ruby files with custom matchers and macros, etc, in
|
17
|
-
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
|
18
|
-
# run as spec files by default. This means that files in spec/support that end
|
19
|
-
# in _spec.rb will both be required and run as specs, causing the specs to be
|
20
|
-
# run twice. It is recommended that you do not name files matching this glob to
|
21
|
-
# end with _spec.rb. You can configure this pattern with the --pattern
|
22
|
-
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
|
23
|
-
#
|
24
|
-
# The following line is provided for convenience purposes. It has the downside
|
25
|
-
# of increasing the boot-up time by auto-requiring all files in the support
|
26
|
-
# directory. Alternatively, in the individual `*_spec.rb` files, manually
|
27
|
-
# require only the support files necessary.
|
28
|
-
#
|
29
|
-
# Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
30
|
-
|
31
|
-
# Checks for pending migrations before tests are run.
|
32
|
-
# If you are not using ActiveRecord, you can remove this line.
|
33
|
-
ActiveRecord::Migration.maintain_test_schema!
|
34
|
-
|
35
|
-
RSpec.configure do |config|
|
36
|
-
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
37
|
-
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
38
|
-
|
39
|
-
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
40
|
-
# examples within a transaction, remove the following line or assign false
|
41
|
-
# instead of true.
|
42
|
-
config.use_transactional_fixtures = true
|
43
|
-
|
44
|
-
# RSpec Rails can automatically mix in different behaviours to your tests
|
45
|
-
# based on their file location, for example enabling you to call `get` and
|
46
|
-
# `post` in specs under `spec/controllers`.
|
47
|
-
#
|
48
|
-
# You can disable this behaviour by removing the line below, and instead
|
49
|
-
# explicitly tag your specs with their type, e.g.:
|
50
|
-
#
|
51
|
-
# RSpec.describe UsersController, :type => :controller do
|
52
|
-
# # ...
|
53
|
-
# end
|
54
|
-
#
|
55
|
-
# The different available types are documented in the features, such as in
|
56
|
-
# https://relishapp.com/rspec/rspec-rails/docs
|
57
|
-
config.infer_spec_type_from_file_location!
|
58
|
-
|
59
|
-
# Factory Girl config
|
60
|
-
config.include FactoryGirl::Syntax::Methods
|
61
|
-
end
|
@@ -1,85 +0,0 @@
|
|
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 this
|
4
|
-
# file to always be loaded, without a need to explicitly require it in any files.
|
5
|
-
#
|
6
|
-
# Given that it is always loaded, you are encouraged to keep this file as
|
7
|
-
# light-weight as possible. Requiring heavyweight dependencies from this file
|
8
|
-
# will add to the boot time of your test suite on EVERY test run, even for an
|
9
|
-
# individual file that may not need all of that loaded. Instead, consider making
|
10
|
-
# a separate helper file that requires the additional dependencies and performs
|
11
|
-
# the additional setup, and require it from the spec files that actually need it.
|
12
|
-
#
|
13
|
-
# The `.rspec` file also contains a few flags that are not defaults but that
|
14
|
-
# users commonly want.
|
15
|
-
#
|
16
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
17
|
-
RSpec.configure do |config|
|
18
|
-
# rspec-expectations config goes here. You can use an alternate
|
19
|
-
# assertion/expectation library such as wrong or the stdlib/minitest
|
20
|
-
# assertions if you prefer.
|
21
|
-
config.expect_with :rspec do |expectations|
|
22
|
-
# This option will default to `true` in RSpec 4. It makes the `description`
|
23
|
-
# and `failure_message` of custom matchers include text for helper methods
|
24
|
-
# defined using `chain`, e.g.:
|
25
|
-
# be_bigger_than(2).and_smaller_than(4).description
|
26
|
-
# # => "be bigger than 2 and smaller than 4"
|
27
|
-
# ...rather than:
|
28
|
-
# # => "be bigger than 2"
|
29
|
-
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
30
|
-
end
|
31
|
-
|
32
|
-
# rspec-mocks config goes here. You can use an alternate test double
|
33
|
-
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
34
|
-
config.mock_with :rspec do |mocks|
|
35
|
-
# Prevents you from mocking or stubbing a method that does not exist on
|
36
|
-
# a real object. This is generally recommended, and will default to
|
37
|
-
# `true` in RSpec 4.
|
38
|
-
mocks.verify_partial_doubles = true
|
39
|
-
end
|
40
|
-
|
41
|
-
# The settings below are suggested to provide a good initial experience
|
42
|
-
# with RSpec, but feel free to customize to your heart's content.
|
43
|
-
=begin
|
44
|
-
# These two settings work together to allow you to limit a spec run
|
45
|
-
# to individual examples or groups you care about by tagging them with
|
46
|
-
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
47
|
-
# get run.
|
48
|
-
config.filter_run :focus
|
49
|
-
config.run_all_when_everything_filtered = true
|
50
|
-
|
51
|
-
# Limits the available syntax to the non-monkey patched syntax that is recommended.
|
52
|
-
# For more details, see:
|
53
|
-
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
54
|
-
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
55
|
-
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
56
|
-
config.disable_monkey_patching!
|
57
|
-
|
58
|
-
# Many RSpec users commonly either run the entire suite or an individual
|
59
|
-
# file, and it's useful to allow more verbose output when running an
|
60
|
-
# individual spec file.
|
61
|
-
if config.files_to_run.one?
|
62
|
-
# Use the documentation formatter for detailed output,
|
63
|
-
# unless a formatter has already been configured
|
64
|
-
# (e.g. via a command-line flag).
|
65
|
-
config.default_formatter = 'doc'
|
66
|
-
end
|
67
|
-
|
68
|
-
# Print the 10 slowest examples and example groups at the
|
69
|
-
# end of the spec run, to help surface which specs are running
|
70
|
-
# particularly slow.
|
71
|
-
config.profile_examples = 10
|
72
|
-
|
73
|
-
# Run specs in random order to surface order dependencies. If you find an
|
74
|
-
# order dependency and want to debug it, you can fix the order by providing
|
75
|
-
# the seed, which is printed after each run.
|
76
|
-
# --seed 1234
|
77
|
-
config.order = :random
|
78
|
-
|
79
|
-
# Seed global randomization in this process using the `--seed` CLI option.
|
80
|
-
# Setting this allows you to use `--seed` to deterministically reproduce
|
81
|
-
# test failures related to randomization by passing the same `--seed` value
|
82
|
-
# as the one that triggered the failure.
|
83
|
-
Kernel.srand config.seed
|
84
|
-
=end
|
85
|
-
end
|
data/test/test_helper.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# Configure Rails Environment
|
2
|
-
ENV["RAILS_ENV"] = "test"
|
3
|
-
|
4
|
-
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
5
|
-
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
6
|
-
require "rails/test_help"
|
7
|
-
|
8
|
-
Rails.backtrace_cleaner.remove_silencers!
|
9
|
-
|
10
|
-
# Load support files
|
11
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
12
|
-
|
13
|
-
# Load fixtures from the engine
|
14
|
-
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
|
15
|
-
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
16
|
-
end
|