goodies 0.0.1
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.
- data/LICENSE +26 -0
- data/README +3 -0
- data/Rakefile +59 -0
- data/lib/goodies/lang/hash.rb +12 -0
- data/lib/goodies/lang/string.rb +10 -0
- data/lib/goodies/lang.rb +3 -0
- data/lib/goodies.rb +3 -0
- metadata +62 -0
data/LICENSE
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
== ruby-goodies
|
2
|
+
|
3
|
+
This software is licensed under the MIT license:
|
4
|
+
|
5
|
+
Copyright (c) <year> <copyright holders>
|
6
|
+
|
7
|
+
Permission is hereby granted, free of charge, to any person
|
8
|
+
obtaining a copy of this software and associated documentation
|
9
|
+
files (the "Software"), to deal in the Software without
|
10
|
+
restriction, including without limitation the rights to use,
|
11
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
+
copies of the Software, and to permit persons to whom the
|
13
|
+
Software is furnished to do so, subject to the following
|
14
|
+
conditions:
|
15
|
+
|
16
|
+
The above copyright notice and this permission notice shall be
|
17
|
+
included in all copies or substantial portions of the Software.
|
18
|
+
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
20
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
21
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
22
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
23
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
24
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
25
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
26
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
data/README
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
#
|
2
|
+
# To change this template, choose Tools | Templates
|
3
|
+
# and open the template in the editor.
|
4
|
+
|
5
|
+
|
6
|
+
require 'rubygems'
|
7
|
+
require 'rake'
|
8
|
+
require 'rake/clean'
|
9
|
+
require 'rake/gempackagetask'
|
10
|
+
require 'rake/rdoctask'
|
11
|
+
require 'rake/testtask'
|
12
|
+
require 'spec/rake/spectask'
|
13
|
+
|
14
|
+
spec = Gem::Specification.new do |s|
|
15
|
+
s.name = 'goodies'
|
16
|
+
s.version = '0.0.1'
|
17
|
+
s.has_rdoc = true
|
18
|
+
s.extra_rdoc_files = ['README', 'LICENSE']
|
19
|
+
s.summary = 'Developer tools to make your life easier'
|
20
|
+
s.description = <<DESC
|
21
|
+
Developer tools to make your life easier. As seen on goodercode.com.
|
22
|
+
DESC
|
23
|
+
s.author = 'Kerry R Wilson'
|
24
|
+
s.email = 'kwilson@goodercode.com'
|
25
|
+
# s.executables = ['your_executable_here']
|
26
|
+
s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,lib,spec}/**/*")
|
27
|
+
s.require_path = "lib"
|
28
|
+
s.bindir = "bin"
|
29
|
+
end
|
30
|
+
|
31
|
+
Rake::GemPackageTask.new(spec) do |p|
|
32
|
+
p.gem_spec = spec
|
33
|
+
p.need_tar = true
|
34
|
+
p.need_zip = true
|
35
|
+
end
|
36
|
+
|
37
|
+
Rake::RDocTask.new do |rdoc|
|
38
|
+
files =['README', 'LICENSE', 'lib/**/*.rb']
|
39
|
+
rdoc.rdoc_files.add(files)
|
40
|
+
rdoc.main = "README" # page to start on
|
41
|
+
rdoc.title = "ruby-goodies Docs"
|
42
|
+
rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
|
43
|
+
rdoc.options << '--line-numbers'
|
44
|
+
end
|
45
|
+
|
46
|
+
Rake::TestTask.new do |t|
|
47
|
+
t.test_files = FileList['test/**/*.rb']
|
48
|
+
end
|
49
|
+
|
50
|
+
Spec::Rake::SpecTask.new do |t|
|
51
|
+
t.spec_files = FileList['spec/**/*.rb']
|
52
|
+
t.libs << Dir["lib"]
|
53
|
+
end
|
54
|
+
|
55
|
+
gem_file = "#{spec.name}-#{spec.version}.gem"
|
56
|
+
desc "Install the gem file #{gem_file}"
|
57
|
+
Rake::Task.define_task :install => :gem do |t|
|
58
|
+
exec "gem install pkg/#{gem_file}"
|
59
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class ::Hash
|
2
|
+
|
3
|
+
# Hash::method_missing("name")
|
4
|
+
#
|
5
|
+
# Method returns hash values using object notation
|
6
|
+
def method_missing(name)
|
7
|
+
return self[name] if key? name
|
8
|
+
self.each { |k,v| return v if k.to_s.to_sym == name }
|
9
|
+
super.method_missing name
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
data/lib/goodies/lang.rb
ADDED
data/lib/goodies.rb
ADDED
metadata
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: goodies
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kerry R Wilson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-02-15 00:00:00 -06:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: " Developer tools to make your life easier. As seen on goodercode.com.\n"
|
17
|
+
email: kwilson@goodercode.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README
|
24
|
+
- LICENSE
|
25
|
+
files:
|
26
|
+
- LICENSE
|
27
|
+
- README
|
28
|
+
- Rakefile
|
29
|
+
- lib/goodies.rb
|
30
|
+
- lib/goodies/lang.rb
|
31
|
+
- lib/goodies/lang/hash.rb
|
32
|
+
- lib/goodies/lang/string.rb
|
33
|
+
has_rdoc: true
|
34
|
+
homepage:
|
35
|
+
licenses: []
|
36
|
+
|
37
|
+
post_install_message:
|
38
|
+
rdoc_options: []
|
39
|
+
|
40
|
+
require_paths:
|
41
|
+
- lib
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: "0"
|
47
|
+
version:
|
48
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: "0"
|
53
|
+
version:
|
54
|
+
requirements: []
|
55
|
+
|
56
|
+
rubyforge_project:
|
57
|
+
rubygems_version: 1.3.5
|
58
|
+
signing_key:
|
59
|
+
specification_version: 3
|
60
|
+
summary: Developer tools to make your life easier
|
61
|
+
test_files: []
|
62
|
+
|