-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store points from service requests #79
Conversation
README.md
Outdated
|
||
### Application Setup | ||
|
||
1. Install ruby gem dependencies: `bundle install` | ||
2. Create the databases and load schema and seeds: `bin/rails db:setup` | ||
3. Run the tests: `bin/rspec` | ||
4. Run the server: `bin/rails server`, and visit the web-browser: [`http://localhost:3000`](http://localhost:3000) | ||
5. Load cities: `rake cities:load` | ||
6. Load service requests: `rake cities:service_requests` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines should be unnecessary when running db:setup
so far as it will load cities and generate fake service requests. Perhaps the better improvement would be to make a section in the readme that differentiates between “developing with fake data” and “running it for reals”
spec/factories/service_requests.rb
Outdated
@@ -19,6 +22,7 @@ | |||
'description' => description, | |||
'status' => status, | |||
'requested_datetime' => requested_datetime.iso8601, | |||
'geometry' => geometry, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The raw_data block should represent only what the Open311 api returns. This should be lat and lon. Then the subsequent test will be correct because it will test that
the raw_data setter assigns the geometry correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs to be resolved so it matches what would come back from an open311 api endpoint. It should be instead:
raw_data do
{
# ...
'lat' => lat,
'long' => long,
}
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! I think I misunderstood how raw_data
works. Hopefully good now.
@@ -20,3 +20,4 @@ staging: | |||
production: | |||
database: open311status_production | |||
<<: *defaults | |||
url: <%= ENV.fetch("DATABASE_URL", "").gsub(/postgres/, 'postgis') %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Progress on #75:
service_requests