{"action":"opened","number":6742,"pull_request":{"url":"https://api.github.com/repos/spree/spree/pulls/6742","id":45476960,"html_url":"https://github.com/spree/spree/pull/6742","diff_url":"https://github.com/spree/spree/pull/6742.diff","patch_url":"https://github.com/spree/spree/pull/6742.patch","issue_url":"https://api.github.com/repos/spree/spree/issues/6742","number":6742,"state":"open","locked":false,"title":"avoid to use require_tree at backend.js for single js file override.","user":{"login":"odk211","id":1321120,"avatar_url":"https://avatars.githubusercontent.com/u/1321120?v=3","gravatar_id":"","url":"https://api.github.com/users/odk211","html_url":"https://github.com/odk211","followers_url":"https://api.github.com/users/odk211/followers","following_url":"https://api.github.com/users/odk211/following{/other_user}","gists_url":"https://api.github.com/users/odk211/gists{/gist_id}","starred_url":"https://api.github.com/users/odk211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odk211/subscriptions","organizations_url":"https://api.github.com/users/odk211/orgs","repos_url":"https://api.github.com/users/odk211/repos","events_url":"https://api.github.com/users/odk211/events{/privacy}","received_events_url":"https://api.github.com/users/odk211/received_events","type":"User","site_admin":false},"body":"It is better not to use require_tree.\r\nBecause it avoids single js file override.\r\n\r\nI tried to override single js file (shipments.js.erb),\r\nso I create `vendor/assets/javascripts/spree/backend/shipment.js.erb` in my app.\r\nand run `rake assets:precompile`.\r\nBut both shipment.js.erb (`spree/backend/app/assets` and `myapp/vendor/assets`) is included to all.js.\r\n\r\nThis is because the backend.js's `require_tree .` do not load overrided shipment.js.erb, but load spree's one.\r\nIn my pull request branch, I can override single js.\r\n\r\nMy `vendor/assets/javascripts/spree/backend/all.js`.\r\n```\r\n//= require jquery\r\n//= require jquery_ujs\r\n//= require spree/backend\r\n\r\n//= require_tree .\r\n```\r\n","created_at":"2015-09-19T13:51:03Z","updated_at":"2015-09-19T13:51:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spree/spree/pulls/6742/commits","review_comments_url":"https://api.github.com/repos/spree/spree/pulls/6742/comments","review_comment_url":"https://api.github.com/repos/spree/spree/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spree/spree/issues/6742/comments","statuses_url":"https://api.github.com/repos/spree/spree/statuses/58e7ea3800a478d7979eda3de73e30d72364a26a","head":{"label":"odk211:avoid-require_tree","ref":"avoid-require_tree","sha":"58e7ea3800a478d7979eda3de73e30d72364a26a","user":{"login":"odk211","id":1321120,"avatar_url":"https://avatars.githubusercontent.com/u/1321120?v=3","gravatar_id":"","url":"https://api.github.com/users/odk211","html_url":"https://github.com/odk211","followers_url":"https://api.github.com/users/odk211/followers","following_url":"https://api.github.com/users/odk211/following{/other_user}","gists_url":"https://api.github.com/users/odk211/gists{/gist_id}","starred_url":"https://api.github.com/users/odk211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odk211/subscriptions","organizations_url":"https://api.github.com/users/odk211/orgs","repos_url":"https://api.github.com/users/odk211/repos","events_url":"https://api.github.com/users/odk211/events{/privacy}","received_events_url":"https://api.github.com/users/odk211/received_events","type":"User","site_admin":false},"repo":{"id":39185478,"name":"spree","full_name":"odk211/spree","owner":{"login":"odk211","id":1321120,"avatar_url":"https://avatars.githubusercontent.com/u/1321120?v=3","gravatar_id":"","url":"https://api.github.com/users/odk211","html_url":"https://github.com/odk211","followers_url":"https://api.github.com/users/odk211/followers","following_url":"https://api.github.com/users/odk211/following{/other_user}","gists_url":"https://api.github.com/users/odk211/gists{/gist_id}","starred_url":"https://api.github.com/users/odk211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odk211/subscriptions","organizations_url":"https://api.github.com/users/odk211/orgs","repos_url":"https://api.github.com/users/odk211/repos","events_url":"https://api.github.com/users/odk211/events{/privacy}","received_events_url":"https://api.github.com/users/odk211/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/odk211/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/odk211/spree","forks_url":"https://api.github.com/repos/odk211/spree/forks","keys_url":"https://api.github.com/repos/odk211/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odk211/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odk211/spree/teams","hooks_url":"https://api.github.com/repos/odk211/spree/hooks","issue_events_url":"https://api.github.com/repos/odk211/spree/issues/events{/number}","events_url":"https://api.github.com/repos/odk211/spree/events","assignees_url":"https://api.github.com/repos/odk211/spree/assignees{/user}","branches_url":"https://api.github.com/repos/odk211/spree/branches{/branch}","tags_url":"https://api.github.com/repos/odk211/spree/tags","blobs_url":"https://api.github.com/repos/odk211/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odk211/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odk211/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/odk211/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odk211/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/odk211/spree/languages","stargazers_url":"https://api.github.com/repos/odk211/spree/stargazers","contributors_url":"https://api.github.com/repos/odk211/spree/contributors","subscribers_url":"https://api.github.com/repos/odk211/spree/subscribers","subscription_url":"https://api.github.com/repos/odk211/spree/subscription","commits_url":"https://api.github.com/repos/odk211/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/odk211/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/odk211/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/odk211/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/odk211/spree/contents/{+path}","compare_url":"https://api.github.com/repos/odk211/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odk211/spree/merges","archive_url":"https://api.github.com/repos/odk211/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odk211/spree/downloads","issues_url":"https://api.github.com/repos/odk211/spree/issues{/number}","pulls_url":"https://api.github.com/repos/odk211/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/odk211/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/odk211/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odk211/spree/labels{/name}","releases_url":"https://api.github.com/repos/odk211/spree/releases{/id}","created_at":"2015-07-16T08:23:36Z","updated_at":"2015-07-16T08:23:45Z","pushed_at":"2015-09-19T13:18:11Z","git_url":"git://github.com/odk211/spree.git","ssh_url":"git@github.com:odk211/spree.git","clone_url":"https://github.com/odk211/spree.git","svn_url":"https://github.com/odk211/spree","homepage":"http://spreecommerce.com","size":75094,"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":"spree:master","ref":"master","sha":"e0f7be4bf46fd3a8bc09d5da3ab64afad40b20d7","user":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"repo":{"id":3314,"name":"spree","full_name":"spree/spree","owner":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spree/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":false,"url":"https://api.github.com/repos/spree/spree","forks_url":"https://api.github.com/repos/spree/spree/forks","keys_url":"https://api.github.com/repos/spree/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spree/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spree/spree/teams","hooks_url":"https://api.github.com/repos/spree/spree/hooks","issue_events_url":"https://api.github.com/repos/spree/spree/issues/events{/number}","events_url":"https://api.github.com/repos/spree/spree/events","assignees_url":"https://api.github.com/repos/spree/spree/assignees{/user}","branches_url":"https://api.github.com/repos/spree/spree/branches{/branch}","tags_url":"https://api.github.com/repos/spree/spree/tags","blobs_url":"https://api.github.com/repos/spree/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spree/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spree/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/spree/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spree/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/spree/spree/languages","stargazers_url":"https://api.github.com/repos/spree/spree/stargazers","contributors_url":"https://api.github.com/repos/spree/spree/contributors","subscribers_url":"https://api.github.com/repos/spree/spree/subscribers","subscription_url":"https://api.github.com/repos/spree/spree/subscription","commits_url":"https://api.github.com/repos/spree/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/spree/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/spree/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/spree/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/spree/spree/contents/{+path}","compare_url":"https://api.github.com/repos/spree/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spree/spree/merges","archive_url":"https://api.github.com/repos/spree/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spree/spree/downloads","issues_url":"https://api.github.com/repos/spree/spree/issues{/number}","pulls_url":"https://api.github.com/repos/spree/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/spree/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/spree/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spree/spree/labels{/name}","releases_url":"https://api.github.com/repos/spree/spree/releases{/id}","created_at":"2008-03-10T14:45:35Z","updated_at":"2015-09-19T07:38:39Z","pushed_at":"2015-09-19T13:51:04Z","git_url":"git://github.com/spree/spree.git","ssh_url":"git@github.com:spree/spree.git","clone_url":"https://github.com/spree/spree.git","svn_url":"https://github.com/spree/spree","homepage":"http://spreecommerce.com","size":138997,"stargazers_count":6721,"watchers_count":6721,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3187,"mirror_url":null,"open_issues_count":182,"forks":3187,"open_issues":182,"watchers":6721,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/6742"},"html":{"href":"https://github.com/spree/spree/pull/6742"},"issue":{"href":"https://api.github.com/repos/spree/spree/issues/6742"},"comments":{"href":"https://api.github.com/repos/spree/spree/issues/6742/comments"},"review_comments":{"href":"https://api.github.com/repos/spree/spree/pulls/6742/comments"},"review_comment":{"href":"https://api.github.com/repos/spree/spree/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spree/spree/pulls/6742/commits"},"statuses":{"href":"https://api.github.com/repos/spree/spree/statuses/58e7ea3800a478d7979eda3de73e30d72364a26a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":35,"deletions":1,"changed_files":1}}