decidim-comments 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/app/assets/javascripts/decidim/comments/bundle.js +43 -44
  4. data/app/assets/javascripts/decidim/comments/bundle.js.map +1 -1
  5. data/app/commands/decidim/comments/vote_comment.rb +38 -0
  6. data/app/frontend/application/icon.component.jsx +9 -4
  7. data/app/frontend/application/icon.component.test.jsx +12 -2
  8. data/app/frontend/comments/add_comment_form.component.jsx +43 -11
  9. data/app/frontend/comments/add_comment_form.mutation.graphql +1 -4
  10. data/app/frontend/comments/comment.component.jsx +67 -7
  11. data/app/frontend/comments/comment.component.test.jsx +49 -1
  12. data/app/frontend/comments/comment_data.fragment.graphql +3 -0
  13. data/app/frontend/comments/comment_order_selector.component.jsx +51 -6
  14. data/app/frontend/comments/comment_order_selector.component.test.jsx +12 -1
  15. data/app/frontend/comments/comment_thread.component.jsx +11 -5
  16. data/app/frontend/comments/comment_thread.component.test.jsx +13 -3
  17. data/app/frontend/comments/comment_thread.fragment.graphql +1 -3
  18. data/app/frontend/comments/comments.component.jsx +37 -11
  19. data/app/frontend/comments/comments.component.test.jsx +44 -7
  20. data/app/frontend/comments/comments.query.graphql +2 -2
  21. data/app/frontend/comments/down_vote.fragment.graphql +6 -0
  22. data/app/frontend/comments/down_vote.mutation.graphql +7 -0
  23. data/app/frontend/comments/down_vote_button.component.jsx +84 -0
  24. data/app/frontend/comments/down_vote_button.component.test.jsx +48 -0
  25. data/app/frontend/comments/up_vote.fragment.graphql +6 -0
  26. data/app/frontend/comments/up_vote.mutation.graphql +7 -0
  27. data/app/frontend/comments/up_vote_button.component.jsx +84 -0
  28. data/app/frontend/comments/up_vote_button.component.test.jsx +48 -0
  29. data/app/frontend/comments/vote_button.component.jsx +19 -0
  30. data/app/frontend/comments/vote_button_component.test.jsx +38 -0
  31. data/app/frontend/support/generate_comments_data.js +7 -2
  32. data/app/helpers/decidim/comments/comments_helper.rb +1 -1
  33. data/app/models/decidim/comments/application_record.rb +9 -0
  34. data/app/models/decidim/comments/comment.rb +19 -4
  35. data/app/models/decidim/comments/comment_vote.rb +22 -0
  36. data/app/models/decidim/comments/seed.rb +27 -0
  37. data/app/queries/decidim/comments/comments_with_replies.rb +88 -0
  38. data/app/resolvers/decidim/comments/vote_comment_resolver.rb +20 -0
  39. data/app/types/decidim/comments/comment_mutation_type.rb +19 -0
  40. data/app/types/decidim/comments/comment_type.rb +38 -2
  41. data/config/locales/en.yml +1 -0
  42. data/db/migrate/20161130143508_create_comments.rb +4 -2
  43. data/db/migrate/20161219150806_create_comment_votes.rb +13 -0
  44. data/lib/decidim/comments/mutation_extensions.rb +9 -0
  45. data/lib/decidim/comments/query_extensions.rb +3 -5
  46. data/lib/decidim/comments/test/factories.rb +22 -0
  47. metadata +26 -49
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-comments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-12-21 00:00:00.000000000 Z
13
+ date: 2017-01-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.0.1
21
+ version: 0.0.2
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.0.1
28
+ version: 0.0.2
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rails
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -46,34 +46,6 @@ dependencies:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: 5.0.0.1
49
- - !ruby/object:Gem::Dependency
50
- name: foundation-rails
51
- requirement: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: 6.2.4.0
56
- type: :runtime
57
- prerelease: false
58
- version_requirements: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - "~>"
61
- - !ruby/object:Gem::Version
62
- version: 6.2.4.0
63
- - !ruby/object:Gem::Dependency
64
- name: sassc-rails
65
- requirement: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - "~>"
68
- - !ruby/object:Gem::Version
69
- version: 1.3.0
70
- type: :runtime
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - "~>"
75
- - !ruby/object:Gem::Version
76
- version: 1.3.0
77
49
  - !ruby/object:Gem::Dependency
78
50
  name: jquery-rails
79
51
  requirement: !ruby/object:Gem::Requirement
@@ -108,34 +80,20 @@ dependencies:
108
80
  - - ">="
109
81
  - !ruby/object:Gem::Version
110
82
  version: 5.0.0.1
111
- - !ruby/object:Gem::Dependency
112
- name: foundation_rails_helper
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: 2.0.0
118
- type: :runtime
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: 2.0.0
125
83
  - !ruby/object:Gem::Dependency
126
84
  name: decidim-dev
127
85
  requirement: !ruby/object:Gem::Requirement
128
86
  requirements:
129
87
  - - '='
130
88
  - !ruby/object:Gem::Version
131
- version: 0.0.1
89
+ version: 0.0.2
132
90
  type: :development
133
91
  prerelease: false
134
92
  version_requirements: !ruby/object:Gem::Requirement
135
93
  requirements:
136
94
  - - '='
137
95
  - !ruby/object:Gem::Version
138
- version: 0.0.1
96
+ version: 0.0.2
139
97
  description: Pluggable comments system for some components.
140
98
  email:
141
99
  - josepjaume@gmail.com
@@ -152,6 +110,7 @@ files:
152
110
  - app/assets/javascripts/decidim/comments/bundle.js.map
153
111
  - app/assets/javascripts/decidim/comments/comments.js.erb
154
112
  - app/commands/decidim/comments/create_comment.rb
113
+ - app/commands/decidim/comments/vote_comment.rb
155
114
  - app/forms/decidim/comments/comment_form.rb
156
115
  - app/frontend/application/apollo_client.js
157
116
  - app/frontend/application/application.component.jsx
@@ -173,8 +132,18 @@ files:
173
132
  - app/frontend/comments/comments.component.jsx
174
133
  - app/frontend/comments/comments.component.test.jsx
175
134
  - app/frontend/comments/comments.query.graphql
135
+ - app/frontend/comments/down_vote.fragment.graphql
136
+ - app/frontend/comments/down_vote.mutation.graphql
137
+ - app/frontend/comments/down_vote_button.component.jsx
138
+ - app/frontend/comments/down_vote_button.component.test.jsx
176
139
  - app/frontend/comments/featured_comment.component.jsx
177
140
  - app/frontend/comments/featured_comment.component.test.jsx
141
+ - app/frontend/comments/up_vote.fragment.graphql
142
+ - app/frontend/comments/up_vote.mutation.graphql
143
+ - app/frontend/comments/up_vote_button.component.jsx
144
+ - app/frontend/comments/up_vote_button.component.test.jsx
145
+ - app/frontend/comments/vote_button.component.jsx
146
+ - app/frontend/comments/vote_button_component.test.jsx
178
147
  - app/frontend/entry.js
179
148
  - app/frontend/entry.test.js
180
149
  - app/frontend/support/asset_url.js
@@ -185,9 +154,15 @@ files:
185
154
  - app/frontend/support/resolve_graphql_query.js
186
155
  - app/frontend/support/stub_component.js
187
156
  - app/helpers/decidim/comments/comments_helper.rb
157
+ - app/models/decidim/comments/application_record.rb
188
158
  - app/models/decidim/comments/comment.rb
159
+ - app/models/decidim/comments/comment_vote.rb
160
+ - app/models/decidim/comments/seed.rb
161
+ - app/queries/decidim/comments/comments_with_replies.rb
162
+ - app/resolvers/decidim/comments/vote_comment_resolver.rb
189
163
  - app/types/decidim/comments/add_comment_type.rb
190
164
  - app/types/decidim/comments/author_type.rb
165
+ - app/types/decidim/comments/comment_mutation_type.rb
191
166
  - app/types/decidim/comments/comment_type.rb
192
167
  - config/i18n-tasks.yml
193
168
  - config/locales/ca.yml
@@ -196,11 +171,13 @@ files:
196
171
  - db/migrate/20161130143508_create_comments.rb
197
172
  - db/migrate/20161214082645_add_depth_to_comments.rb
198
173
  - db/migrate/20161216102820_add_alignment_to_comments.rb
174
+ - db/migrate/20161219150806_create_comment_votes.rb
199
175
  - db/seeds.rb
200
176
  - lib/decidim/comments.rb
201
177
  - lib/decidim/comments/engine.rb
202
178
  - lib/decidim/comments/mutation_extensions.rb
203
179
  - lib/decidim/comments/query_extensions.rb
180
+ - lib/decidim/comments/test/factories.rb
204
181
  homepage: https://github.com/AjuntamentdeBarcelona/decidim
205
182
  licenses:
206
183
  - AGPLv3
@@ -221,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
198
  version: '0'
222
199
  requirements: []
223
200
  rubyforge_project:
224
- rubygems_version: 2.5.2
201
+ rubygems_version: 2.6.8
225
202
  signing_key:
226
203
  specification_version: 4
227
204
  summary: Pluggable comments system for some components.