Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/samples/simple-rubygems.rb
blob: 7aff52dfd6858d5bb0fda9913397a54f1ef018cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# The setup block will install gems before launching the 
# rest of the app below it.
#
Shoes.setup do
  gem 'bluecloth =2.0.6'
  gem 'metaid'
end

require 'bluecloth'
require 'metaid'

Shoes.app :width => 300, :height => 400, :resizable => false do
  background "#eed"

  stack :margin => 40 do
    tagline "Loaded Gems:", :align => "center", :underline => "single"
    Gem.loaded_specs.each do |name, spec|
      para "#{name}\n#{spec.version}", :align => "center"
    end

    caption "Total Gems: #{Gem.source_index.length}", :align => "center", :margin_bottom => 0
    para "(includes unloaded gems)", :align => "center", :margin_top => 0
    button "OK", :bottom => 30, :left => 0.4 do
      self.close
    end
  end

end