https://github.com/cjheath/polyglot
Augment 'require' to load non-ruby file types
https://github.com/cjheath/polyglot
Keywords from Contributors
rubygems
Last synced: about 22 hours ago
JSON representation
Repository metadata
Augment 'require' to load non-ruby file types
- Host: GitHub
- URL: https://github.com/cjheath/polyglot
- Owner: cjheath
- License: mit
- Created: 2009-04-29T02:58:32.000Z (almost 17 years ago)
- Default Branch: master
- Last Pushed: 2014-05-30T02:22:11.000Z (almost 12 years ago)
- Last Synced: 2026-02-24T05:22:59.130Z (7 days ago)
- Language: JavaScript
- Homepage: http://polyglot.rubyforge.org/
- Size: 209 KB
- Stars: 50
- Watchers: 2
- Forks: 12
- Open Issues: 0
- Releases: 0
-
Metadata Files:
- Readme: README.txt
- Changelog: History.txt
- License: License.txt
README.txt
= polyglot
* http://github.com/cjheath/polyglot
== DESCRIPTION:
Author: Clifford Heath, 2007
The Polyglot library allows a Ruby module to register a loader
for the file type associated with a filename extension, and it
augments 'require' to find and load matching files.
This supports the creation of DSLs having a syntax that is most
appropriate to their purpose, instead of abusing the Ruby syntax.
Files are sought using the normal Ruby search path.
== EXAMPLE:
In file rubyglot.rb, define and register a file type handler:
require 'polyglot'
class RubyglotLoader
def self.load(filename, options = nil, &block)
File.open(filename) {|file|
# Load the contents of file as Ruby code:
# Implement your parser here instead!
Kernel.eval(file.read)
}
end
end
Polyglot.register("rgl", RubyglotLoader)
In file test.rb:
require 'rubyglot' # Create my file type handler
require 'hello' # Can add extra options or even a block here
puts "Ready to go"
Hello.new
In file hello.rgl (this simple example uses Ruby code):
puts "Initializing"
class Hello
def initialize()
puts "Hello, world\n"
end
end
Run:
$ ruby test.rb
Initializing
Ready to go
Hello, world
$
== INSTALL:
sudo gem install polyglot
== LICENSE:
(The MIT License)
Copyright (c) 2007 Clifford Heath
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Owner metadata
- Name: Clifford Heath
- Login: cjheath
- Email:
- Kind: user
- Description: Enterprise software product architect, data modeller and inventor.
- Website: http://dataconstellation.com/
- Location: Sydney Australia
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/1703?u=04b7a340657fdb3eb2ed94dd12e463562d76ddfd&v=4
- Repositories: 81
- Last ynced at: 2023-04-09T05:07:01.555Z
- Profile URL: https://github.com/cjheath
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers metadata
Last synced: 1 day ago
Total Commits: 31
Total Committers: 3
Avg Commits per committer: 10.333
Development Distribution Score (DDS): 0.097
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| Clifford Heath | c****h@g****m | 28 |
| Jeremy Kemper | j****y@b****t | 2 |
| Jason Garber | jg@j****m | 1 |
Committer domains:
- jasongarber.com: 1
- bitsweat.net: 1
Issue and Pull Request metadata
Last synced: 19 days ago
Total issues: 9
Total pull requests: 1
Average time to close issues: 1 day
Average time to close pull requests: 2 days
Total issue authors: 9
Total pull request authors: 1
Average comments per issue: 4.0
Average comments per pull request: 3.0
Merged pull request: 0
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- jgarber (1)
- victorbstan (1)
- alex-rodriguez (1)
- jfirebaugh (1)
- damiencuvillier (1)
- grimen (1)
- lokenmakwana (1)
- jimsynz (1)
- sarahzrf (1)
Top Pull Request Authors
- pusewicz (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 12
-
Total downloads:
- rubygems: 194,505,093 total
- Total docker downloads: 553,060,514
- Total dependent packages: 68 (may contain duplicates)
- Total dependent repositories: 328,754 (may contain duplicates)
- Total versions: 50
- Total maintainers: 3
gem.coop: polyglot
The Polyglot library allows a Ruby module to register a loader for the file type associated with a filename extension, and it augments 'require' to find and load matching files.
- Homepage: http://github.com/cjheath/polyglot
- Documentation: http://www.rubydoc.info/gems/polyglot/
- Licenses: MIT
- Latest release: 0.3.5 (published almost 12 years ago)
- Last Synced: 2026-03-02T07:31:29.903Z (1 day ago)
- Versions: 17
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 97,257,227 Total
- Docker Downloads: 276,530,257
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.165%
- Downloads: 0.255%
- Docker downloads count: 0.404%
- Maintainers (1)
rubygems.org: polyglot
The Polyglot library allows a Ruby module to register a loader for the file type associated with a filename extension, and it augments 'require' to find and load matching files.
- Homepage: http://github.com/cjheath/polyglot
- Documentation: http://www.rubydoc.info/gems/polyglot/
- Licenses: MIT
- Latest release: 0.3.5 (published almost 12 years ago)
- Last Synced: 2026-03-01T12:22:47.811Z (2 days ago)
- Versions: 17
- Dependent Packages: 63
- Dependent Repositories: 328,754
- Downloads: 97,247,866 Total
- Docker Downloads: 276,530,257
-
Rankings:
- Dependent repos count: 0.064%
- Downloads: 0.2%
- Dependent packages count: 0.44%
- Docker downloads count: 0.495%
- Average: 2.715%
- Forks count: 7.416%
- Stargazers count: 7.678%
- Maintainers (1)
alpine-v3.3: ruby-polyglot
Augment 'require' to load non-ruby file types
- Homepage: https://github.com/cjheath/polyglot
- Licenses: MIT
- Latest release: 0.3.5-r1 (published over 10 years ago)
- Last Synced: 2026-02-03T03:22:25.942Z (28 days ago)
- Versions: 1
- Dependent Packages: 3
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Stargazers count: 4.404%
- Forks count: 5.241%
- Average: 6.888%
- Dependent packages count: 17.907%
- Maintainers (1)
proxy.golang.org: github.com/cjheath/polyglot
- Homepage:
- Documentation: https://pkg.go.dev/github.com/cjheath/polyglot#section-documentation
- Licenses: mit
- Latest release: v0.3.5 (published almost 12 years ago)
- Last Synced: 2026-03-01T12:22:48.399Z (2 days ago)
- Versions: 4
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Forks count: 5.604%
- Stargazers count: 5.86%
- Average: 7.96%
- Dependent packages count: 9.576%
- Dependent repos count: 10.802%
alpine-v3.18: ruby-polyglot
Augment 'require' to load non-ruby file types
- Homepage: https://github.com/cjheath/polyglot
- Licenses: MIT
- Latest release: 0.3.5-r1 (published almost 3 years ago)
- Last Synced: 2026-02-03T16:14:25.592Z (28 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 11.422%
- Stargazers count: 22.508%
- Forks count: 23.181%
- Maintainers (1)
alpine-edge: ruby-polyglot
Augment 'require' to load non-ruby file types
- Homepage: https://github.com/cjheath/polyglot
- Licenses: MIT
- Latest release: 0.3.5-r3 (published 10 months ago)
- Last Synced: 2026-02-02T13:38:51.894Z (29 days ago)
- Versions: 4
- Dependent Packages: 1
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 6.031%
- Average: 13.403%
- Stargazers count: 23.662%
- Forks count: 23.92%
- Maintainers (1)
alpine-v3.17: ruby-polyglot
Augment 'require' to load non-ruby file types
- Homepage: https://github.com/cjheath/polyglot
- Licenses: MIT
- Latest release: 0.3.5-r0 (published over 3 years ago)
- Last Synced: 2026-02-03T03:22:45.489Z (28 days ago)
- Versions: 1
- Dependent Packages: 1
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Average: 14.94%
- Dependent packages count: 18.951%
- Stargazers count: 20.119%
- Forks count: 20.692%
- Maintainers (1)
alpine-v3.22: ruby-polyglot
Augment 'require' to load non-ruby file types
- Homepage: https://github.com/cjheath/polyglot
- Licenses: MIT
- Latest release: 0.3.5-r3 (published 10 months ago)
- Last Synced: 2026-02-03T03:22:53.995Z (28 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
alpine-v3.23: ruby-polyglot
Augment 'require' to load non-ruby file types
alpine-v3.20: ruby-polyglot
Augment 'require' to load non-ruby file types
- Homepage: https://github.com/cjheath/polyglot
- Licenses: MIT
- Latest release: 0.3.5-r2 (published about 2 years ago)
- Last Synced: 2026-02-03T13:19:14.372Z (28 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
alpine-v3.21: ruby-polyglot
Augment 'require' to load non-ruby file types
- Homepage: https://github.com/cjheath/polyglot
- Licenses: MIT
- Latest release: 0.3.5-r2 (published about 2 years ago)
- Last Synced: 2026-02-03T03:22:51.456Z (28 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
alpine-v3.19: ruby-polyglot
Augment 'require' to load non-ruby file types
- Homepage: https://github.com/cjheath/polyglot
- Licenses: MIT
- Latest release: 0.3.5-r1 (published almost 3 years ago)
- Last Synced: 2026-02-02T15:11:47.681Z (29 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
Score: 25.443408825582438