technicalpickles-existing-project-with-version 1.5.3

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 (4) hide show
  1. data/LICENSE +20 -0
  2. data/VERSION.yml +4 -0
  3. data/test/test_helper.rb +110 -0
  4. metadata +60 -0
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2008 Josh Nichols
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.
@@ -0,0 +1,4 @@
1
+ ---
2
+ :minor: 0
3
+ :patch: 0
4
+ :major: 0
@@ -0,0 +1,110 @@
1
+ require 'test/unit'
2
+
3
+ require 'rubygems'
4
+ require 'shoulda'
5
+ begin
6
+ require 'ruby-debug'
7
+ rescue LoadError
8
+ end
9
+ require 'rr'
10
+ require 'time'
11
+
12
+ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
13
+ require 'jeweler'
14
+
15
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
16
+ require 'shoulda_macros/jeweler_macros'
17
+
18
+ # Use vendored gem because of limited gem availability on runcoderun
19
+ # This is loosely based on 'vendor everything'.
20
+ Dir[File.join(File.dirname(__FILE__), '..', 'vendor', 'gems', '**')].each do |dir|
21
+ lib = "#{dir}/lib"
22
+ $LOAD_PATH.unshift(lib) if File.directory?(lib)
23
+ end
24
+
25
+ class RubyForgeStub
26
+ attr_accessor :userconfig, :autoconfig
27
+
28
+ def initialize
29
+ @userconfig = {}
30
+ @autoconfig = {}
31
+ end
32
+ end
33
+
34
+ class Test::Unit::TestCase
35
+ include RR::Adapters::TestUnit unless include?(RR::Adapters::TestUnit)
36
+
37
+ def fixture_dir
38
+ File.join(File.dirname(__FILE__), 'fixtures', 'bar')
39
+ end
40
+
41
+ def tmp_dir
42
+ File.join(File.dirname(__FILE__), 'tmp')
43
+ end
44
+
45
+ def build_spec(*files)
46
+ Gem::Specification.new do |s|
47
+ s.name = "bar"
48
+ s.summary = "Simple and opinionated helper for creating Rubygem projects on GitHub"
49
+ s.email = "josh@technicalpickles.com"
50
+ s.homepage = "http://github.com/technicalpickles/jeweler"
51
+ s.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
52
+ s.authors = ["Josh Nichols"]
53
+ s.files = FileList[*files] unless files.empty?
54
+ end
55
+ end
56
+
57
+ class << self
58
+ attr_accessor :subject_block, :tested_type
59
+ end
60
+
61
+ def self.subject(&block)
62
+ self.subject_block = block
63
+ end
64
+
65
+ def subject
66
+ self.class.subject_block ? self.class.subject_block.call : default_subject
67
+ end
68
+
69
+ def default_subject
70
+ self.class.tested_type.new
71
+ end
72
+
73
+ def self.tested_type
74
+ @tested_type ||= eval self.name.gsub(/::Test/, '::')
75
+ end
76
+
77
+ def self.tests(tested_type)
78
+ self.tested_type = tested_type
79
+ end
80
+
81
+ def self.rubyforge_command_context(description, &block)
82
+ context description do
83
+ setup do
84
+ @command = subject
85
+
86
+ if @command.respond_to? :gemspec=
87
+ @gemspec = Object.new
88
+ @command.gemspec = @gemspec
89
+ end
90
+
91
+ if @command.respond_to? :gemspec_helper=
92
+ @gemspec_helper = Object.new
93
+ @command.gemspec_helper = @gemspec_helper
94
+ end
95
+
96
+ if @command.respond_to? :rubyforge=
97
+ @rubyforge = RubyForgeStub.new
98
+ @command.rubyforge = @rubyforge
99
+ end
100
+
101
+ if @command.respond_to? :output
102
+ @output = StringIO.new
103
+ @command.output = @output
104
+ end
105
+ end
106
+
107
+ context "", &block
108
+ end
109
+ end
110
+ end
metadata ADDED
@@ -0,0 +1,60 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: technicalpickles-existing-project-with-version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.5.3
5
+ platform: ruby
6
+ authors:
7
+ - Josh Nichols
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-03-13 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description:
17
+ email: josh@technicalpickles.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README.rdoc
24
+ - LICENSE
25
+ files:
26
+ - README.rdoc
27
+ - VERSION.yml
28
+ - lib/existing_project_with_version.rb
29
+ - test/existing_project_with_version_test.rb
30
+ - test/test_helper.rb
31
+ - LICENSE
32
+ has_rdoc: true
33
+ homepage: http://github.com/technicalpickles/existing-project-with-version
34
+ post_install_message:
35
+ rdoc_options:
36
+ - --inline-source
37
+ - --charset=UTF-8
38
+ require_paths:
39
+ - lib
40
+ required_ruby_version: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: "0"
45
+ version:
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: "0"
51
+ version:
52
+ requirements: []
53
+
54
+ rubyforge_project:
55
+ rubygems_version: 1.2.0
56
+ signing_key:
57
+ specification_version: 2
58
+ summary: TODO
59
+ test_files: []
60
+