{"action":"created","issue":{"url":"https://api.github.com/repos/dry-rb/dry-transaction/issues/101","repository_url":"https://api.github.com/repos/dry-rb/dry-transaction","labels_url":"https://api.github.com/repos/dry-rb/dry-transaction/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/dry-rb/dry-transaction/issues/101/comments","events_url":"https://api.github.com/repos/dry-rb/dry-transaction/issues/101/events","html_url":"https://github.com/dry-rb/dry-transaction/issues/101","id":312482966,"node_id":"MDU6SXNzdWUzMTI0ODI5NjY=","number":101,"title":"Support usage alongside dry-auto_inject ","user":{"login":"timriley","id":3134,"node_id":"MDQ6VXNlcjMxMzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3134?v=4","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},"labels":[{"id":277931327,"node_id":"MDU6TGFiZWwyNzc5MzEzMjc=","url":"https://api.github.com/repos/dry-rb/dry-transaction/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-09T10:50:00Z","updated_at":"2018-09-24T09:35:52Z","closed_at":null,"author_association":"MEMBER","body":"Something like this should work:\r\n\r\n```ruby\r\nrequire \"dry-monads\"\r\nrequire \"dry-auto_inject\"\r\n\r\nRSpec.describe \"Using dry-auto_inject\" do\r\n  let(:transaction) {\r\n    Class.new do\r\n      include Dry::Transaction(container: Test::Container)\r\n      include Test::Inject[:extract_email]\r\n\r\n      step :symbolize\r\n\r\n      def call(input)\r\n        super(input).bind(extract_email)\r\n      end\r\n    end.new\r\n  }\r\n\r\n  before do\r\n    module Test\r\n      Container = {\r\n        symbolize: -> input { Dry::Monads::Right(name: input[\"name\"], email: input[\"email\"]) },\r\n        extract_email: -> input { Dry::Monads::Right(email: input[:email]) },\r\n      }\r\n\r\n      Inject = Dry::AutoInject(container: Container)\r\n    end\r\n  end\r\n\r\n  it \"support auto-injection of dependencies alongside step operations\" do\r\n    expect(transaction.(\"name\" => \"Jane\", \"email\" => \"jane@example.com\").value).to eq(email: \"jane@example.com\")\r\n  end\r\nend\r\n```\r\n\r\nBut right now, it doesn't:\r\n\r\n```\r\n  1) Using dry-auto_inject support auto-injection of dependencies alongside step operations\r\n     Failure/Error: end.new\r\n     ArgumentError:\r\n       wrong number of arguments (given 1, expected 0)\r\n     # ./lib/dry/transaction/instance_methods.rb:47:in `initialize'\r\n     # ./lib/dry/transaction/instance_methods.rb:47:in `initialize'\r\n     # ./lib/dry/transaction/operation_resolver.rb:19:in `block (2 levels) in initialize'\r\n     # ./spec/integration/auto_injection_spec.rb:15:in `block (2 levels) in <top (required)>'\r\n     # ./spec/integration/auto_injection_spec.rb:30:in `block (2 levels) in <top (required)>'\r\n```"},"comment":{"url":"https://api.github.com/repos/dry-rb/dry-transaction/issues/comments/423920983","html_url":"https://github.com/dry-rb/dry-transaction/issues/101#issuecomment-423920983","issue_url":"https://api.github.com/repos/dry-rb/dry-transaction/issues/101","id":423920983,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzkyMDk4Mw==","user":{"login":"timriley","id":3134,"node_id":"MDQ6VXNlcjMxMzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3134?v=4","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},"created_at":"2018-09-24T09:35:52Z","updated_at":"2018-09-24T09:35:52Z","author_association":"MEMBER","body":"@johnvoon Would love you to look into it, thanks 🙏 "}}
{"actor":{"display_login":"timriley"}}