Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial commit

  • Loading branch information...
commit 7eedc69b753ef7e181ff82ff00f6b3b0df0e27b6 0 parents
@banister authored
0  .gemtest
No changes.
7 .gitignore
@@ -0,0 +1,7 @@
+Makefile
+*.so
+*.o
+*.def
+doc/
+pkg/
+.yardoc/
1  .yardopts
@@ -0,0 +1 @@
+--markup markdown
0  CHANGELOG
No changes.
2  Gemfile
@@ -0,0 +1,2 @@
+source :rubygems
+gemspec
25 LICENSE
@@ -0,0 +1,25 @@
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2012 John Mair (banisterfiend)
+
+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.
56 README.md
@@ -0,0 +1,56 @@
+plymouth
+===========
+
+(C) John Mair (banisterfiend) 2012
+
+FIXME: _tagline_
+
+FIXME: _description goes here_
+
+* Install the [gem](https://rubygems.org/gems/plymouth): `gem install plymouth`
+* Read the [documentation](http://rdoc.info/github/banister/plymouth/master/file/README.md)
+* See the [source code](http://github.com/banister/plymouth)
+
+Example: Example description
+--------
+
+Example preamble
+
+ puts "example code"
+
+Features and limitations
+-------------------------
+
+Feature List Preamble
+
+Contact
+-------
+
+Problems or questions contact me at [github](http://github.com/banister)
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2012 John Mair (banisterfiend)
+
+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.
75 Rakefile
@@ -0,0 +1,75 @@
+$:.unshift 'lib'
+
+PROJECT_NAME = "plymouth"
+
+require "#{PROJECT_NAME}/version"
+
+CLASS_NAME = Plymouth
+
+require 'rake/clean'
+require 'rake/gempackagetask'
+
+CLOBBER.include("**/*~", "**/*#*", "**/*.log", "**/*.o")
+CLEAN.include("ext/**/*.log", "ext/**/*.o",
+ "ext/**/*~", "ext/**/*#*", "ext/**/*.obj", "**/*#*", "**/*#*.*",
+ "ext/**/*.def", "ext/**/*.pdb", "**/*_flymake*.*", "**/*_flymake")
+
+def apply_spec_defaults(s)
+ s.name = PROJECT_NAME
+ s.summary = "FIX ME"
+ s.version = CLASS_NAME::VERSION
+ s.date = Time.now.strftime '%Y-%m-%d'
+ s.author = "John Mair (banisterfiend)"
+ s.email = 'jrmair@gmail.com'
+ s.description = s.summary
+ s.require_path = 'lib'
+ s.add_development_dependency("bacon","~>1.1.0")
+ s.homepage = "http://github.com/banister/#{PROJECT_NAME}"
+ s.has_rdoc = 'yard'
+ s.add_dependency('pry-exception_explorer')
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- test/*`.split("\n")
+end
+
+desc "Run tests"
+task :test do
+ sh "bacon -Itest -rubygems test.rb -q"
+end
+
+namespace :ruby do
+ spec = Gem::Specification.new do |s|
+ apply_spec_defaults(s)
+ s.platform = Gem::Platform::RUBY
+ end
+
+ Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.need_zip = false
+ pkg.need_tar = false
+ end
+end
+
+desc "Show version"
+task :version do
+ puts "Plymouth version: #{Plymouth::VERSION}"
+end
+
+desc "Generate gemspec file"
+task :gemspec => "ruby:gemspec"
+
+desc "build all platform gems at once"
+task :gems => [:clean, :rmgems, "ruby:gem"]
+
+task :gem => [:gems]
+
+desc "remove all platform gems"
+task :rmgems => ["ruby:clobber_package"]
+
+desc "build and push latest gems"
+task :pushgems => :gems do
+ chdir("./pkg") do
+ Dir["*.gem"].each do |gemfile|
+ sh "gem push #{gemfile}"
+ end
+ end
+end
+
42 lib/plymouth.rb
@@ -0,0 +1,42 @@
+# plymouth.rb
+# (C) 2012 John Mair (banisterfiend); MIT license
+
+require "plymouth/version"
+require 'pry-exception_explorer'
+
+EE.enabled = true
+
+if defined?(Bacon)
+
+ EE.intercept(Bacon::Error).skip_until { |frame| frame.klass == Bacon::Context }
+
+elsif defined?(RSpec)
+
+ EE.intercept do |frame, ex|
+ ex.class.name =~ /RSpec::Expectations::ExpectationNotMetError/
+ end.skip_until do |frame|
+ frame.klass.name =~ /RSpec::Core::ExampleGroup::Nested/
+ end
+
+elsif defined?(MiniTest)
+
+ EE.intercept(MiniTest::Assertion).skip_until do |frame|
+ frame.method_name =~ /^test_/
+ end
+
+# elsif defined?(Riot)
+# EE.enabled = false
+# class Riot::Assertion
+# private
+# alias_method :oh_my_old_assert, :assert
+# def assert(*args, &block)
+# result = oh_my_old_assert(*args, &block)
+# if result.first == :fail || result.first == :error
+# Pry.start binding, :call_stack => binding.callers
+# end
+
+# result
+# end
+# end
+end
+
3  lib/plymouth/version.rb
@@ -0,0 +1,3 @@
+module Plymouth
+ VERSION = "0.1.0"
+end
12 test/test.rb
@@ -0,0 +1,12 @@
+direc = File.dirname(__FILE__)
+
+require 'rubygems'
+require "#{direc}/../lib/plymouth"
+require 'bacon'
+
+puts "Testing plymouth version #{Plymouth::VERSION}..."
+puts "Ruby version: #{RUBY_VERSION}"
+
+describe Plymouth do
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.