Class: Puppetfactory::Plugins::Gitviz
- Inherits:
-
Puppetfactory::Plugins
- Object
- Puppetfactory::Plugins
- Puppetfactory::Plugins::Gitviz
- Defined in:
- lib/puppetfactory/plugins/gitviz.rb
Instance Attribute Summary
Attributes inherited from Puppetfactory::Plugins
Instance Method Summary collapse
-
#initialize(options) ⇒ Gitviz
constructor
A new instance of Gitviz.
- #tabs(privileged = false) ⇒ Object
Constructor Details
#initialize(options) ⇒ Gitviz
Returns a new instance of Gitviz.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/puppetfactory/plugins/gitviz.rb', line 5 def initialize() super() return unless [:puppetfactory] server = [:puppetfactory] # Add a web route to the puppetfactory server. Must happen in the initializer server.get '/gitviz' do '<iframe id="gitviz" src="/explain-git-with-d3/embed.html" /><script>$("div:has(#gitviz)").css("padding", 0);$("body").css("min-width", "1150px");</script>' end end |
Instance Method Details
#tabs(privileged = false) ⇒ Object
18 19 20 21 |
# File 'lib/puppetfactory/plugins/gitviz.rb', line 18 def tabs(privileged = false) # url path => display title { 'gitviz' => 'Git Visualization' } end |