hashblock 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/.gitignore +4 -0
- data/Gemfile +4 -0
- data/Rakefile +20 -0
- data/hashblock.gemspec +23 -0
- data/lib/hashblock/version.rb +3 -0
- data/lib/hashblock.rb +4 -0
- metadata +70 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require 'bundler'
|
|
2
|
+
require 'rake/testtask'
|
|
3
|
+
Bundler::GemHelper.install_tasks
|
|
4
|
+
|
|
5
|
+
task :console do
|
|
6
|
+
$:.push(File.expand_path("lib", __FILE__))
|
|
7
|
+
require 'hashblock'
|
|
8
|
+
|
|
9
|
+
require 'irb'
|
|
10
|
+
ARGV.clear
|
|
11
|
+
IRB.start
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
Rake::TestTask.new do |t|
|
|
15
|
+
t.libs << "test"
|
|
16
|
+
t.test_files = FileList['test/*_test.rb']
|
|
17
|
+
t.verbose = true
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
task :default => :test
|
data/hashblock.gemspec
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
3
|
+
require "hashblock/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |s|
|
|
6
|
+
s.name = "hashblock"
|
|
7
|
+
s.version = Hashblock::VERSION
|
|
8
|
+
s.platform = Gem::Platform::RUBY
|
|
9
|
+
s.authors = ["Nathan Ladd"]
|
|
10
|
+
s.email = ["nathanladd@gmail.com"]
|
|
11
|
+
s.homepage = "http://github.com/ntl"
|
|
12
|
+
s.summary = %q{Hashblock converts ruby hashes and blocks to friendly config objects}
|
|
13
|
+
s.description = %q{Sometimes you'll want to allow the user to configure a plugin or some other object via a ruby block where options are specified through method calls. Hashblock is a tool which converts either a hash or a block into a plain old ruby object that is simple to access and modify. Hashblock supports deep nesting and even schema definitions to take the pain out of sanity checking your input.}
|
|
14
|
+
|
|
15
|
+
s.rubyforge_project = "hashblock"
|
|
16
|
+
|
|
17
|
+
s.files = `git ls-files`.split("\n")
|
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
19
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
20
|
+
s.require_paths = ["lib"]
|
|
21
|
+
|
|
22
|
+
s.add_development_dependency "shoulda"
|
|
23
|
+
end
|
data/lib/hashblock.rb
ADDED
metadata
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: hashblock
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
prerelease:
|
|
5
|
+
version: 0.0.1
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Nathan Ladd
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
|
|
13
|
+
date: 2011-07-26 00:00:00 Z
|
|
14
|
+
dependencies:
|
|
15
|
+
- !ruby/object:Gem::Dependency
|
|
16
|
+
name: shoulda
|
|
17
|
+
prerelease: false
|
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
19
|
+
none: false
|
|
20
|
+
requirements:
|
|
21
|
+
- - ">="
|
|
22
|
+
- !ruby/object:Gem::Version
|
|
23
|
+
version: "0"
|
|
24
|
+
type: :development
|
|
25
|
+
version_requirements: *id001
|
|
26
|
+
description: Sometimes you'll want to allow the user to configure a plugin or some other object via a ruby block where options are specified through method calls. Hashblock is a tool which converts either a hash or a block into a plain old ruby object that is simple to access and modify. Hashblock supports deep nesting and even schema definitions to take the pain out of sanity checking your input.
|
|
27
|
+
email:
|
|
28
|
+
- nathanladd@gmail.com
|
|
29
|
+
executables: []
|
|
30
|
+
|
|
31
|
+
extensions: []
|
|
32
|
+
|
|
33
|
+
extra_rdoc_files: []
|
|
34
|
+
|
|
35
|
+
files:
|
|
36
|
+
- .gitignore
|
|
37
|
+
- Gemfile
|
|
38
|
+
- Rakefile
|
|
39
|
+
- hashblock.gemspec
|
|
40
|
+
- lib/hashblock.rb
|
|
41
|
+
- lib/hashblock/version.rb
|
|
42
|
+
homepage: http://github.com/ntl
|
|
43
|
+
licenses: []
|
|
44
|
+
|
|
45
|
+
post_install_message:
|
|
46
|
+
rdoc_options: []
|
|
47
|
+
|
|
48
|
+
require_paths:
|
|
49
|
+
- lib
|
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
|
+
none: false
|
|
52
|
+
requirements:
|
|
53
|
+
- - ">="
|
|
54
|
+
- !ruby/object:Gem::Version
|
|
55
|
+
version: "0"
|
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
|
+
none: false
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: "0"
|
|
62
|
+
requirements: []
|
|
63
|
+
|
|
64
|
+
rubyforge_project: hashblock
|
|
65
|
+
rubygems_version: 1.8.6
|
|
66
|
+
signing_key:
|
|
67
|
+
specification_version: 3
|
|
68
|
+
summary: Hashblock converts ruby hashes and blocks to friendly config objects
|
|
69
|
+
test_files: []
|
|
70
|
+
|