acts_as_commentable_more 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +48 -0
  4. data/.travis.yml +23 -0
  5. data/CHANGELOG.rdoc +5 -0
  6. data/Gemfile +40 -0
  7. data/Gemfile.lock +212 -0
  8. data/LICENSE +22 -0
  9. data/MIT-LICENSE +20 -0
  10. data/README.rdoc +16 -0
  11. data/Rakefile +32 -0
  12. data/acts_as_commentable_more.gemspec +36 -0
  13. data/lib/acts_as_commentable_more/version.rb +3 -0
  14. data/lib/acts_as_commentable_more.rb +4 -0
  15. data/lib/comment_methods.rb +19 -0
  16. data/lib/commentable_methods.rb +68 -0
  17. data/lib/generators/commentable/USAGE +11 -0
  18. data/lib/generators/commentable/commentable_generator.rb +18 -0
  19. data/lib/generators/commentable/templates/comment.rb +17 -0
  20. data/lib/generators/commentable/templates/create_comments.rb +18 -0
  21. data/lib/tasks/acts_as_commentable_more_tasks.rake +4 -0
  22. data/test/acts_as_commentable_more_test.rb +7 -0
  23. data/test/dummy/README.rdoc +28 -0
  24. data/test/dummy/Rakefile +17 -0
  25. data/test/dummy/app/assets/images/.keep +0 -0
  26. data/test/dummy/app/assets/javascripts/application.js +13 -0
  27. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  28. data/test/dummy/app/controllers/application_controller.rb +5 -0
  29. data/test/dummy/app/controllers/concerns/.keep +0 -0
  30. data/test/dummy/app/helpers/application_helper.rb +2 -0
  31. data/test/dummy/app/mailers/.keep +0 -0
  32. data/test/dummy/app/models/.keep +0 -0
  33. data/test/dummy/app/models/admin.rb +2 -0
  34. data/test/dummy/app/models/comment.rb +17 -0
  35. data/test/dummy/app/models/concerns/.keep +0 -0
  36. data/test/dummy/app/models/custom_comment.rb +17 -0
  37. data/test/dummy/app/models/letter.rb +3 -0
  38. data/test/dummy/app/models/note.rb +3 -0
  39. data/test/dummy/app/models/post.rb +4 -0
  40. data/test/dummy/app/models/topic.rb +3 -0
  41. data/test/dummy/app/models/user.rb +2 -0
  42. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  43. data/test/dummy/bin/bundle +3 -0
  44. data/test/dummy/bin/rails +4 -0
  45. data/test/dummy/bin/rake +4 -0
  46. data/test/dummy/config/application.rb +35 -0
  47. data/test/dummy/config/boot.rb +5 -0
  48. data/test/dummy/config/database.travis.yml +18 -0
  49. data/test/dummy/config/environment.rb +5 -0
  50. data/test/dummy/config/environments/development.rb +37 -0
  51. data/test/dummy/config/environments/production.rb +78 -0
  52. data/test/dummy/config/environments/test.rb +39 -0
  53. data/test/dummy/config/initializers/assets.rb +8 -0
  54. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  55. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  56. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  57. data/test/dummy/config/initializers/inflections.rb +16 -0
  58. data/test/dummy/config/initializers/mime_types.rb +4 -0
  59. data/test/dummy/config/initializers/session_store.rb +3 -0
  60. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  61. data/test/dummy/config/locales/en.yml +23 -0
  62. data/test/dummy/config/routes.rb +56 -0
  63. data/test/dummy/config/secrets.yml +22 -0
  64. data/test/dummy/config.ru +4 -0
  65. data/test/dummy/db/migrate/20150113045806_create_posts.rb +9 -0
  66. data/test/dummy/db/migrate/20150113045817_create_admins.rb +9 -0
  67. data/test/dummy/db/migrate/20150113045831_create_users.rb +9 -0
  68. data/test/dummy/db/migrate/20150113065948_create_notes.rb +9 -0
  69. data/test/dummy/db/migrate/20150113074249_create_topics.rb +9 -0
  70. data/test/dummy/db/migrate/20150114052120_create_letters.rb +9 -0
  71. data/test/dummy/db/migrate/20150114100411_create_comments.rb +18 -0
  72. data/test/dummy/db/migrate/20150114100422_create_custom_comments.rb +18 -0
  73. data/test/dummy/db/schema.rb +86 -0
  74. data/test/dummy/lib/assets/.keep +0 -0
  75. data/test/dummy/log/.keep +0 -0
  76. data/test/dummy/public/404.html +67 -0
  77. data/test/dummy/public/422.html +67 -0
  78. data/test/dummy/public/500.html +66 -0
  79. data/test/dummy/public/favicon.ico +0 -0
  80. data/test/dummy/spec/acts_as_commentable_more_spec.rb +205 -0
  81. data/test/dummy/spec/factories/admins.rb +7 -0
  82. data/test/dummy/spec/factories/comments.rb +7 -0
  83. data/test/dummy/spec/factories/custom_comments.rb +7 -0
  84. data/test/dummy/spec/factories/letters.rb +7 -0
  85. data/test/dummy/spec/factories/notes.rb +7 -0
  86. data/test/dummy/spec/factories/posts.rb +7 -0
  87. data/test/dummy/spec/factories/topics.rb +7 -0
  88. data/test/dummy/spec/factories/users.rb +7 -0
  89. data/test/dummy/spec/models/admin_spec.rb +5 -0
  90. data/test/dummy/spec/models/custom_comment_spec.rb +5 -0
  91. data/test/dummy/spec/models/letter_spec.rb +5 -0
  92. data/test/dummy/spec/models/note_spec.rb +5 -0
  93. data/test/dummy/spec/models/post_spec.rb +5 -0
  94. data/test/dummy/spec/models/topic_spec.rb +5 -0
  95. data/test/dummy/spec/models/user_spec.rb +5 -0
  96. data/test/dummy/spec/rails_helper.rb +61 -0
  97. data/test/dummy/spec/spec_helper.rb +85 -0
  98. data/test/test_helper.rb +16 -0
  99. metadata +197 -0
@@ -0,0 +1,61 @@
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
@@ -0,0 +1,85 @@
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
@@ -0,0 +1,16 @@
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
metadata ADDED
@@ -0,0 +1,197 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: acts_as_commentable_more
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - piya23300
8
+ autorequire: acts_as_commentable_more
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-01-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 4.1.8
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 4.1.8
55
+ - !ruby/object:Gem::Dependency
56
+ name: pg
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: gem that provides comment functionality.
70
+ email:
71
+ - piya23300@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - .coveralls.yml
77
+ - .gitignore
78
+ - .travis.yml
79
+ - CHANGELOG.rdoc
80
+ - Gemfile
81
+ - Gemfile.lock
82
+ - LICENSE
83
+ - MIT-LICENSE
84
+ - README.rdoc
85
+ - Rakefile
86
+ - acts_as_commentable_more.gemspec
87
+ - lib/acts_as_commentable_more.rb
88
+ - lib/acts_as_commentable_more/version.rb
89
+ - lib/comment_methods.rb
90
+ - lib/commentable_methods.rb
91
+ - lib/generators/commentable/USAGE
92
+ - lib/generators/commentable/commentable_generator.rb
93
+ - lib/generators/commentable/templates/comment.rb
94
+ - lib/generators/commentable/templates/create_comments.rb
95
+ - lib/tasks/acts_as_commentable_more_tasks.rake
96
+ - test/acts_as_commentable_more_test.rb
97
+ - test/dummy/README.rdoc
98
+ - test/dummy/Rakefile
99
+ - test/dummy/app/assets/images/.keep
100
+ - test/dummy/app/assets/javascripts/application.js
101
+ - test/dummy/app/assets/stylesheets/application.css
102
+ - test/dummy/app/controllers/application_controller.rb
103
+ - test/dummy/app/controllers/concerns/.keep
104
+ - test/dummy/app/helpers/application_helper.rb
105
+ - test/dummy/app/mailers/.keep
106
+ - test/dummy/app/models/.keep
107
+ - test/dummy/app/models/admin.rb
108
+ - test/dummy/app/models/comment.rb
109
+ - test/dummy/app/models/concerns/.keep
110
+ - test/dummy/app/models/custom_comment.rb
111
+ - test/dummy/app/models/letter.rb
112
+ - test/dummy/app/models/note.rb
113
+ - test/dummy/app/models/post.rb
114
+ - test/dummy/app/models/topic.rb
115
+ - test/dummy/app/models/user.rb
116
+ - test/dummy/app/views/layouts/application.html.erb
117
+ - test/dummy/bin/bundle
118
+ - test/dummy/bin/rails
119
+ - test/dummy/bin/rake
120
+ - test/dummy/config.ru
121
+ - test/dummy/config/application.rb
122
+ - test/dummy/config/boot.rb
123
+ - test/dummy/config/database.travis.yml
124
+ - test/dummy/config/environment.rb
125
+ - test/dummy/config/environments/development.rb
126
+ - test/dummy/config/environments/production.rb
127
+ - test/dummy/config/environments/test.rb
128
+ - test/dummy/config/initializers/assets.rb
129
+ - test/dummy/config/initializers/backtrace_silencers.rb
130
+ - test/dummy/config/initializers/cookies_serializer.rb
131
+ - test/dummy/config/initializers/filter_parameter_logging.rb
132
+ - test/dummy/config/initializers/inflections.rb
133
+ - test/dummy/config/initializers/mime_types.rb
134
+ - test/dummy/config/initializers/session_store.rb
135
+ - test/dummy/config/initializers/wrap_parameters.rb
136
+ - test/dummy/config/locales/en.yml
137
+ - test/dummy/config/routes.rb
138
+ - test/dummy/config/secrets.yml
139
+ - test/dummy/db/migrate/20150113045806_create_posts.rb
140
+ - test/dummy/db/migrate/20150113045817_create_admins.rb
141
+ - test/dummy/db/migrate/20150113045831_create_users.rb
142
+ - test/dummy/db/migrate/20150113065948_create_notes.rb
143
+ - test/dummy/db/migrate/20150113074249_create_topics.rb
144
+ - test/dummy/db/migrate/20150114052120_create_letters.rb
145
+ - test/dummy/db/migrate/20150114100411_create_comments.rb
146
+ - test/dummy/db/migrate/20150114100422_create_custom_comments.rb
147
+ - test/dummy/db/schema.rb
148
+ - test/dummy/lib/assets/.keep
149
+ - test/dummy/log/.keep
150
+ - test/dummy/public/404.html
151
+ - test/dummy/public/422.html
152
+ - test/dummy/public/500.html
153
+ - test/dummy/public/favicon.ico
154
+ - test/dummy/spec/acts_as_commentable_more_spec.rb
155
+ - test/dummy/spec/factories/admins.rb
156
+ - test/dummy/spec/factories/comments.rb
157
+ - test/dummy/spec/factories/custom_comments.rb
158
+ - test/dummy/spec/factories/letters.rb
159
+ - test/dummy/spec/factories/notes.rb
160
+ - test/dummy/spec/factories/posts.rb
161
+ - test/dummy/spec/factories/topics.rb
162
+ - test/dummy/spec/factories/users.rb
163
+ - test/dummy/spec/models/admin_spec.rb
164
+ - test/dummy/spec/models/custom_comment_spec.rb
165
+ - test/dummy/spec/models/letter_spec.rb
166
+ - test/dummy/spec/models/note_spec.rb
167
+ - test/dummy/spec/models/post_spec.rb
168
+ - test/dummy/spec/models/topic_spec.rb
169
+ - test/dummy/spec/models/user_spec.rb
170
+ - test/dummy/spec/rails_helper.rb
171
+ - test/dummy/spec/spec_helper.rb
172
+ - test/test_helper.rb
173
+ homepage: https://github.com/piya23300/acts_as_commentable_more
174
+ licenses:
175
+ - MIT
176
+ metadata: {}
177
+ post_install_message:
178
+ rdoc_options: []
179
+ require_paths:
180
+ - lib
181
+ required_ruby_version: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - '>='
184
+ - !ruby/object:Gem::Version
185
+ version: '0'
186
+ required_rubygems_version: !ruby/object:Gem::Requirement
187
+ requirements:
188
+ - - '>='
189
+ - !ruby/object:Gem::Version
190
+ version: '0'
191
+ requirements: []
192
+ rubyforge_project:
193
+ rubygems_version: 2.4.5
194
+ signing_key:
195
+ specification_version: 4
196
+ summary: gem that provides comment functionality.
197
+ test_files: []