-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Place tag detection and replacing "-" with "" #2734
Place tag detection and replacing "-" with "" #2734
Conversation
@jywarren Please have a look! |
Generated by 🚫 Danger |
Ah, can you link me back to the description? I think we don't want to do this on initial tag creation but only temporarily when attempting geocoding. Let me check the discussion at the planning issue! |
app/controllers/tag_controller.rb
Outdated
@@ -289,6 +289,9 @@ def create | |||
uid: current_user.uid, | |||
body: " @#{current_user.username} has marked #{tagname.split(':')[1]} as a co-author. ") | |||
|
|||
elsif tagname.split(':')[0] == "place" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets trim this back out!
app/assets/javascripts/tagging.js
Outdated
if (tagname.indexOf("place") != -1) { | ||
place = tagname.split(":")[1]; | ||
place.replace("-", " "); | ||
alert("This looks like a location"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a placeholder, i guess - we can insert a modal dialog instead once we get this working!
Here, also, if you use the place
string to initiate a geocoding search that'd be great -- we'll probably have to display a spinner on the modal like This looks like a location. Trying to find coordinates... (spinner)
-- while it loads - make sense?
app/assets/javascripts/tagging.js
Outdated
|
||
var el = $(selector); | ||
|
||
el.find('.tag-input').val(tagname); | ||
el.find('.tag-input').val("tagname"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the quotes are not needed - we want the variable -- but, we could put this in an else
clause after checking if it's a place. So:
- if it's a place, start the dialog box and wait until a) we geocode and b) user says OK or Cancel
- if it's not, just go ahead and submit the tag!
Make sense?
Good going Mridul, exciting to see this start off!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, on it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, still have to remove the quotation marks here! Almost there!
@jywarren Made some changes, please have a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really great. it's very readable. Great work! Just a few more steps!
Let's use a confirm()
instead of a prompt()
and say This looks like a location. Is this full description of the location accurate? __________
A confirm()
will return a true of false for OK
vs Cancel
-- make sense?
👍 👍 🎉
Gemfile.lock
Outdated
@@ -63,6 +63,7 @@ GEM | |||
debug_inspector (>= 0.0.1) | |||
builder (3.2.3) | |||
byebug (10.0.2) | |||
chronic (0.10.2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @mridulnagpal -- are these gems used in your code, or was this added by mistake? I guess we can upgrade the versions without a problem, though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I am not using these gems, must be by mistake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just remember to remove this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
app/assets/javascripts/tagging.js
Outdated
if (tagname.indexOf("place") != -1) { | ||
place = tagname.split(":")[1]; | ||
place.replace("-", " "); | ||
geocodeStringAndPan(place); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to put the prompt code into a callback so it executes /after/ the geocode is complete? Or does this just work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, perhaps in the onComplete
parameter!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied this code from blurred-location library, how do I test all of it?
app/assets/javascripts/tagging.js
Outdated
geocodeStringAndPan(place); | ||
var choice = prompt("This looks like a location: A) Geocode B) Leave"); | ||
while(choice == NULL) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the while
may not be needed? the prompt()
should hang up the process until it's submitted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome
app/controllers/tag_controller.rb
Outdated
@@ -289,8 +289,6 @@ def create | |||
uid: current_user.uid, | |||
body: " @#{current_user.username} has marked #{tagname.split(':')[1]} as a co-author. ") | |||
|
|||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a stray deletion? Maybe re-adding the end
will fix some of the tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, on it!!
@jywarren Made the changes, how do we proceed forward? |
@jywarren What do we do next, as I don't know how to test it as of yet |
Hi, sorry Mridul, I've been traveling and teaching workshops but will take
a look later today! In the meantime can you try asking some other soc folks
for support? Thanks!
…On Tue, May 22, 2018, 3:24 AM Mridul Nagpal ***@***.***> wrote:
[image: public]
<https://user-images.githubusercontent.com/22350740/40347781-156b4a92-5dbf-11e8-94d0-968e713d2e35.png>
I don't understand why it does not detect the place tag, any ideas?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2734 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ2s2C_GUKVylIngehiJuoJ8d44Vsks5t07z7gaJpZM4UCcIL>
.
|
@publiclab/soc Any thoughts on how to test this guys? |
app/assets/javascripts/tagging.js
Outdated
place.replace("-", " "); | ||
|
||
confirm("This looks like a location. Is this full description of the location accurate?"); | ||
if(confirm) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aha - so here, confirm()
returns true or false, but doesn't create a confirm
variable. You can just say:
if (confirm("......")) {
Or you could say:
var confirm = confirm("......");
if (confirm) {
Make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, done!
@mridulnagpal can you take a look at the CodeClimate suggestions too? https://codeclimate.com/github/publiclab/plots2/pull/2734 This did pass though! |
@jywarren Sure, working on refatoring!! |
@publiclab/soc @jywarren Fixed the codeclimate issues, do you know why is this not passing? |
Yes, i think it's related to #2593 which we're trying to make progress on! |
OK it should work now if you rebase and retrigger it! |
Oh oops i also retriggered the build... let's see |
app/assets/javascripts/tagging.js
Outdated
place = tagname.split(":")[1]; | ||
place.replace("-", " "); | ||
|
||
var confirm = confirm("This looks like a location. Is this full description of the location accurate?"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so we have a flow issue here -- think about this, we probably need to do the geocoding /first/ and then present the user with the attempt to determine the full location /after/ it returns, right?
So if so, we ought to just initiate the geocode automatically. Then, the confirm()
step ought to go in the onComplete -- that way we can say Is "____________" an accurate description of the place?
@jywarren Also corrected the detection of "place" in the tagname |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah!!! It's because the form doesn't by default use addTag! In fact it's the reverse. addTag actually submits the form.
Ok, so we should finally rewire the form to use the JavaScript function rather than natively submit. Can you work on the tagging HTML template and try to rewire it to submit via Ajax rather than just using native HTML submit action?
Does this make sense? |
@jywarren Got it, I am getting this issue when I try to add 2 tags together. |
Weird but maybe because in SQLite itbcant respond fast enough for two
entries very fast? Do u have MySQL available?
…On Thu, May 31, 2018, 2:45 PM Mridul Nagpal ***@***.***> wrote:
@jywarren <https://github.com/jywarren> Got it, I am getting this issue
when I try to add 2 tags together.
[image: image]
<https://user-images.githubusercontent.com/22350740/40801537-c883e382-6530-11e8-92ca-4ddc1d8b6804.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2734 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ2UVPLCHa68KhZ8mM6g7KpaeZNJNks5t4Do-gaJpZM4UCcIL>
.
|
@jywarren Yes I have it, what do I do? |
Try changing your database.yml to use MySQL ( you may need to go through
setup steps again) and see if it works then?
…On Thu, May 31, 2018, 3:26 PM Mridul Nagpal ***@***.***> wrote:
@jywarren <https://github.com/jywarren> Yes I have it, what do I do?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2734 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJyldooRBxKfmDjKBCJpehjnQ_0Auks5t4EPZgaJpZM4UCcIL>
.
|
@jywarren I think we have some migration which are not compatible with mysql |
Hi, can someone from @publiclab/reviewers help Mridul here? I'm
unfortunately at a meeting this weekend, thanks!
…On Sat, Jun 2, 2018, 4:34 AM Mridul Nagpal ***@***.***> wrote:
@jywarren <https://github.com/jywarren> I think we have some migration
which are not compatible with mysql
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2734 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJwbaHxPcepWU_b4gb5hP8XlXxn5kks5t4moMgaJpZM4UCcIL>
.
|
Hi, Mridul - can you check if you've modified your |
app/assets/javascripts/tagging.js
Outdated
if (geo.length > 0) { | ||
var confirm = confirm("This looks like a location. Is this full description of the location accurate?"); | ||
if(confirm) { | ||
addTag("lat: " + str(geo[0])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! you could also do a single addTag("lat: " + str(geo[0])" + "," + "lng: " + str(geo[1]))
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!!
@jywarren, I tried testing it and it works, I just need to rewire the form to submit via addTag method, how are the tags added right now? |
…ation-tag-geocoder
@jywarren @publiclab/soc We are done with the adding of tag, but we need to call addTag() when the form is submitted. Do you know what method is called right now to add Tags to research notes? |
console.log(geo[0]); | ||
console.log(geo[1]); | ||
if(r) { | ||
addTag("lat:" + geo[0].toString() + ",lng:" + geo[1].toString()+",place:"+string); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so I think we can put off refactoring addTag
for now -- or do it in an independent PR. This should just submit the HTML form. I'm going to merge it!
* Place tag detection and replacing "-" with "" * Javascript changed * Geocode method added * Tweaks * Tweaks * Tweaks * Tweaks 2 * Tweaks 3 * Update Gemfile.lock * Climate fix * add geocoded tags * Tweaks * Block shift and callback to onComplete * onComplete binded with ajax * place in starting of tag detection * Tweaks
* Routes modified * Set the views * Modified error messages and user_tag * Add User_Tag as identity and find user_tag * User_sessions_controller modified * User_tag modified * user session controller modified * Checkpoint 1 * checkpoint1 codeclimate errors fixed * Checkpoint 2 * checkpoint 2 * User is created from sign up process successfully * create a usertag_with_omniauth * Search a usertag for oauth * search user_tag existing in db * create a user with omniauth test * LOGIN WORKS * current_user=(user) method removed * sign up correction * routing tests for google oauth * Google auth details saved * Google should return omniauth hash test * sign up and login via provider * sign up and login via provider alternative flow * flash message test added * login user with an email and then connect google provider * . * Changes according to rails 5 done * Changes according to rails 5 done * Environment nomenclature updated * Comments added * Adding application.yml * Submitting a draft (#2747) * Checkbox and JS function added * publish_draft method, routes, mail_notify_stop * coauthor can see and publish * bower update * undo and trying * draft label on dashboard * draft option not visible to first timer * updating bower * debug1 * removing debug statement * button view * view 2 * normal * generate path added * publish privil update * code climate * displaying comment with status1 only * coauthor can view draft * test correction * button text change to save if draft * fixture addition and 1 test * tests , fixtures and minor changes * test addition * codeclimate 1 * codeclimate 2 * codeclimate 3 * minor fixes * enable method=post for data-url image upload at /post (#2675) * enable method=post for data-url image upload at /post * Update editor_controller.rb * Update editor_controller.rb * Fixed first part of Issue #2352 Sorting headers added in wiki index page (#2353) * sorting headers added in wiki index page * replaced sorting header icon * Improved translate widget (#2553) * enhanced translate widget * changed title formatting of widget * Fix the clone command (#2766) * List subscription change (#2767) * Add sidekiq gem (#2738) * added resque gem * made changes for resqu installation * added sidekiq gem * minor changes * modified docker-compose.yml for redis * minor changes * resolve conflicts * Place tag detection and replacing "-" with "" (#2734) * Place tag detection and replacing "-" with "" * Javascript changed * Geocode method added * Tweaks * Tweaks * Tweaks * Tweaks 2 * Tweaks 3 * Update Gemfile.lock * Climate fix * add geocoded tags * Tweaks * Block shift and callback to onComplete * onComplete binded with ajax * place in starting of tag detection * Tweaks * make descriptive tag links move to bottom of page (#2770) * skylight config (#2773) * Reply to comment by email feature (#2669) * Added mailman script * Added migration file for adding comment_via column to comment table * Added reverse_markdown gem for converting html to markdown format * Added migration file for adding message_id column to comment table * Added function to handle received mail to create comment * Added icon for comment added via email to distinguish between the normal comment and reply by email comment * Added node_id in Mailer subjects to be used in reply by email feature * Minor changes * Updated schema.rb.example file * Improved tests * Added migrations * Added migrations * Added migrations * Corrected tests * Added enviroment variable for server address * Added sql sphefic conditions * Unwanted changes in schema.rb.example file is removed * Gem added * Log file is moved to public folder * Corrected tests * forward-date timestamps * Rename 20180605190014_add_message_id_column_to_comments.rb to 20180605010014_add_message_id_column_to_comments.rb * Update schema.rb.example * Added whenever cron update command in Makefile for redeploy-container (#2780) * Fix rss images and email images (#2784) * Fix rss images and email images * Update rss.rss.builder * Update rss_for_tagged_with_author.rss.builder * Update rss.rss.builder * Update rss.rss.builder * Update notify_node_creation.html.erb * Rails 5.0 upgrade (#2726) (#2783) * Rails 5.0 upgrade (#2726) * Upgraded the .gitignore according to rails diff * Initial Gemfile update * Update README.md * Showing message at the top of upgrade page (#2713) * added an upgrade alert tag * Additional questions page tweak (#2721) * added the tag to determine which upgrade is listed on the website * changed regex back * added an upgrade alert tag * added the tag to determine which upgrade is listed on the website * changed regex back * added upgrade after pull and rebase master * Upgrade to Rails 5 * Uncommented composite_primary_key gem * Removed the dual occurence of rails_autolink * Update readme installation, fixes #2729 (#2730) Updates the readme to change the installation instructions, fixes #2729 * Commented activerecord-tableless * Draft display on Dashboard (#2666) * draft display on dashboard * moderator file view permitted * checking * fix * test fix * Added and modified few config files according to railsdiff.org * Removed mass_assignment_sanitizer * Removed composite primary key gem * Removed all attr_accessible in all models * Added composite_primary_key gem again * Downgraded rails and removed few attr_accessible commands * Added strong parameters to the controllers * Added strong parameters gem and also include params.require inside private methods * Added strongparameters.rb file to initializers folder * Removed unnecessary strong_parameter functions * Removed some errors * Changed test command temporarily in .travis.yml * Corrected config/puma.rb file with adding some assets * Added all the config.precompile files in one line * Removed error of problem in updating of user profile * Removed the error while creating a user * Removed error RecordNotFound: Couldn't find Node with 'nid'= * Removed some errors related to ids * Removed comment.reload in comment_controller_test * Track Dockerfiles accross instances. (#2593) * Track Dockerfiles accross instances. * Specify jessie as base * Add commands to build&deploy container with Makefile. (#2746) * Added Sample Cron Job to check working of Whenever Gem (#2715) * Added Sample Cron Job to test Whenever Gem * Added make targets for deployment and cron service start * Added make to image * Tweak Makefile * Fix cron starting command in Makefile * Trim whitespace * Explicitly set jessie as base container * Fixed codeclimate issues * Auto-set wiki slug (#2743) * Added keyword arguments to the tag_model.rb * changed the query statement in search method of node.rb * Force removal of pid file (see docker/compose#1393) * Updated the tests due to change in arguments of search function in node.rb * Removed all the failures from tag_controller_test.rb * Changed the style of params in notes_controller_test.rb * Removed all depreciation warnings related to notes_controller * Removed all deprecation warnings related to image_controller and answers_controller * Removed all deprecation warnings of like_controller and fixed syntax error of answer_controller_test.rb * Removed all dep warnings of editor_controller and syntax error of like_controller_test.rb * removed all errors of answer_controller and some errors of tag_controller.rb * Removed all dep warnings of tag_controller_test.rb * Removed several dep warnings * Removed dep warnings of wiki_controller * Removed dep warnings of talk_controller * Removed dep warnings of legacy_controller_test.rb * Removed some warnings related to comment_controller * Removed the syntax errors * Removed two failures regarding application/xml+rss * Removed 2 failures due to wrong way of passing parameters in tests * Removed 2 failures * Fix params * Remove deprecations * Removed some dep warnings * Remove deprecations * Reverted to nothing => true * Reverted to nothing => true * Avoid rendering more than once in the same action * Removed all dep warnings related to user_tags_controller_test * Remove deprecation * Removed Dep warnings * Fix deprecation * Replace before_filter * Remove deprecation * Remove deprecation * Remove deprecation * Remove deprecation * Bump Ruby version to match Travis' * Simplify email regex to work with Ruby 2.4.1 * Changed the ruby version in Dockerfile * Remove deprecation * Remove deprecation * Removed the depreciation warning related to dynamic :controller and :action segment in routes * Changed the default ActiveRecord to ApplicationRecord in models * Clean Gemfile * Reverted to ['nid'] in tag_controller_test.rb * Changed the tests to rake test:all in .travis.yml * Minor spacing correction in .travis.yml * added a commit in application.js an application.css regarding the precompilation of files * Added more indentation * Small fixes * Separated the rails test and jasmine and coveralls task * Modified ['nid'] to ['node']['nid'] * Removed the extra puts in Rakefile * Changed the serial of tests * Added rake/testtask to Rakefile * Removed puma * Changed to ruby 2.4.1-jessie * Removed the whitelist_attributes command from config/application.rb * Removed two failures due to old usage of params * Fixed some new deprecation warnigs introduced * fixes #2731 'add spam button,line 16 _answers.html.erb' (#2785) * add spam button,line 16 _answers.html.erb * changed comment.ids to answer.ids * changed from comment path to answer * changed comment.parent.path to answer.path * some more cleanup to the button * change answer.aid to answer id * First timers recaptcha Environment Variables (#2786) * Edited the if statement * Added the env variables * Edited ENV variable, and added fallback * Fixed issue#2445 added both direction sort order (#2557) * fixed issue#2445 added both direction sort order * added function get_order_string in tags_controller * Changed get to post (#2788) * Update container definitions to match actual files used. (#2791) * Update container definitions to match actual files used. * Fix paths for running docker-compose.yml from subdir * Fix reference to Dockerfile * Reformat range stats page to table (#2792) * Index page listing for UserTags per issue #2741. (#2753) * Index page listing for UserTags per issue #2741. * Changes per pull request checks. * Removed debugging line. * Added routes to reflect 'groups' naming convention for user_tags per pull request spec. * Tests rewritten after rebase. * Index page listing for UserTags per issue #2741. * Changes per pull request checks. * Removed debugging line. * Added routes to reflect 'groups' naming convention for user_tags per pull request spec. * Fix for test of sort by value. * Update routes.rb for wiki update (#2804) * Update routes.rb * fixes * integration tests for assets (#2806) * integration tests for assets * full assets included * Update assets.rb * Added routes to notes/edit (#2808) * Added routes to notes/edit * Removed redundant notes#edit and added get instead of post in edit actions * Update routes.rb (#2810) * Create OPENID.md * fixing error in home_controller related to `group by` (#2794) * Added group by note.nid * correction * Openid fix with post route and better alert texts (#2815) * Added group by note.nid * correction * reworded openid requests and added post method for 2nd step * adjust message * Update openid_test.rb * Update openid_test.rb * Update openid_test.rb * Update openid_test.rb * Update Dangerfile (#2816) * Update routes.rb to fix embeddable features (#2818) * Update routes.rb * Removed the apostrophe mismatch * Added tests for embed in feature * Delete route for notes (#2820) * Documentation for the reply-by-email to comment feature (#2774) * Added documentation for the reply-by-email to comment feature * Added documentation for the reply-by-email to comment feature * Added documentation for the reply-by-email to comment feature * Added documentation for the reply-by-email to comment feature * Re-order comment options and messages (#2834) * Update _comment.html.erb * Update _comment.html.erb * encoding issue resolved for migrating DrupalUsers to User records (#2257) * encoding issue solved fixes #2209 * minor changes * Rename 20180206161706_add_user_for_orphaned_drupal_user.rb to 20180614000000_add_user_for_orphaned_drupal_user.rb * resolves issue 2520 (#2831) * Emoji autocomplete (#2832) * basic emoji autocomplete * minor changes * minor tweaks * code climate fixes * minor change * changes * remove unnecessary style * Fix parent powertags for wikis like /barnraising (#2844) * application.yml added * Views removed * Application.yml removed * application removed * Docker changes * sign up page removed
* Place tag detection and replacing "-" with "" * Javascript changed * Geocode method added * Tweaks * Tweaks * Tweaks * Tweaks 2 * Tweaks 3 * Update Gemfile.lock * Climate fix * add geocoded tags * Tweaks * Block shift and callback to onComplete * onComplete binded with ajax * place in starting of tag detection * Tweaks
* Routes modified * Set the views * Modified error messages and user_tag * Add User_Tag as identity and find user_tag * User_sessions_controller modified * User_tag modified * user session controller modified * Checkpoint 1 * checkpoint1 codeclimate errors fixed * Checkpoint 2 * checkpoint 2 * User is created from sign up process successfully * create a usertag_with_omniauth * Search a usertag for oauth * search user_tag existing in db * create a user with omniauth test * LOGIN WORKS * current_user=(user) method removed * sign up correction * routing tests for google oauth * Google auth details saved * Google should return omniauth hash test * sign up and login via provider * sign up and login via provider alternative flow * flash message test added * login user with an email and then connect google provider * . * Changes according to rails 5 done * Changes according to rails 5 done * Environment nomenclature updated * Comments added * Adding application.yml * Submitting a draft (publiclab#2747) * Checkbox and JS function added * publish_draft method, routes, mail_notify_stop * coauthor can see and publish * bower update * undo and trying * draft label on dashboard * draft option not visible to first timer * updating bower * debug1 * removing debug statement * button view * view 2 * normal * generate path added * publish privil update * code climate * displaying comment with status1 only * coauthor can view draft * test correction * button text change to save if draft * fixture addition and 1 test * tests , fixtures and minor changes * test addition * codeclimate 1 * codeclimate 2 * codeclimate 3 * minor fixes * enable method=post for data-url image upload at /post (publiclab#2675) * enable method=post for data-url image upload at /post * Update editor_controller.rb * Update editor_controller.rb * Fixed first part of Issue publiclab#2352 Sorting headers added in wiki index page (publiclab#2353) * sorting headers added in wiki index page * replaced sorting header icon * Improved translate widget (publiclab#2553) * enhanced translate widget * changed title formatting of widget * Fix the clone command (publiclab#2766) * List subscription change (publiclab#2767) * Add sidekiq gem (publiclab#2738) * added resque gem * made changes for resqu installation * added sidekiq gem * minor changes * modified docker-compose.yml for redis * minor changes * resolve conflicts * Place tag detection and replacing "-" with "" (publiclab#2734) * Place tag detection and replacing "-" with "" * Javascript changed * Geocode method added * Tweaks * Tweaks * Tweaks * Tweaks 2 * Tweaks 3 * Update Gemfile.lock * Climate fix * add geocoded tags * Tweaks * Block shift and callback to onComplete * onComplete binded with ajax * place in starting of tag detection * Tweaks * make descriptive tag links move to bottom of page (publiclab#2770) * skylight config (publiclab#2773) * Reply to comment by email feature (publiclab#2669) * Added mailman script * Added migration file for adding comment_via column to comment table * Added reverse_markdown gem for converting html to markdown format * Added migration file for adding message_id column to comment table * Added function to handle received mail to create comment * Added icon for comment added via email to distinguish between the normal comment and reply by email comment * Added node_id in Mailer subjects to be used in reply by email feature * Minor changes * Updated schema.rb.example file * Improved tests * Added migrations * Added migrations * Added migrations * Corrected tests * Added enviroment variable for server address * Added sql sphefic conditions * Unwanted changes in schema.rb.example file is removed * Gem added * Log file is moved to public folder * Corrected tests * forward-date timestamps * Rename 20180605190014_add_message_id_column_to_comments.rb to 20180605010014_add_message_id_column_to_comments.rb * Update schema.rb.example * Added whenever cron update command in Makefile for redeploy-container (publiclab#2780) * Fix rss images and email images (publiclab#2784) * Fix rss images and email images * Update rss.rss.builder * Update rss_for_tagged_with_author.rss.builder * Update rss.rss.builder * Update rss.rss.builder * Update notify_node_creation.html.erb * Rails 5.0 upgrade (publiclab#2726) (publiclab#2783) * Rails 5.0 upgrade (publiclab#2726) * Upgraded the .gitignore according to rails diff * Initial Gemfile update * Update README.md * Showing message at the top of upgrade page (publiclab#2713) * added an upgrade alert tag * Additional questions page tweak (publiclab#2721) * added the tag to determine which upgrade is listed on the website * changed regex back * added an upgrade alert tag * added the tag to determine which upgrade is listed on the website * changed regex back * added upgrade after pull and rebase master * Upgrade to Rails 5 * Uncommented composite_primary_key gem * Removed the dual occurence of rails_autolink * Update readme installation, fixes publiclab#2729 (publiclab#2730) Updates the readme to change the installation instructions, fixes publiclab#2729 * Commented activerecord-tableless * Draft display on Dashboard (publiclab#2666) * draft display on dashboard * moderator file view permitted * checking * fix * test fix * Added and modified few config files according to railsdiff.org * Removed mass_assignment_sanitizer * Removed composite primary key gem * Removed all attr_accessible in all models * Added composite_primary_key gem again * Downgraded rails and removed few attr_accessible commands * Added strong parameters to the controllers * Added strong parameters gem and also include params.require inside private methods * Added strongparameters.rb file to initializers folder * Removed unnecessary strong_parameter functions * Removed some errors * Changed test command temporarily in .travis.yml * Corrected config/puma.rb file with adding some assets * Added all the config.precompile files in one line * Removed error of problem in updating of user profile * Removed the error while creating a user * Removed error RecordNotFound: Couldn't find Node with 'nid'= * Removed some errors related to ids * Removed comment.reload in comment_controller_test * Track Dockerfiles accross instances. (publiclab#2593) * Track Dockerfiles accross instances. * Specify jessie as base * Add commands to build&deploy container with Makefile. (publiclab#2746) * Added Sample Cron Job to check working of Whenever Gem (publiclab#2715) * Added Sample Cron Job to test Whenever Gem * Added make targets for deployment and cron service start * Added make to image * Tweak Makefile * Fix cron starting command in Makefile * Trim whitespace * Explicitly set jessie as base container * Fixed codeclimate issues * Auto-set wiki slug (publiclab#2743) * Added keyword arguments to the tag_model.rb * changed the query statement in search method of node.rb * Force removal of pid file (see docker/compose#1393) * Updated the tests due to change in arguments of search function in node.rb * Removed all the failures from tag_controller_test.rb * Changed the style of params in notes_controller_test.rb * Removed all depreciation warnings related to notes_controller * Removed all deprecation warnings related to image_controller and answers_controller * Removed all deprecation warnings of like_controller and fixed syntax error of answer_controller_test.rb * Removed all dep warnings of editor_controller and syntax error of like_controller_test.rb * removed all errors of answer_controller and some errors of tag_controller.rb * Removed all dep warnings of tag_controller_test.rb * Removed several dep warnings * Removed dep warnings of wiki_controller * Removed dep warnings of talk_controller * Removed dep warnings of legacy_controller_test.rb * Removed some warnings related to comment_controller * Removed the syntax errors * Removed two failures regarding application/xml+rss * Removed 2 failures due to wrong way of passing parameters in tests * Removed 2 failures * Fix params * Remove deprecations * Removed some dep warnings * Remove deprecations * Reverted to nothing => true * Reverted to nothing => true * Avoid rendering more than once in the same action * Removed all dep warnings related to user_tags_controller_test * Remove deprecation * Removed Dep warnings * Fix deprecation * Replace before_filter * Remove deprecation * Remove deprecation * Remove deprecation * Remove deprecation * Bump Ruby version to match Travis' * Simplify email regex to work with Ruby 2.4.1 * Changed the ruby version in Dockerfile * Remove deprecation * Remove deprecation * Removed the depreciation warning related to dynamic :controller and :action segment in routes * Changed the default ActiveRecord to ApplicationRecord in models * Clean Gemfile * Reverted to ['nid'] in tag_controller_test.rb * Changed the tests to rake test:all in .travis.yml * Minor spacing correction in .travis.yml * added a commit in application.js an application.css regarding the precompilation of files * Added more indentation * Small fixes * Separated the rails test and jasmine and coveralls task * Modified ['nid'] to ['node']['nid'] * Removed the extra puts in Rakefile * Changed the serial of tests * Added rake/testtask to Rakefile * Removed puma * Changed to ruby 2.4.1-jessie * Removed the whitelist_attributes command from config/application.rb * Removed two failures due to old usage of params * Fixed some new deprecation warnigs introduced * fixes publiclab#2731 'add spam button,line 16 _answers.html.erb' (publiclab#2785) * add spam button,line 16 _answers.html.erb * changed comment.ids to answer.ids * changed from comment path to answer * changed comment.parent.path to answer.path * some more cleanup to the button * change answer.aid to answer id * First timers recaptcha Environment Variables (publiclab#2786) * Edited the if statement * Added the env variables * Edited ENV variable, and added fallback * Fixed issue#2445 added both direction sort order (publiclab#2557) * fixed issue#2445 added both direction sort order * added function get_order_string in tags_controller * Changed get to post (publiclab#2788) * Update container definitions to match actual files used. (publiclab#2791) * Update container definitions to match actual files used. * Fix paths for running docker-compose.yml from subdir * Fix reference to Dockerfile * Reformat range stats page to table (publiclab#2792) * Index page listing for UserTags per issue publiclab#2741. (publiclab#2753) * Index page listing for UserTags per issue publiclab#2741. * Changes per pull request checks. * Removed debugging line. * Added routes to reflect 'groups' naming convention for user_tags per pull request spec. * Tests rewritten after rebase. * Index page listing for UserTags per issue publiclab#2741. * Changes per pull request checks. * Removed debugging line. * Added routes to reflect 'groups' naming convention for user_tags per pull request spec. * Fix for test of sort by value. * Update routes.rb for wiki update (publiclab#2804) * Update routes.rb * fixes * integration tests for assets (publiclab#2806) * integration tests for assets * full assets included * Update assets.rb * Added routes to notes/edit (publiclab#2808) * Added routes to notes/edit * Removed redundant notes#edit and added get instead of post in edit actions * Update routes.rb (publiclab#2810) * Create OPENID.md * fixing error in home_controller related to `group by` (publiclab#2794) * Added group by note.nid * correction * Openid fix with post route and better alert texts (publiclab#2815) * Added group by note.nid * correction * reworded openid requests and added post method for 2nd step * adjust message * Update openid_test.rb * Update openid_test.rb * Update openid_test.rb * Update openid_test.rb * Update Dangerfile (publiclab#2816) * Update routes.rb to fix embeddable features (publiclab#2818) * Update routes.rb * Removed the apostrophe mismatch * Added tests for embed in feature * Delete route for notes (publiclab#2820) * Documentation for the reply-by-email to comment feature (publiclab#2774) * Added documentation for the reply-by-email to comment feature * Added documentation for the reply-by-email to comment feature * Added documentation for the reply-by-email to comment feature * Added documentation for the reply-by-email to comment feature * Re-order comment options and messages (publiclab#2834) * Update _comment.html.erb * Update _comment.html.erb * encoding issue resolved for migrating DrupalUsers to User records (publiclab#2257) * encoding issue solved fixes publiclab#2209 * minor changes * Rename 20180206161706_add_user_for_orphaned_drupal_user.rb to 20180614000000_add_user_for_orphaned_drupal_user.rb * resolves issue 2520 (publiclab#2831) * Emoji autocomplete (publiclab#2832) * basic emoji autocomplete * minor changes * minor tweaks * code climate fixes * minor change * changes * remove unnecessary style * Fix parent powertags for wikis like /barnraising (publiclab#2844) * application.yml added * Views removed * Application.yml removed * application removed * Docker changes * sign up page removed
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
rake test
fixes #0000
-style reference to original issue #@publiclab/reviewers
for help, in a comment belowIf tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
We have a loose schedule of reviewing and pulling in changes every Tuesday and Friday, and publishing changes on Fridays.
Thanks!