commontator 4.10.4 → 4.10.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/config/locales/ru.yml +78 -0
- data/lib/commontator/version.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +119 -33
- data/spec/dummy/log/test.log +33201 -33045
- data/spec/dummy/tmp/cache/assets/test/sprockets/{02d4b791eb831cf2057bf4703a1218d1 → 72b63dddbc5c995f79af8e3c94904fd9} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{c69ee3cc5796188d873574179290a6ef → a473b3873e554893372a53d71f5e9879} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{e85565206c3e5fdf9dfeb367c85557b1 → a77b1a9223d168112e1705c29220116f} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{a3fb9025f90ff05a6fd4afc7ded2692c → afa63eb365bdf4f42584b17ac9176b9d} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{0f196a1a50363b0a076ec6e1ee5417f6 → d2244ccef8e05bb993f75715af0344cc} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/decb63cac838a5314aa0c22a979f5ac9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{e1f674c11941d62aac1764ef3a7134e4 → f721383d531f067d82b071e14aed7a92} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/2MuTpyqaQLj1O4wgROKGqNe4lXIGrVZDYXCWWWMRmrA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/4CjNCL1K4fowKckGvL9F3HkCEtCH42rfsn2geU5A1xs.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/CT_fvD-uYyN5f1Kis6kQ7DNUnwtnSVT1sdDKxW1e4hw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/CjR916jO_S7Mo8eTI1vKieKJoKQ0t-bk4sxhcYYQ5Bw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/DtzP3rNdkPulzFug4nVQunOws8OXjvPJwB2nNhp9Scs.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/E6KZN1luOC7jAKXFS_xo-XOd5H41vK-eeCsj8MITJHA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/FmvRMZstlcKHCKy5g4mmAu4vjz-YPScTigFnnvs1v-E.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/HXtFVXhiLFEohXrf9PBX2u9xkPew5yU2IOyxmFCa7fo.cache +2 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/Kg9VuIGtHRNvM4_TXG3EmqpEWzfEY1kQUI1Mx8AHklY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/Kqg37VotFbWELQyr3-R20M2yWWoiloqBWDWRG-i3m5E.cache +2 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/PeZjQ1KGvso4tt6qvVQZniMzlTlVTWeH-tjln1fERkw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/SN7TWtuyq1ZblzWxqqcr26s_vanAr5PyZ8q_w8IxIPE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/VH5BWA_SC2XnIxStJ5vtjX3pNqdbo7uMo9Tg9GVFUGU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/lzmR_-kjjgHYgaJd_fvBlAimt7_xADtnhEPo_CIBiPM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/q3giWdNvlLQ39xIHQWPY8vzbfjW9zXkSqwibRQBKcvM.cache +2 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/zpCVMbdGU9JtJWkk95WWomNsxP3Q7jqZmWKJXnsGH0g.cache +2 -0
- data/spec/spec_helper.rb +10 -3
- metadata +100 -171
- data/app/models/commontator/subscription.rb~ +0 -23
- data/lib/commontator/version.rb~ +0 -3
- data/spec/controllers/commontator/comments_controller_spec.rb~ +0 -565
- data/spec/controllers/commontator/subscriptions_controller_spec.rb~ +0 -101
- data/spec/controllers/commontator/threads_controller_spec.rb~ +0 -130
- data/spec/dummy/README.md~ +0 -3
- data/spec/dummy/Rakefile~ +0 -6
- data/spec/dummy/app/assets/javascripts/application.js~ +0 -15
- data/spec/dummy/app/assets/stylesheets/application.css~ +0 -13
- data/spec/dummy/app/controllers/application_controller.rb~ +0 -3
- data/spec/dummy/app/controllers/dummy_models_controller.rb~ +0 -34
- data/spec/dummy/app/helpers/application_helper.rb~ +0 -15
- data/spec/dummy/app/models/dummy_model.rb~ +0 -3
- data/spec/dummy/app/models/dummy_user.rb~ +0 -13
- data/spec/dummy/app/views/dummy_model/show.html.erb~ +0 -1
- data/spec/dummy/app/views/layouts/application.html.erb~ +0 -14
- data/spec/dummy/config.ru~ +0 -4
- data/spec/dummy/config/application.rb~ +0 -26
- data/spec/dummy/config/boot.rb~ +0 -5
- data/spec/dummy/config/database.yml~ +0 -25
- data/spec/dummy/config/environment.rb~ +0 -5
- data/spec/dummy/config/environments/development.rb~ +0 -31
- data/spec/dummy/config/environments/production.rb~ +0 -82
- data/spec/dummy/config/environments/test.rb~ +0 -40
- data/spec/dummy/config/initializers/backtrace_silencers.rb~ +0 -7
- data/spec/dummy/config/initializers/commontator.rb~ +0 -14
- data/spec/dummy/config/initializers/filter_parameter_logging.rb~ +0 -4
- data/spec/dummy/config/initializers/inflections.rb~ +0 -16
- data/spec/dummy/config/initializers/mime_types.rb~ +0 -5
- data/spec/dummy/config/initializers/secret_token.rb~ +0 -12
- data/spec/dummy/config/initializers/session_store.rb~ +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb~ +0 -14
- data/spec/dummy/config/routes.rb~ +0 -7
- data/spec/dummy/db/migrate/1_create_dummy_models.rb~ +0 -7
- data/spec/dummy/db/migrate/2_create_dummy_users.rb~ +0 -7
- data/spec/dummy/db/migrate/3_acts_as_votable_migration.rb~ +0 -27
- data/spec/dummy/public/404.html~ +0 -26
- data/spec/dummy/public/422.html~ +0 -26
- data/spec/dummy/public/500.html~ +0 -25
- data/spec/dummy/script/rails~ +0 -6
- data/spec/dummy/tmp/cache/assets/test/sprockets/a41c8be5379abec3c0d0d98e2f0d5609 +0 -0
- data/spec/helpers/commontator/application_helper_spec.rb~ +0 -9
- data/spec/lib/commontator/acts_as_commontable_spec.rb~ +0 -25
- data/spec/lib/commontator/acts_as_commontator_spec.rb~ +0 -52
- data/spec/lib/commontator/commontable_config_spec.rb~ +0 -29
- data/spec/lib/commontator/commontator_config_spec.rb~ +0 -29
- data/spec/lib/commontator/controller_includes_spec.rb~ +0 -18
- data/spec/lib/commontator/shared_helper_spec.rb~ +0 -22
- data/spec/lib/commontator_spec.rb~ +0 -26
- data/spec/mailers/commontator/subscriptions_mailer_spec.rb~ +0 -30
- data/spec/models/commontator/comment_spec.rb~ +0 -82
- data/spec/models/commontator/subscription_spec.rb~ +0 -38
- data/spec/models/commontator/thread_spec.rb~ +0 -122
- data/spec/rails_helper.rb~ +0 -74
- data/spec/spec_helper.rb~ +0 -86
@@ -1,31 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the web server when you make code changes.
|
7
|
-
config.cache_classes = false
|
8
|
-
|
9
|
-
# Do not eager load code on boot.
|
10
|
-
config.eager_load = false
|
11
|
-
|
12
|
-
# Show full error reports and disable caching.
|
13
|
-
config.consider_all_requests_local = true
|
14
|
-
config.action_controller.perform_caching = false
|
15
|
-
|
16
|
-
# Don't care if the mailer can't send.
|
17
|
-
config.action_mailer.raise_delivery_errors = false
|
18
|
-
|
19
|
-
config.action_mailer.default_url_options = { :host => "dev.example.com" }
|
20
|
-
|
21
|
-
# Print deprecation notices to the Rails logger.
|
22
|
-
config.active_support.deprecation = :log
|
23
|
-
|
24
|
-
# Raise an error on page load if there are pending migrations
|
25
|
-
config.active_record.migration_error = :page_load
|
26
|
-
|
27
|
-
# Debug mode disables concatenation and preprocessing of assets.
|
28
|
-
# This option may cause significant delays in view rendering with a large
|
29
|
-
# number of complex assets.
|
30
|
-
config.assets.debug = true
|
31
|
-
end
|
@@ -1,82 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# Code is not reloaded between requests.
|
5
|
-
config.cache_classes = true
|
6
|
-
|
7
|
-
# Eager load code on boot. This eager loads most of Rails and
|
8
|
-
# your application in memory, allowing both thread web servers
|
9
|
-
# and those relying on copy on write to perform better.
|
10
|
-
# Rake tasks automatically ignore this option for performance.
|
11
|
-
config.eager_load = true
|
12
|
-
|
13
|
-
# Full error reports are disabled and caching is turned on.
|
14
|
-
config.consider_all_requests_local = false
|
15
|
-
config.action_controller.perform_caching = true
|
16
|
-
|
17
|
-
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
-
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
-
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
20
|
-
# config.action_dispatch.rack_cache = true
|
21
|
-
|
22
|
-
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
-
config.serve_static_assets = false
|
24
|
-
|
25
|
-
# Compress JavaScripts and CSS.
|
26
|
-
config.assets.js_compressor = :uglifier
|
27
|
-
# config.assets.css_compressor = :sass
|
28
|
-
|
29
|
-
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
30
|
-
config.assets.compile = false
|
31
|
-
|
32
|
-
# Generate digests for assets URLs.
|
33
|
-
config.assets.digest = true
|
34
|
-
|
35
|
-
# Version of your assets, change this if you want to expire all your assets.
|
36
|
-
config.assets.version = '1.0'
|
37
|
-
|
38
|
-
# Specifies the header that your server uses for sending files.
|
39
|
-
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
40
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
41
|
-
|
42
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
43
|
-
# config.force_ssl = true
|
44
|
-
|
45
|
-
# Set to :debug to see everything in the log.
|
46
|
-
config.log_level = :info
|
47
|
-
|
48
|
-
# Prepend all log lines with the following tags.
|
49
|
-
# config.log_tags = [ :subdomain, :uuid ]
|
50
|
-
|
51
|
-
# Use a different logger for distributed setups.
|
52
|
-
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
53
|
-
|
54
|
-
# Use a different cache store in production.
|
55
|
-
# config.cache_store = :mem_cache_store
|
56
|
-
|
57
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
58
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
59
|
-
|
60
|
-
# Precompile additional assets.
|
61
|
-
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
62
|
-
# config.assets.precompile += %w( search.js )
|
63
|
-
|
64
|
-
# Ignore bad email addresses and do not raise email delivery errors.
|
65
|
-
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
66
|
-
# config.action_mailer.raise_delivery_errors = false
|
67
|
-
|
68
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
69
|
-
# the I18n.default_locale when a translation can not be found).
|
70
|
-
config.i18n.fallbacks = true
|
71
|
-
|
72
|
-
config.action_mailer.default_url_options = { :host => "www.example.com" }
|
73
|
-
|
74
|
-
# Send deprecation notices to registered listeners.
|
75
|
-
config.active_support.deprecation = :notify
|
76
|
-
|
77
|
-
# Disable automatic flushing of the log to improve performance.
|
78
|
-
# config.autoflush_log = false
|
79
|
-
|
80
|
-
# Use default logging formatter so that PID and timestamp are not suppressed.
|
81
|
-
config.log_formatter = ::Logger::Formatter.new
|
82
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite. You never need to work with it otherwise. Remember that
|
6
|
-
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs. Don't rely on the data there!
|
8
|
-
config.cache_classes = true
|
9
|
-
|
10
|
-
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
-
# just for the purpose of running a single test. If you are using a tool that
|
12
|
-
# preloads Rails for running tests, you may have to set it to true.
|
13
|
-
config.eager_load = false
|
14
|
-
|
15
|
-
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
-
config.serve_static_files = true
|
17
|
-
config.static_cache_control = "public, max-age=3600"
|
18
|
-
|
19
|
-
# Show full error reports and disable caching.
|
20
|
-
config.consider_all_requests_local = true
|
21
|
-
config.action_controller.perform_caching = false
|
22
|
-
|
23
|
-
# Raise exceptions instead of rendering exception templates.
|
24
|
-
config.action_dispatch.show_exceptions = false
|
25
|
-
|
26
|
-
# Disable request forgery protection in test environment.
|
27
|
-
config.action_controller.allow_forgery_protection = false
|
28
|
-
|
29
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
-
# The :test delivery method accumulates sent emails in the
|
31
|
-
# ActionMailer::Base.deliveries array.
|
32
|
-
config.action_mailer.delivery_method = :test
|
33
|
-
|
34
|
-
config.action_mailer.default_url_options = { :host => "test.example.com" }
|
35
|
-
|
36
|
-
# Print deprecation notices to the stderr.
|
37
|
-
config.active_support.deprecation = :stderr
|
38
|
-
|
39
|
-
config.active_support.test_order = :sorted
|
40
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Dummy application configuration file
|
2
|
-
Commontator.configure do |config|
|
3
|
-
config.javascript_proc = lambda { |view| '// Some javascript' }
|
4
|
-
|
5
|
-
config.user_name_proc = lambda { |user| user.try(:name) || 'Anonymous' }
|
6
|
-
|
7
|
-
config.thread_read_proc = lambda { |thread, user| user && user.can_read }
|
8
|
-
|
9
|
-
config.thread_moderator_proc = lambda { |thread, user| user.is_admin || user.can_edit }
|
10
|
-
|
11
|
-
config.comment_voting = :ld
|
12
|
-
|
13
|
-
config.thread_subscription = :m
|
14
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format. Inflections
|
4
|
-
# are locale specific, and you may define rules for as many different
|
5
|
-
# locales as you wish. All of these examples are active by default:
|
6
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
-
# inflect.singular /^(ox)en/i, '\1'
|
9
|
-
# inflect.irregular 'person', 'people'
|
10
|
-
# inflect.uncountable %w( fish sheep )
|
11
|
-
# end
|
12
|
-
|
13
|
-
# These inflection rules are supported but not enabled by default:
|
14
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
-
# inflect.acronym 'RESTful'
|
16
|
-
# end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
|
6
|
-
# Make sure the secret is at least 30 characters and all random,
|
7
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
-
# You can use `rake secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure your secret_key_base is kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
Dummy::Application.config.secret_key_base = 'dummy'
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
-
# is enabled by default.
|
5
|
-
|
6
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
-
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
-
end
|
10
|
-
|
11
|
-
# To enable root element in JSON for ActiveRecord objects.
|
12
|
-
# ActiveSupport.on_load(:active_record) do
|
13
|
-
# self.include_root_in_json = true
|
14
|
-
# end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
class ActsAsVotableMigration < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :votes do |t|
|
4
|
-
|
5
|
-
t.references :votable, :polymorphic => true
|
6
|
-
t.references :voter, :polymorphic => true
|
7
|
-
|
8
|
-
t.boolean :vote_flag
|
9
|
-
t.string :vote_scope
|
10
|
-
t.integer :vote_weight
|
11
|
-
|
12
|
-
t.timestamps
|
13
|
-
end
|
14
|
-
|
15
|
-
if ActiveRecord::VERSION::MAJOR < 4
|
16
|
-
add_index :votes, [:votable_id, :votable_type]
|
17
|
-
add_index :votes, [:voter_id, :voter_type]
|
18
|
-
end
|
19
|
-
|
20
|
-
add_index :votes, [:voter_id, :voter_type, :vote_scope]
|
21
|
-
add_index :votes, [:votable_id, :votable_type, :vote_scope]
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.down
|
25
|
-
drop_table :votes
|
26
|
-
end
|
27
|
-
end
|
data/spec/dummy/public/404.html~
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/404.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
-
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
-
</div>
|
25
|
-
</body>
|
26
|
-
</html>
|
data/spec/dummy/public/422.html~
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The change you wanted was rejected (422)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/422.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>The change you wanted was rejected.</h1>
|
23
|
-
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
-
</div>
|
25
|
-
</body>
|
26
|
-
</html>
|
data/spec/dummy/public/500.html~
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>We're sorry, but something went wrong (500)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/500.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>We're sorry, but something went wrong.</h1>
|
23
|
-
</div>
|
24
|
-
</body>
|
25
|
-
</html>
|
data/spec/dummy/script/rails~
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
-
|
4
|
-
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
-
require File.expand_path('../../config/boot', __FILE__)
|
6
|
-
require 'rails/commands'
|
Binary file
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
|
3
|
-
module Commontator
|
4
|
-
RSpec.describe ActsAsCommontable, type: :lib do
|
5
|
-
it 'must add methods to ActiveRecord and subclasses' do
|
6
|
-
expect(ActiveRecord::Base).to respond_to(:acts_as_commontable)
|
7
|
-
expect(ActiveRecord::Base).to respond_to(:is_commontable)
|
8
|
-
expect(ActiveRecord::Base.is_commontable).to eq false
|
9
|
-
expect(DummyModel).to respond_to(:acts_as_commontable)
|
10
|
-
expect(DummyModel).to respond_to(:is_commontable)
|
11
|
-
expect(DummyModel.is_commontable).to eq true
|
12
|
-
expect(DummyUser).to respond_to(:acts_as_commontable)
|
13
|
-
expect(DummyUser).to respond_to(:is_commontable)
|
14
|
-
expect(DummyUser.is_commontable).to eq false
|
15
|
-
end
|
16
|
-
|
17
|
-
it 'must modify models that act_as_commontable' do
|
18
|
-
dummy = DummyModel.create
|
19
|
-
expect(dummy).to respond_to(:thread)
|
20
|
-
expect(dummy).to respond_to(:commontable_config)
|
21
|
-
dummy.commontable_config.must_be_instance_of CommontableConfig
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
@@ -1,52 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
|
3
|
-
module Commontator
|
4
|
-
RSpec.describe ActsAsCommontator, type: :lib do
|
5
|
-
it 'must add methods to ActiveRecord and subclasses' do
|
6
|
-
ActiveRecord::Base.must_respond_to :acts_as_commontator
|
7
|
-
ActiveRecord::Base.must_respond_to :is_commontator
|
8
|
-
ActiveRecord::Base.is_commontator.must_equal false
|
9
|
-
DummyModel.must_respond_to :acts_as_commontator
|
10
|
-
DummyModel.must_respond_to :is_commontator
|
11
|
-
DummyModel.is_commontator.must_equal false
|
12
|
-
DummyUser.must_respond_to :acts_as_commontator
|
13
|
-
DummyUser.must_respond_to :is_commontator
|
14
|
-
DummyUser.is_commontator.must_equal true
|
15
|
-
end
|
16
|
-
|
17
|
-
it 'must modify models that act_as_commontator' do
|
18
|
-
user = DummyUser.create
|
19
|
-
user.must_respond_to :comments
|
20
|
-
user.must_respond_to :subscriptions
|
21
|
-
user.must_respond_to :commontator_config
|
22
|
-
user.commontator_config.must_be_instance_of CommontatorConfig
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
require 'rails_helper'
|
28
|
-
|
29
|
-
module Commontator
|
30
|
-
RSpec.describe ActsAsCommontator, type: :lib do
|
31
|
-
it 'must add methods to ActiveRecord and subclasses' do
|
32
|
-
expect(ActiveRecord::Base).to respond_to(:acts_as_commontator)
|
33
|
-
expect(ActiveRecord::Base).to respond_to(:is_commontator)
|
34
|
-
expect(ActiveRecord::Base.is_commontator).to eq false
|
35
|
-
expect(DummyModel).to respond_to(:acts_as_commontator)
|
36
|
-
expect(DummyModel).to respond_to(:is_commontator)
|
37
|
-
expect(DummyModel.is_commontator).to eq false
|
38
|
-
expect(DummyUser).to respond_to(:acts_as_commontator)
|
39
|
-
expect(DummyUser).to respond_to(:is_commontator)
|
40
|
-
expect(DummyUser.is_commontator).to eq true
|
41
|
-
end
|
42
|
-
|
43
|
-
it 'must modify models that act_as_commontator' do
|
44
|
-
user = DummyUser.create
|
45
|
-
expect(user).to respond_to(:comments)
|
46
|
-
expect(user).to respond_to(:subscriptions)
|
47
|
-
expect(user).to respond_to(:commontator_config)
|
48
|
-
expect(user.commontator_config).to be_a(CommontatorConfig)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|