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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzVhMzg5YmQzMGQ0ZDM0ZDU4NTcxYzBmYmMwZGE0NzE4NDgzNWI5Zg==
4
+ MWQ2MWFiMGFiMjIzYWZiYmJjM2UzZDZlZTIxZDZlZDZhNGIxNzc1YQ==
5
5
  data.tar.gz: !binary |-
6
- OTFjZWM4Njg3ZDlmYjRjMDg2NDI0YTA5MWE3NTg2ODA5Y2Y1NWVlNw==
6
+ ZWU1MTRmMDBjMzIzMTZlZjJlYzFhMGMxMWNjNTlmZjQ3MWZkNWQ0OA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDgzYTk3NmU0YjE3ZjA5MWZhZjZmMWNmNjNiZjdmZGUyOGYyZGQ2N2MyNDZm
10
- OWNmM2E0NGRjMTY4NzBjOTA0MmE1NzQwODkyZDFlZGZkMWU4NjAyOGI2MjQ2
11
- ZDBmNWU0MGEyZTk0OTBjMGMwMjQxYjNhYjRhOWJkMWVhNjBkMGU=
9
+ NzYxZDVhYzVmNWMxZGE2NWRmYjZjNmRiYzg2YWZmYTg2NzdmYjMzOTFhNjVm
10
+ MDczNWE3NGUyNzZkY2NkNGI2MjQwZDBjMTEyNDgzNDc1ZmNmZTI5NzFiZjkz
11
+ NzkzY2E1MDZhODkyYjIyNmQwMDk3NzJlMWM2MDY4Nzc2NGEzODY=
12
12
  data.tar.gz: !binary |-
13
- ZmI0NzA0YzY0MDgzM2QyODE0NTc3YThjYjVhZGFhYTZiYzI0OTJjYTg4YjY2
14
- MTViYjRhNjg4OWU5YzVjNDM2MGM3YTNhN2NkNGJkYjY0MzNiMjZhZWQwYTk0
15
- OWExODRkZGQ1MjhhMzk3ZGIyYWZlZGMwZmJkNGVjYTk4MzQ3Y2Y=
13
+ NzQyMTZkZWYxMDI4N2RlYzY3ZjEzODQyZDUwODVmMzQ4NWQ2MDc5NGVlNjBl
14
+ ZjMzMTU0OTZjOWFmYzA5ZTczNGZlNDYwOGI0NGRhMWE3NzRiNTlkOWJmNzAy
15
+ MDU4MTAxYTcyOWE0MjQzMGEwMjMxOWZkNDM5MjYxZDk5MDUzZDc=
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,11 @@
1
+ CHANGELOG
2
+ =========
3
+
4
+ v0.0.2
5
+ ------
6
+
7
+ Dependent on `fun_with_testing` and `fun_with_files`, even `fun_with_version_strings`. It's all very silly, really.
8
+
1
9
  0.0.1
2
10
  -----
3
11
 
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
1
+ 0.0.2
@@ -6,7 +6,7 @@ module FunWith
6
6
  end
7
7
 
8
8
  def validate_gem
9
- FunWith::Gems::Validator.new(self).validate
9
+ FunWith::Gems::Validator.new( self ).validate
10
10
  end
11
11
 
12
12
  def valid_gem?
@@ -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] ||= [ @gem_const.root( "lib", "fun_with" ) ]
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/fun_with directory doesn't exist" unless @gem_const.root("lib", "fun_with").directory?
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 'simplecov'
1
+ require 'fun_with_testing'
2
2
 
3
- module SimpleCov::Configuration
4
- def clean_filters
5
- @filters = []
6
- end
7
- end
8
-
9
- SimpleCov.configure do
10
- clean_filters
11
- load_adapter 'test_frameworks'
12
- end
13
-
14
- ENV["COVERAGE"] && SimpleCov.start do
15
- add_filter "/.rvm/"
16
- end
17
- require 'rubygems'
18
- require 'bundler'
19
- begin
20
- Bundler.setup(:default, :development)
21
- rescue Bundler::BundlerError => e
22
- $stderr.puts e.message
23
- $stderr.puts "Run `bundle install` to install missing gems"
24
- exit e.status_code
25
- end
26
- require 'test/unit'
27
- require 'shoulda'
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
@@ -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.1
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-04-08 00:00:00.000000000 Z
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