reagent-throat-punch 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.
@@ -0,0 +1,54 @@
1
+ = ThroatPunch
2
+
3
+ == Description
4
+
5
+ Punch your codes in the throat...
6
+
7
+ This library just wraps my preferred testing stack in an easy-to-use gem.
8
+
9
+ == Installation
10
+
11
+ sudo gem install reagent-throat-punch --source=http://gems.github.com
12
+
13
+ == Usage
14
+
15
+ require 'rubygems'
16
+ require 'throat_punch'
17
+
18
+ class StringTest < Test::Unit::TestCase
19
+
20
+ context "An instance of the String class" do
21
+ it "should lie about its length" do
22
+ string = String.new
23
+ string.expects(:length).with().returns(10)
24
+
25
+ string.length.should == 10
26
+ end
27
+ end
28
+
29
+ end
30
+
31
+ == License
32
+
33
+ Copyright (c) 2008 Patrick Reagan (mailto:reaganpr@gmail.com)
34
+
35
+ Permission is hereby granted, free of charge, to any person
36
+ obtaining a copy of this software and associated documentation
37
+ files (the "Software"), to deal in the Software without
38
+ restriction, including without limitation the rights to use,
39
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
40
+ copies of the Software, and to permit persons to whom the
41
+ Software is furnished to do so, subject to the following
42
+ conditions:
43
+
44
+ The above copyright notice and this permission notice shall be
45
+ included in all copies or substantial portions of the Software.
46
+
47
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
48
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
49
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
50
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
51
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
52
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
53
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
54
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,42 @@
1
+ require 'rubygems'
2
+ require 'rake/gempackagetask'
3
+ require 'rake/testtask'
4
+
5
+ require 'lib/throat_punch/version'
6
+
7
+ task :default => :test
8
+
9
+ spec = Gem::Specification.new do |s|
10
+ s.name = 'throat-punch'
11
+ s.version = ThroatPunch::Version.to_s
12
+ s.has_rdoc = true
13
+ s.extra_rdoc_files = %w(README.rdoc)
14
+ s.rdoc_options = %w(--main README.rdoc)
15
+ s.summary = "Punch your codes in the throat..."
16
+ s.author = 'Patrick Reagan'
17
+ s.email = 'reaganpr@gmail.com'
18
+ s.homepage = 'http://sneaq.net'
19
+ s.files = %w(README.rdoc Rakefile) + Dir.glob("{lib,test}/**/*")
20
+ # s.executables = ['throat-punch']
21
+
22
+ s.add_dependency('jeremymcanally-context', '= 0.0.6')
23
+ s.add_dependency('jeremymcanally-matchy', '= 0.0.1')
24
+ s.add_dependency('mocha', '= 0.9.1')
25
+ end
26
+
27
+ Rake::GemPackageTask.new(spec) do |pkg|
28
+ pkg.gem_spec = spec
29
+ end
30
+
31
+ Rake::TestTask.new do |t|
32
+ t.libs << 'test'
33
+ t.test_files = FileList["test/**/*_test.rb"]
34
+ t.verbose = true
35
+ end
36
+
37
+ desc 'Generate the gemspec to serve this Gem from Github'
38
+ task :github do
39
+ file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
40
+ File.open(file, 'w') {|f| f << spec.to_ruby }
41
+ puts "Created gemspec: #{file}"
42
+ end
@@ -0,0 +1,6 @@
1
+ $:.unshift File.dirname(__FILE__)
2
+
3
+ require 'test/unit'
4
+ require 'context'
5
+ require 'matchy'
6
+ require 'mocha'
@@ -0,0 +1,13 @@
1
+ module ThroatPunch
2
+ module Version
3
+
4
+ MAJOR = 0
5
+ MINOR = 1
6
+ TINY = 0
7
+
8
+ def self.to_s # :nodoc:
9
+ [MAJOR, MINOR, TINY].join('.')
10
+ end
11
+
12
+ end
13
+ end
@@ -0,0 +1,6 @@
1
+ # http://sneaq.net/textmate-wtf
2
+ $:.reject! { |e| e.include? 'TextMate' }
3
+
4
+ require 'rubygems'
5
+
6
+ require File.dirname(__FILE__) + '/../lib/throat_punch'
@@ -0,0 +1,15 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+
3
+ class ThroatPunchTest < Test::Unit::TestCase
4
+
5
+ describe "An instance of the ThroatPunch class" do
6
+
7
+ it "should work" do
8
+ s = ''
9
+ s.expects(:length).returns(10)
10
+ s.length.should == 10
11
+ end
12
+
13
+ end
14
+
15
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: reagent-throat-punch
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Patrick Reagan
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-01-20 00:00:00 -08:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: jeremymcanally-context
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - "="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.0.6
23
+ version:
24
+ - !ruby/object:Gem::Dependency
25
+ name: jeremymcanally-matchy
26
+ version_requirement:
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - "="
30
+ - !ruby/object:Gem::Version
31
+ version: 0.0.1
32
+ version:
33
+ - !ruby/object:Gem::Dependency
34
+ name: mocha
35
+ version_requirement:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.9.1
41
+ version:
42
+ description:
43
+ email: reaganpr@gmail.com
44
+ executables: []
45
+
46
+ extensions: []
47
+
48
+ extra_rdoc_files:
49
+ - README.rdoc
50
+ files:
51
+ - README.rdoc
52
+ - Rakefile
53
+ - lib/throat_punch
54
+ - lib/throat_punch/version.rb
55
+ - lib/throat_punch.rb
56
+ - test/test_helper.rb
57
+ - test/unit
58
+ - test/unit/throat_punch_test.rb
59
+ has_rdoc: true
60
+ homepage: http://sneaq.net
61
+ post_install_message:
62
+ rdoc_options:
63
+ - --main
64
+ - README.rdoc
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: "0"
72
+ version:
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: "0"
78
+ version:
79
+ requirements: []
80
+
81
+ rubyforge_project:
82
+ rubygems_version: 1.2.0
83
+ signing_key:
84
+ specification_version: 2
85
+ summary: Punch your codes in the throat...
86
+ test_files: []
87
+