voluntary 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -1
  4. data/app/assets/javascripts/voluntary/lib/jquery-competitive_list.js +3 -7
  5. data/app/assets/javascripts/voluntary/lib/sugar.js +8264 -0
  6. data/app/assets/stylesheets/voluntary/bootstrap_and_overrides.css.sass +1 -1
  7. data/app/controllers/voluntary/api/v1/argument_topics_controller.rb +18 -0
  8. data/app/controllers/voluntary/api/v1/arguments_controller.rb +76 -0
  9. data/app/controllers/voluntary/api/v1/things/arguments_controller.rb +48 -0
  10. data/app/controllers/voluntary/api/v1/users_controller.rb +9 -0
  11. data/app/models/argument.rb +58 -0
  12. data/app/models/argument_topic.rb +17 -0
  13. data/app/models/user.rb +1 -0
  14. data/app/serializers/application_serializer.rb +2 -0
  15. data/app/serializers/argument_serializer.rb +19 -0
  16. data/app/serializers/basic_user_serializer.rb +3 -0
  17. data/app/serializers/current_user_serializer.rb +3 -0
  18. data/app/serializers/user_serializer.rb +2 -0
  19. data/app/views/layouts/application.html.erb +1 -1
  20. data/app/views/shared/layouts/twitter_bootstrap/_control_group.html.erb +1 -1
  21. data/app/views/shared/layouts/twitter_bootstrap/_modal.html.erb +13 -9
  22. data/config/initializers/active_model_serializer.rb +4 -0
  23. data/config/locales/general/en.yml +15 -1
  24. data/config/locales/resources/argument/en.yml +28 -0
  25. data/config/locales/resources/argument_topic/en.yml +9 -0
  26. data/config/locales/resources/like/en.yml +6 -0
  27. data/config/routes/api.rb +12 -0
  28. data/db/migrate/20121006162913_add_public_attribute_to_roles.rb +3 -0
  29. data/db/migrate/20150818151512_create_or_alter_arguments.rb +49 -0
  30. data/db/migrate/20150821102558_add_vote_column_to_arguments.rb +6 -0
  31. data/db/migrate/20150823174056_add_likes_count_to_arguments.rb +6 -0
  32. data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/session_steps.rb +1 -0
  33. data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/web_steps.rb +4 -0
  34. data/lib/generators/voluntary/product_dummy/templates/features/support/env.rb +4 -0
  35. data/lib/voluntary/engine.rb +1 -0
  36. data/lib/voluntary/test/rspec_helpers/factories.rb +4 -0
  37. data/lib/voluntary/version.rb +1 -1
  38. data/lib/voluntary.rb +1 -1
  39. metadata +35 -4
  40. data/lib/generators/voluntary/product_dummy/templates/features/step_definitions/state_machines/vacancy_steps.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 419c8a84e348727daf69aa18cf56c4c9a6b719ff
4
- data.tar.gz: 0539d0b9cf7e06254e7a892b050de1c246082ae3
3
+ metadata.gz: cb222e6b0d5f86dc5ed08f2b475ba280e2a9a4de
4
+ data.tar.gz: 50d18620cab7b3716b9ad74ad643eba56e752c23
5
5
  SHA512:
6
- metadata.gz: 82e81ddb6f66fd0accbdae7561fd49b31a80534c884166b142e73e37a9a52cdc0189008fe56d6b4876c6cc44daf36773a3a9caf117bbc677af00b39143f415bf
7
- data.tar.gz: 30be2205e906c800a754507e5391e74e2fdc0827bca932e68bc04cb1e8b38a7045af9ec98497140e9514055af877118c56b6894e0758078df87f8b973f379b9e
6
+ metadata.gz: 6087b6fc4acdd8ecb1a045823c767591aae2e64988ded390d83db70b930c25426adb93b6439a025de276c3f950ed6cf18bd567756f837d28a92e1cb548e09cce
7
+ data.tar.gz: 4e747c15e0566d4186d000840def52df454fe3ef470944f3e8c965d97010ce1188f88828b1c5a609cc5f01011e239f6c8e8d5caa0f0c0441acb7ef9100dfa0a2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## unreleased ##
2
2
 
3
+ ## 0.5.1 (August 23, 2015) ##
4
+
5
+ * Adds new JavaScript library sugar.
6
+ * Implements api/v1/arguments#update and #destroy.
7
+ * Adds seeds with 1 admin user.
8
+ * [#92](https://github.com/volontariat/voluntary/issues/92) Move Argument and ArgumentTopic model from ranking plugin to here
9
+
3
10
  ## 0.5.0 (August 17, 2015) ##
4
11
 
5
12
  * [#87](https://github.com/volontariat/voluntary/issues/87) WikiData.org integration for things suggestion
data/README.md CHANGED
@@ -94,8 +94,8 @@ Run this in your console:
94
94
  cd dummy
95
95
  bundle exec rake railties:install:migrations
96
96
  # change database names to #{product_name}_#{environment} and customize user credentials in dummy/config/mongoid.yml
97
+ # create a class for your new product under app/models/product/product_name.rb like: https://github.com/volontariat/voluntary_scholarship/blob/master/app/models/product/scholarship.rb
97
98
  bundle exec rake db:migrate && bundle exec rake db:test:clone_structure
98
- # create a class for your new product under app/models/product/product_name.rb like: https://github.com/volontariat/voluntary_scholarship/blob/master/app/models/product/scholarship.rb
99
99
  bundle exec rails s
100
100
  ```
101
101
 
@@ -66,10 +66,6 @@
66
66
  })(this));
67
67
  };
68
68
 
69
- CompetitiveList.meaningOfLife = function() {
70
- return 42;
71
- };
72
-
73
69
  CompetitiveList.prototype.start = function() {
74
70
  var matchesAlreadyExist, matchesWithoutWinner;
75
71
  matchesAlreadyExist = false;
@@ -207,7 +203,7 @@
207
203
  modalFooterHtml = '';
208
204
  if (this.currentMatch === null) {
209
205
  modalTitle = 'No matches to rate left.';
210
- modalFooterHtml = "<p>\n <button type=\"button\" class=\"cancel_tournament_button\" class=\"btn\">Save match results and close window</button>\n</p> ";
206
+ modalFooterHtml = "<p>\n <button type=\"button\" class=\"cancel_tournament_button btn btn-default\">Save match results and close window</button>\n</p> ";
211
207
  } else {
212
208
  modalTitle = "Appoint Winner (" + this.matchesLeft + " matches left)";
213
209
  radioButtons = [];
@@ -226,10 +222,10 @@
226
222
  };
227
223
  })(this));
228
224
  modalBodyHtml += "<div class=\"controls\" style=\"margin-left:50px\">\n <table>\n <tr> \n <td style=\"width:325px; text-align:right;\">\n " + competitorStrings[0] + "\n </td>\n <td>&nbsp;&nbsp;&nbsp;</td>\n <td>" + radioButtons[0] + "</td>\n <td>&nbsp;&nbsp;VS.&nbsp;&nbsp;&nbsp;</td>\n <td>" + radioButtons[1] + "</td>\n <td>\n &nbsp;&nbsp;&nbsp;\n </td>\n <td style=\"width:325px\">\n " + competitorStrings[1] + "\n </td>\n </tr>\n </table>\n</div> ";
229
- modalFooterHtml = "<p>\n <button type=\"button\" class=\"cancel_tournament_button\" class=\"btn\">Save match results and close window</button> &nbsp;&nbsp;&nbsp;&nbsp;\n <button type=\"button\" class=\"select_winner_button\" class=\"btn btn-primary\">Submit</button>\n</p>";
225
+ modalFooterHtml = "<p>\n <button type=\"button\" class=\"cancel_tournament_button btn btn-default\">Save match results and close window</button> &nbsp;&nbsp;&nbsp;&nbsp;\n <button type=\"button\" class=\"select_winner_button btn btn-primary\">Submit</button>\n</p>";
230
226
  }
231
227
  modalBodyHtml += autoWinnerMatchesHtml;
232
- html = "<form class=\"form-inline\" style=\"margin:0px;\">\n <div class=\"modal-header\">\n <button type=\"button\" id=\"close_bootstrap_modal_button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\n <h3>" + modalTitle + "</h3>\n </div>\n <div class=\"modal-body\" style=\"overflow-y:auto;\">\n " + modalBodyHtml + "\n </div>\n <div class=\"modal-footer\" style=\"text-align:left;\">\n " + modalFooterHtml + "\n </div>\n</form>";
228
+ html = "<div class=\"modal-dialog\">\n <div class=\"modal-content\"> \n <form class=\"form-inline\" style=\"margin:0px;\">\n <div class=\"modal-header\">\n <button type=\"button\" id=\"close_bootstrap_modal_button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\n <h3>" + modalTitle + "</h3>\n </div>\n <div class=\"modal-body\" style=\"overflow-y:auto;\">\n " + modalBodyHtml + "\n </div>\n <div class=\"modal-footer\" style=\"text-align:left;\">\n " + modalFooterHtml + "\n </div>\n </form>\n </div>\n</div>";
233
229
  $('#bootstrap_modal').html(html);
234
230
  $('.bootstrap_tooltip').tooltip();
235
231
  this.currentAutoWinnerMatches = [];