pax_global_header 0000666 0000000 0000000 00000000064 13610154250 0014507 g ustar 00root root 0000000 0000000 52 comment=eaac9932d39d7535e3a029d750b43c687bb76ed3 tty-platform-0.3.0/ 0000775 0000000 0000000 00000000000 13610154250 0014151 5 ustar 00root root 0000000 0000000 tty-platform-0.3.0/.github/ 0000775 0000000 0000000 00000000000 13610154250 0015511 5 ustar 00root root 0000000 0000000 tty-platform-0.3.0/.github/FUNDING.yml 0000664 0000000 0000000 00000000024 13610154250 0017322 0 ustar 00root root 0000000 0000000 github: piotrmurach tty-platform-0.3.0/.github/ISSUE_TEMPLATE.md 0000664 0000000 0000000 00000001110 13610154250 0020207 0 ustar 00root root 0000000 0000000 ### Are you in the right place? * For issues or feature requests file a GitHub issue in this repository * For general questions or discussion post in [Gitter](https://gitter.im/piotrmurach/tty) ### Describe the problem A brief description of the issue/feature. ### Steps to reproduce the problem ``` Your code here to reproduce the issue ``` ### Actual behaviour What happened? This could be a description, log output, error raised etc... ### Expected behaviour What did you expect to happen? ### Describe your environment * OS version: * Ruby version: * TTY::Platform version: tty-platform-0.3.0/.github/PULL_REQUEST_TEMPLATE.md 0000664 0000000 0000000 00000000677 13610154250 0021324 0 ustar 00root root 0000000 0000000 ### Describe the change What does this Pull Request do? ### Why are we doing this? Any related context as to why is this is a desirable change. ### Benefits How will the library improve? ### Drawbacks Possible drawbacks applying this change. ### Requirements Put an X between brackets on each line if you have done the item: [] Tests written & passing locally? [] Code style checked? [] Rebased with `master` branch? [] Documentation updated? tty-platform-0.3.0/.gitignore 0000664 0000000 0000000 00000000166 13610154250 0016144 0 ustar 00root root 0000000 0000000 /.bundle/ /.yardoc /Gemfile.lock /_yardoc/ /coverage/ /doc/ /pkg/ /spec/reports/ /tmp/ *.bundle *.so *.o *.a mkmf.log tty-platform-0.3.0/.rspec 0000664 0000000 0000000 00000000036 13610154250 0015265 0 ustar 00root root 0000000 0000000 --color --require spec_helper tty-platform-0.3.0/.travis.yml 0000664 0000000 0000000 00000000564 13610154250 0016267 0 ustar 00root root 0000000 0000000 --- language: ruby before_install: gem install bundler -v '< 2.0' script: bundle exec rake ci rvm: - 2.0.0 - 2.1.10 - 2.2.10 - 2.3.8 - 2.4.9 - 2.5.7 - 2.6.5 - 2.7.0 - ruby-head - jruby-9.2.6.0 - jruby-head matrix: allow_failures: - rvm: ruby-head - rvm: jruby-head fast_finish: true branches: only: master notifications: email: false tty-platform-0.3.0/CHANGELOG.md 0000664 0000000 0000000 00000001155 13610154250 0015764 0 ustar 00root root 0000000 0000000 # Change log ## [v0.3.0] - 2020-01-16 ### Changed * Change gemspec to update metadata and remove test artifacts ## [v0.2.1] - 2019-06-15 ### Changed * Change to relax bundler dependency ## [v0.2.0] - 2018-12-02 ### Changed * Change to Ruby >= 2.0 ## [v0.1.0] - 2015-05-16 * Initial implementation and release [v0.3.0]: https://github.com/piotrmurach/tty-platform/compare/v0.2.1...v0.3.0 [v0.2.1]: https://github.com/piotrmurach/tty-platform/compare/v0.2.0...v0.2.1 [v0.2.0]: https://github.com/piotrmurach/tty-platform/compare/v0.1.0...v0.2.0 [v0.1.0]: https://github.com/piotrmurach/tty-platform/compare/v0.1.0 tty-platform-0.3.0/CODE_OF_CONDUCT.md 0000664 0000000 0000000 00000006235 13610154250 0016756 0 ustar 00root root 0000000 0000000 # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 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, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at piotr@piotrmurach.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ tty-platform-0.3.0/Gemfile 0000664 0000000 0000000 00000000232 13610154250 0015441 0 ustar 00root root 0000000 0000000 source 'https://rubygems.org' gemspec group :metrics do gem 'simplecov', '~> 0.16.1' gem 'coveralls', '~> 0.8.22' gem 'yardstick', '~> 0.9.9' end tty-platform-0.3.0/LICENSE.txt 0000664 0000000 0000000 00000002055 13610154250 0015776 0 ustar 00root root 0000000 0000000 Copyright (c) 2015 Piotr Murach MIT License 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. tty-platform-0.3.0/README.md 0000664 0000000 0000000 00000005575 13610154250 0015444 0 ustar 00root root 0000000 0000000
# TTY::Platform [][gitter] [][gem] [][travis] [][appveyor] [][codeclimate] [][coverage] [][inchpages] [gitter]: https://gitter.im/piotrmurach/tty [gem]: http://badge.fury.io/rb/tty-platform [travis]: http://travis-ci.org/piotrmurach/tty-platform [appveyor]: https://ci.appveyor.com/project/piotrmurach/tty-platform [codeclimate]: https://codeclimate.com/github/piotrmurach/tty-platform [coverage]: https://coveralls.io/github/piotrmurach/tty-platform [inchpages]: http://inch-ci.org/github/piotrmurach/tty-platform > Terminal platform query methods for detecting different operating systems and their properties. **TTY::Platform** provides independent operating system detection component for [TTY](https://github.com/piotrmurach/tty) toolkit. ## Installation Add this line to your application's Gemfile: ```ruby gem 'tty-platform' ``` And then execute: $ bundle Or install it yourself as: $ gem install tty-platform ## 1. Usage With **TTY::Platform** you can find out the properties of your operating system by creating an instance: ```ruby platform = TTY::Platform.new ``` To query for processor name use `cpu` method: ```ruby platform.cpu # => 'x86_64' ``` A `nil` is returned if the value cannot be determined. To get the system/OS name use `os` method: ```ruby platform.os # => 'darwin' ``` A `nil` is returned if the value cannot be determined. To get system's release version use `version` method: ```ruby platform.version # => '10.6.1' ``` A `nil` is returned. Note that many platforms do not provide this information. In addition, you can use more generic methods to check the type of operating system out of `windows`, `linux`, `mac` and `unix`: ```ruby platform.windows? # => false platform.unix? # => true platform.linux? # => false platform.mac? # => true ``` ## Contributing 1. Fork it ( https://github.com/piotrmurach/tty-platform/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request ## Copyright Copyright (c) 2015 Piotr Murach. See LICENSE for further details. tty-platform-0.3.0/Rakefile 0000664 0000000 0000000 00000000217 13610154250 0015616 0 ustar 00root root 0000000 0000000 require 'bundler/gem_tasks' FileList['tasks/**/*.rake'].each(&method(:import)) desc 'Run all specs' task ci: %w[ spec ] task default: :spec tty-platform-0.3.0/appveyor.yml 0000664 0000000 0000000 00000001146 13610154250 0016543 0 ustar 00root root 0000000 0000000 --- install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - gem install bundler -v '< 2.0' - bundle install before_test: - ruby -v - gem -v - bundle -v build: off test_script: - bundle exec rake ci environment: matrix: - ruby_version: "200" - ruby_version: "200-x64" - ruby_version: "21" - ruby_version: "21-x64" - ruby_version: "22" - ruby_version: "22-x64" - ruby_version: "23" - ruby_version: "23-x64" - ruby_version: "24" - ruby_version: "24-x64" - ruby_version: "25" - ruby_version: "25-x64" - ruby_version: "26" - ruby_version: "26-x64" tty-platform-0.3.0/lib/ 0000775 0000000 0000000 00000000000 13610154250 0014717 5 ustar 00root root 0000000 0000000 tty-platform-0.3.0/lib/tty-platform.rb 0000664 0000000 0000000 00000000040 13610154250 0017700 0 ustar 00root root 0000000 0000000 require_relative 'tty/platform' tty-platform-0.3.0/lib/tty/ 0000775 0000000 0000000 00000000000 13610154250 0015537 5 ustar 00root root 0000000 0000000 tty-platform-0.3.0/lib/tty/platform.rb 0000664 0000000 0000000 00000006572 13610154250 0017722 0 ustar 00root root 0000000 0000000 # frozen_string_literal: true require 'rbconfig' require_relative 'platform/version' module TTY # Detects system platform properties # # @api public class Platform WINDOWS_PATTERN = /(cygwin|mswin|mingw|bccwin|wince|emx)/i UNIX_PATTERN = /(aix|arch|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i LINUX_PATTERN = /linux|arch/i MAC_PATTERN = /darwin/i # Returns processor name, e.g. 'amdk6' # # @api public attr_reader :cpu # Returns the system/OS name, e.g. 'darwin' # # @api public attr_reader :os # Returns system's release version, e.g. '10.8.1' # # @api public attr_reader :version # Create platform properties # # @api public def initialize(arch = nil) @cpu, @os, @version = *detect_system_properties(arch) end # Add operating system query methods constants.grep(/PATTERN/).each do |pattern| name = pattern.to_s.split('_').first.downcase system_query = :"#{name}?" define_method(system_query) do match_os?(self.class.const_get(pattern)) end self.class.class_eval do define_method(system_query) do new.public_send(system_query) end end end # Detect if using windows path delimiter # # @return [Boolean] # # @api public def windows_file_path? ::File::ALT_SEPARATOR == '\\' end # Check if platform matches given systems # # @return [Boolean] # # @api public def match_os?(matcher) !!(@os =~ matcher) end # Queries for system architecture information # # @return [String] # # @api public def architecture RbConfig::CONFIG['arch'] end # @return [Array[String]] # # @api public def to_a [@cpu, @os, @version] end # String representation # # @api public def to_s to_a.compact.join('-') end private # Infer system properties from architecture information # # @return [Array[String, String String]] # # @api private def detect_system_properties(arch) parts = (arch || architecture).split('-', 2) if parts.length == 1 @cpu, system = nil, parts.shift else @cpu, system = *parts end @os, @version = *find_os_and_version(system) [@cpu, @os, @version] end # @param [String] system # # @api private def find_os_and_version(system) case system when /aix(\d+(\.\d+)*)?/ then ['aix', $1] when /bccwin(\d+(\.\d+)*)?/ then ['bccwin', $1] when /bitrig(\d+(\.\d+)*)?/ then ['bitrig', $1] when /cygwin/ then ['cygwin', nil] when /darwin(\d+(\.\d+)*)?/ then ['darwin', $1] when /emx/ then ['emx', nil] when /freebsd(\d+(\.\d+)*)?/ then ['freebsd', $1] when /linux(\d+(\.\d+)*)?/ then ['linux', $1] when /mingw32/ then ['mingw32', nil] when /(mswin\d+)((\_|-)(\d+))?/ then [$1, $4] when /netbsdelf/ then ['netbsdelf', nil] when /openbsd(\d+(\.\d+)*)?/ then ['openbsd', $1] when /solaris(\d+(\.\d+)*)?/ then ['solaris', $1] when /wince(\d+(\.\d+)*)?/ then ['wince', $1] else ['unknown', nil] end end end # Platform end # TTY tty-platform-0.3.0/lib/tty/platform/ 0000775 0000000 0000000 00000000000 13610154250 0017363 5 ustar 00root root 0000000 0000000 tty-platform-0.3.0/lib/tty/platform/version.rb 0000664 0000000 0000000 00000000154 13610154250 0021375 0 ustar 00root root 0000000 0000000 # frozen_string_literal: true module TTY class Platform VERSION = "0.3.0" end # Platform end # TTY tty-platform-0.3.0/spec/ 0000775 0000000 0000000 00000000000 13610154250 0015103 5 ustar 00root root 0000000 0000000 tty-platform-0.3.0/spec/spec_helper.rb 0000664 0000000 0000000 00000001612 13610154250 0017721 0 ustar 00root root 0000000 0000000 # frozen_string_literal: true if ENV['COVERAGE'] || ENV['TRAVIS'] require 'simplecov' require 'coveralls' SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([ SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter ]) SimpleCov.start do command_name 'spec' add_filter 'spec' end end require 'tty-platform' RSpec.configure do |config| config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end config.mock_with :rspec do |mocks| mocks.verify_partial_doubles = true end config.filter_run :focus config.run_all_when_everything_filtered = true config.disable_monkey_patching! config.warnings = true if config.files_to_run.one? config.default_formatter = 'doc' end config.profile_examples = 2 config.order = :random Kernel.srand config.seed end tty-platform-0.3.0/spec/unit/ 0000775 0000000 0000000 00000000000 13610154250 0016062 5 ustar 00root root 0000000 0000000 tty-platform-0.3.0/spec/unit/new_spec.rb 0000664 0000000 0000000 00000005022 13610154250 0020211 0 ustar 00root root 0000000 0000000 # frozen_string_literal: true RSpec.describe TTY::Platform, '#new' do it "detects system properties" do allow(RbConfig::CONFIG).to receive(:[]).with('arch').and_return('i686-darwin8.10.1') platform = TTY::Platform.new expect(platform.cpu).to eq('i686') expect(platform.os).to eq('darwin') expect(platform.version).to eq('8.10.1') end { # aix 'powerpc-aix7.1' => ['powerpc', 'aix', '7.1'], # bitrig 'amd64-bitrig1.0' => ['amd64', 'bitrig', '1.0'], 'armv7-bitrig1.0' => ['armv7', 'bitrig', '1.0'], 'bitrig1.0' => [nil, 'bitrig', '1.0'], # cygwin 'i386-cygwin' => ['i386', 'cygwin', nil], # darwin 'powerpc-darwin7' => ['powerpc', 'darwin', '7'], 'universal-darwin9' => ['universal', 'darwin', '9'], 'x86_64-darwin14.0.0' => ['x86_64', 'darwin', '14.0.0'], 'x86_64-darwin' => ['x86_64', 'darwin', nil], # freebsd 'amd64-freebsd10.1' => ['amd64', 'freebsd', '10.1'], 'i386-freebsd10.1' => ['i386', 'freebsd', '10.1'], 'i386-freebsd10' => ['i386', 'freebsd', '10'], 'i386-freebsd' => ['i386', 'freebsd', nil], 'universal-freebsd' => ['universal', 'freebsd', nil], # linux 'powerpc-linux' => ['powerpc', 'linux', nil], 'i686-linux' => ['i686', 'linux', nil], 'x86_64-linux' => ['x86_64', 'linux', nil], 'i386-linux-gnu' => ['i386', 'linux', nil], # mswin 'i386-mingw32' => ['i386', 'mingw32', nil], 'mswin32' => [nil, 'mswin32', nil], 'i386-mswin32' => ['i386', 'mswin32', nil], 'i386-mswin32_80' => ['i386', 'mswin32', '80'], 'i386-mswin32-80' => ['i386', 'mswin32', '80'], # netbsd 'i386-netbsdelf' => ['i386', 'netbsdelf', nil], # openbsd 'i386-openbsd4.0' => ['i386', 'openbsd', '4.0'], 'x86_64-openbsd4.0' => ['x86_64', 'openbsd', '4.0'], # solaris 'sparc-solaris2.10' => ['sparc', 'solaris', '2.10'], 'i386-solaris2.10' => ['i386', 'solaris', '2.10'], # wince 'i386-wince7.0' => ['i386', 'wince', '7.0'], }.each do |arch, expected| it "detectes #{sprintf("%-22s", "'#{arch}'")} as #{expected}" do platform = TTY::Platform.new(arch) expect(platform.to_a).to eq(expected) end end end tty-platform-0.3.0/spec/unit/platform_spec.rb 0000664 0000000 0000000 00000004350 13610154250 0021247 0 ustar 00root root 0000000 0000000 # frozen_string_literal: true RSpec.describe TTY::Platform, 'platform' do it "correctly detects windows platform" do allow(RbConfig::CONFIG).to receive(:[]).with('arch').and_return('x86-mswin32_60') platform = TTY::Platform.new expect(platform.windows?).to eq(true) end it "fails to detect windows" do allow(RbConfig::CONFIG).to receive(:[]).with('arch').and_return('unknown') platform = TTY::Platform.new expect(platform.windows?).to eq(false) end it "correctly detects windows platform at class level" do allow(RbConfig::CONFIG).to receive(:[]).with('arch').and_return('x86-mswin32_60') expect(TTY::Platform.windows?).to eq(true) end it "correctly detects linux platform" do allow(RbConfig::CONFIG).to receive(:[]).with('arch').and_return('x86_64-linux') platform = TTY::Platform.new expect(platform.linux?).to eq(true) end it "fails to detect linux platform" do allow(RbConfig::CONFIG).to receive(:[]).with('arch').and_return('unknown') platform = TTY::Platform.new expect(platform.linux?).to eq(false) end it "correctly detects linux platform at class level" do allow(RbConfig::CONFIG).to receive(:[]).with('arch').and_return('x86_64-linux') expect(TTY::Platform.linux?).to eq(true) end it "correctly detects mac platform" do allow(RbConfig::CONFIG).to receive(:[]).with('arch').and_return('x86_64-darwin') platform = TTY::Platform.new expect(platform.mac?).to eq(true) end it "fails to detect mac platform" do allow(RbConfig::CONFIG).to receive(:[]).with('arch').and_return('unknown') platform = TTY::Platform.new expect(platform.mac?).to eq(false) end it "correctly detects mac platform at class level" do allow(RbConfig::CONFIG).to receive(:[]).with('arch').and_return('x86_64-darwin') expect(TTY::Platform.mac?).to eq(true) end it "correctly detects unix platform" do allow(RbConfig::CONFIG).to receive(:[]).with('arch').and_return('x86_64-darwin') platform = TTY::Platform.new expect(platform.unix?).to eq(true) end it "correctly detects unix platform at class level" do allow(RbConfig::CONFIG).to receive(:[]).with('arch').and_return('x86_64-darwin') expect(TTY::Platform.unix?).to eq(true) end end tty-platform-0.3.0/spec/unit/to_s_spec.rb 0000664 0000000 0000000 00000000451 13610154250 0020365 0 ustar 00root root 0000000 0000000 # frozen_string_literal: true RSpec.describe TTY::Platform, '#to_s' do it "display platform information" do allow(RbConfig::CONFIG).to receive(:[]).with('arch').and_return('i686-darwin8.10.1') platform = TTY::Platform.new expect(platform.to_s).to eq('i686-darwin-8.10.1') end end tty-platform-0.3.0/tasks/ 0000775 0000000 0000000 00000000000 13610154250 0015276 5 ustar 00root root 0000000 0000000 tty-platform-0.3.0/tasks/console.rake 0000664 0000000 0000000 00000000305 13610154250 0017602 0 ustar 00root root 0000000 0000000 desc 'Load gem inside irb console' task :console do require 'irb' require 'irb/completion' require File.join(__FILE__, '../../lib/tty-platform') ARGV.clear IRB.start end task c: :console tty-platform-0.3.0/tasks/coverage.rake 0000664 0000000 0000000 00000000322 13610154250 0017732 0 ustar 00root root 0000000 0000000 # encoding: utf-8 desc 'Measure code coverage' task :coverage do begin original, ENV['COVERAGE'] = ENV['COVERAGE'], 'true' Rake::Task['spec'].invoke ensure ENV['COVERAGE'] = original end end tty-platform-0.3.0/tasks/spec.rake 0000664 0000000 0000000 00000001255 13610154250 0017077 0 ustar 00root root 0000000 0000000 # encoding: utf-8 begin require 'rspec/core/rake_task' desc 'Run all specs' RSpec::Core::RakeTask.new(:spec) do |task| task.pattern = 'spec/{unit,integration}{,/*/**}/*_spec.rb' end namespace :spec do desc 'Run unit specs' RSpec::Core::RakeTask.new(:unit) do |task| task.pattern = 'spec/unit{,/*/**}/*_spec.rb' end desc 'Run integration specs' RSpec::Core::RakeTask.new(:integration) do |task| task.pattern = 'spec/integration{,/*/**}/*_spec.rb' end end rescue LoadError %w[spec spec:unit spec:integration].each do |name| task name do $stderr.puts "In order to run #{name}, do `gem install rspec`" end end end tty-platform-0.3.0/tty-platform.gemspec 0000664 0000000 0000000 00000002503 13610154250 0020160 0 ustar 00root root 0000000 0000000 require File.expand_path("lib/tty/platform/version", __dir__) Gem::Specification.new do |spec| spec.name = "tty-platform" spec.version = TTY::Platform::VERSION spec.authors = ["Piotr Murach"] spec.email = ["piotr@piotrmurach.com"] spec.summary = %q{Query methods for detecting different operating systems and their properties.} spec.description = %q{Query methods for detecting different operating systems and their properties.} spec.homepage = "https://ttytoolkit.org" spec.license = "MIT" spec.metadata = { "allowed_push_host" => "https://rubygems.org", "bug_tracker_uri" => "https://github.com/piotrmurach/tty-platform/issues", "changelog_uri" => "https://github.com/piotrmurach/tty-platform/blob/master/CHANGELOG.md", "documentation_uri" => "https://www.rubydoc.info/gems/tty-platform", "homepage_uri" => spec.homepage, "source_code_uri" => "https://github.com/piotrmurach/tty-platform" } spec.files = Dir["lib/**/*", "README.md", "CHANGELOG.md", "LICENSE.txt"] spec.extra_rdoc_files = ["README.md"] spec.require_paths = ["lib"] spec.required_ruby_version = ">= 2.0.0" spec.add_development_dependency "bundler", ">= 1.5" spec.add_development_dependency "rspec", "~> 3.1" spec.add_development_dependency "rake" end