{"action":"created","comment":{"url":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls/comments/87518819","pull_request_review_id":8129754,"id":87518819,"diff_hunk":"@@ -0,0 +1,272 @@\n+---\n+chapter: Getting Started\n+title: Simple authentication with ROM and Rails\n+---\n+\n+## Initial setup\n+\n+This guide describes how to add a simplest form of user authentication using ROM, Warden and Rails.\n+\n+> Please note that this guide is only for illustrative purposes and does not include validations \n+\n+First of all, let's add following gems to the Gemfile:\n+\n+```ruby\n+# Gemfile\n+gem 'rom-rails'\n+gem 'rom-sql'\n+gem 'rom-repository'\n+gem 'rom'\n+gem 'warden'\n+gem 'bcrypt'\n+gem 'sqlite3'\n+```\n+\n+Now we will need to add configuration for ROM to work. In this example we are going to use SQLite3 to store our data:\n+\n+```ruby\n+# config/initializers/rom.rb\n+ROM::Rails::Railtie.configure do |config|\n+  config.gateways[:default] = [:sql, \"sqlite://db/dev.db\"]\n+end\n+```\n+\n+After this, we will need to add ROM rake tasks in our Procfile","path":"source/learn/getting-started/auth-with-rom.html.md","position":34,"original_position":34,"commit_id":"64148b6d59a91df43bea6e1414005dd3d436940c","original_commit_id":"64148b6d59a91df43bea6e1414005dd3d436940c","user":{"login":"solnic","id":1066,"avatar_url":"https://avatars.githubusercontent.com/u/1066?v=3","gravatar_id":"","url":"https://api.github.com/users/solnic","html_url":"https://github.com/solnic","followers_url":"https://api.github.com/users/solnic/followers","following_url":"https://api.github.com/users/solnic/following{/other_user}","gists_url":"https://api.github.com/users/solnic/gists{/gist_id}","starred_url":"https://api.github.com/users/solnic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solnic/subscriptions","organizations_url":"https://api.github.com/users/solnic/orgs","repos_url":"https://api.github.com/users/solnic/repos","events_url":"https://api.github.com/users/solnic/events{/privacy}","received_events_url":"https://api.github.com/users/solnic/received_events","type":"User","site_admin":false},"body":"Procfile => Rakefile :)","created_at":"2016-11-11T00:49:32Z","updated_at":"2016-11-11T00:49:32Z","html_url":"https://github.com/rom-rb/rom-rb.org/pull/177#discussion_r87518819","pull_request_url":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls/177","_links":{"self":{"href":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls/comments/87518819"},"html":{"href":"https://github.com/rom-rb/rom-rb.org/pull/177#discussion_r87518819"},"pull_request":{"href":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls/177"}}},"pull_request":{"url":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls/177","id":93237136,"html_url":"https://github.com/rom-rb/rom-rb.org/pull/177","diff_url":"https://github.com/rom-rb/rom-rb.org/pull/177.diff","patch_url":"https://github.com/rom-rb/rom-rb.org/pull/177.patch","issue_url":"https://api.github.com/repos/rom-rb/rom-rb.org/issues/177","number":177,"state":"open","locked":false,"title":"[WIP] User authentication tutorial - ROM, Rails, Warden","user":{"login":"janjiss","id":600203,"avatar_url":"https://avatars.githubusercontent.com/u/600203?v=3","gravatar_id":"","url":"https://api.github.com/users/janjiss","html_url":"https://github.com/janjiss","followers_url":"https://api.github.com/users/janjiss/followers","following_url":"https://api.github.com/users/janjiss/following{/other_user}","gists_url":"https://api.github.com/users/janjiss/gists{/gist_id}","starred_url":"https://api.github.com/users/janjiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janjiss/subscriptions","organizations_url":"https://api.github.com/users/janjiss/orgs","repos_url":"https://api.github.com/users/janjiss/repos","events_url":"https://api.github.com/users/janjiss/events{/privacy}","received_events_url":"https://api.github.com/users/janjiss/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-10T21:46:57Z","updated_at":"2016-11-11T00:49:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0702ecf82bdda4f1fb6bfb285cbd47583532cec6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls/177/commits","review_comments_url":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls/177/comments","review_comment_url":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rom-rb/rom-rb.org/issues/177/comments","statuses_url":"https://api.github.com/repos/rom-rb/rom-rb.org/statuses/64148b6d59a91df43bea6e1414005dd3d436940c","head":{"label":"rom-rb:auth-with-rails","ref":"auth-with-rails","sha":"64148b6d59a91df43bea6e1414005dd3d436940c","user":{"login":"rom-rb","id":4589832,"avatar_url":"https://avatars.githubusercontent.com/u/4589832?v=3","gravatar_id":"","url":"https://api.github.com/users/rom-rb","html_url":"https://github.com/rom-rb","followers_url":"https://api.github.com/users/rom-rb/followers","following_url":"https://api.github.com/users/rom-rb/following{/other_user}","gists_url":"https://api.github.com/users/rom-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/rom-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rom-rb/subscriptions","organizations_url":"https://api.github.com/users/rom-rb/orgs","repos_url":"https://api.github.com/users/rom-rb/repos","events_url":"https://api.github.com/users/rom-rb/events{/privacy}","received_events_url":"https://api.github.com/users/rom-rb/received_events","type":"Organization","site_admin":false},"repo":{"id":10435644,"name":"rom-rb.org","full_name":"rom-rb/rom-rb.org","owner":{"login":"rom-rb","id":4589832,"avatar_url":"https://avatars.githubusercontent.com/u/4589832?v=3","gravatar_id":"","url":"https://api.github.com/users/rom-rb","html_url":"https://github.com/rom-rb","followers_url":"https://api.github.com/users/rom-rb/followers","following_url":"https://api.github.com/users/rom-rb/following{/other_user}","gists_url":"https://api.github.com/users/rom-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/rom-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rom-rb/subscriptions","organizations_url":"https://api.github.com/users/rom-rb/orgs","repos_url":"https://api.github.com/users/rom-rb/repos","events_url":"https://api.github.com/users/rom-rb/events{/privacy}","received_events_url":"https://api.github.com/users/rom-rb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rom-rb/rom-rb.org","description":"Official Ruby Object Mapper website","fork":false,"url":"https://api.github.com/repos/rom-rb/rom-rb.org","forks_url":"https://api.github.com/repos/rom-rb/rom-rb.org/forks","keys_url":"https://api.github.com/repos/rom-rb/rom-rb.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rom-rb/rom-rb.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rom-rb/rom-rb.org/teams","hooks_url":"https://api.github.com/repos/rom-rb/rom-rb.org/hooks","issue_events_url":"https://api.github.com/repos/rom-rb/rom-rb.org/issues/events{/number}","events_url":"https://api.github.com/repos/rom-rb/rom-rb.org/events","assignees_url":"https://api.github.com/repos/rom-rb/rom-rb.org/assignees{/user}","branches_url":"https://api.github.com/repos/rom-rb/rom-rb.org/branches{/branch}","tags_url":"https://api.github.com/repos/rom-rb/rom-rb.org/tags","blobs_url":"https://api.github.com/repos/rom-rb/rom-rb.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rom-rb/rom-rb.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rom-rb/rom-rb.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/rom-rb/rom-rb.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rom-rb/rom-rb.org/statuses/{sha}","languages_url":"https://api.github.com/repos/rom-rb/rom-rb.org/languages","stargazers_url":"https://api.github.com/repos/rom-rb/rom-rb.org/stargazers","contributors_url":"https://api.github.com/repos/rom-rb/rom-rb.org/contributors","subscribers_url":"https://api.github.com/repos/rom-rb/rom-rb.org/subscribers","subscription_url":"https://api.github.com/repos/rom-rb/rom-rb.org/subscription","commits_url":"https://api.github.com/repos/rom-rb/rom-rb.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/rom-rb/rom-rb.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/rom-rb/rom-rb.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/rom-rb/rom-rb.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/rom-rb/rom-rb.org/contents/{+path}","compare_url":"https://api.github.com/repos/rom-rb/rom-rb.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rom-rb/rom-rb.org/merges","archive_url":"https://api.github.com/repos/rom-rb/rom-rb.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rom-rb/rom-rb.org/downloads","issues_url":"https://api.github.com/repos/rom-rb/rom-rb.org/issues{/number}","pulls_url":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls{/number}","milestones_url":"https://api.github.com/repos/rom-rb/rom-rb.org/milestones{/number}","notifications_url":"https://api.github.com/repos/rom-rb/rom-rb.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rom-rb/rom-rb.org/labels{/name}","releases_url":"https://api.github.com/repos/rom-rb/rom-rb.org/releases{/id}","deployments_url":"https://api.github.com/repos/rom-rb/rom-rb.org/deployments","created_at":"2013-06-02T10:50:47Z","updated_at":"2016-10-26T16:53:26Z","pushed_at":"2016-11-11T00:10:39Z","git_url":"git://github.com/rom-rb/rom-rb.org.git","ssh_url":"git@github.com:rom-rb/rom-rb.org.git","clone_url":"https://github.com/rom-rb/rom-rb.org.git","svn_url":"https://github.com/rom-rb/rom-rb.org","homepage":"http://rom-rb.org/","size":2139,"stargazers_count":20,"watchers_count":20,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":77,"mirror_url":null,"open_issues_count":29,"forks":77,"open_issues":29,"watchers":20,"default_branch":"master"}},"base":{"label":"rom-rb:master","ref":"master","sha":"edd29097c1ae3596594aebb3fffdf30ed1bdf3ba","user":{"login":"rom-rb","id":4589832,"avatar_url":"https://avatars.githubusercontent.com/u/4589832?v=3","gravatar_id":"","url":"https://api.github.com/users/rom-rb","html_url":"https://github.com/rom-rb","followers_url":"https://api.github.com/users/rom-rb/followers","following_url":"https://api.github.com/users/rom-rb/following{/other_user}","gists_url":"https://api.github.com/users/rom-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/rom-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rom-rb/subscriptions","organizations_url":"https://api.github.com/users/rom-rb/orgs","repos_url":"https://api.github.com/users/rom-rb/repos","events_url":"https://api.github.com/users/rom-rb/events{/privacy}","received_events_url":"https://api.github.com/users/rom-rb/received_events","type":"Organization","site_admin":false},"repo":{"id":10435644,"name":"rom-rb.org","full_name":"rom-rb/rom-rb.org","owner":{"login":"rom-rb","id":4589832,"avatar_url":"https://avatars.githubusercontent.com/u/4589832?v=3","gravatar_id":"","url":"https://api.github.com/users/rom-rb","html_url":"https://github.com/rom-rb","followers_url":"https://api.github.com/users/rom-rb/followers","following_url":"https://api.github.com/users/rom-rb/following{/other_user}","gists_url":"https://api.github.com/users/rom-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/rom-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rom-rb/subscriptions","organizations_url":"https://api.github.com/users/rom-rb/orgs","repos_url":"https://api.github.com/users/rom-rb/repos","events_url":"https://api.github.com/users/rom-rb/events{/privacy}","received_events_url":"https://api.github.com/users/rom-rb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rom-rb/rom-rb.org","description":"Official Ruby Object Mapper website","fork":false,"url":"https://api.github.com/repos/rom-rb/rom-rb.org","forks_url":"https://api.github.com/repos/rom-rb/rom-rb.org/forks","keys_url":"https://api.github.com/repos/rom-rb/rom-rb.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rom-rb/rom-rb.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rom-rb/rom-rb.org/teams","hooks_url":"https://api.github.com/repos/rom-rb/rom-rb.org/hooks","issue_events_url":"https://api.github.com/repos/rom-rb/rom-rb.org/issues/events{/number}","events_url":"https://api.github.com/repos/rom-rb/rom-rb.org/events","assignees_url":"https://api.github.com/repos/rom-rb/rom-rb.org/assignees{/user}","branches_url":"https://api.github.com/repos/rom-rb/rom-rb.org/branches{/branch}","tags_url":"https://api.github.com/repos/rom-rb/rom-rb.org/tags","blobs_url":"https://api.github.com/repos/rom-rb/rom-rb.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rom-rb/rom-rb.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rom-rb/rom-rb.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/rom-rb/rom-rb.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rom-rb/rom-rb.org/statuses/{sha}","languages_url":"https://api.github.com/repos/rom-rb/rom-rb.org/languages","stargazers_url":"https://api.github.com/repos/rom-rb/rom-rb.org/stargazers","contributors_url":"https://api.github.com/repos/rom-rb/rom-rb.org/contributors","subscribers_url":"https://api.github.com/repos/rom-rb/rom-rb.org/subscribers","subscription_url":"https://api.github.com/repos/rom-rb/rom-rb.org/subscription","commits_url":"https://api.github.com/repos/rom-rb/rom-rb.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/rom-rb/rom-rb.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/rom-rb/rom-rb.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/rom-rb/rom-rb.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/rom-rb/rom-rb.org/contents/{+path}","compare_url":"https://api.github.com/repos/rom-rb/rom-rb.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rom-rb/rom-rb.org/merges","archive_url":"https://api.github.com/repos/rom-rb/rom-rb.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rom-rb/rom-rb.org/downloads","issues_url":"https://api.github.com/repos/rom-rb/rom-rb.org/issues{/number}","pulls_url":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls{/number}","milestones_url":"https://api.github.com/repos/rom-rb/rom-rb.org/milestones{/number}","notifications_url":"https://api.github.com/repos/rom-rb/rom-rb.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rom-rb/rom-rb.org/labels{/name}","releases_url":"https://api.github.com/repos/rom-rb/rom-rb.org/releases{/id}","deployments_url":"https://api.github.com/repos/rom-rb/rom-rb.org/deployments","created_at":"2013-06-02T10:50:47Z","updated_at":"2016-10-26T16:53:26Z","pushed_at":"2016-11-11T00:10:39Z","git_url":"git://github.com/rom-rb/rom-rb.org.git","ssh_url":"git@github.com:rom-rb/rom-rb.org.git","clone_url":"https://github.com/rom-rb/rom-rb.org.git","svn_url":"https://github.com/rom-rb/rom-rb.org","homepage":"http://rom-rb.org/","size":2139,"stargazers_count":20,"watchers_count":20,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":77,"mirror_url":null,"open_issues_count":29,"forks":77,"open_issues":29,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls/177"},"html":{"href":"https://github.com/rom-rb/rom-rb.org/pull/177"},"issue":{"href":"https://api.github.com/repos/rom-rb/rom-rb.org/issues/177"},"comments":{"href":"https://api.github.com/repos/rom-rb/rom-rb.org/issues/177/comments"},"review_comments":{"href":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls/177/comments"},"review_comment":{"href":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rom-rb/rom-rb.org/pulls/177/commits"},"statuses":{"href":"https://api.github.com/repos/rom-rb/rom-rb.org/statuses/64148b6d59a91df43bea6e1414005dd3d436940c"}}}}
{"actor":{"display_login":"solnic"}}