os_name 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (7) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +22 -0
  3. data/README.md +59 -0
  4. data/Rakefile +12 -0
  5. data/bin/os_name +18 -0
  6. data/os_name.gemspec +22 -0
  7. metadata +65 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e1174b42e25770fbab500ef7eca4a47252463810
4
+ data.tar.gz: 79dd573d20d90bbf9ae285209342147dbb5af0ab
5
+ SHA512:
6
+ metadata.gz: fd2a18fbedc00c3c293efabc0b76065114bd75154e414c11addf32724ab6874c6171bb87bf9d11770f212879f68bff7b0b499527118de8a086a19ac061c2c7f8
7
+ data.tar.gz: 779bae259f55e7cee178a62c237e73e319f253d698e5163ba047a6a51dfc5bf31f3e5270a2ac367e8bf2624dddde9ddf4e1655e88b9dae91d539a50aa764757c
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Juanito Fatas
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # `OSName`
2
+
3
+ [![Gem Version](http://img.shields.io/gem/v/os_name.svg)][gem]
4
+ [![Build Status](https://travis-ci.org/JuanitoFatas/comer_de_tapas.svg)][travis]
5
+ [![Dependency Status](https://gemnasium.com/JuanitoFatas/os_name.svg)][gemnasium]
6
+ [![Inline docs ](http://inch-ci.org/github/JuanitoFatas/os_name.svg)][docs]
7
+ [![Code Climate](https://codeclimate.com/github/JuanitoFatas/os_name.png)][codeclimate]
8
+ [![Coverage](https://codeclimate.com/github/JuanitoFatas/os_name/coverage.png)][coverage]
9
+
10
+ [gem]: https://rubygems.org/gems/os_name
11
+ [travis]: https://travis-ci.org/JuanitoFatas/os_name
12
+ [gemnasium]: https://gemnasium.com/JuanitoFatas/os_name
13
+ [docs]: http://inch-ci.org/github/juanitofatas/os_name
14
+ [codeclimate]: https://codeclimate.com/github/JuanitoFatas/os_name
15
+ [coverage]: https://codeclimate.com/github/JuanitoFatas/os_name
16
+
17
+ Get the name of the current operating system.
18
+
19
+ ## Usage
20
+
21
+ Add this line to your application's Gemfile:
22
+
23
+ gem 'os_name'
24
+
25
+ And then execute:
26
+
27
+ $ bundle
28
+
29
+ ### API
30
+
31
+ os_name([os, version])
32
+
33
+ By default the name of the current operating system is returned.
34
+
35
+ You can optionally supply a custom os and version.
36
+
37
+ ### CLI
38
+
39
+ $ gem install os_name
40
+
41
+ $ os_name
42
+ OS X Mavericks
43
+
44
+ $ os_name -h
45
+ Example
46
+ $ os_name
47
+ OS X Mavericks
48
+
49
+ ## Contributing
50
+
51
+ 1. [Fork it](https://github.com/juanitofatas/os_name/fork)
52
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
53
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
54
+ 4. Push to the branch (`git push origin my-new-feature`)
55
+ 5. [Create a new Pull Request](https://help.github.com/articles/creating-a-pull-request)
56
+
57
+ ## License
58
+
59
+ MIT License. See [LICENSE](/LICENSE).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+ require 'rake/testtask'
4
+
5
+ Rake::TestTask.new do |t|
6
+ t.libs << "test"
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ t.verbose = true
9
+ end
10
+
11
+ desc 'Run Tests'
12
+ task default: :test
data/bin/os_name ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby -w
2
+
3
+ Signal.trap('INT') { abort }
4
+
5
+ $:.unshift File.join(File.dirname(__FILE__), *%w{ .. lib })
6
+
7
+ require 'optparse'
8
+ require "os_name"
9
+
10
+ OptionParser.new do |opts|
11
+ opts.banner = <<-BANNER
12
+ Example:
13
+ $ os_name
14
+ OS X Mavericks
15
+ BANNER
16
+ end.parse!
17
+
18
+ puts Class.new.extend(OSName).os_name
data/os_name.gemspec ADDED
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'os_name/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "os_name"
8
+ spec.version = OSName::VERSION
9
+ spec.authors = ["Juanito Fatas"]
10
+ spec.email = ["katehuang0320@gmail.com"]
11
+ spec.summary = %q{Get the name of the current operating system. Example: OS X Yosemite}
12
+ spec.description = spec.summary
13
+ spec.homepage = "https://github.com/juanitofatas/os_name"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = %w[LICENSE README.md Rakefile os_name.gemspec]
17
+ spec.executables = %w[os_name]
18
+ spec.test_files = Dir.glob('spec/**/*')
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", ">= 1.3.0"
22
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: os_name
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Juanito Fatas
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-07-04 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.3.0
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 1.3.0
27
+ description: 'Get the name of the current operating system. Example: OS X Yosemite'
28
+ email:
29
+ - katehuang0320@gmail.com
30
+ executables:
31
+ - os_name
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - LICENSE
36
+ - README.md
37
+ - Rakefile
38
+ - bin/os_name
39
+ - os_name.gemspec
40
+ homepage: https://github.com/juanitofatas/os_name
41
+ licenses:
42
+ - MIT
43
+ metadata: {}
44
+ post_install_message:
45
+ rdoc_options: []
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ requirements: []
59
+ rubyforge_project:
60
+ rubygems_version: 2.3.0
61
+ signing_key:
62
+ specification_version: 4
63
+ summary: 'Get the name of the current operating system. Example: OS X Yosemite'
64
+ test_files: []
65
+ has_rdoc: