This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun yank-to-gist () | |
| "yank from the top of the kill ring, create a gist from it, and insert the gist url at the point" | |
| (interactive) | |
| (save-excursion | |
| (let ((buffer (current-buffer))) | |
| (set-buffer (get-buffer-create "*yank-to-gist*")) | |
| (yank) | |
| (gist-region | |
| (point-min) | |
| (point-max) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Convert XML response to defined Ruby Class | |
| def xml_to_class(c, item) | |
| obj = c.new | |
| # Set default attributes | |
| obj.id = item['id'] | |
| api = self | |
| c.instance_eval do | |
| define_method :client do | |
| api | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| irb> client.keys.collect {|x| [x.id, x.actions_urls]} | |
| [ | |
| [0] [ | |
| [0] "jimkey", | |
| [1] { | |
| "destroy" => "http://localhost:8080/deltacloud/api/keys/default" | |
| } | |
| ], | |
| [1] [ | |
| [0] "default", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [user] | |
| email = [email protected] | |
| name = Tobias Crawley | |
| [push] | |
| default = tracking | |
| [github] | |
| user = tobias | |
| token = <redacted> | |
| [alias] | |
| lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| platforms: | |
| - name: JBoss 3-Tier | |
| platform_versions: | |
| - version_number: | |
| images: | |
| - name: Backend - JBoss AS 6 M5 (w/TorqueBox 1.0.0.Beta22) | |
| cloud_id: ami-68e51101 | |
| services: | |
| - jboss_as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Artifact X v5 | |
| Artifact Y v3 | |
| Artifact Z v4 | |
| ------------- | |
| Artifact X v5 | |
| Artifact X v4 | |
| Artifact X v3 | |
| Artifact X v2 | |
| Artifact X v1 | |
| Artifact Y v3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def control(opts=nil, &block) | |
| op = self | |
| @control = Proc.new do | |
| if opts and | |
| opts[:with_capability] and | |
| !driver.respond_to?(opts[:with_capability]) | |
| raise Deltacloud::BackendFeatureUnsupported.new('501', nil, | |
| "#{opts[:with_capability]} not supported by backend", nil) | |
| end | |
| op.validate(params) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/server/lib/deltacloud/backend_capability.rb b/server/lib/deltacloud/backend_capability.rb | |
| new file mode 100644 | |
| index 0000000..bec8714 | |
| --- /dev/null | |
| +++ b/server/lib/deltacloud/backend_capability.rb | |
| @@ -0,0 +1,21 @@ | |
| +module Deltacloud::BackendCapability | |
| + | |
| + class Failure < StandardError | |
| + attr_reader :capability |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;;###autoload | |
| (defun gist-list () | |
| "Displays a list of all of the current user's gists in a new buffer." | |
| (interactive) | |
| (message "Retrieving list of your gists...") | |
| (github-with-auth-info login token | |
| (gist-request | |
| (format "https://gist.github.com/api/v1/xml/gists/%s" login) | |
| 'gist-lists-retrieved-callback))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Look! A gist! |