the_comments 2.0.0 → 2.0.1

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 50833c02203fba28ab6aaec5b74b295f7e1727c4
4
+ data.tar.gz: 0050dd29db88e8b37ac6b8459146e518cd9ba7e0
5
+ SHA512:
6
+ metadata.gz: 0cb0562dffaac6b0cd41b8da0b0298f8d22751b6b405b5755d7d54e37c2d6682682878829b1706ccdf6336369337bbbcd6eb259efb0620ac56e9cd568a777371
7
+ data.tar.gz: b89cfab3061c32c2ac02669a97d4ef19f22cee1caf40073e719a99e00f665e346070bd7cb4df8617654241f513d41c595a04774b247e2df8e4037f6553ffe0f0
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
- ### This Repo under development!
2
-
3
1
  # TheComments
4
2
 
5
3
  [![Gem Version](https://badge.fury.io/rb/the_comments.png)](http://badge.fury.io/rb/the_comments) | [![Build Status](https://travis-ci.org/the-teacher/the_comments.png?branch=master)](https://travis-ci.org/the-teacher/the_comments) | [![Code Climate](https://codeclimate.com/github/the-teacher/the_comments.png)](https://codeclimate.com/github/the-teacher/the_comments) | [(rubygems)](http://rubygems.org/gems/the_comments)
6
4
 
7
5
  TheComments - probably, best commenting system for Rails
8
6
 
7
+ :question:   [Why TheComments is better than others gems?](docs/whats_wrong_with_other_gems.md#why-thecomments-is-better-than-others-gems)
8
+
9
9
  ### Main features
10
10
 
11
11
  * Threaded comments
@@ -198,6 +198,19 @@ end
198
198
 
199
199
  <hr>
200
200
 
201
+ ### Feedback
202
+
203
+ :speech_balloon: &nbsp; My twitter: [@iam_teacher](https://twitter.com/iam_teacher) &nbsp; &nbsp; &nbsp; hashtag: **#the_comments**
204
+
205
+ ### Acknowledgment
206
+
207
+ * Anna Nechaeva (my wife) - for love and my happy life
208
+ * @tanraya (Andrew Kozlov) - for code review
209
+ * @solenko (Anton Petrunich) - for mountable routes
210
+ * @pyromaniac (Arkadiy Zabazhanov) - for consalting
211
+
212
+ <hr>
213
+
201
214
  ### MIT License
202
215
 
203
216
  Copyright (c) 2013 Ilya N. Zykin
@@ -2,12 +2,13 @@
2
2
 
3
3
  TheComments.configure do |config|
4
4
  config.max_reply_depth = 3 # comments tree depth
5
- config.tolerance_time = 5 # sec - after this delay user can post a comment
5
+ config.tolerance_time = 10 # sec - after this delay user can post a comment
6
6
  config.default_state = :draft # default state for comment
7
7
  config.default_owner_state = :published # default state for comment for Moderator
8
8
  config.empty_inputs = [:commentBody] # array of spam trap fields
9
9
  config.default_title = 'Undefined title' # default commentable_title for denormalization
10
+ config.template_engine = :haml
10
11
 
11
12
  config.empty_trap_protection = true
12
13
  config.tolerance_time_protection = true
13
- end
14
+ end
@@ -2,6 +2,7 @@
2
2
  * :white_check_mark: &nbsp; [ADVANCED INSTALLATION](advanced_installation.md)
3
3
  * :white_check_mark: &nbsp; [ADMIN UI INSTALLATION](admin_ui_installation.md)
4
4
  * :white_check_mark: &nbsp; [Mountable Routing](mountable_routes.md)
5
+ * :white_check_mark: &nbsp; [Generators](generators.md)
5
6
 
6
7
  #### API
7
8
  * :white_check_mark: &nbsp; [User API](user_api.md)
@@ -0,0 +1,74 @@
1
+ &larr; &nbsp; [documentation](documentation.md)
2
+
3
+ ## Generators
4
+
5
+ ```ruby
6
+ rails g the_comments NAME
7
+ rails g the_comments:views NAME
8
+ ```
9
+
10
+ #### Migrations
11
+
12
+ ```ruby
13
+ rake the_comments_engine:install:migrations
14
+ ```
15
+
16
+ ### Full list
17
+
18
+ ```ruby
19
+ rails g the_comments --help
20
+ ```
21
+
22
+ #### Main
23
+
24
+ ```ruby
25
+ rails g the_comments install
26
+ ```
27
+
28
+ This will create:
29
+
30
+ * config/initializers/the_comments.rb
31
+ * app/controllers/comments_controller.rb
32
+ * app/models/comment.rb
33
+
34
+ #### Controllers
35
+
36
+ ```ruby
37
+ rails g the_comments controllers
38
+ ```
39
+
40
+ This will create:
41
+
42
+ * app/controllers/comments_controller.rb
43
+
44
+ #### Models
45
+
46
+ ```ruby
47
+ rails g the_comments models
48
+ ```
49
+
50
+ This will create:
51
+
52
+ * app/models/comment.rb
53
+
54
+ #### Config
55
+
56
+ ```ruby
57
+ rails g the_comments config
58
+ ```
59
+
60
+ #### Locals
61
+
62
+ ```ruby
63
+ rails g the_comments locales
64
+ ```
65
+
66
+ #### Views
67
+
68
+ ```ruby
69
+ rails g the_comments:views js
70
+ rails g the_comments:views css
71
+ rails g the_comments:views assets
72
+ rails g the_comments:views helper
73
+ rails g the_comments:views views
74
+ ```
@@ -11,8 +11,17 @@ Just look at [Ruby-Toolbox](https://www.ruby-toolbox.com/categories/rails_commen
11
11
 
12
12
  ### Why TheComments is better than others gems?
13
13
 
14
- 1. Only TheComments has special helper for tree rendering ([TheSortableTree](https://github.com/the-teacher/the_sortable_tree)).
15
- 2. TheComments designed to reduce requests to database. I say about useful cache counters.
16
- 3. TheComments has solution for [building of Recent Comments](https://github.com/the-teacher/the_comments/blob/master/docs/denormalization_and_recent_comments.md) (for polymorphic relations)
17
- 4. TheComments designed for text preprocessors (Textile, Markdown, Sanitize, Coderay etc.)
18
- 5. TheComments has admin UI based on bootstrap 3
14
+ 1. TheComments allows for threaded comments
15
+ 2. **Only TheComments has special helper for tree rendering** (based on [TheSortableTree](https://github.com/the-teacher/the_sortable_tree)).
16
+ 3. TheComments designed to reduce requests to database. I say about useful cache counters.
17
+ 4. TheComments has solution for [building of Recent Comments](https://github.com/the-teacher/the_comments/blob/master/docs/denormalization_and_recent_comments.md) (for polymorphic relations)
18
+ 5. TheComments designed for text preprocessors (Textile, Markdown, Sanitize, Coderay etc.)
19
+ 6. TheComments has admin UI based on bootstrap 3
20
+ 7. TheComments is "all-in-one" solutions.<br>
21
+ It has: Models and Controllers logic (via concerns), Generators, Views, Helper for fast Tree rendering and Admin UI.
22
+
23
+ ### TheComments based on:
24
+
25
+ 1. [AwesomeNestedSet](https://github.com/collectiveidea/awesome_nested_set) - for comments threading
26
+ 2. [TheSortableTree](https://github.com/the-teacher/the_sortable_tree) - for fast render of comments tree
27
+ 3. [State Machine](https://github.com/pluginaweek/state_machine) - to provide easy and correct recalculation cache counters on states transitions
data/gem_version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module TheComments
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -31,20 +31,3 @@ rake db:bootstrap RAILS_ENV=test
31
31
 
32
32
  rspec --format documentation
33
33
  ```
34
-
35
- ### Only for me (don't read this)
36
-
37
- base install commands
38
-
39
- ```
40
- rails g sorcery:install
41
- rails generate rspec:install
42
-
43
- rails g the_comments install
44
- rails g the_comments:views views
45
- rails g model post user_id:integer title:string content:text
46
-
47
- rake the_comments_engine:install:migrations (EDIT!)
48
-
49
- rake db:bootstrap
50
- ```
@@ -2,12 +2,13 @@
2
2
 
3
3
  TheComments.configure do |config|
4
4
  config.max_reply_depth = 3 # comments tree depth
5
- config.tolerance_time = 3 # sec - after this delay user can post a comment
5
+ config.tolerance_time = 5 # sec - after this delay user can post a comment
6
6
  config.default_state = :draft # default state for comment
7
7
  config.default_owner_state = :published # default state for comment for Moderator
8
8
  config.empty_inputs = [:commentBody] # array of spam trap fields
9
9
  config.default_title = 'Undefined title' # default commentable_title for denormalization
10
+ config.template_engine = :haml
10
11
 
11
12
  config.empty_trap_protection = true
12
13
  config.tolerance_time_protection = true
13
- end
14
+ end
metadata CHANGED
@@ -1,38 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: the_comments
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
5
- prerelease:
4
+ version: 2.0.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ilya N. Zykin
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-11-04 00:00:00.000000000 Z
11
+ date: 2013-11-05 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: state_machine
16
- requirement: &85480050 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *85480050
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: the_sortable_tree
27
- requirement: &85479700 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - ! '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
34
  type: :runtime
34
35
  prerelease: false
35
- version_requirements: *85479700
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
36
41
  description: ! ' Comments with threading for Rails 4 '
37
42
  email:
38
43
  - zykin-ilya@ya.ru
@@ -97,6 +102,7 @@ files:
97
102
  - docs/customazation_of_views.md
98
103
  - docs/denormalization_and_recent_comments.md
99
104
  - docs/documentation.md
105
+ - docs/generators.md
100
106
  - docs/mountable_routes.md
101
107
  - docs/pagination.md
102
108
  - docs/screencast.jpg
@@ -201,27 +207,26 @@ files:
201
207
  - views_converter.rb
202
208
  homepage: https://github.com/open-cook/the_comments
203
209
  licenses: []
210
+ metadata: {}
204
211
  post_install_message:
205
212
  rdoc_options: []
206
213
  require_paths:
207
214
  - lib
208
215
  required_ruby_version: !ruby/object:Gem::Requirement
209
- none: false
210
216
  requirements:
211
217
  - - ! '>='
212
218
  - !ruby/object:Gem::Version
213
219
  version: '0'
214
220
  required_rubygems_version: !ruby/object:Gem::Requirement
215
- none: false
216
221
  requirements:
217
222
  - - ! '>='
218
223
  - !ruby/object:Gem::Version
219
224
  version: '0'
220
225
  requirements: []
221
226
  rubyforge_project:
222
- rubygems_version: 1.8.15
227
+ rubygems_version: 2.0.5
223
228
  signing_key:
224
- specification_version: 3
229
+ specification_version: 4
225
230
  summary: the_comments by the-teacher
226
231
  test_files:
227
232
  - spec/dummy_app/.gitignore