
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Glimmer DSL for SWT Cube Custom Shape.
cube
is the Glimmer GUI DSL keyword provided by this gem.
It is used in Glimmer Quarto.
Add the follwing to Gemfile
:
gem 'glimmer-cp-cube', '~> 0.1.0'
Run bundle install
or bundle
:
bundle
Run:
gem install glimmer-cp-cube
First, add this to your Ruby file:
require 'glimmer-cp-cube'
Then, use this keyword:
cube(options) { properties_and_listeners }
Options (keyword args) are:
:location_x
(default: 0) (optional): starting location x coordinate within parent:location_y
(default: 0) (optional): starting location y coordinate within parent:cube_height
: cube height:rectangle_width
: top and bottom rectangle width:rectangle_height
: top and bottom rectangle height:background_color
: background color:line_thickness
(optional): line thickness:pitted
(optional): whether it is pitted (has a black hole on top) or notThe glimmer-cp-cube Ruby gem adds to glimmer samples, showing up when you run:
glimmer samples
Glimmer GUI DSL code (from samples/cube/hello_cube.rb):
require_relative '../../lib/glimmer-cp-cube' # Use `require 'glimmer-cp-cube'` if gem is installed
class HelloCube
include Glimmer::UI::CustomShell
body {
shell {
text 'Hello, Cube!'
minimum_size 310, 200
canvas {
background :white
text('Cubes can be dragged and moved', :default, 30) {
font height: 16, style: :bold
}
cube(location_x: 30, location_y: 70, cube_height: 50, rectangle_width: 50, rectangle_height: 25, pitted: false, background_color: rgb(255, 255, 64), line_thickness: 2) { |c|
drag_and_move true
}
cube(location_x: 130, location_y: 70, cube_height: 50, rectangle_width: 50, rectangle_height: 25, pitted: false, background_color: rgb(255, 64, 255), line_thickness: 2) { |c|
drag_and_move true
}
cube(location_x: 230, location_y: 70, cube_height: 50, rectangle_width: 50, rectangle_height: 25, pitted: true, background_color: rgb(64, 255, 255), line_thickness: 2) { |c|
drag_and_move true
on_mouse_up do
c.pitted = !c.pitted
end
}
}
}
}
end
HelloCube.launch
Hello, Cube!
If you need new features or spot things that need to be fixed or improved, please report in an Issue or submit a Pull Request.
Copyright (c) 2022 - Andy Maleh.
--
Built for Glimmer DSL for SWT (JRuby Desktop Development GUI Framework).
FAQs
Unknown package
We found that glimmer-cp-cube demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.