infinities 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YjVmMjA2MDQ1NDI1NjRlZWQ1ZDA4MTNjMzNiMjg1ZjNiZGNiMGRkNg==
5
+ data.tar.gz: !binary |-
6
+ MWM2YjRjMmQ3NzQ5ZWNlYTMwMTUyMmFkYzNmNjI4YzNkZDU0YTBiZQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ NmEwNWYzNjAxMzVlZmIxY2EzNDYxNzIyODA4MTc2Y2I3MjlmZmY1ZjcwMDNj
10
+ ZDUzY2NmYWFlN2FiOTZjOTk1YzcwYzhiMGM4MWVlMTAwMzRkZmIwZDQ4Mjdl
11
+ YzIyMjMwOTg4NDE1MTkzZDRkZDZmNDVjNzE5ZGM4ODJlZTViZjk=
12
+ data.tar.gz: !binary |-
13
+ OGJmYTA5YTYxMjFlODgzNzkwN2UwNDEyNzNjYWQ2ZjM1NzhkZmI2NGE2NWZl
14
+ YzU2ZTkyZDAzYjIzNDc5NzA0ODY5ZDA3YzA1MzM1Mjc5ZmU5YmQxNDM0Yzhh
15
+ YTBiN2Q4ZDI1YWJmOTE4MTg3MmUxZWI4YmFjZTIzZDRhZDdhZDY=
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ script: bundle exec rake test
3
+ rvm:
4
+ - 2.2
5
+ - 2.1
6
+ - 1.9
7
+ - ruby-head
8
+ - jruby-19mode
9
+ - jruby-9
10
+ - rbx-2.5.2
@@ -0,0 +1,25 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, # Contributor Code of Conduct
4
+
5
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
6
+
7
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
8
+
9
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
10
+
11
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
12
+
13
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
14
+
15
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)submitting pull requests or patches, and other activities.
16
+
17
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
18
+
19
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
20
+
21
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
22
+
23
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
24
+
25
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in infinities.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Faraz Yashar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,28 @@
1
+ # Infinities ∞
2
+
3
+ **INFINITY ∞ for the infinitely lazy.**
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/infinities.svg)](http://badge.fury.io/rb/infinities)
6
+ [![Build Status](https://travis-ci.org/fny/infinities.svg?branch=master)](https://travis-ci.org/fny/infinities)
7
+
8
+ Annoyed by typing `Float::INFINITY`? Wish you could just use the word or symbol instead?
9
+
10
+ require 'infinities/symbols'
11
+ ∞ # => Infinity
12
+
13
+ require 'infinities/words'
14
+ INFINITY # => Infinity
15
+
16
+ If you require `BigDecimal` before loading any infinities, you get more goodies:
17
+
18
+ require 'bigdecimal'
19
+
20
+ require 'infinities/symbols'
21
+ BIG∞ # => #<BigDecimal:2428b80,'Infinity',9(9)>
22
+
23
+ require 'infinities/words'
24
+ BIG_INFINITY # => #<BigDecimal:2428b80,'Infinity',9(9)>
25
+
26
+ *Note `BIG∞` is not available on Rubinius until a [certain issue is resolved](https://github.com/rubinius/rubinius/issues/3382).*
27
+
28
+ Require the whole shebang with `require 'infinites/all'`
@@ -0,0 +1,8 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new do |t|
5
+ t.libs << 'lib/infinities'
6
+ t.test_files = FileList['test/**/test_*.rb']
7
+ t.verbose = true
8
+ end
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "infinities"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'infinities'
7
+ spec.version = '1.0.0'
8
+ spec.authors = ["Faraz Yashar"]
9
+ spec.email = ['faraz.yashar@gmail.com']
10
+
11
+ spec.summary = "INFINITY ∞ for the infinitely lazy."
12
+ spec.description = "Too lazy to type out Float::INFINITY or BigDecimal::INFINITY? " \
13
+ "∞ = INFINITY = Float::INFINITY; BIG∞ = BIG_INFINITY = BigDecimal::INFINITY"
14
+ spec.homepage = 'https://github.com/fny/infinities'
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_development_dependency 'bundler', '~> 1.7'
22
+ spec.add_development_dependency 'rake', '~> 10.0'
23
+ spec.add_development_dependency 'minitest', '~> 5.6.0'
24
+ end
@@ -0,0 +1,2 @@
1
+ require 'infinities/symbols'
2
+ require 'infinities/words'
@@ -0,0 +1,9 @@
1
+ # coding: UTF-8
2
+ # Needs to be defined as a method since ∞ is an invalid constant name
3
+ def ∞
4
+ Float::INFINITY
5
+ end
6
+
7
+ if defined?(BigDecimal) && RUBY_ENGINE != 'rbx'
8
+ BIG∞ = BigDecimal::INFINITY
9
+ end
@@ -0,0 +1,5 @@
1
+ INFINITY = Float::INFINITY
2
+
3
+ if defined?(BigDecimal)
4
+ BIG_INFINITY = BigDecimal::INFINITY
5
+ end
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: infinities
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Faraz Yashar
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 5.6.0
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 5.6.0
55
+ description: Too lazy to type out Float::INFINITY or BigDecimal::INFINITY? ∞ = INFINITY
56
+ = Float::INFINITY; BIG∞ = BIG_INFINITY = BigDecimal::INFINITY
57
+ email:
58
+ - faraz.yashar@gmail.com
59
+ executables: []
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - .gitignore
64
+ - .travis.yml
65
+ - CODE_OF_CONDUCT.md
66
+ - Gemfile
67
+ - LICENSE.txt
68
+ - README.md
69
+ - Rakefile
70
+ - bin/console
71
+ - bin/setup
72
+ - infinities.gemspec
73
+ - lib/infinities/all.rb
74
+ - lib/infinities/symbols.rb
75
+ - lib/infinities/words.rb
76
+ homepage: https://github.com/fny/infinities
77
+ licenses:
78
+ - MIT
79
+ metadata: {}
80
+ post_install_message:
81
+ rdoc_options: []
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ requirements: []
95
+ rubyforge_project:
96
+ rubygems_version: 2.4.3
97
+ signing_key:
98
+ specification_version: 4
99
+ summary: INFINITY ∞ for the infinitely lazy.
100
+ test_files: []