[openstreetmap/openstreetmap-website] Supporting multiple API versions (#2353)

Andy Allan notifications at github.com
Wed Sep 4 12:15:42 UTC 2019


So, trying (desperately) to drag the conversation back to the contents of this PR - does anyone have any comments on handling the indentation of the tests? I really dislike PRs that combine widespread indentation with additional changes to the code, since I find it very hard to spot where the real changes are and which lines are just indented with no other change.

I've been considering whether I should split out the indentation into a separate PR, with a dummy `indent` method like

```ruby
def indent
  yield
end
```
and then make a PR with the methods indented but with no other changes
```diff
  def test_something
-   code
-   code
-   post :foo
-   code
+   indent
+    code
+    code
+    post :foo
+    code
+   end
  end
```

and then in the second PR it will be more obvious which of the lines have real changes. 

```diff
  def test_other_thing
-   indent
+   all_api_versions.each do |version|
      code
      code
-     post :foo
+     post :foo, params => { etc }
      code
    end
end
```

Or am I worrying about this too much, and the PR is fine the way it is now?


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2353#issuecomment-527874247
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190904/ec45ce32/attachment.html>


More information about the rails-dev mailing list