18F / dashboard

DEPRECATED: A site to track our projects' status and much, much more...
Other
44 stars 25 forks source link

Better support for not using the Team API #296

Closed gboone closed 8 years ago

gboone commented 8 years ago

This adjusts the import-public script to only work if there's an API baseurl specified in the _config.yml file. This will help people looking to reuse this Dashboard for their own agency by not automatically pulling information about our projects out of our API. The way it was written, every time serve or build were issued from the go script, new data would be pulled down and a new projects.json file created. This would make it very tricky to adapt as a potential user might write their own projects.json file only to have it overwritten as soon as the site is built.

Along these same lines, we may want to think about a script that will setup this repo better for someone outside of 18F looking to reuse this code. Right now a reuser would have to do the following:

  1. Set up the project
  2. Remove the _config.yml that's in the repo and rename the _config.yml.sample to _config.yml
  3. Rename the projects.json.example file to "projects.json".

Now, if you run ./go serve now you should see something similar to what you see at 18f.gsa.gov/dashboard

  1. Change the values in the _config.yml file to better reflect your organization.
  2. Rename the projects in the projects.json file you created before and replace their values with ones that fit your organizations projects.
gboone commented 8 years ago

And I have no idea why the build is failing. Looks like import_public can't find safe_yaml despite it being installed during the CI build. Anyone with more experience bundleing than me have thoughts?

mbland commented 8 years ago

Wherever it's getting run, it needs to be run as bundle exec ruby _data/import-public.rb.

gboone commented 8 years ago

Done. Thanks for the assist, @mbland