How can I call fetch_revision in my deploy.rb? Here is the link to docs on the method I mention
Related
Is there by NuGet API call to find whether a certain package is set
unlisted
deprecated
And in case of unlisted/ deprecated to get the reason or suggestion references?
Oh sorry, I see it seems to be quite easy - just call the
https://api.nuget.org/v3/registration5-gz-semver2/{package-id}/index.json
and then search for
items.items.listed (and its boolean val)
items.items.deprecation and its properties e.g. alternatePackage
example:
https://api.nuget.org/v3/registration5-gz-semver2/dotnet-tool-outdated/index.json
I was trying to use the REST API of TeamCity but i can't find a list of all supported requests and the names of parameters. I wanted to look it up in their official documentation (https://confluence.jetbrains.com/display/TCD10/REST+API)
where a link to exactly this list is provided
(http://teamcity:8111/app/rest/application.wadl)
but i just can't connect to it. Seems like the page is down.
I have googled all kinds of stuff in the hope to find this list somewhere else but i couldn't find anything smart.
Does anyone know where to find such a list or can provide one? That would be fantastic.
Thanks
You can find available API on the public teamcity:
https://teamcity.jetbrains.com/app/rest/swagger.json
You can navigate through the response inside the paths and look at supported methods, and required parameters for each API.
You can also access to the .wadl on the public teamcity server:
https://teamcity.jetbrains.com/app/rest/application.wadl
When you are inside the documentation of teamcity, they use teamcity:8111 as your own teamcity, installed on your server.
The URL examples on this page assume that your TeamCity server web UI is accessible via the http://teamcity:8111 URL.
If you download a copy of teamcity, start a copy of the server, and then connect to /app/rest/application.wadl, you will probably get a copy of representation.
I am trying to get the new registerTaskProvider method in the VSCode Task API working within my extension, and I have been unable to make this work so far.
I have used the npm extension as a basis. Here are the steps that I have followed:
Used yo to create a new extension
Updated package.json to include a new activationEvent onCommand:workbench.action.tasks.runTask
Updated package.json to include configuration and taskDefinitions sections in the contributes section
Added the following code to the extension.ts file
NOTE: I realise that the linked code won't actually provide any additional tasks, I am just using this code as a basis for testing.
Now, when I try to debug the extension, the provideTasks method is never invoked. What am I missing?
Also, the only way to have the activate method called is when I invoke the Hello World command. However, I might not have a command associated with the extension. How can I force the activation of the extension?
Is there any additional documentation on how to get started with the registerTaskProvider API?
I have added a sample repository that has the current work to date.
Turns out that this was a case of PEBKAC.
After a Twitter discussion with Erich Gamma, he showed me that the provideTasks method is only consulted when you begin running a task. As shown here:
https://twitter.com/ErichGamma/status/885823516293177346
I had assumed that the provideTasks method would be consulted on activation of the extension.
I am looking for a code sample on how to use Manatee.Trello Webhook feature.
I found some documentation here: https://bitbucket.org/gregsdennis/manatee.trello/wiki/Webhooks, but it's not clear enough for me.
It only demonstrates how to create a Webhook, but doesn't demonstrate how the real-time updates are received and processed. Tried the Updated event on the Webhook, Card and Actions - but clearly I am not doing something correctly.
Any help would be appreciated.
This article demonstrates webhooks in general:
https://blogs.msdn.microsoft.com/webdev/2015/09/04/introducing-microsoft-asp-net-webhooks-preview/
Basically, there is a NuGet package Microsoft.AspNet.WebHooks.Receivers.Trello that you can install that does all the heavy lifting.
Once the NuGet package is installed I can override the built-in Controller and use Webhook.ProcessNotification() as Greg Dennis had suggested.
Hope someone out there finds this useful.
You'll need to set up the web portion yourself. This can be done with an ApiController (or others).
Once you receive a POST message, read the content as a string (don't deserialize), and pass that to Webhook.ProcessNotification(). Manatee.Trello well take care of the rest.
This will trigger the Updated events.
EDIT
I have created some better docs. Here is the example you seek!
https://gregsdennis.github.io/Manatee.Trello/examples/webhook.html#processing-a-webhook-notification
I want to include the distance_of_time_in_words method in a sinatra app
I don't want to package and distribute a gem, which is what the Sintra docs direct you to do. I just want that method accessible in my view.
What's the easiest way to do this? Thanks.
On http://www.sinatrarb.com/intro.html look at Helpers section and define helper methods for use in route handlers and templates
Just place the file somewhere in your ruby load path ($LOAD_PATH) and require it. Or place the code directly in your app file.