{"action":"created","comment":{"url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/pulls/comments/47809767","id":47809767,"diff_hunk":"@@ -0,0 +1,16 @@\n+namespace :mongoid_slug do\n+  desc 'Goes though all documents and sets slug if not already set'\n+  task set: :environment do |_, args|\n+    ::Rails.application.eager_load! if defined?(Rails)","path":"lib/tasks/mongoid_slug.rake","position":4,"original_position":4,"commit_id":"6d52c70fbecbcb140bb094d8ef2894cebc98f974","original_commit_id":"df56880ee03f3b128b7e793b581e88eefe52f73d","user":{"login":"dblock","id":542335,"avatar_url":"https://avatars.githubusercontent.com/u/542335?v=3","gravatar_id":"","url":"https://api.github.com/users/dblock","html_url":"https://github.com/dblock","followers_url":"https://api.github.com/users/dblock/followers","following_url":"https://api.github.com/users/dblock/following{/other_user}","gists_url":"https://api.github.com/users/dblock/gists{/gist_id}","starred_url":"https://api.github.com/users/dblock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dblock/subscriptions","organizations_url":"https://api.github.com/users/dblock/orgs","repos_url":"https://api.github.com/users/dblock/repos","events_url":"https://api.github.com/users/dblock/events{/privacy}","received_events_url":"https://api.github.com/users/dblock/received_events","type":"User","site_admin":false},"body":"I see.","created_at":"2015-12-16T17:55:08Z","updated_at":"2015-12-16T17:55:08Z","html_url":"https://github.com/digitalplaywright/mongoid-slug/pull/201#discussion_r47809767","pull_request_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/pulls/201","_links":{"self":{"href":"https://api.github.com/repos/digitalplaywright/mongoid-slug/pulls/comments/47809767"},"html":{"href":"https://github.com/digitalplaywright/mongoid-slug/pull/201#discussion_r47809767"},"pull_request":{"href":"https://api.github.com/repos/digitalplaywright/mongoid-slug/pulls/201"}}},"pull_request":{"url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/pulls/201","id":49552153,"html_url":"https://github.com/digitalplaywright/mongoid-slug/pull/201","diff_url":"https://github.com/digitalplaywright/mongoid-slug/pull/201.diff","patch_url":"https://github.com/digitalplaywright/mongoid-slug/pull/201.patch","issue_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/issues/201","number":201,"state":"open","locked":false,"title":"refs #177 added rake task to set slug for legacy data","user":{"login":"anuja-joshi","id":5124042,"avatar_url":"https://avatars.githubusercontent.com/u/5124042?v=3","gravatar_id":"","url":"https://api.github.com/users/anuja-joshi","html_url":"https://github.com/anuja-joshi","followers_url":"https://api.github.com/users/anuja-joshi/followers","following_url":"https://api.github.com/users/anuja-joshi/following{/other_user}","gists_url":"https://api.github.com/users/anuja-joshi/gists{/gist_id}","starred_url":"https://api.github.com/users/anuja-joshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuja-joshi/subscriptions","organizations_url":"https://api.github.com/users/anuja-joshi/orgs","repos_url":"https://api.github.com/users/anuja-joshi/repos","events_url":"https://api.github.com/users/anuja-joshi/events{/privacy}","received_events_url":"https://api.github.com/users/anuja-joshi/received_events","type":"User","site_admin":false},"body":"- Added rake task `rake mongoid_slug:set` that will set slug for existing records, if not already set.\r\n- We can pass optional parameters to task like `rake mongoid_slug:set[Model1,Model2]` so that slug will get set for records of only these models.\r\n- To load this task into `Rails`, I loaded task using `Rails::Railtie` so this task will be directly available to `Rails` projects. For other frameworks user have to load tasks file into their rake stack.\r\n- Added associated test cases.","created_at":"2015-11-03T12:59:42Z","updated_at":"2015-12-16T17:55:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"777d557d71db9a70df1331bf9c8337050064e954","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/pulls/201/commits","review_comments_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/pulls/201/comments","review_comment_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/pulls/comments{/number}","comments_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/issues/201/comments","statuses_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/statuses/6d52c70fbecbcb140bb094d8ef2894cebc98f974","head":{"label":"joshsoftware:issue_177","ref":"issue_177","sha":"6d52c70fbecbcb140bb094d8ef2894cebc98f974","user":{"login":"joshsoftware","id":130756,"avatar_url":"https://avatars.githubusercontent.com/u/130756?v=3","gravatar_id":"","url":"https://api.github.com/users/joshsoftware","html_url":"https://github.com/joshsoftware","followers_url":"https://api.github.com/users/joshsoftware/followers","following_url":"https://api.github.com/users/joshsoftware/following{/other_user}","gists_url":"https://api.github.com/users/joshsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/joshsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshsoftware/subscriptions","organizations_url":"https://api.github.com/users/joshsoftware/orgs","repos_url":"https://api.github.com/users/joshsoftware/repos","events_url":"https://api.github.com/users/joshsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/joshsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":43631109,"name":"mongoid-slug","full_name":"joshsoftware/mongoid-slug","owner":{"login":"joshsoftware","id":130756,"avatar_url":"https://avatars.githubusercontent.com/u/130756?v=3","gravatar_id":"","url":"https://api.github.com/users/joshsoftware","html_url":"https://github.com/joshsoftware","followers_url":"https://api.github.com/users/joshsoftware/followers","following_url":"https://api.github.com/users/joshsoftware/following{/other_user}","gists_url":"https://api.github.com/users/joshsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/joshsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshsoftware/subscriptions","organizations_url":"https://api.github.com/users/joshsoftware/orgs","repos_url":"https://api.github.com/users/joshsoftware/repos","events_url":"https://api.github.com/users/joshsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/joshsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joshsoftware/mongoid-slug","description":"Generates a URL slug/permalink based on fields in a Mongoid-based model","fork":true,"url":"https://api.github.com/repos/joshsoftware/mongoid-slug","forks_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/forks","keys_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/teams","hooks_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/hooks","issue_events_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/issues/events{/number}","events_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/events","assignees_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/assignees{/user}","branches_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/branches{/branch}","tags_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/tags","blobs_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/statuses/{sha}","languages_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/languages","stargazers_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/stargazers","contributors_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/contributors","subscribers_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/subscribers","subscription_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/subscription","commits_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/contents/{+path}","compare_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/merges","archive_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/downloads","issues_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/issues{/number}","pulls_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/pulls{/number}","milestones_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/milestones{/number}","notifications_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/labels{/name}","releases_url":"https://api.github.com/repos/joshsoftware/mongoid-slug/releases{/id}","created_at":"2015-10-04T09:22:08Z","updated_at":"2015-10-04T09:22:09Z","pushed_at":"2015-12-16T14:37:36Z","git_url":"git://github.com/joshsoftware/mongoid-slug.git","ssh_url":"git@github.com:joshsoftware/mongoid-slug.git","clone_url":"https://github.com/joshsoftware/mongoid-slug.git","svn_url":"https://github.com/joshsoftware/mongoid-slug","homepage":"http://github.com/digitalplaywright/mongoid-slug","size":502,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"digitalplaywright:master","ref":"master","sha":"c229009aafce6281d5cee48d723ce046661ef48f","user":{"login":"digitalplaywright","id":606207,"avatar_url":"https://avatars.githubusercontent.com/u/606207?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalplaywright","html_url":"https://github.com/digitalplaywright","followers_url":"https://api.github.com/users/digitalplaywright/followers","following_url":"https://api.github.com/users/digitalplaywright/following{/other_user}","gists_url":"https://api.github.com/users/digitalplaywright/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalplaywright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalplaywright/subscriptions","organizations_url":"https://api.github.com/users/digitalplaywright/orgs","repos_url":"https://api.github.com/users/digitalplaywright/repos","events_url":"https://api.github.com/users/digitalplaywright/events{/privacy}","received_events_url":"https://api.github.com/users/digitalplaywright/received_events","type":"User","site_admin":false},"repo":{"id":733570,"name":"mongoid-slug","full_name":"digitalplaywright/mongoid-slug","owner":{"login":"digitalplaywright","id":606207,"avatar_url":"https://avatars.githubusercontent.com/u/606207?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalplaywright","html_url":"https://github.com/digitalplaywright","followers_url":"https://api.github.com/users/digitalplaywright/followers","following_url":"https://api.github.com/users/digitalplaywright/following{/other_user}","gists_url":"https://api.github.com/users/digitalplaywright/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalplaywright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalplaywright/subscriptions","organizations_url":"https://api.github.com/users/digitalplaywright/orgs","repos_url":"https://api.github.com/users/digitalplaywright/repos","events_url":"https://api.github.com/users/digitalplaywright/events{/privacy}","received_events_url":"https://api.github.com/users/digitalplaywright/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/digitalplaywright/mongoid-slug","description":"Generates a URL slug/permalink based on fields in a Mongoid-based model","fork":false,"url":"https://api.github.com/repos/digitalplaywright/mongoid-slug","forks_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/forks","keys_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/keys{/key_id}","collaborators_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/teams","hooks_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/hooks","issue_events_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/issues/events{/number}","events_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/events","assignees_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/assignees{/user}","branches_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/branches{/branch}","tags_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/tags","blobs_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/git/refs{/sha}","trees_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/git/trees{/sha}","statuses_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/statuses/{sha}","languages_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/languages","stargazers_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/stargazers","contributors_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/contributors","subscribers_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/subscribers","subscription_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/subscription","commits_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/commits{/sha}","git_commits_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/git/commits{/sha}","comments_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/comments{/number}","issue_comment_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/issues/comments{/number}","contents_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/contents/{+path}","compare_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/compare/{base}...{head}","merges_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/merges","archive_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/downloads","issues_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/issues{/number}","pulls_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/pulls{/number}","milestones_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/milestones{/number}","notifications_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/labels{/name}","releases_url":"https://api.github.com/repos/digitalplaywright/mongoid-slug/releases{/id}","created_at":"2010-06-22T09:39:11Z","updated_at":"2015-11-26T21:00:54Z","pushed_at":"2015-12-16T14:37:37Z","git_url":"git://github.com/digitalplaywright/mongoid-slug.git","ssh_url":"git@github.com:digitalplaywright/mongoid-slug.git","clone_url":"https://github.com/digitalplaywright/mongoid-slug.git","svn_url":"https://github.com/digitalplaywright/mongoid-slug","homepage":"http://github.com/digitalplaywright/mongoid-slug","size":1556,"stargazers_count":468,"watchers_count":468,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":148,"mirror_url":null,"open_issues_count":9,"forks":148,"open_issues":9,"watchers":468,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/digitalplaywright/mongoid-slug/pulls/201"},"html":{"href":"https://github.com/digitalplaywright/mongoid-slug/pull/201"},"issue":{"href":"https://api.github.com/repos/digitalplaywright/mongoid-slug/issues/201"},"comments":{"href":"https://api.github.com/repos/digitalplaywright/mongoid-slug/issues/201/comments"},"review_comments":{"href":"https://api.github.com/repos/digitalplaywright/mongoid-slug/pulls/201/comments"},"review_comment":{"href":"https://api.github.com/repos/digitalplaywright/mongoid-slug/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/digitalplaywright/mongoid-slug/pulls/201/commits"},"statuses":{"href":"https://api.github.com/repos/digitalplaywright/mongoid-slug/statuses/6d52c70fbecbcb140bb094d8ef2894cebc98f974"}}}}