Every gem contains a name, version and platform. Gems work only on ruby designed for a particular platform based on
CPU architecture and operating-system type and version. Each gem consists of: • Code • Documentation • Gem specification (Gemspec) The code organization follows the following structure for a gem called
gem_name: gem_name/ ├── bin/ │ └── gem_name ├── lib/ │ └── gem_name.rb ├── test/ │ └── test_gem_name.rb ├── README ├── Rakefile └── gem_name.gemspec • The lib directory contains the code for the gem. • The test (or spec) directory is used for testing. • Rakefile is used by
Rake to automate tests and to generate code. •
README includes the documentation,
RDOC, for most gems. • Gem specification (gemspec) contains information about the author of the gem, the time of creation and the purpose the gem serves. ==Security concerns==