https://github.com/flori/tins
This Is Not Spruz
https://github.com/flori/tins
Last synced: about 6 hours ago
JSON representation
Repository metadata
This Is Not Spruz
- Host: GitHub
- URL: https://github.com/flori/tins
- Owner: flori
- License: other
- Created: 2011-09-23T19:04:03.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2026-04-14T19:07:46.000Z (17 days ago)
- Last Synced: 2026-04-19T19:09:08.320Z (12 days ago)
- Language: Ruby
- Homepage:
- Size: 687 KB
- Stars: 22
- Watchers: 1
- Forks: 11
- Open Issues: 0
- Releases: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
README.md
Tins - Useful tools library in Ruby
Description
A collection of useful Ruby utilities that extend the standard library with
practical conveniences. Tins provides lightweight, dependency-free tools for
common programming tasks.
Documentation
Complete API documentation is available at: GitHub.io
Installation
Add this line to your application's Gemfile:
gem 'tins'
Or:
gem 'tins', require 'tins/xt'
to automatically extend some core classes with useful methods.
And then execute:
$ bundle install
Or install it yourself as:
$ gem install tins
Usage
# Load all utilities
require 'tins'
# Load all utilities and extends core classes with useful methods
require 'tins/xt'
Some Usage Examples
Duration Handling
require 'tins/duration'
duration = Tins::Duration.new(9000)
puts duration.to_s # "02:30:00"
puts duration.to_i # 9000 (seconds)
# Parse durations from strings
Tins::Duration.parse('2h 30m', template: '%hh %mm') # 9000 (seconds)
Unit Conversion
require 'tins/unit'
bytes = Tins::Unit.parse('1.5 GB', unit: ?B).to_i # => 1610612736
puts Tins::Unit.format(bytes, unit: 'B') # "1.500000 GB"
Secure File Writing
require 'tins/xt/secure_write'
# Write files safely (atomic operation)
File.secure_write('config.json', '{"key": "value"}')
Time Freezing for Testing
require 'tins/xt/time_freezer'
# Freeze time during testing
Tins::TimeFreezer.freeze(Time.new('2011-12-13 14:15:16')) do
puts Time.now # Always returns the frozen time
end
Building blocks for DSLs
class Foo
include Tins::DynamicScope
def let(bindings = {})
dynamic_scope do
bindings.each { |name, value| send("#{name}=", value) }
yield
end
end
def twice(x)
2 * x
end
def test
let x: 1, y: twice(1) do
let z: twice(x) do
"#{x} * #{y} == #{z} # => #{x * y == twice(x)}"
end
end
end
end
Foo.new.test # "1 * 2 == 2 # => true"
Core Class Extensions (xt)
When you require tins/xt, some useful methods are added to core classes:
default_options = {
format: :json,
timeout: 30,
retries: 3
}
user_options = { timeout: 60 }
options = user_options | default_options
# => { format: :json, timeout: 60, retries: 3 }
'1.10.3'.version < '1.9.2'.version # => false
add_one = -> x { x + 1 }
multiply_by_two = -> x { x * 2 }
composed = multiply_by_two * add_one
composed.(5) # => 12
# For Testing
>> o = Object.new
>> o.puts # => private method, NoMethodError
>> o = o.expose
>> o.puts "hello"
hello
Hash Symbolization
require 'tins/hash_symbolize_keys_recursive'
hash = {
'name' => 'John',
'age' => 30,
'address' => {
'street' => '123 Main St'
}
}
hash.symbolize_keys_recursive! # Converts all keys to symbols recursively
Author
License
Owner metadata
- Name: Florian Frank
- Login: flori
- Email:
- Kind: user
- Description:
- Website:
- Location: Berlin, Germany
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/15918?u=7fbe6878fe6f97c20d1a5a4fce900dae1154c98e&v=4
- Repositories: 97
- Last ynced at: 2024-04-23T11:23:12.550Z
- Profile URL: https://github.com/flori
GitHub Events
Total
- Release event: 8
- Fork event: 1
- Issue comment event: 3
- Push event: 21
- Create event: 7
Last Year
- Release event: 8
- Fork event: 1
- Issue comment event: 3
- Push event: 18
- Create event: 5
Committers metadata
Last synced: 4 days ago
Total Commits: 542
Total Committers: 7
Avg Commits per committer: 77.429
Development Distribution Score (DDS): 0.018
Commits in past year: 174
Committers in past year: 2
Avg Commits per committer in past year: 87.0
Development Distribution Score (DDS) in past year: 0.011
| Name | Commits | |
|---|---|---|
| Florian Frank | f****i@p****e | 532 |
| Tobias | t@t****e | 3 |
| Diego Elio Pettenò | f****s@f****u | 2 |
| Colin Kelley | c****n@i****m | 2 |
| Otto Urpelainen | o****e@i****i | 1 |
| Jens Fahnenbruck | j****x@m****m | 1 |
| Janosch Müller | j****r@b****g | 1 |
Committer domains:
- betterplace.org: 1
- me.com: 1
- iki.fi: 1
- invoca.com: 1
- flameeyes.eu: 1
- tobiasjordans.de: 1
- ping.de: 1
Issue and Pull Request metadata
Last synced: 30 days ago
Total issues: 12
Total pull requests: 13
Average time to close issues: about 2 years
Average time to close pull requests: 3 months
Total issue authors: 12
Total pull request authors: 8
Average comments per issue: 1.33
Average comments per pull request: 0.92
Merged pull request: 5
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 3
Past year average time to close issues: N/A
Past year average time to close pull requests: 3 months
Past year issue authors: 0
Past year pull request authors: 2
Past year average comments per issue: 0
Past year average comments per pull request: 1.67
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- arfl (1)
- Peeja (1)
- ppeble (1)
- jaynetics (1)
- lion-man44 (1)
- tordans (1)
- axilleas (1)
- wildlyinaccurate (1)
- Ana06 (1)
- graaff (1)
- PikachuEXE (1)
- oturpe (1)
Top Pull Request Authors
- tordans (3)
- oturpe (3)
- parkr (2)
- Flameeyes (1)
- jigfox (1)
- katrinundfritz (1)
- jaynetics (1)
- ColinDKelley (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 14
-
Total downloads:
- rubygems: 239,161,330 total
- Total docker downloads: 1,222,647,138
- Total dependent packages: 133 (may contain duplicates)
- Total dependent repositories: 17,966 (may contain duplicates)
- Total versions: 417
- Total maintainers: 1
gem.coop: tins
All the stuff that isn't good/big enough for a real library.
- Homepage: https://github.com/flori/tins
- Documentation: http://www.rubydoc.info/gems/tins/
- Licenses: MIT
- Latest release: 1.53.0 (published 17 days ago)
- Last Synced: 2026-04-27T15:01:28.575Z (4 days ago)
- Versions: 135
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 119,580,665 Total
- Docker Downloads: 611,323,569
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.071%
- Downloads: 0.213%
- Maintainers (1)
ubuntu-20.04: ruby-tins
- Homepage: https://github.com/flori/tins
- Licenses: other
- Latest release: 1.1.0-2 (published 3 months ago)
- Last Synced: 2026-03-13T14:25:41.679Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Forks count: 0.685%
- Average: 0.727%
- Stargazers count: 2.222%
rubygems.org: tins
All the stuff that isn't good/big enough for a real library.
- Homepage: https://github.com/flori/tins
- Documentation: http://www.rubydoc.info/gems/tins/
- Licenses: MIT
- Latest release: 1.53.0 (published 17 days ago)
- Last Synced: 2026-04-27T15:21:06.678Z (4 days ago)
- Versions: 135
- Dependent Packages: 133
- Dependent Repositories: 17,966
- Downloads: 119,580,665 Total
- Docker Downloads: 611,323,569
-
Rankings:
- Downloads: 0.206%
- Docker downloads count: 0.248%
- Dependent packages count: 0.26%
- Dependent repos count: 0.268%
- Average: 3.437%
- Forks count: 8.314%
- Stargazers count: 11.323%
- Maintainers (1)
proxy.golang.org: github.com/flori/tins
- Homepage:
- Documentation: https://pkg.go.dev/github.com/flori/tins#section-documentation
- Licenses: other
- Latest release: v1.53.0 (published 16 days ago)
- Last Synced: 2026-04-27T15:21:08.037Z (4 days ago)
- Versions: 136
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Forks count: 6.374%
- Stargazers count: 7.895%
- Average: 8.662%
- Dependent packages count: 9.576%
- Dependent repos count: 10.802%
debian-11: ruby-tins
- Homepage: https://github.com/flori/tins
- Documentation: https://packages.debian.org/bullseye/ruby-tins
- Licenses:
- Latest release: 1.1.0-2 (published 3 months ago)
- Last Synced: 2026-03-13T10:28:26.264Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-22.04: ruby-tins
- Homepage: https://github.com/flori/tins
- Licenses:
- Latest release: 1.1.0-2 (published 3 months ago)
- Last Synced: 2026-03-13T23:40:28.438Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-23.10: ruby-tins
- Homepage: https://github.com/flori/tins
- Licenses:
- Latest release: 1.1.0-2 (published 3 months ago)
- Last Synced: 2026-03-14T03:15:45.910Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-10: ruby-tins
- Homepage: https://github.com/flori/tins
- Documentation: https://packages.debian.org/buster/ruby-tins
- Licenses:
- Latest release: 1.1.0-1 (published 3 months ago)
- Last Synced: 2026-03-14T03:02:25.347Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-23.04: ruby-tins
- Homepage: https://github.com/flori/tins
- Licenses:
- Latest release: 1.1.0-2 (published 3 months ago)
- Last Synced: 2026-03-11T15:30:50.028Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-24.10: ruby-tins
- Homepage: https://github.com/flori/tins
- Licenses:
- Latest release: 1.32.1-1 (published 3 months ago)
- Last Synced: 2026-03-09T18:23:03.012Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
guix: ruby-tins
Assorted tools for Ruby
- Homepage: https://github.com/flori/tins
- Documentation: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ruby-xyz.scm#n7236
- Licenses: expat
- Latest release: 1.29.1 (published about 2 months ago)
- Last Synced: 2026-04-27T16:17:08.712Z (4 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-12: ruby-tins
- Homepage: https://github.com/flori/tins
- Documentation: https://packages.debian.org/bookworm/ruby-tins
- Licenses:
- Latest release: 1.1.0-2 (published 3 months ago)
- Last Synced: 2026-03-13T03:29:11.266Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-13: ruby-tins
- Homepage: https://github.com/flori/tins
- Documentation: https://packages.debian.org/trixie/ruby-tins
- Licenses:
- Latest release: 1.32.1-1 (published 3 months ago)
- Last Synced: 2026-03-14T18:11:55.629Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
Dependencies
- byebug >= 0 development
- term-ansicolor >= 0 development
- actions/checkout v3 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/autobuild v2 composite
- github/codeql-action/init v2 composite
- actions/checkout v4 composite
- actions/configure-pages v5 composite
- actions/deploy-pages v4 composite
- actions/upload-pages-artifact v3 composite
- ruby/setup-ruby v1 composite
Score: 26.139906016733583