{"action":"created","comment":{"url":"https://api.github.com/repos/mojotech/dill/pulls/comments/32072992","id":32072992,"diff_hunk":"@@ -6,3 +6,138 @@\n Cucumber helpers to make it easier to write living documentation in Ruby.\n \n See the documentation at https://www.relishapp.com/mojotech/dill/docs.\n+\n+#Overview\n+Dill is designed to work seamlessly with Cucumber as a DOM interaction tool. Dill emphasizes relying on DOM attributes, rather than text, as attributes tend to be more stable.\n+\n+Dill might best be thought of as three layers:\n+\n+    ROLES, that perform => TASKS, which manipulate => ELEMENTS\n+\n+#A Dill Walkthrough\n+For this walkthrough, we're going to build a single Cucumber step using Dill. If we use these concepts of Roles, Tasks and Elements, our cucumber step might end up looking something like this:\n+\n+```\n+Then(^\\the Admin should be able to create a new user$\\) do\n+  params = { name: 'Example', email: 'example@example.com' }\n+\n+  roles.admin.navigate_to_new_user\n+  roles.admin.create_user(params)\n+\n+  expect(roles.admin).to see :new_user_message\n+end\n+```\n+\n+You can start to see in the expect statement that Dill is magical, too.\n+\n+##Roles\n+A Dill role groups tasks and elements together, and is defined as a class.\n+\n+```ruby\n+class Admin < Dill::Role\n+  ...\n+end\n+```\n+\n+##Tasks\n+A task is just a method on a role.\n+\n+```ruby\n+class Admin < Dill::Role\n+  def navigate_to_new_user\n+    ...\n+  end\n+\n+  def create_user(params)\n+    ...\n+  end\n+\n+  ...\n+end\n+```\n+\n+##Elements\n+Elements are where the Dill amazingness begins, as well as where the Dill confusion heats up. Elements are dom abstractions that allow for precise testing. By using dom element attributes we can easily create the most basic Dill Element, a widget.\n+\n+```ruby\n+class Admin < Dill::Role\n+  widget :new_user_button, 'a.add-user'\n+end\n+```\n+\n+This widget uses css selectors to search the page for a link with the `add-user` class. That dom element is then wrapped into a Dill object, complete with a useful interface.\n+\n+```ruby\n+  widget(:new_user_button).text # => 'Add a new user'","path":"README.md","position":66,"original_position":66,"commit_id":"57a5759d4b87138a2f70e23d0e7a8ed4089befa1","original_commit_id":"57a5759d4b87138a2f70e23d0e7a8ed4089befa1","user":{"login":"adsteel","id":4186462,"avatar_url":"https://avatars.githubusercontent.com/u/4186462?v=3","gravatar_id":"","url":"https://api.github.com/users/adsteel","html_url":"https://github.com/adsteel","followers_url":"https://api.github.com/users/adsteel/followers","following_url":"https://api.github.com/users/adsteel/following{/other_user}","gists_url":"https://api.github.com/users/adsteel/gists{/gist_id}","starred_url":"https://api.github.com/users/adsteel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adsteel/subscriptions","organizations_url":"https://api.github.com/users/adsteel/orgs","repos_url":"https://api.github.com/users/adsteel/repos","events_url":"https://api.github.com/users/adsteel/events{/privacy}","received_events_url":"https://api.github.com/users/adsteel/received_events","type":"User","site_admin":false},"body":"@david So I've removed the parens from the declarations, and moved click to the new format, allowing me to remove the parens on the click calls, too. However, I still need them here. It seems odd that I have to use them sometimes with widgets even though it's the idiom to leave them off;","created_at":"2015-06-09T22:44:46Z","updated_at":"2015-06-09T22:44:46Z","html_url":"https://github.com/mojotech/dill/pull/98#discussion_r32072992","pull_request_url":"https://api.github.com/repos/mojotech/dill/pulls/98","_links":{"self":{"href":"https://api.github.com/repos/mojotech/dill/pulls/comments/32072992"},"html":{"href":"https://github.com/mojotech/dill/pull/98#discussion_r32072992"},"pull_request":{"href":"https://api.github.com/repos/mojotech/dill/pulls/98"}}},"pull_request":{"url":"https://api.github.com/repos/mojotech/dill/pulls/98","id":37075711,"html_url":"https://github.com/mojotech/dill/pull/98","diff_url":"https://github.com/mojotech/dill/pull/98.diff","patch_url":"https://github.com/mojotech/dill/pull/98.patch","issue_url":"https://api.github.com/repos/mojotech/dill/issues/98","number":98,"state":"open","locked":false,"title":"Updates readme with Dill walkthrough","user":{"login":"adsteel","id":4186462,"avatar_url":"https://avatars.githubusercontent.com/u/4186462?v=3","gravatar_id":"","url":"https://api.github.com/users/adsteel","html_url":"https://github.com/adsteel","followers_url":"https://api.github.com/users/adsteel/followers","following_url":"https://api.github.com/users/adsteel/following{/other_user}","gists_url":"https://api.github.com/users/adsteel/gists{/gist_id}","starred_url":"https://api.github.com/users/adsteel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adsteel/subscriptions","organizations_url":"https://api.github.com/users/adsteel/orgs","repos_url":"https://api.github.com/users/adsteel/repos","events_url":"https://api.github.com/users/adsteel/events{/privacy}","received_events_url":"https://api.github.com/users/adsteel/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-05T22:27:41Z","updated_at":"2015-06-09T22:44:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eee269bf7e109b9bd55f557d991ff98401b72988","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mojotech/dill/pulls/98/commits","review_comments_url":"https://api.github.com/repos/mojotech/dill/pulls/98/comments","review_comment_url":"https://api.github.com/repos/mojotech/dill/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mojotech/dill/issues/98/comments","statuses_url":"https://api.github.com/repos/mojotech/dill/statuses/57a5759d4b87138a2f70e23d0e7a8ed4089befa1","head":{"label":"adsteel:ags/update-docs","ref":"ags/update-docs","sha":"57a5759d4b87138a2f70e23d0e7a8ed4089befa1","user":{"login":"adsteel","id":4186462,"avatar_url":"https://avatars.githubusercontent.com/u/4186462?v=3","gravatar_id":"","url":"https://api.github.com/users/adsteel","html_url":"https://github.com/adsteel","followers_url":"https://api.github.com/users/adsteel/followers","following_url":"https://api.github.com/users/adsteel/following{/other_user}","gists_url":"https://api.github.com/users/adsteel/gists{/gist_id}","starred_url":"https://api.github.com/users/adsteel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adsteel/subscriptions","organizations_url":"https://api.github.com/users/adsteel/orgs","repos_url":"https://api.github.com/users/adsteel/repos","events_url":"https://api.github.com/users/adsteel/events{/privacy}","received_events_url":"https://api.github.com/users/adsteel/received_events","type":"User","site_admin":false},"repo":{"id":36958392,"name":"dill","full_name":"adsteel/dill","owner":{"login":"adsteel","id":4186462,"avatar_url":"https://avatars.githubusercontent.com/u/4186462?v=3","gravatar_id":"","url":"https://api.github.com/users/adsteel","html_url":"https://github.com/adsteel","followers_url":"https://api.github.com/users/adsteel/followers","following_url":"https://api.github.com/users/adsteel/following{/other_user}","gists_url":"https://api.github.com/users/adsteel/gists{/gist_id}","starred_url":"https://api.github.com/users/adsteel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adsteel/subscriptions","organizations_url":"https://api.github.com/users/adsteel/orgs","repos_url":"https://api.github.com/users/adsteel/repos","events_url":"https://api.github.com/users/adsteel/events{/privacy}","received_events_url":"https://api.github.com/users/adsteel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adsteel/dill","description":"Chop up all the cucumbers into a fresh delicious salad.","fork":true,"url":"https://api.github.com/repos/adsteel/dill","forks_url":"https://api.github.com/repos/adsteel/dill/forks","keys_url":"https://api.github.com/repos/adsteel/dill/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adsteel/dill/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adsteel/dill/teams","hooks_url":"https://api.github.com/repos/adsteel/dill/hooks","issue_events_url":"https://api.github.com/repos/adsteel/dill/issues/events{/number}","events_url":"https://api.github.com/repos/adsteel/dill/events","assignees_url":"https://api.github.com/repos/adsteel/dill/assignees{/user}","branches_url":"https://api.github.com/repos/adsteel/dill/branches{/branch}","tags_url":"https://api.github.com/repos/adsteel/dill/tags","blobs_url":"https://api.github.com/repos/adsteel/dill/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adsteel/dill/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adsteel/dill/git/refs{/sha}","trees_url":"https://api.github.com/repos/adsteel/dill/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adsteel/dill/statuses/{sha}","languages_url":"https://api.github.com/repos/adsteel/dill/languages","stargazers_url":"https://api.github.com/repos/adsteel/dill/stargazers","contributors_url":"https://api.github.com/repos/adsteel/dill/contributors","subscribers_url":"https://api.github.com/repos/adsteel/dill/subscribers","subscription_url":"https://api.github.com/repos/adsteel/dill/subscription","commits_url":"https://api.github.com/repos/adsteel/dill/commits{/sha}","git_commits_url":"https://api.github.com/repos/adsteel/dill/git/commits{/sha}","comments_url":"https://api.github.com/repos/adsteel/dill/comments{/number}","issue_comment_url":"https://api.github.com/repos/adsteel/dill/issues/comments{/number}","contents_url":"https://api.github.com/repos/adsteel/dill/contents/{+path}","compare_url":"https://api.github.com/repos/adsteel/dill/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adsteel/dill/merges","archive_url":"https://api.github.com/repos/adsteel/dill/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adsteel/dill/downloads","issues_url":"https://api.github.com/repos/adsteel/dill/issues{/number}","pulls_url":"https://api.github.com/repos/adsteel/dill/pulls{/number}","milestones_url":"https://api.github.com/repos/adsteel/dill/milestones{/number}","notifications_url":"https://api.github.com/repos/adsteel/dill/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adsteel/dill/labels{/name}","releases_url":"https://api.github.com/repos/adsteel/dill/releases{/id}","created_at":"2015-06-05T22:24:31Z","updated_at":"2015-06-05T22:24:31Z","pushed_at":"2015-06-09T22:40:14Z","git_url":"git://github.com/adsteel/dill.git","ssh_url":"git@github.com:adsteel/dill.git","clone_url":"https://github.com/adsteel/dill.git","svn_url":"https://github.com/adsteel/dill","homepage":null,"size":619,"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":"mojotech:master","ref":"master","sha":"45aacd6fd4133701006918b557231a9ce8c2ff64","user":{"login":"mojotech","id":314035,"avatar_url":"https://avatars.githubusercontent.com/u/314035?v=3","gravatar_id":"","url":"https://api.github.com/users/mojotech","html_url":"https://github.com/mojotech","followers_url":"https://api.github.com/users/mojotech/followers","following_url":"https://api.github.com/users/mojotech/following{/other_user}","gists_url":"https://api.github.com/users/mojotech/gists{/gist_id}","starred_url":"https://api.github.com/users/mojotech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mojotech/subscriptions","organizations_url":"https://api.github.com/users/mojotech/orgs","repos_url":"https://api.github.com/users/mojotech/repos","events_url":"https://api.github.com/users/mojotech/events{/privacy}","received_events_url":"https://api.github.com/users/mojotech/received_events","type":"Organization","site_admin":false},"repo":{"id":9579367,"name":"dill","full_name":"mojotech/dill","owner":{"login":"mojotech","id":314035,"avatar_url":"https://avatars.githubusercontent.com/u/314035?v=3","gravatar_id":"","url":"https://api.github.com/users/mojotech","html_url":"https://github.com/mojotech","followers_url":"https://api.github.com/users/mojotech/followers","following_url":"https://api.github.com/users/mojotech/following{/other_user}","gists_url":"https://api.github.com/users/mojotech/gists{/gist_id}","starred_url":"https://api.github.com/users/mojotech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mojotech/subscriptions","organizations_url":"https://api.github.com/users/mojotech/orgs","repos_url":"https://api.github.com/users/mojotech/repos","events_url":"https://api.github.com/users/mojotech/events{/privacy}","received_events_url":"https://api.github.com/users/mojotech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mojotech/dill","description":"Chop up all the cucumbers into a fresh delicious salad.","fork":false,"url":"https://api.github.com/repos/mojotech/dill","forks_url":"https://api.github.com/repos/mojotech/dill/forks","keys_url":"https://api.github.com/repos/mojotech/dill/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mojotech/dill/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mojotech/dill/teams","hooks_url":"https://api.github.com/repos/mojotech/dill/hooks","issue_events_url":"https://api.github.com/repos/mojotech/dill/issues/events{/number}","events_url":"https://api.github.com/repos/mojotech/dill/events","assignees_url":"https://api.github.com/repos/mojotech/dill/assignees{/user}","branches_url":"https://api.github.com/repos/mojotech/dill/branches{/branch}","tags_url":"https://api.github.com/repos/mojotech/dill/tags","blobs_url":"https://api.github.com/repos/mojotech/dill/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mojotech/dill/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mojotech/dill/git/refs{/sha}","trees_url":"https://api.github.com/repos/mojotech/dill/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mojotech/dill/statuses/{sha}","languages_url":"https://api.github.com/repos/mojotech/dill/languages","stargazers_url":"https://api.github.com/repos/mojotech/dill/stargazers","contributors_url":"https://api.github.com/repos/mojotech/dill/contributors","subscribers_url":"https://api.github.com/repos/mojotech/dill/subscribers","subscription_url":"https://api.github.com/repos/mojotech/dill/subscription","commits_url":"https://api.github.com/repos/mojotech/dill/commits{/sha}","git_commits_url":"https://api.github.com/repos/mojotech/dill/git/commits{/sha}","comments_url":"https://api.github.com/repos/mojotech/dill/comments{/number}","issue_comment_url":"https://api.github.com/repos/mojotech/dill/issues/comments{/number}","contents_url":"https://api.github.com/repos/mojotech/dill/contents/{+path}","compare_url":"https://api.github.com/repos/mojotech/dill/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mojotech/dill/merges","archive_url":"https://api.github.com/repos/mojotech/dill/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mojotech/dill/downloads","issues_url":"https://api.github.com/repos/mojotech/dill/issues{/number}","pulls_url":"https://api.github.com/repos/mojotech/dill/pulls{/number}","milestones_url":"https://api.github.com/repos/mojotech/dill/milestones{/number}","notifications_url":"https://api.github.com/repos/mojotech/dill/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mojotech/dill/labels{/name}","releases_url":"https://api.github.com/repos/mojotech/dill/releases{/id}","created_at":"2013-04-21T12:54:56Z","updated_at":"2015-03-24T17:44:46Z","pushed_at":"2015-06-09T22:40:14Z","git_url":"git://github.com/mojotech/dill.git","ssh_url":"git@github.com:mojotech/dill.git","clone_url":"https://github.com/mojotech/dill.git","svn_url":"https://github.com/mojotech/dill","homepage":null,"size":1477,"stargazers_count":8,"watchers_count":8,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":30,"forks":1,"open_issues":30,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mojotech/dill/pulls/98"},"html":{"href":"https://github.com/mojotech/dill/pull/98"},"issue":{"href":"https://api.github.com/repos/mojotech/dill/issues/98"},"comments":{"href":"https://api.github.com/repos/mojotech/dill/issues/98/comments"},"review_comments":{"href":"https://api.github.com/repos/mojotech/dill/pulls/98/comments"},"review_comment":{"href":"https://api.github.com/repos/mojotech/dill/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mojotech/dill/pulls/98/commits"},"statuses":{"href":"https://api.github.com/repos/mojotech/dill/statuses/57a5759d4b87138a2f70e23d0e7a8ed4089befa1"}}}}