Comments (4)
You're right, this is a better default. I'm gone for the weekend, but if you want to have a look at it in the meantime, I'm going to add you to plu/Pithub. So feel free to just push that change to master :)
from pithub.
Thanks. The change is trivial, but it perturbs the tests badly and will require test changes well outside its proportions. Mind you, this was just with setting per_page=30 to see what would happen without a behavioral change.
It potentially changes every URL (I think I can modify it so it only effects queries which use an iterator) which affects many tests. Checks for simple URL equality will have to be changed to take into account the per_page default as well as the unreliable ordering of the query keywords. I've written up url_is
to handle this, and it might be worth adding to Test::URI, but I'm not sure where to put it. Pithub::Test would be the normal place, but that's already a testing subclass of Pithub.
The larger problem is with the response mocking. Adding a default query to every URL changes the response filenames which breaks a lot of tests. I could rename all the files to take into account the per_page=30 (and then change them all later 100). I could change Pithub::Test to strip out per_page if it's equal to the default (requiring Test knowledge of Pithub's defaults). Or something else?
Anyhow, that's a lot of test restructuring so I figure I'd get your input before launching off on it. I might not bother since I can just as easily set per_page in my application.
from pithub.
I've fixed one part of the problem (response stub filenames) and you can now use the Pithub::Test module for you intentions, if you want to.
I'm not sure where your code of url_is
is living, I guess you have it somewhere? If you want to, you can fix that part, I'd be really happy about it. But I can also understand if you'd prefer that I clean up the mess I created myself :).
from pithub.
Done by #167
from pithub.
Related Issues (20)
- Turn on coveralls.io HOT 2
- Allow passing attributes to Pithub instance helpers HOT 1
- Ability to delete repositories
- Add the ability to get a branch
- New release? HOT 5
- Pithub-0.01027 unchecked dependency on Moo-1.006001 HOT 1
- No way to pull issues by milestone title HOT 5
- #186 breaks compatibility HOT 9
- Need more examples in the SYNOPSIS of main module HOT 1
- Test Failures / Modification of non-creatable hash value attempted, subscript "bio" HOT 3
- ->issues HOT 4
- ->commits HOT 5
- ->pull_requests HOT 2
- Feature Request: Markdown HOT 7
- Feature: method to query rate_limit HOT 1
- Problem with POD generation HOT 2
- Failures due to JSON deps HOT 2
- Fix Pod errors in Pithub::Base HOT 1
- Drop dependency on Array::Iterator HOT 2
- Github requires boolean values for true/false values not 0/1 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pithub.