{"action":"created","issue":{"url":"https://api.github.com/repos/FirebaseExtended/protobuf-rules-gen/issues/29","repository_url":"https://api.github.com/repos/FirebaseExtended/protobuf-rules-gen","labels_url":"https://api.github.com/repos/FirebaseExtended/protobuf-rules-gen/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/FirebaseExtended/protobuf-rules-gen/issues/29/comments","events_url":"https://api.github.com/repos/FirebaseExtended/protobuf-rules-gen/issues/29/events","html_url":"https://github.com/FirebaseExtended/protobuf-rules-gen/pull/29","id":379287500,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NzkyMDUy","number":29,"title":"Add bazel macros for protobuf_rules_gen","user":{"login":"ribrdb","id":72241,"node_id":"MDQ6VXNlcjcyMjQx","avatar_url":"https://avatars1.githubusercontent.com/u/72241?v=4","gravatar_id":"","url":"https://api.github.com/users/ribrdb","html_url":"https://github.com/ribrdb","followers_url":"https://api.github.com/users/ribrdb/followers","following_url":"https://api.github.com/users/ribrdb/following{/other_user}","gists_url":"https://api.github.com/users/ribrdb/gists{/gist_id}","starred_url":"https://api.github.com/users/ribrdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ribrdb/subscriptions","organizations_url":"https://api.github.com/users/ribrdb/orgs","repos_url":"https://api.github.com/users/ribrdb/repos","events_url":"https://api.github.com/users/ribrdb/events{/privacy}","received_events_url":"https://api.github.com/users/ribrdb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-09T19:14:28Z","updated_at":"2018-11-09T19:20:29Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/FirebaseExtended/protobuf-rules-gen/pulls/29","html_url":"https://github.com/FirebaseExtended/protobuf-rules-gen/pull/29","diff_url":"https://github.com/FirebaseExtended/protobuf-rules-gen/pull/29.diff","patch_url":"https://github.com/FirebaseExtended/protobuf-rules-gen/pull/29.patch"},"body":"Here's a first stab at adding the BUILD rules.\r\nI'm not sure if you'd want to update the integration test to build using these rules or keep it completely separate.\r\n\r\nI didn't include using the firestore emulator here. There's two reasons for that:\r\n - The current url for downloading the emulator \r\n    (https://firebase.google.com/docs/firestore/downloads/cloud-firestore-emulator.jar)\r\n     isn't versioned, so it would be problematic to download it in the WORKSPACE file. \r\n - For unrelated reasons I'm stuck using an older version of Bazel and so I can't use the latest rules_nodejs. I'm not sure if it'd be a good idea to give an example using an older version.\r\n\r\nOnce the emulator jar is available I basically just use a jasmine_node_test and add this to start the emulator:\r\n```js\r\nbeforeAll(async () => {\r\n  return new Promise((resolve) => {\r\n    console.log('Starting firestore emulator...');\r\n    const child = child_process.spawn('java', [\r\n      '-jar',\r\n      '../com_google_cloud_firestore_emulator/jar/cloud-firestore-emulator.jar'\r\n    ]);\r\n    child.stdout.on('data', (data) => {\r\n      console.log(`emulator: ${data}`);\r\n      if (/localhost:8080/.test(data)) {\r\n        console.log('Emulator alive!');\r\n        resolve();\r\n      }\r\n    });\r\n\r\n    child.stderr.on('data', (data) => {\r\n      console.error(`emulator: ${data}`);\r\n    });\r\n    emulator = child;\r\n  });\r\n});\r\nafterAll(() => {\r\n  emulator.kill();\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/FirebaseExtended/protobuf-rules-gen/issues/comments/437466635","html_url":"https://github.com/FirebaseExtended/protobuf-rules-gen/pull/29#issuecomment-437466635","issue_url":"https://api.github.com/repos/FirebaseExtended/protobuf-rules-gen/issues/29","id":437466635,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzQ2NjYzNQ==","user":{"login":"ribrdb","id":72241,"node_id":"MDQ6VXNlcjcyMjQx","avatar_url":"https://avatars1.githubusercontent.com/u/72241?v=4","gravatar_id":"","url":"https://api.github.com/users/ribrdb","html_url":"https://github.com/ribrdb","followers_url":"https://api.github.com/users/ribrdb/followers","following_url":"https://api.github.com/users/ribrdb/following{/other_user}","gists_url":"https://api.github.com/users/ribrdb/gists{/gist_id}","starred_url":"https://api.github.com/users/ribrdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ribrdb/subscriptions","organizations_url":"https://api.github.com/users/ribrdb/orgs","repos_url":"https://api.github.com/users/ribrdb/repos","events_url":"https://api.github.com/users/ribrdb/events{/privacy}","received_events_url":"https://api.github.com/users/ribrdb/received_events","type":"User","site_admin":false},"created_at":"2018-11-09T19:20:29Z","updated_at":"2018-11-09T19:20:29Z","author_association":"NONE","body":"Hmm, I guess the CI is using an even older version of Bazel than I am. Should I update the rules to work with Bazel 0.9.0, or update the CI to use a newer version?"}}
{"actor":{"display_login":"ribrdb"}}