From dc8be1068943fd58f9e679322b1c3768877c7f6f Mon Sep 17 00:00:00 2001 From: Maarten van Gijssel Date: Thu, 30 Jan 2014 15:16:02 +0100 Subject: [PATCH] First commit --- .gitignore | 17 +++++++++++++++++ .idea/.name | 1 + .idea/blackhole.iml | 20 ++++++++++++++++++++ .idea/encodings.xml | 5 +++++ .idea/misc.xml | 5 +++++ .idea/modules.xml | 9 +++++++++ .idea/scopes/scope_settings.xml | 5 +++++ .idea/vcs.xml | 7 +++++++ Gemfile | 4 ++++ LICENSE.txt | 22 ++++++++++++++++++++++ README | 1 + README.md | 29 +++++++++++++++++++++++++++++ Rakefile | 1 + blackhole.gemspec | 23 +++++++++++++++++++++++ lib/blackhole.rb | 5 +++++ lib/blackhole/empty_black_hole.rb | 23 +++++++++++++++++++++++ lib/blackhole/exceptions.rb | 5 +++++ lib/blackhole/version.rb | 3 +++ test.rb | 3 +++ 19 files changed, 188 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.name create mode 100644 .idea/blackhole.iml create mode 100644 .idea/encodings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/scopes/scope_settings.xml create mode 100644 .idea/vcs.xml create mode 100644 Gemfile create mode 100644 LICENSE.txt create mode 100644 README create mode 100644 README.md create mode 100644 Rakefile create mode 100644 blackhole.gemspec create mode 100644 lib/blackhole.rb create mode 100644 lib/blackhole/empty_black_hole.rb create mode 100644 lib/blackhole/exceptions.rb create mode 100644 lib/blackhole/version.rb create mode 100644 test.rb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d87d4be --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +*.gem +*.rbc +.bundle +.config +.yardoc +Gemfile.lock +InstalledFiles +_yardoc +coverage +doc/ +lib/bundler/man +pkg +rdoc +spec/reports +test/tmp +test/version_tmp +tmp diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..d44e02f --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +blackhole \ No newline at end of file diff --git a/.idea/blackhole.iml b/.idea/blackhole.iml new file mode 100644 index 0000000..e15b017 --- /dev/null +++ b/.idea/blackhole.iml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..e206d70 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..1d87b06 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..788319a --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml new file mode 100644 index 0000000..922003b --- /dev/null +++ b/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..c80f219 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..5e6f8ba --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +# Specify your gem's dependencies in blackhole.gemspec +gemspec diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..1d87827 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2014 Maarten van Gijssel + +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. diff --git a/README b/README new file mode 100644 index 0000000..9843406 --- /dev/null +++ b/README @@ -0,0 +1 @@ +This file was created by JetBrains RubyMine 5.4.3.2.1 for binding GitHub repository \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..678a217 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# Blackhole + +TODO: Write a gem description + +## Installation + +Add this line to your application's Gemfile: + + gem 'blackhole' + +And then execute: + + $ bundle + +Or install it yourself as: + + $ gem install blackhole + +## Usage + +TODO: Write usage instructions here + +## Contributing + +1. Fork it +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 new Pull Request diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..2995527 --- /dev/null +++ b/Rakefile @@ -0,0 +1 @@ +require "bundler/gem_tasks" diff --git a/blackhole.gemspec b/blackhole.gemspec new file mode 100644 index 0000000..31254ed --- /dev/null +++ b/blackhole.gemspec @@ -0,0 +1,23 @@ +# coding: utf-8 +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'blackhole/version' + +Gem::Specification.new do |spec| + spec.name = "blackhole" + spec.version = Blackhole::VERSION + spec.authors = ["Maarten van Gijssel"] + spec.email = ["maarten@vgijssel.nl"] + spec.description = %q{TODO: Write a gem description} + spec.summary = %q{TODO: Write a gem summary} + spec.homepage = "" + spec.license = "MIT" + + spec.files = `git ls-files`.split($/) + spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } + spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) + spec.require_paths = ["lib"] + + spec.add_development_dependency "bundler", "~> 1.3" + spec.add_development_dependency "rake" +end diff --git a/lib/blackhole.rb b/lib/blackhole.rb new file mode 100644 index 0000000..d644c27 --- /dev/null +++ b/lib/blackhole.rb @@ -0,0 +1,5 @@ +require "blackhole/version" + +module Blackhole + # Your code goes here... +end diff --git a/lib/blackhole/empty_black_hole.rb b/lib/blackhole/empty_black_hole.rb new file mode 100644 index 0000000..6f682ec --- /dev/null +++ b/lib/blackhole/empty_black_hole.rb @@ -0,0 +1,23 @@ +class BlackHole + + class EmptyBlackHole + + # class variables should always be instantiated + @@_instance = nil + + def self.instance + + unless @@_instance + + @@_instance = EmptyBlackHole.new + + end + + # return the instance + @@_instance + + end + + end + +end diff --git a/lib/blackhole/exceptions.rb b/lib/blackhole/exceptions.rb new file mode 100644 index 0000000..84aef0e --- /dev/null +++ b/lib/blackhole/exceptions.rb @@ -0,0 +1,5 @@ +class BlackHole + + class BlackHoleError < ::StandardError; end + +end \ No newline at end of file diff --git a/lib/blackhole/version.rb b/lib/blackhole/version.rb new file mode 100644 index 0000000..cdc52b8 --- /dev/null +++ b/lib/blackhole/version.rb @@ -0,0 +1,3 @@ +module Blackhole + VERSION = "0.0.1" +end diff --git a/test.rb b/test.rb new file mode 100644 index 0000000..71355c2 --- /dev/null +++ b/test.rb @@ -0,0 +1,3 @@ +class + # To change this template use File | Settings | File Templates. +end \ No newline at end of file