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
Refactor thor #47
Refactor thor #47
Conversation
…ferences after upgrade from version 2
…ib from API_NAME.apiary.io # This is integration testing you have to set APIARY_API_KEY Scenario: Fetch apiary.apib from API_NAME.apiary.io # features/fetch.feature:4 When I run `apiary fetch --api-name apiaryclienttest` # aruba-0.6.1/lib/aruba/cucumber.rb:93 Then the output should contain the content of file "apiary.apib" # features/step_definitions/file_content_step.rb:1 Feature: Show API documentation in specified browser # This is integration testing you have to set APIARY_API_KEY Scenario: Write generated HTML into specified file # features/preview.feature:4 When I run `apiary preview --path apiary.apib --output=test.html` # aruba-0.6.1/lib/aruba/cucumber.rb:93 Then a file named "test.html" should exist # aruba-0.6.1/lib/aruba/cucumber.rb:307 Feature: Publish apiary.apib on docs.API_NAME.apiary.io # This is integration testing you have to set APIARY_API_KEY Scenario: Publish apiary.apib on docs.API_NAME.apiary.io # features/publish.feature:4 When I run `apiary publish --path=apiary.apib --api-name 1111apiaryclienttest` # aruba-0.6.1/lib/aruba/cucumber.rb:93 Then the exit status should be 1 # aruba-0.6.1/lib/aruba/cucumber.rb:197 Feature: Version of Apiary client Scenario: Print the semantic version of Apiary client # features/version.feature:3 When I run `apiary version` # aruba-0.6.1/lib/aruba/cucumber.rb:93 Then the output should match /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/ # aruba-0.6.1/lib/aruba/cucumber.rb:180 And the exit status should be 0 # aruba-0.6.1/lib/aruba/cucumber.rb:197 4 scenarios (4 passed) 9 steps (9 passed) 0m3.871s
Note: If merged, closes #37. |
desc "fetch", "Fetch apiary.apib from API_NAME.apiary.io" | ||
method_option :api_name, :type => :string, :required => true, :default => '' | ||
def fetch | ||
cmd = Apiary::Command::Fetch.new options |
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.
Some files have indentation by two spaces, some by four - I do not like this. Please, unify it throughout the codebase.
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.
I'll fix all to 2, thx
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.
👍
Why Circle? Thought that we usually put OpenSource projects into TravisCI. |
BODY_EXAMPLE = '{ | ||
"error": false, | ||
"message": "", | ||
"code": "FORMAT: 1A\nHOST: http://www.testing.com\n\n# Notes API test 123\nNotes API is a *short texts saving* service similar to its physical paper presence on your table.\n\n# Group Notes\nNotes related resources of the **Notes API**\n\n## Notes Collection [/notes]\n### List all Notes [GET]\n+ Response 200 (application/json)\n\n [{\n \"id\": 1, \"title\": \"Jogging in park\"\n }, {\n \"id\": 2, \"title\": \"Pick-up posters from post-office\"\n }]\n\n### Create a Note [POST]\n+ Request (application/json)\n\n { \"title\": \"Buy cheese and bread for breakfast.\" }\n\n+ Response 201 (application/json)\n\n { \"id\": 3, \"title\": \"Buy cheese and bread for breakfast.\" }\n\n## Note [/notes/{id}]\nA single Note object with all its details\n\n+ Parameters\n + id (required, number, `1`) ... Numeric `id` of the Note to perform action with. Has example value.\n\n### Retrieve a Note [GET]\n+ Response 200 (application/json)\n\n + Header\n\n X-My-Header: The Value\n\n + Body\n\n { \"id\": 2, \"title\": \"Pick-up posters from post-office\" }\n\n### Remove a Note [DELETE]\n+ Response 204\n" | ||
}' |
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.
👍
Large PR :-( Please, split into smaller pieces next time so it is easier to understand and review. As I am not that good in Ruby, I do not have balls to push the Merge button on something this big without someone else also reviewing this. |
Circle for integration |
Sorry for large PR, but doesn't not work without many changes. |
27dd4ef
to
d60bf4b
Compare
d60bf4b
to
2ab425d
Compare
@honzajavorek All works, please look into and merge or close. |
@@ -0,0 +1,7 @@ | |||
require 'spec_helper' | |||
|
|||
describe Apiary::Command::Preview do |
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.
Isn't this dead code?
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.
Yes and no. It's some from future feature. I'll remove from this PR.
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.
Fixed
@abtris will you please publish a new version? |
@abtris Would you please give access to more people like @honzajavorek so they can publish new releases as well? ;) |
@Almad Hi can (5 people can). |
My request was not because I could not, but because I forgot again how to do it and I knew @abtris will have it done in a minute, so I kindly asked him :) I did already release |
@honzajavorek this means we should have |
@abtris I'd still say "branch properly"... |
Fixed |
Summary