CSG Chamorro π΄
Learn Chamorro words and phrases with your Ruby projects! A gem built by Code School of Guam students to preserve and share the Chamorro language.
π Now published on RubyGems.org! Install with: gem install csg_chamorro
Table of Contents
- Why This Gem?
- What's Included
- Project Structure
- Installation
- Usage
- Examples
- Testing Locally
- Development
- Contributing
- Publishing
Why This Gem?
The Chamorro language is an important part of Guam's cultural heritage. This gem helps:
- Preserve the language through technology
- Share Chamorro words with developers worldwide
- Learn basic Chamorro phrases in an accessible way
- Integrate language learning into daily development work
What's Included
The gem includes 12 common Chamorro words and phrases:
- HΓ₯fa Adai - Hello
- Si Yu'os Ma'Γ₯se' - Thank you
- Inafa'maolek - Harmony/To make good
- Biba - Long live/Hurray
- HΓ₯gat - Hello (casual)
- Adios - Goodbye
- PΓ₯go - Now
- GuΓ₯han - Guam
- I ManΓ₯mko' - The elders
- NΓ₯na - Mother
- TΓ₯ta - Father
- Hafa tatatmanu hao? - How are you?
Each word includes:
- Chamorro spelling
- English translation
- Pronunciation guide
- Usage context
- Example sentence
π Project Structure
Understanding what each file and folder does:
csg_chamorro/
βββ lib/ β Your Ruby code lives here
β βββ csg_chamorro.rb β Main file with all the methods
β βββ csg_chamorro/
β βββ version.rb β Just the version number (0.1.0)
β
βββ bin/ β Executable command-line tools
β βββ csg_chamorro β The CLI script (runs when you type 'csg_chamorro')
β
βββ test/ β Automated tests
β βββ csg_chamorro_test.rb β Tests all the methods work correctly
β
βββ csg_chamorro.gemspec β Gem metadata (name, version, description, etc.)
βββ Gemfile β Lists dependencies (what other gems this needs)
βββ Gemfile.lock β Locks exact versions of dependencies
βββ Rakefile β Defines tasks you can run (rake word, rake list, etc.)
βββ README.md β Documentation (this file!)
βββ LICENSE.txt β MIT License (how others can use your code)
What Each Folder Does:
lib/ - The main code
- This is where your actual Ruby code lives
-
lib/csg_chamorro.rbis the "entry point" - it's what runs when someone doesrequire 'csg_chamorro' -
lib/csg_chamorro/version.rbstores the version number - Ruby convention: main file name matches the gem name
bin/ - Command-line executables
- Contains scripts that users can run from the terminal
-
bin/csg_chamorrois the CLI tool - After installing the gem, typing
csg_chamorroin terminal runs this file - Must start with
#!/usr/bin/env ruby(tells system to run it with Ruby)
test/ - Automated tests
- Contains test files that verify your code works
-
test/csg_chamorro_test.rbhas 11 tests - Run with:
ruby test/csg_chamorro_test.rb - Uses Minitest framework (comes with Ruby)
What Each File Does:
csg_chamorro.gemspec - Gem specification
- Tells RubyGems everything about your gem
- Name, version, authors, description
- What files to include in the gem package
- What dependencies it needs
- Required for building the gem
Gemfile - Dependency management
- Lists gems your project depends on
- In our case, just says
gemspec(use dependencies from .gemspec) - Run
bundle installto install dependencies - Creates
Gemfile.lockwith exact versions
Rakefile - Task definitions
- Defines shortcuts for common tasks
-
rake word- print a random word -
rake list- list all words -
rake test- run tests -
rake version- show version - Like npm scripts, but for Ruby
README.md - Documentation
- First thing people see on GitHub
- Explains what the gem does
- Shows how to install and use it
- Includes examples
LICENSE.txt - Legal stuff
- MIT License (very permissive)
- Says others can use, modify, and share your code
- Required if you publish to RubyGems.org
Installation
This gem is published on RubyGems.org! Anyone can install it:
gem install csg_chamorroOr add to your Gemfile:
gem 'csg_chamorro'Then run bundle install.
π Note for students: This reference gem is already published, so you can install it right away! However, when you create YOUR own gem, it won't be installable via
gem installuntil you publish it to RubyGems.org (see "Publishing" section below). Until then, test it locally using the "Testing Locally" section!
Usage
In Ruby
require 'csg_chamorro'
# Get a random Chamorro word
word = CSGChamorro.word_of_day
puts word[:chamorro] # => "HΓ₯fa Adai"
puts word[:english] # => "Hello"
puts word[:pronunciation] # => "half-a-day"
# Get a nicely formatted word
puts CSGChamorro.pretty
# =>
# π Chamorro Word of the Day
#
# Chamorro: HΓ₯fa Adai
# English: Hello
# Pronunciation: half-a-day
# Usage: Traditional Chamorro greeting used throughout the day
# Example: "HΓ₯fa Adai! Welcome to Guam!"
# Get all words
all_words = CSGChamorro.all_words # => Array of 12 words
# Count total words
CSGChamorro.count # => 12
# Search for a word
results = CSGChamorro.search("thank")
# => [{chamorro: "Si Yu'os Ma'Γ₯se'", english: "Thank you", ...}]
# Get a random greeting
greeting = CSGChamorro.random_greetingCommand Line
# Random word of the day
csg_chamorro
# => HΓ₯fa Adai - Hello
# Formatted output
csg_chamorro --pretty
# => Full formatted output with pronunciation and example
# Show all words
csg_chamorro --all
# Count words
csg_chamorro --count
# => Total Chamorro words: 12
# Get a random greeting
csg_chamorro --greeting
# Search for a word
csg_chamorro --search "hello"
# Help
csg_chamorro --helpExamples
Terminal Greeting
require 'csg_chamorro'
# Print a Chamorro word every time you open your terminal
# Add to your ~/.zshrc or ~/.bashrc:
# ruby -e "require 'csg_chamorro'; puts CSGChamorro.pretty"Slack Bot
require 'csg_chamorro'
# Send a Chamorro word to your team Slack
word = CSGChamorro.word_of_day
message = "π΄ Chamorro Word of the Day: #{word[:chamorro]} (#{word[:english]})\n" \
"Pronunciation: #{word[:pronunciation]}\n" \
"#{word[:usage]}"
# send_to_slack(message)Learning App
require 'csg_chamorro'
# Quiz yourself on Chamorro words
word = CSGChamorro.word_of_day
puts "What does '#{word[:chamorro]}' mean?"
# ... get user input ...
puts word[:english]π§ͺ Testing Locally (For Developers)
Want to test this gem before installing? Here's how:
Quick Test in IRB
# Navigate to the gem folder
cd csg_chamorro
# Open IRB
irbThen load and test the gem:
# Load the gem
require './lib/csg_chamorro'
# Test the methods
CSGChamorro.word_of_day
CSGChamorro.pretty
CSGChamorro.search("hello")
CSGChamorro.random_greetingRun the Tests
ruby test/csg_chamorro_test.rbShould see: 11 runs, 15 assertions, 0 failures
Test Rake Tasks
bundle install # First time only
rake word # Random word
rake list # All words
rake version # Show version
rake test # Run testsBuild & Install Locally
# Build the gem
gem build csg_chamorro.gemspec
# Creates: csg_chamorro-0.1.0.gem
# Install it
gem install ./csg_chamorro-0.1.0.gem
# Test it works
csg_chamorro --prettyDevelopment
After checking out the repo:
bundle install
bundle exec rake -T # See available tasksRun tests:
ruby test/csg_chamorro_test.rbBuild and install locally:
gem build csg_chamorro.gemspec
gem install ./csg_chamorro-0.1.0.gemContributing
We welcome contributions from everyone! Whether you're a student, a Chamorro language speaker, or just someone interested in preserving indigenous languages, your help is appreciated! π΄
Ways to Contribute:
1. Add More Chamorro Words
We currently have 12 words, but there are so many more to share!
How to add words:
- Fork the repository
- Open
lib/csg_chamorro.rb - Add a new word to the
WORDSarray following this format:{ chamorro: "Your Chamorro word", english: "English translation", pronunciation: "how-to-say-it", usage: "When and how it's used", example: "Example sentence showing usage" }
- Submit a pull request with your changes!
Ideas for words to add:
- Common greetings and phrases
- Family terms (siblings, grandparents, etc.)
- Numbers (one, two, three...)
- Days of the week
- Food and cooking terms
- Nature and animals
- Actions and verbs
2. Improve Pronunciations
Help make our pronunciation guides clearer! If you're a native speaker or have better phonetic knowledge, we'd love your input.
3. Add Tests
Help us ensure accuracy by adding more test cases in test/csg_chamorro_test.rb.
4. Fix Typos or Errors
Found a mistake in spelling, pronunciation, or usage? Please let us know or submit a fix!
5. Share Ideas
Open an issue to suggest:
- New features (search by category, difficulty levels, etc.)
- Additional word metadata (parts of speech, cultural context)
- Better examples or usage explanations
- Integration ideas
Contribution Guidelines:
- Be respectful of the Chamorro language and culture
- Verify accuracy - if you're not sure about a word, ask or provide sources
- Follow the existing format to keep the gem consistent
- Test your changes before submitting
- Write clear commit messages (e.g., "Add 5 new family-related words")
Questions?
Not sure how to contribute? Open an issue and ask! We're here to help and appreciate all levels of contribution. Si Yu'os Ma'Γ₯se' (Thank you!) for helping preserve the Chamorro language! π΄
About Chamorro Language
Chamorro is the indigenous language of the Mariana Islands (Guam and Northern Mariana Islands). It's a vital part of the island's cultural identity and is actively preserved through education and community programs.
Resources for learning more:
π Publishing to RubyGems.org (Optional)
Want to share this gem with the world? Here's how to publish it:
Step 1: Create a RubyGems.org Account
- Go to rubygems.org
- Sign up (it's free!)
- Verify your email
Step 2: Sign In and Create API Key
Run gem signin and follow the prompts:
gem signin
# Enter your RubyGems.org credentials
# Give your API key a name (e.g., "CSG-RubyGems")
# When asked "Do you want to customise scopes? [yN]"
# - Type "N" (easiest - we'll add permissions on the website)
# - OR type "Y" and manually add scopes in the terminalStep 3: Add Push Permissions to Your API Key
Important: By default, the API key only has "Index" permissions. You need to add Push!
- Go to https://rubygems.org/settings/api_keys
- Click "Edit" on the API key you just created
- Under Scopes, check:
- β Push rubygem (required to publish - this is the one you need!)
- β Index rubygems (already checked)
- Optional: Yank rubygem (to unpublish if needed)
- Click "Update API Key"
You're now ready to publish! No need to sign in again.
π‘ Note: If you typed "Y" in step 2 and added Push permissions in the terminal, you can skip this step!
Step 4: Build Your Gem
gem build csg_chamorro.gemspec
# Creates: csg_chamorro-0.1.0.gemStep 5: Push to RubyGems
gem push csg_chamorro-0.1.0.gemYou'll see:
Pushing gem to https://rubygems.org...
Successfully registered gem: csg_chamorro (0.1.0)
Step 6: Verify It's Live
- Visit
https://rubygems.org/gems/csg_chamorro - Try installing:
gem install csg_chamorro
Now anyone in the world can use your gem! π
Updating Your Gem
When you make changes:
- Update version in
lib/csg_chamorro/version.rb(e.g.,0.1.0β0.1.1) - Rebuild:
gem build csg_chamorro.gemspec - Push:
gem push csg_chamorro-0.1.1.gem
Built by Code School of Guam π΄
This gem was created as a learning project by students at Code School of Guam to:
- Learn Ruby gem development
- Practice version control and collaboration
- Contribute to cultural preservation
- Build portfolio-worthy projects
Learn more at https://codeschoolofguam.com
License
MIT License - see LICENSE.txt
Si Yu'os Ma'Γ₯se' (Thank You!)
Thank you for helping preserve and share the Chamorro language through technology! π΄
Biba GuΓ₯han! (Long live Guam!)