{"action":"created","comment":{"url":"https://api.github.com/repos/PRX/fixer.prx.org/pulls/comments/32963435","id":32963435,"diff_hunk":"@@ -0,0 +1,89 @@\n+require 'test_helper'\n+\n+class JobCreateWorkerTest < ActiveSupport::TestCase\n+\n+  before {\n+    ENV['WORKER_LIB'] = 'inline'\n+    ActiveJob::Base.queue_adapter = :inline\n+  }\n+\n+  after {\n+    ENV['WORKER_LIB'] = 'test'\n+    ActiveJob::Base.queue_adapter = :test\n+  }\n+\n+\n+  let(:user) { User.create!(email: 'test@prx.org', password: 'foobarpassword') }\n+\n+  let(:application) do\n+    Doorkeeper::Application.create(\n+      name: 'test',\n+      owner: user,\n+      redirect_uri: 'urn:ietf:wg:oauth:2.0:oob'\n+    )\n+  end\n+\n+  let(:msg) do\n+    {\n+      application_id: application.id,\n+      job_type: 'test',\n+      priority: 1,\n+      retry_max: 10,\n+      retry_delay: 300,\n+      tasks: [\n+        {\n+          task_type: 'echo',\n+          label: 'test0',\n+          options: { foo: 'bar' },\n+          call_back: 'sqs://prx-some-app'\n+        }\n+      ]\n+    }\n+  end\n+\n+  let(:sequence_msg) do\n+    {\n+      application_id: application.id,\n+      job_type: 'test',\n+      priority: 1,\n+      retry_max: 10,\n+      retry_delay: 300,\n+      tasks: [\n+        sequence: {\n+          tasks: [\n+            {\n+              task_type: 'echo',","path":"test/workers/job_create_worker_test.rb","position":55,"original_position":55,"commit_id":"e717901b2da876b124dcd289a6125aa1bab96ff6","original_commit_id":"e717901b2da876b124dcd289a6125aa1bab96ff6","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-06-22T17:58:26Z","updated_at":"2015-06-22T17:58:26Z","html_url":"https://github.com/PRX/fixer.prx.org/pull/42#discussion_r32963435","pull_request_url":"https://api.github.com/repos/PRX/fixer.prx.org/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/PRX/fixer.prx.org/pulls/comments/32963435"},"html":{"href":"https://github.com/PRX/fixer.prx.org/pull/42#discussion_r32963435"},"pull_request":{"href":"https://api.github.com/repos/PRX/fixer.prx.org/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/PRX/fixer.prx.org/pulls/42","id":37953532,"html_url":"https://github.com/PRX/fixer.prx.org/pull/42","diff_url":"https://github.com/PRX/fixer.prx.org/pull/42.diff","patch_url":"https://github.com/PRX/fixer.prx.org/pull/42.patch","issue_url":"https://api.github.com/repos/PRX/fixer.prx.org/issues/42","number":42,"state":"open","locked":false,"title":"add new worker to create jobs from queue","user":{"login":"kookster","id":46439,"avatar_url":"https://avatars.githubusercontent.com/u/46439?v=3","gravatar_id":"","url":"https://api.github.com/users/kookster","html_url":"https://github.com/kookster","followers_url":"https://api.github.com/users/kookster/followers","following_url":"https://api.github.com/users/kookster/following{/other_user}","gists_url":"https://api.github.com/users/kookster/gists{/gist_id}","starred_url":"https://api.github.com/users/kookster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kookster/subscriptions","organizations_url":"https://api.github.com/users/kookster/orgs","repos_url":"https://api.github.com/users/kookster/repos","events_url":"https://api.github.com/users/kookster/events{/privacy}","received_events_url":"https://api.github.com/users/kookster/received_events","type":"User","site_admin":false},"body":"This should fulfill #10 ","created_at":"2015-06-17T22:20:44Z","updated_at":"2015-06-22T17:58:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14ace1c61db3b401e30b038e69adbd983046f514","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PRX/fixer.prx.org/pulls/42/commits","review_comments_url":"https://api.github.com/repos/PRX/fixer.prx.org/pulls/42/comments","review_comment_url":"https://api.github.com/repos/PRX/fixer.prx.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PRX/fixer.prx.org/issues/42/comments","statuses_url":"https://api.github.com/repos/PRX/fixer.prx.org/statuses/e717901b2da876b124dcd289a6125aa1bab96ff6","head":{"label":"PRX:feat/sqs_job_create_callback","ref":"feat/sqs_job_create_callback","sha":"e717901b2da876b124dcd289a6125aa1bab96ff6","user":{"login":"PRX","id":160453,"avatar_url":"https://avatars.githubusercontent.com/u/160453?v=3","gravatar_id":"","url":"https://api.github.com/users/PRX","html_url":"https://github.com/PRX","followers_url":"https://api.github.com/users/PRX/followers","following_url":"https://api.github.com/users/PRX/following{/other_user}","gists_url":"https://api.github.com/users/PRX/gists{/gist_id}","starred_url":"https://api.github.com/users/PRX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PRX/subscriptions","organizations_url":"https://api.github.com/users/PRX/orgs","repos_url":"https://api.github.com/users/PRX/repos","events_url":"https://api.github.com/users/PRX/events{/privacy}","received_events_url":"https://api.github.com/users/PRX/received_events","type":"Organization","site_admin":false},"repo":{"id":29747841,"name":"fixer.prx.org","full_name":"PRX/fixer.prx.org","owner":{"login":"PRX","id":160453,"avatar_url":"https://avatars.githubusercontent.com/u/160453?v=3","gravatar_id":"","url":"https://api.github.com/users/PRX","html_url":"https://github.com/PRX","followers_url":"https://api.github.com/users/PRX/followers","following_url":"https://api.github.com/users/PRX/following{/other_user}","gists_url":"https://api.github.com/users/PRX/gists{/gist_id}","starred_url":"https://api.github.com/users/PRX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PRX/subscriptions","organizations_url":"https://api.github.com/users/PRX/orgs","repos_url":"https://api.github.com/users/PRX/repos","events_url":"https://api.github.com/users/PRX/events{/privacy}","received_events_url":"https://api.github.com/users/PRX/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PRX/fixer.prx.org","description":"Media processing application.","fork":false,"url":"https://api.github.com/repos/PRX/fixer.prx.org","forks_url":"https://api.github.com/repos/PRX/fixer.prx.org/forks","keys_url":"https://api.github.com/repos/PRX/fixer.prx.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PRX/fixer.prx.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PRX/fixer.prx.org/teams","hooks_url":"https://api.github.com/repos/PRX/fixer.prx.org/hooks","issue_events_url":"https://api.github.com/repos/PRX/fixer.prx.org/issues/events{/number}","events_url":"https://api.github.com/repos/PRX/fixer.prx.org/events","assignees_url":"https://api.github.com/repos/PRX/fixer.prx.org/assignees{/user}","branches_url":"https://api.github.com/repos/PRX/fixer.prx.org/branches{/branch}","tags_url":"https://api.github.com/repos/PRX/fixer.prx.org/tags","blobs_url":"https://api.github.com/repos/PRX/fixer.prx.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PRX/fixer.prx.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PRX/fixer.prx.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/PRX/fixer.prx.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PRX/fixer.prx.org/statuses/{sha}","languages_url":"https://api.github.com/repos/PRX/fixer.prx.org/languages","stargazers_url":"https://api.github.com/repos/PRX/fixer.prx.org/stargazers","contributors_url":"https://api.github.com/repos/PRX/fixer.prx.org/contributors","subscribers_url":"https://api.github.com/repos/PRX/fixer.prx.org/subscribers","subscription_url":"https://api.github.com/repos/PRX/fixer.prx.org/subscription","commits_url":"https://api.github.com/repos/PRX/fixer.prx.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/PRX/fixer.prx.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/PRX/fixer.prx.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/PRX/fixer.prx.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/PRX/fixer.prx.org/contents/{+path}","compare_url":"https://api.github.com/repos/PRX/fixer.prx.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PRX/fixer.prx.org/merges","archive_url":"https://api.github.com/repos/PRX/fixer.prx.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PRX/fixer.prx.org/downloads","issues_url":"https://api.github.com/repos/PRX/fixer.prx.org/issues{/number}","pulls_url":"https://api.github.com/repos/PRX/fixer.prx.org/pulls{/number}","milestones_url":"https://api.github.com/repos/PRX/fixer.prx.org/milestones{/number}","notifications_url":"https://api.github.com/repos/PRX/fixer.prx.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PRX/fixer.prx.org/labels{/name}","releases_url":"https://api.github.com/repos/PRX/fixer.prx.org/releases{/id}","created_at":"2015-01-23T18:58:41Z","updated_at":"2015-06-17T17:42:08Z","pushed_at":"2015-06-22T17:58:17Z","git_url":"git://github.com/PRX/fixer.prx.org.git","ssh_url":"git@github.com:PRX/fixer.prx.org.git","clone_url":"https://github.com/PRX/fixer.prx.org.git","svn_url":"https://github.com/PRX/fixer.prx.org","homepage":"","size":11183,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":10,"forks":1,"open_issues":10,"watchers":2,"default_branch":"master"}},"base":{"label":"PRX:master","ref":"master","sha":"1493e767bb78cc7d8d7a2cc6078ab1590d4321fc","user":{"login":"PRX","id":160453,"avatar_url":"https://avatars.githubusercontent.com/u/160453?v=3","gravatar_id":"","url":"https://api.github.com/users/PRX","html_url":"https://github.com/PRX","followers_url":"https://api.github.com/users/PRX/followers","following_url":"https://api.github.com/users/PRX/following{/other_user}","gists_url":"https://api.github.com/users/PRX/gists{/gist_id}","starred_url":"https://api.github.com/users/PRX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PRX/subscriptions","organizations_url":"https://api.github.com/users/PRX/orgs","repos_url":"https://api.github.com/users/PRX/repos","events_url":"https://api.github.com/users/PRX/events{/privacy}","received_events_url":"https://api.github.com/users/PRX/received_events","type":"Organization","site_admin":false},"repo":{"id":29747841,"name":"fixer.prx.org","full_name":"PRX/fixer.prx.org","owner":{"login":"PRX","id":160453,"avatar_url":"https://avatars.githubusercontent.com/u/160453?v=3","gravatar_id":"","url":"https://api.github.com/users/PRX","html_url":"https://github.com/PRX","followers_url":"https://api.github.com/users/PRX/followers","following_url":"https://api.github.com/users/PRX/following{/other_user}","gists_url":"https://api.github.com/users/PRX/gists{/gist_id}","starred_url":"https://api.github.com/users/PRX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PRX/subscriptions","organizations_url":"https://api.github.com/users/PRX/orgs","repos_url":"https://api.github.com/users/PRX/repos","events_url":"https://api.github.com/users/PRX/events{/privacy}","received_events_url":"https://api.github.com/users/PRX/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PRX/fixer.prx.org","description":"Media processing application.","fork":false,"url":"https://api.github.com/repos/PRX/fixer.prx.org","forks_url":"https://api.github.com/repos/PRX/fixer.prx.org/forks","keys_url":"https://api.github.com/repos/PRX/fixer.prx.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PRX/fixer.prx.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PRX/fixer.prx.org/teams","hooks_url":"https://api.github.com/repos/PRX/fixer.prx.org/hooks","issue_events_url":"https://api.github.com/repos/PRX/fixer.prx.org/issues/events{/number}","events_url":"https://api.github.com/repos/PRX/fixer.prx.org/events","assignees_url":"https://api.github.com/repos/PRX/fixer.prx.org/assignees{/user}","branches_url":"https://api.github.com/repos/PRX/fixer.prx.org/branches{/branch}","tags_url":"https://api.github.com/repos/PRX/fixer.prx.org/tags","blobs_url":"https://api.github.com/repos/PRX/fixer.prx.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PRX/fixer.prx.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PRX/fixer.prx.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/PRX/fixer.prx.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PRX/fixer.prx.org/statuses/{sha}","languages_url":"https://api.github.com/repos/PRX/fixer.prx.org/languages","stargazers_url":"https://api.github.com/repos/PRX/fixer.prx.org/stargazers","contributors_url":"https://api.github.com/repos/PRX/fixer.prx.org/contributors","subscribers_url":"https://api.github.com/repos/PRX/fixer.prx.org/subscribers","subscription_url":"https://api.github.com/repos/PRX/fixer.prx.org/subscription","commits_url":"https://api.github.com/repos/PRX/fixer.prx.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/PRX/fixer.prx.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/PRX/fixer.prx.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/PRX/fixer.prx.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/PRX/fixer.prx.org/contents/{+path}","compare_url":"https://api.github.com/repos/PRX/fixer.prx.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PRX/fixer.prx.org/merges","archive_url":"https://api.github.com/repos/PRX/fixer.prx.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PRX/fixer.prx.org/downloads","issues_url":"https://api.github.com/repos/PRX/fixer.prx.org/issues{/number}","pulls_url":"https://api.github.com/repos/PRX/fixer.prx.org/pulls{/number}","milestones_url":"https://api.github.com/repos/PRX/fixer.prx.org/milestones{/number}","notifications_url":"https://api.github.com/repos/PRX/fixer.prx.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PRX/fixer.prx.org/labels{/name}","releases_url":"https://api.github.com/repos/PRX/fixer.prx.org/releases{/id}","created_at":"2015-01-23T18:58:41Z","updated_at":"2015-06-17T17:42:08Z","pushed_at":"2015-06-22T17:58:17Z","git_url":"git://github.com/PRX/fixer.prx.org.git","ssh_url":"git@github.com:PRX/fixer.prx.org.git","clone_url":"https://github.com/PRX/fixer.prx.org.git","svn_url":"https://github.com/PRX/fixer.prx.org","homepage":"","size":11183,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":10,"forks":1,"open_issues":10,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PRX/fixer.prx.org/pulls/42"},"html":{"href":"https://github.com/PRX/fixer.prx.org/pull/42"},"issue":{"href":"https://api.github.com/repos/PRX/fixer.prx.org/issues/42"},"comments":{"href":"https://api.github.com/repos/PRX/fixer.prx.org/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/PRX/fixer.prx.org/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/PRX/fixer.prx.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PRX/fixer.prx.org/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/PRX/fixer.prx.org/statuses/e717901b2da876b124dcd289a6125aa1bab96ff6"}}}}