bug 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Masaya TARUI
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,19 @@
1
+ = bug
2
+
3
+ Description goes here.
4
+
5
+ == Contributing to bug
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
9
+ * Fork the project.
10
+ * Start a feature/bugfix branch.
11
+ * Commit and push until you are happy with your contribution.
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2012 Masaya TARUI. See LICENSE.txt for
18
+ further details.
19
+
data/Rakefile ADDED
@@ -0,0 +1,56 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'rake'
5
+
6
+ require 'jeweler'
7
+ Jeweler::Tasks.new do |gem|
8
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
9
+ gem.name = "bug"
10
+ gem.homepage = "http://github.com/tarui/bug"
11
+ gem.license = "MIT"
12
+ gem.summary = %Q{we can encounter a Bug everywhere!}
13
+ gem.description = %Q{we can encounter a Bug everywhere!
14
+ Bug.raise call bug backtrace
15
+ }
16
+ gem.email = "tarui@prx.jp"
17
+ gem.authors = ["Masaya TARUI"]
18
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
19
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
20
+ # gem.add_runtime_dependency 'jabber4r', '> 0.1'
21
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
22
+ # gem.add_development_dependency "rdoc", "~> 3.12"
23
+ gem.add_development_dependency "bundler", "~> 1.0"
24
+ gem.add_development_dependency "jeweler", "~> 1.8.4"
25
+ # gem.add_development_dependency "rcov", ">= 0"
26
+ end
27
+ Jeweler::RubygemsDotOrgTasks.new
28
+
29
+ require 'rake/testtask'
30
+ Rake::TestTask.new(:test) do |test|
31
+ test.libs << 'lib' << 'test'
32
+ test.pattern = 'test/**/test_*.rb'
33
+ test.verbose = true
34
+ end
35
+
36
+ =begin
37
+ require 'rcov/rcovtask'
38
+ Rcov::RcovTask.new do |test|
39
+ test.libs << 'test'
40
+ test.pattern = 'test/**/test_*.rb'
41
+ test.verbose = true
42
+ test.rcov_opts << '--exclude "gems/*"'
43
+ end
44
+ =end
45
+
46
+ task :default => :test
47
+
48
+ require 'rdoc/task'
49
+ Rake::RDocTask.new do |rdoc|
50
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
51
+
52
+ rdoc.rdoc_dir = 'rdoc'
53
+ rdoc.title = "bug #{version}"
54
+ rdoc.rdoc_files.include('README*')
55
+ rdoc.rdoc_files.include('lib/**/*.rb')
56
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
data/bug.gemspec ADDED
@@ -0,0 +1,54 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "bug"
8
+ s.version = "1.0.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Masaya TARUI"]
12
+ s.date = "2012-11-12"
13
+ s.description = "we can encounter a Bug everywhere!\n Bug.raise call bug backtrace\n"
14
+ s.email = "tarui@prx.jp"
15
+ s.extensions = ["ext/extconf.rb"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE.txt",
18
+ "README.rdoc"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ "LICENSE.txt",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "bug.gemspec",
27
+ "ext/bug.c",
28
+ "ext/extconf.rb",
29
+ "lib/bug.rb",
30
+ "test/helper.rb",
31
+ "test/test_bug.rb"
32
+ ]
33
+ s.homepage = "http://github.com/tarui/bug"
34
+ s.licenses = ["MIT"]
35
+ s.require_paths = ["lib"]
36
+ s.rubygems_version = "1.8.24"
37
+ s.summary = "we can encounter a Bug everywhere!"
38
+
39
+ if s.respond_to? :specification_version then
40
+ s.specification_version = 3
41
+
42
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
43
+ s.add_development_dependency(%q<bundler>, ["~> 1.0"])
44
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
45
+ else
46
+ s.add_dependency(%q<bundler>, ["~> 1.0"])
47
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
48
+ end
49
+ else
50
+ s.add_dependency(%q<bundler>, ["~> 1.0"])
51
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
52
+ end
53
+ end
54
+
data/ext/bug.c ADDED
@@ -0,0 +1,25 @@
1
+ #include "ruby.h"
2
+
3
+
4
+ static VALUE
5
+ bug_s_raise(int argc, VALUE *argv, VALUE self)
6
+ {
7
+ VALUE str=Qnil;
8
+ rb_scan_args(argc, argv, "01", &str);
9
+ if(str!=Qnil){
10
+ StringValue(str);
11
+ rb_bug("%s",RSTRING_PTR(str));
12
+ RB_GC_GUARD(str);
13
+ }else{
14
+ rb_bug("Bug.raise");
15
+ }
16
+ return self;
17
+ }
18
+
19
+ void
20
+ Init_bug(void)
21
+ {
22
+ VALUE cBug;
23
+ cBug = rb_define_module("Bug");
24
+ rb_define_singleton_method(cBug, "raise", bug_s_raise,-1);
25
+ }
data/ext/extconf.rb ADDED
@@ -0,0 +1,6 @@
1
+ require "mkmf"
2
+
3
+ # $defs = ["-D_MSC_VER=1200"]
4
+ # $LDFLAGS += " msvcrt_winxp.obj"
5
+
6
+ create_makefile("bug")
data/lib/bug.rb ADDED
File without changes
data/test/helper.rb ADDED
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+
4
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
5
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'ext'))
7
+ require 'bug'
8
+
9
+ class Test::Unit::TestCase
10
+ end
data/test/test_bug.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'helper'
2
+
3
+ class TestBug < Test::Unit::TestCase
4
+ def test_something_for_real
5
+ #flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ skip "hey buddy, you should probably rename this file and start testing for real"
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,91 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bug
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Masaya TARUI
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-11-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: jeweler
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 1.8.4
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.8.4
46
+ description: ! "we can encounter a Bug everywhere!\n Bug.raise call bug backtrace\n"
47
+ email: tarui@prx.jp
48
+ executables: []
49
+ extensions:
50
+ - ext/extconf.rb
51
+ extra_rdoc_files:
52
+ - LICENSE.txt
53
+ - README.rdoc
54
+ files:
55
+ - .document
56
+ - LICENSE.txt
57
+ - README.rdoc
58
+ - Rakefile
59
+ - VERSION
60
+ - bug.gemspec
61
+ - ext/bug.c
62
+ - ext/extconf.rb
63
+ - lib/bug.rb
64
+ - test/helper.rb
65
+ - test/test_bug.rb
66
+ homepage: http://github.com/tarui/bug
67
+ licenses:
68
+ - MIT
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ required_rubygems_version: !ruby/object:Gem::Requirement
80
+ none: false
81
+ requirements:
82
+ - - ! '>='
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ requirements: []
86
+ rubyforge_project:
87
+ rubygems_version: 1.8.24
88
+ signing_key:
89
+ specification_version: 3
90
+ summary: we can encounter a Bug everywhere!
91
+ test_files: []