fun_with_gems 0.0.1 → 0.0.2
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.
- checksums.yaml +8 -8
- data/CHANGELOG.markdown +8 -0
- data/Gemfile +5 -5
- data/VERSION +1 -1
- data/lib/fun_with/gems/fun_gem_api.rb +1 -1
- data/lib/fun_with/gems/gem_api.rb +3 -2
- data/lib/fun_with/gems/validator.rb +1 -1
- data/lib/fun_with_gems.rb +1 -1
- data/test/helper.rb +32 -29
- data/test/test_fun_with_gems.rb +8 -1
- metadata +2 -78
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWQ2MWFiMGFiMjIzYWZiYmJjM2UzZDZlZTIxZDZlZDZhNGIxNzc1YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWU1MTRmMDBjMzIzMTZlZjJlYzFhMGMxMWNjNTlmZjQ3MWZkNWQ0OA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzYxZDVhYzVmNWMxZGE2NWRmYjZjNmRiYzg2YWZmYTg2NzdmYjMzOTFhNjVm
|
10
|
+
MDczNWE3NGUyNzZkY2NkNGI2MjQwZDBjMTEyNDgzNDc1ZmNmZTI5NzFiZjkz
|
11
|
+
NzkzY2E1MDZhODkyYjIyNmQwMDk3NzJlMWM2MDY4Nzc2NGEzODY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzQyMTZkZWYxMDI4N2RlYzY3ZjEzODQyZDUwODVmMzQ4NWQ2MDc5NGVlNjBl
|
14
|
+
ZjMzMTU0OTZjOWFmYzA5ZTczNGZlNDYwOGI0NGRhMWE3NzRiNTlkOWJmNzAy
|
15
|
+
MDU4MTAxYTcyOWE0MjQzMGEwMjMxOWZkNDM5MjYxZDk5MDUzZDc=
|
data/CHANGELOG.markdown
CHANGED
data/Gemfile
CHANGED
@@ -6,11 +6,11 @@ source "http://rubygems.org"
|
|
6
6
|
# Add dependencies to develop your gem here.
|
7
7
|
# Include everything needed to run rake, tests, features, etc.
|
8
8
|
group :development do
|
9
|
-
gem "shoulda", "~> 3.5"
|
10
|
-
gem "rdoc", "~> 3.12"
|
11
|
-
gem "bundler", "~> 1.0"
|
12
|
-
gem "jeweler", "~> 2.0"
|
13
|
-
gem "simplecov", "~> 0", ">= 0.8"
|
9
|
+
# gem "shoulda", "~> 3.5"
|
10
|
+
# gem "rdoc", "~> 3.12"
|
11
|
+
# gem "bundler", "~> 1.0"
|
12
|
+
# gem "jeweler", "~> 2.0"
|
13
|
+
# gem "simplecov", "~> 0", ">= 0.8"
|
14
14
|
|
15
15
|
# Should be safe to add. By default, none of the assert functions get added to Test::Unit::TestCase
|
16
16
|
gem "fun_with_testing", "~> 0.0"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
@@ -18,7 +18,7 @@ module FunWith
|
|
18
18
|
# :require => false (avoids requiring the default lib/fun_with dir.)
|
19
19
|
# :require => filepath or array of filepaths (require these things instead (note: not in addition to))
|
20
20
|
def make_gem_fun( gem_const, opts = {} )
|
21
|
-
@caller_file = caller.first.gsub(/:\d+:.*/,'')
|
21
|
+
@caller_file = caller.first.gsub(/:\d+:.*/,'').fwf_filepath
|
22
22
|
@opts = opts
|
23
23
|
set_gem_const( gem_const )
|
24
24
|
@gem_const.extend( FunGemAPI )
|
@@ -69,9 +69,10 @@ module FunWith
|
|
69
69
|
VersionStrings.versionize( @gem_const )
|
70
70
|
end
|
71
71
|
end
|
72
|
+
|
72
73
|
def require_libs
|
73
74
|
unless @opts[:require] == false
|
74
|
-
@opts[:require] ||=
|
75
|
+
@opts[:require] ||= @gem_const.root( "lib" ).glob(:all, :recursive => false) - [ @caller_file ]
|
75
76
|
@opts[:require] = [ @opts[:require] ] unless @opts[:require].is_a?(Array)
|
76
77
|
|
77
78
|
@opts[:require].each do |req_dir|
|
@@ -20,7 +20,7 @@ module FunWith
|
|
20
20
|
@fun_gem_errors << ".root() doesn't exist" unless @gem_const.root.directory?
|
21
21
|
@fun_gem_errors << "VERSION file doesn't exist" unless @gem_const.root("VERSION").file?
|
22
22
|
@fun_gem_errors << "CHANGELOG.markdown doesn't exist" unless @gem_const.root("CHANGELOG.markdown")
|
23
|
-
@fun_gem_errors << "lib
|
23
|
+
@fun_gem_errors << "lib directory doesn't exist" unless @gem_const.root("lib").directory?
|
24
24
|
else
|
25
25
|
@fun_gem_errors << ".root() doesn't give a filepath"
|
26
26
|
end
|
data/lib/fun_with_gems.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "fun_with_version_strings"
|
2
2
|
require "fun_with_files"
|
3
3
|
|
4
|
-
FunWith::VersionStrings.versionize( FunWith::Files )
|
4
|
+
# FunWith::VersionStrings.versionize( FunWith::Files )
|
5
5
|
|
6
6
|
lib_dir = __FILE__.fwf_filepath.dirname
|
7
7
|
lib_dir.join( "fun_with", "gems", "gem_api.rb" ).requir
|
data/test/helper.rb
CHANGED
@@ -1,41 +1,44 @@
|
|
1
|
-
require '
|
1
|
+
require 'fun_with_testing'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
3
|
+
# require 'simplecov'
|
4
|
+
#
|
5
|
+
# module SimpleCov::Configuration
|
6
|
+
# def clean_filters
|
7
|
+
# @filters = []
|
8
|
+
# end
|
9
|
+
# end
|
10
|
+
#
|
11
|
+
# SimpleCov.configure do
|
12
|
+
# clean_filters
|
13
|
+
# load_adapter 'test_frameworks'
|
14
|
+
# end
|
15
|
+
#
|
16
|
+
# ENV["COVERAGE"] && SimpleCov.start do
|
17
|
+
# add_filter "/.rvm/"
|
18
|
+
# end
|
19
|
+
|
20
|
+
# require 'rubygems'
|
21
|
+
# require 'bundler'
|
22
|
+
|
23
|
+
# begin
|
24
|
+
# Bundler.setup(:default, :development)
|
25
|
+
# rescue Bundler::BundlerError => e
|
26
|
+
# $stderr.puts e.message
|
27
|
+
# $stderr.puts "Run `bundle install` to install missing gems"
|
28
|
+
# exit e.status_code
|
29
|
+
# end
|
30
|
+
# require 'test/unit'
|
31
|
+
# require 'shoulda'
|
28
32
|
|
29
33
|
# $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
30
34
|
# $LOAD_PATH.unshift(File.dirname(__FILE__))
|
31
35
|
|
32
|
-
require 'fun_with_testing'
|
33
36
|
require 'fun_with_gems'
|
34
37
|
|
35
38
|
FunWith::Gems.make_gem_fun( FunWith::Testing, :require => false )
|
36
39
|
|
37
|
-
class Test::Unit::TestCase
|
38
|
-
end
|
40
|
+
# class Test::Unit::TestCase
|
41
|
+
# end
|
39
42
|
|
40
43
|
class FunWith::Gems::TestCase < FunWith::Testing::TestCase
|
41
44
|
include FunWith::Testing::Assertions::Basics
|
data/test/test_fun_with_gems.rb
CHANGED
@@ -1,17 +1,24 @@
|
|
1
1
|
require 'helper'
|
2
2
|
|
3
3
|
class TestFunWithGems < FunWith::Gems::TestCase
|
4
|
-
context "checking the plumbing" do
|
4
|
+
context "checking the plumbing of FunWith::Gems" do
|
5
5
|
should "have FunWith::Gems constants defined" do
|
6
6
|
assert defined?( FunWith )
|
7
7
|
assert defined?( FunWith::Gems )
|
8
8
|
assert defined?( FunWith::Gems::GemAPI )
|
9
9
|
end
|
10
10
|
|
11
|
+
should "be a proper gem" do
|
12
|
+
assert_respond_to( FunWith::Gems, :version )
|
13
|
+
end
|
14
|
+
|
11
15
|
should "respond to API methods" do
|
12
16
|
assert_respond_to( FunWith::Gems, :root )
|
13
17
|
assert_respond_to( FunWith::Gems, :version )
|
14
18
|
assert_respond_to( FunWith::Gems, :make_gem_fun )
|
19
|
+
|
20
|
+
assert_kind_of( FunWith::VersionStrings::VersionString, FunWith::Gems.version )
|
21
|
+
assert_kind_of( FunWith::Files::FilePath, FunWith::Gems.root )
|
15
22
|
end
|
16
23
|
|
17
24
|
should "have FunWith::Files constants" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fun_with_gems
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryce Anderson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fun_with_files
|
@@ -50,82 +50,6 @@ dependencies:
|
|
50
50
|
- - ~>
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0.0'
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name: shoulda
|
55
|
-
requirement: !ruby/object:Gem::Requirement
|
56
|
-
requirements:
|
57
|
-
- - ~>
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '3.5'
|
60
|
-
type: :development
|
61
|
-
prerelease: false
|
62
|
-
version_requirements: !ruby/object:Gem::Requirement
|
63
|
-
requirements:
|
64
|
-
- - ~>
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: '3.5'
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: rdoc
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - ~>
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '3.12'
|
74
|
-
type: :development
|
75
|
-
prerelease: false
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - ~>
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '3.12'
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: bundler
|
83
|
-
requirement: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - ~>
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '1.0'
|
88
|
-
type: :development
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: !ruby/object:Gem::Requirement
|
91
|
-
requirements:
|
92
|
-
- - ~>
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '1.0'
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: jeweler
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - ~>
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '2.0'
|
102
|
-
type: :development
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
requirements:
|
106
|
-
- - ~>
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: '2.0'
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: simplecov
|
111
|
-
requirement: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - ! '>='
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: '0.8'
|
116
|
-
- - ~>
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '0'
|
119
|
-
type: :development
|
120
|
-
prerelease: false
|
121
|
-
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
requirements:
|
123
|
-
- - ! '>='
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
version: '0.8'
|
126
|
-
- - ~>
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: '0'
|
129
53
|
- !ruby/object:Gem::Dependency
|
130
54
|
name: fun_with_testing
|
131
55
|
requirement: !ruby/object:Gem::Requirement
|