{"action":"opened","number":11,"pull_request":{"url":"https://api.github.com/repos/dry-rb/dry-component/pulls/11","id":69268265,"html_url":"https://github.com/dry-rb/dry-component/pull/11","diff_url":"https://github.com/dry-rb/dry-component/pull/11.diff","patch_url":"https://github.com/dry-rb/dry-component/pull/11.patch","issue_url":"https://api.github.com/repos/dry-rb/dry-component/issues/11","number":11,"state":"open","locked":false,"title":"[WIP] Supports all dry-auto_inject injector types","user":{"login":"timriley","id":3134,"avatar_url":"https://avatars.githubusercontent.com/u/3134?v=3","gravatar_id":"","url":"https://api.github.com/users/timriley","html_url":"https://github.com/timriley","followers_url":"https://api.github.com/users/timriley/followers","following_url":"https://api.github.com/users/timriley/following{/other_user}","gists_url":"https://api.github.com/users/timriley/gists{/gist_id}","starred_url":"https://api.github.com/users/timriley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timriley/subscriptions","organizations_url":"https://api.github.com/users/timriley/orgs","repos_url":"https://api.github.com/users/timriley/repos","events_url":"https://api.github.com/users/timriley/events{/privacy}","received_events_url":"https://api.github.com/users/timriley/received_events","type":"User","site_admin":false},"body":"Support all injector types offered by dry-auto_inject (args, hash, kwargs) while still auto-loading component files as required.\r\n\r\nThis changes `Container.import_module` to `Container.Inject`, which now returns an `Injector` object that offers API to inject with each of the strategies, e.g.\r\n\r\n```ruby\r\nclass MyContainer < Dry::Component::Container\r\nend\r\n\r\nclass MyClass\r\n  # using plain args\r\n  include MyContainer.Inject[\"foo.bar\"]\r\n\r\n  # using hash\r\n  include MyContainer.Inject.hash[\"foo.bar\"]\r\n\r\n  # using kwargs\r\n  include MyContainer.Inject.kwargs[\"foo.bar\"]\r\nend\r\n```\r\n\r\nThe `Injector` also supports the new dry-auto_inject dependency aliasing API (e.g. `Inect[local_name: \"container.name\"]`).\r\n\r\nThis is a work in progress. I'm putting this PR up now for your feedback!\r\n\r\nOne change I would like to make is to be able to access the Injector via `::` syntax, e.g. `include MyContainer::Inject[*deps]`, but I'm not quite sure how to do that (or if it is even possible).","created_at":"2016-05-08T12:53:53Z","updated_at":"2016-05-08T12:53:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dry-rb/dry-component/pulls/11/commits","review_comments_url":"https://api.github.com/repos/dry-rb/dry-component/pulls/11/comments","review_comment_url":"https://api.github.com/repos/dry-rb/dry-component/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dry-rb/dry-component/issues/11/comments","statuses_url":"https://api.github.com/repos/dry-rb/dry-component/statuses/c44942693ab9002c101cdc1255afe51299f9c22e","head":{"label":"dry-rb:support-multiple-auto-inject-strategies","ref":"support-multiple-auto-inject-strategies","sha":"c44942693ab9002c101cdc1255afe51299f9c22e","user":{"login":"dry-rb","id":11280820,"avatar_url":"https://avatars.githubusercontent.com/u/11280820?v=3","gravatar_id":"","url":"https://api.github.com/users/dry-rb","html_url":"https://github.com/dry-rb","followers_url":"https://api.github.com/users/dry-rb/followers","following_url":"https://api.github.com/users/dry-rb/following{/other_user}","gists_url":"https://api.github.com/users/dry-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/dry-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dry-rb/subscriptions","organizations_url":"https://api.github.com/users/dry-rb/orgs","repos_url":"https://api.github.com/users/dry-rb/repos","events_url":"https://api.github.com/users/dry-rb/events{/privacy}","received_events_url":"https://api.github.com/users/dry-rb/received_events","type":"Organization","site_admin":false},"repo":{"id":48485619,"name":"dry-component","full_name":"dry-rb/dry-component","owner":{"login":"dry-rb","id":11280820,"avatar_url":"https://avatars.githubusercontent.com/u/11280820?v=3","gravatar_id":"","url":"https://api.github.com/users/dry-rb","html_url":"https://github.com/dry-rb","followers_url":"https://api.github.com/users/dry-rb/followers","following_url":"https://api.github.com/users/dry-rb/following{/other_user}","gists_url":"https://api.github.com/users/dry-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/dry-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dry-rb/subscriptions","organizations_url":"https://api.github.com/users/dry-rb/orgs","repos_url":"https://api.github.com/users/dry-rb/repos","events_url":"https://api.github.com/users/dry-rb/events{/privacy}","received_events_url":"https://api.github.com/users/dry-rb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dry-rb/dry-component","description":"Organize your code into reusable components","fork":false,"url":"https://api.github.com/repos/dry-rb/dry-component","forks_url":"https://api.github.com/repos/dry-rb/dry-component/forks","keys_url":"https://api.github.com/repos/dry-rb/dry-component/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dry-rb/dry-component/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dry-rb/dry-component/teams","hooks_url":"https://api.github.com/repos/dry-rb/dry-component/hooks","issue_events_url":"https://api.github.com/repos/dry-rb/dry-component/issues/events{/number}","events_url":"https://api.github.com/repos/dry-rb/dry-component/events","assignees_url":"https://api.github.com/repos/dry-rb/dry-component/assignees{/user}","branches_url":"https://api.github.com/repos/dry-rb/dry-component/branches{/branch}","tags_url":"https://api.github.com/repos/dry-rb/dry-component/tags","blobs_url":"https://api.github.com/repos/dry-rb/dry-component/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dry-rb/dry-component/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dry-rb/dry-component/git/refs{/sha}","trees_url":"https://api.github.com/repos/dry-rb/dry-component/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dry-rb/dry-component/statuses/{sha}","languages_url":"https://api.github.com/repos/dry-rb/dry-component/languages","stargazers_url":"https://api.github.com/repos/dry-rb/dry-component/stargazers","contributors_url":"https://api.github.com/repos/dry-rb/dry-component/contributors","subscribers_url":"https://api.github.com/repos/dry-rb/dry-component/subscribers","subscription_url":"https://api.github.com/repos/dry-rb/dry-component/subscription","commits_url":"https://api.github.com/repos/dry-rb/dry-component/commits{/sha}","git_commits_url":"https://api.github.com/repos/dry-rb/dry-component/git/commits{/sha}","comments_url":"https://api.github.com/repos/dry-rb/dry-component/comments{/number}","issue_comment_url":"https://api.github.com/repos/dry-rb/dry-component/issues/comments{/number}","contents_url":"https://api.github.com/repos/dry-rb/dry-component/contents/{+path}","compare_url":"https://api.github.com/repos/dry-rb/dry-component/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dry-rb/dry-component/merges","archive_url":"https://api.github.com/repos/dry-rb/dry-component/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dry-rb/dry-component/downloads","issues_url":"https://api.github.com/repos/dry-rb/dry-component/issues{/number}","pulls_url":"https://api.github.com/repos/dry-rb/dry-component/pulls{/number}","milestones_url":"https://api.github.com/repos/dry-rb/dry-component/milestones{/number}","notifications_url":"https://api.github.com/repos/dry-rb/dry-component/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dry-rb/dry-component/labels{/name}","releases_url":"https://api.github.com/repos/dry-rb/dry-component/releases{/id}","deployments_url":"https://api.github.com/repos/dry-rb/dry-component/deployments","created_at":"2015-12-23T10:51:36Z","updated_at":"2016-03-28T19:56:53Z","pushed_at":"2016-05-08T12:43:43Z","git_url":"git://github.com/dry-rb/dry-component.git","ssh_url":"git@github.com:dry-rb/dry-component.git","clone_url":"https://github.com/dry-rb/dry-component.git","svn_url":"https://github.com/dry-rb/dry-component","homepage":null,"size":49,"stargazers_count":28,"watchers_count":28,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":8,"forks":6,"open_issues":8,"watchers":28,"default_branch":"master"}},"base":{"label":"dry-rb:master","ref":"master","sha":"9a12078576f34c5214aa2d322649899b10678370","user":{"login":"dry-rb","id":11280820,"avatar_url":"https://avatars.githubusercontent.com/u/11280820?v=3","gravatar_id":"","url":"https://api.github.com/users/dry-rb","html_url":"https://github.com/dry-rb","followers_url":"https://api.github.com/users/dry-rb/followers","following_url":"https://api.github.com/users/dry-rb/following{/other_user}","gists_url":"https://api.github.com/users/dry-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/dry-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dry-rb/subscriptions","organizations_url":"https://api.github.com/users/dry-rb/orgs","repos_url":"https://api.github.com/users/dry-rb/repos","events_url":"https://api.github.com/users/dry-rb/events{/privacy}","received_events_url":"https://api.github.com/users/dry-rb/received_events","type":"Organization","site_admin":false},"repo":{"id":48485619,"name":"dry-component","full_name":"dry-rb/dry-component","owner":{"login":"dry-rb","id":11280820,"avatar_url":"https://avatars.githubusercontent.com/u/11280820?v=3","gravatar_id":"","url":"https://api.github.com/users/dry-rb","html_url":"https://github.com/dry-rb","followers_url":"https://api.github.com/users/dry-rb/followers","following_url":"https://api.github.com/users/dry-rb/following{/other_user}","gists_url":"https://api.github.com/users/dry-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/dry-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dry-rb/subscriptions","organizations_url":"https://api.github.com/users/dry-rb/orgs","repos_url":"https://api.github.com/users/dry-rb/repos","events_url":"https://api.github.com/users/dry-rb/events{/privacy}","received_events_url":"https://api.github.com/users/dry-rb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dry-rb/dry-component","description":"Organize your code into reusable components","fork":false,"url":"https://api.github.com/repos/dry-rb/dry-component","forks_url":"https://api.github.com/repos/dry-rb/dry-component/forks","keys_url":"https://api.github.com/repos/dry-rb/dry-component/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dry-rb/dry-component/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dry-rb/dry-component/teams","hooks_url":"https://api.github.com/repos/dry-rb/dry-component/hooks","issue_events_url":"https://api.github.com/repos/dry-rb/dry-component/issues/events{/number}","events_url":"https://api.github.com/repos/dry-rb/dry-component/events","assignees_url":"https://api.github.com/repos/dry-rb/dry-component/assignees{/user}","branches_url":"https://api.github.com/repos/dry-rb/dry-component/branches{/branch}","tags_url":"https://api.github.com/repos/dry-rb/dry-component/tags","blobs_url":"https://api.github.com/repos/dry-rb/dry-component/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dry-rb/dry-component/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dry-rb/dry-component/git/refs{/sha}","trees_url":"https://api.github.com/repos/dry-rb/dry-component/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dry-rb/dry-component/statuses/{sha}","languages_url":"https://api.github.com/repos/dry-rb/dry-component/languages","stargazers_url":"https://api.github.com/repos/dry-rb/dry-component/stargazers","contributors_url":"https://api.github.com/repos/dry-rb/dry-component/contributors","subscribers_url":"https://api.github.com/repos/dry-rb/dry-component/subscribers","subscription_url":"https://api.github.com/repos/dry-rb/dry-component/subscription","commits_url":"https://api.github.com/repos/dry-rb/dry-component/commits{/sha}","git_commits_url":"https://api.github.com/repos/dry-rb/dry-component/git/commits{/sha}","comments_url":"https://api.github.com/repos/dry-rb/dry-component/comments{/number}","issue_comment_url":"https://api.github.com/repos/dry-rb/dry-component/issues/comments{/number}","contents_url":"https://api.github.com/repos/dry-rb/dry-component/contents/{+path}","compare_url":"https://api.github.com/repos/dry-rb/dry-component/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dry-rb/dry-component/merges","archive_url":"https://api.github.com/repos/dry-rb/dry-component/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dry-rb/dry-component/downloads","issues_url":"https://api.github.com/repos/dry-rb/dry-component/issues{/number}","pulls_url":"https://api.github.com/repos/dry-rb/dry-component/pulls{/number}","milestones_url":"https://api.github.com/repos/dry-rb/dry-component/milestones{/number}","notifications_url":"https://api.github.com/repos/dry-rb/dry-component/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dry-rb/dry-component/labels{/name}","releases_url":"https://api.github.com/repos/dry-rb/dry-component/releases{/id}","deployments_url":"https://api.github.com/repos/dry-rb/dry-component/deployments","created_at":"2015-12-23T10:51:36Z","updated_at":"2016-03-28T19:56:53Z","pushed_at":"2016-05-08T12:43:43Z","git_url":"git://github.com/dry-rb/dry-component.git","ssh_url":"git@github.com:dry-rb/dry-component.git","clone_url":"https://github.com/dry-rb/dry-component.git","svn_url":"https://github.com/dry-rb/dry-component","homepage":null,"size":49,"stargazers_count":28,"watchers_count":28,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":8,"forks":6,"open_issues":8,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dry-rb/dry-component/pulls/11"},"html":{"href":"https://github.com/dry-rb/dry-component/pull/11"},"issue":{"href":"https://api.github.com/repos/dry-rb/dry-component/issues/11"},"comments":{"href":"https://api.github.com/repos/dry-rb/dry-component/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/dry-rb/dry-component/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/dry-rb/dry-component/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dry-rb/dry-component/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/dry-rb/dry-component/statuses/c44942693ab9002c101cdc1255afe51299f9c22e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":64,"deletions":10,"changed_files":5}}