resourcelogic 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/{MIT-LICENSE → LICENSE} +0 -0
- data/README.rdoc +1 -1
- data/Rakefile +47 -18
- data/VERSION.yml +4 -0
- data/lib/resourcelogic.rb +0 -1
- data/lib/resourcelogic/response_collector.rb +7 -2
- data/resourcelogic.gemspec +62 -0
- metadata +9 -20
- data/Manifest.txt +0 -25
- data/lib/resourcelogic/version.rb +0 -51
data/.gitignore
ADDED
data/{MIT-LICENSE → LICENSE}
RENAMED
File without changes
|
data/README.rdoc
CHANGED
@@ -6,7 +6,7 @@ The purpose of Resourcelogic is to support a development style I created called
|
|
6
6
|
|
7
7
|
== Helpful links
|
8
8
|
|
9
|
-
* <b>Documentation:</b> http://resourcelogic
|
9
|
+
* <b>Documentation:</b> http://rdoc.info/projects/binarylogic/resourcelogic
|
10
10
|
* <b>Bugs / feature suggestions:</b> http://binarylogic.lighthouseapp.com/projects/28581-resourcelogic
|
11
11
|
|
12
12
|
== Contextual Development
|
data/Rakefile
CHANGED
@@ -1,20 +1,49 @@
|
|
1
|
-
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
2
3
|
|
3
|
-
|
4
|
-
require
|
5
|
-
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "resourcelogic"
|
8
|
+
gem.summary = "Removes the need to namespace controllers by adding context and relative url functions among other things."
|
9
|
+
gem.email = "bjohnson@binarylogic.com"
|
10
|
+
gem.homepage = "http://github.com/binarylogic/resourcelogic"
|
11
|
+
gem.authors = ["Ben Johnson of Binary Logic"]
|
12
|
+
gem.rubyforge_project = "resourcelogic"
|
13
|
+
gem.add_dependency "activesupport"
|
14
|
+
end
|
15
|
+
rescue LoadError
|
16
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
17
|
+
end
|
6
18
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
end
|
19
|
+
require 'rake/testtask'
|
20
|
+
Rake::TestTask.new(:test) do |test|
|
21
|
+
test.libs << 'lib' << 'test'
|
22
|
+
test.pattern = 'test/**/*_test.rb'
|
23
|
+
test.verbose = true
|
24
|
+
end
|
25
|
+
|
26
|
+
begin
|
27
|
+
require 'rcov/rcovtask'
|
28
|
+
Rcov::RcovTask.new do |test|
|
29
|
+
test.libs << 'test'
|
30
|
+
test.pattern = 'test/**/*_test.rb'
|
31
|
+
test.verbose = true
|
32
|
+
end
|
33
|
+
rescue LoadError
|
34
|
+
task :rcov do
|
35
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
task :default => :test
|
40
|
+
|
41
|
+
begin
|
42
|
+
require 'rake/contrib/sshpublisher'
|
43
|
+
namespace :rubyforge do
|
44
|
+
desc "Release gem to RubyForge"
|
45
|
+
task :release => ["rubyforge:release:gem"]
|
46
|
+
end
|
47
|
+
rescue LoadError
|
48
|
+
puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
|
49
|
+
end
|
data/VERSION.yml
ADDED
data/lib/resourcelogic.rb
CHANGED
@@ -10,8 +10,13 @@ module Resourcelogic
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def method_missing(method_name, &block)
|
13
|
-
|
14
|
-
|
13
|
+
existing = self[method_name]
|
14
|
+
if existing
|
15
|
+
existing[0] = method_name
|
16
|
+
existing[1] = block || nil
|
17
|
+
else
|
18
|
+
@responses << [method_name, block || nil]
|
19
|
+
end
|
15
20
|
end
|
16
21
|
|
17
22
|
def [](symbol)
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{resourcelogic}
|
5
|
+
s.version = "0.12.0"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Ben Johnson of Binary Logic"]
|
9
|
+
s.date = %q{2009-06-28}
|
10
|
+
s.email = %q{bjohnson@binarylogic.com}
|
11
|
+
s.extra_rdoc_files = [
|
12
|
+
"LICENSE",
|
13
|
+
"README.rdoc"
|
14
|
+
]
|
15
|
+
s.files = [
|
16
|
+
".gitignore",
|
17
|
+
"CHANGELOG.rdoc",
|
18
|
+
"LICENSE",
|
19
|
+
"README.rdoc",
|
20
|
+
"Rakefile",
|
21
|
+
"VERSION.yml",
|
22
|
+
"init.rb",
|
23
|
+
"lib/resourcelogic.rb",
|
24
|
+
"lib/resourcelogic/accessors.rb",
|
25
|
+
"lib/resourcelogic/action_options.rb",
|
26
|
+
"lib/resourcelogic/actions.rb",
|
27
|
+
"lib/resourcelogic/aliases.rb",
|
28
|
+
"lib/resourcelogic/base.rb",
|
29
|
+
"lib/resourcelogic/child.rb",
|
30
|
+
"lib/resourcelogic/context.rb",
|
31
|
+
"lib/resourcelogic/context_options.rb",
|
32
|
+
"lib/resourcelogic/failable_action_options.rb",
|
33
|
+
"lib/resourcelogic/parent.rb",
|
34
|
+
"lib/resourcelogic/response_collector.rb",
|
35
|
+
"lib/resourcelogic/scope.rb",
|
36
|
+
"lib/resourcelogic/self.rb",
|
37
|
+
"lib/resourcelogic/sibling.rb",
|
38
|
+
"lib/resourcelogic/singleton.rb",
|
39
|
+
"lib/resourcelogic/sub_views.rb",
|
40
|
+
"lib/resourcelogic/urligence.rb",
|
41
|
+
"resourcelogic.gemspec"
|
42
|
+
]
|
43
|
+
s.homepage = %q{http://github.com/binarylogic/resourcelogic}
|
44
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
45
|
+
s.require_paths = ["lib"]
|
46
|
+
s.rubyforge_project = %q{resourcelogic}
|
47
|
+
s.rubygems_version = %q{1.3.4}
|
48
|
+
s.summary = %q{Removes the need to namespace controllers by adding context and relative url functions among other things.}
|
49
|
+
|
50
|
+
if s.respond_to? :specification_version then
|
51
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
52
|
+
s.specification_version = 3
|
53
|
+
|
54
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
55
|
+
s.add_runtime_dependency(%q<activesupport>, [">= 0"])
|
56
|
+
else
|
57
|
+
s.add_dependency(%q<activesupport>, [">= 0"])
|
58
|
+
end
|
59
|
+
else
|
60
|
+
s.add_dependency(%q<activesupport>, [">= 0"])
|
61
|
+
end
|
62
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resourcelogic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Johnson of Binary Logic
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-06-
|
12
|
+
date: 2009-06-28 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,32 +22,22 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: "0"
|
24
24
|
version:
|
25
|
-
|
26
|
-
name: hoe
|
27
|
-
type: :development
|
28
|
-
version_requirement:
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 2.0.0
|
34
|
-
version:
|
35
|
-
description: Removes the need to namespace controllers by adding context and relative url functions among other things.
|
25
|
+
description:
|
36
26
|
email: bjohnson@binarylogic.com
|
37
27
|
executables: []
|
38
28
|
|
39
29
|
extensions: []
|
40
30
|
|
41
31
|
extra_rdoc_files:
|
42
|
-
-
|
43
|
-
- CHANGELOG.rdoc
|
32
|
+
- LICENSE
|
44
33
|
- README.rdoc
|
45
34
|
files:
|
35
|
+
- .gitignore
|
46
36
|
- CHANGELOG.rdoc
|
47
|
-
-
|
48
|
-
- Manifest.txt
|
37
|
+
- LICENSE
|
49
38
|
- README.rdoc
|
50
39
|
- Rakefile
|
40
|
+
- VERSION.yml
|
51
41
|
- init.rb
|
52
42
|
- lib/resourcelogic.rb
|
53
43
|
- lib/resourcelogic/accessors.rb
|
@@ -67,15 +57,14 @@ files:
|
|
67
57
|
- lib/resourcelogic/singleton.rb
|
68
58
|
- lib/resourcelogic/sub_views.rb
|
69
59
|
- lib/resourcelogic/urligence.rb
|
70
|
-
-
|
60
|
+
- resourcelogic.gemspec
|
71
61
|
has_rdoc: true
|
72
62
|
homepage: http://github.com/binarylogic/resourcelogic
|
73
63
|
licenses: []
|
74
64
|
|
75
65
|
post_install_message:
|
76
66
|
rdoc_options:
|
77
|
-
- --
|
78
|
-
- README.rdoc
|
67
|
+
- --charset=UTF-8
|
79
68
|
require_paths:
|
80
69
|
- lib
|
81
70
|
required_ruby_version: !ruby/object:Gem::Requirement
|
data/Manifest.txt
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
CHANGELOG.rdoc
|
2
|
-
MIT-LICENSE
|
3
|
-
Manifest.txt
|
4
|
-
README.rdoc
|
5
|
-
Rakefile
|
6
|
-
init.rb
|
7
|
-
lib/resourcelogic.rb
|
8
|
-
lib/resourcelogic/accessors.rb
|
9
|
-
lib/resourcelogic/action_options.rb
|
10
|
-
lib/resourcelogic/actions.rb
|
11
|
-
lib/resourcelogic/aliases.rb
|
12
|
-
lib/resourcelogic/base.rb
|
13
|
-
lib/resourcelogic/child.rb
|
14
|
-
lib/resourcelogic/context.rb
|
15
|
-
lib/resourcelogic/context_options.rb
|
16
|
-
lib/resourcelogic/failable_action_options.rb
|
17
|
-
lib/resourcelogic/parent.rb
|
18
|
-
lib/resourcelogic/response_collector.rb
|
19
|
-
lib/resourcelogic/scope.rb
|
20
|
-
lib/resourcelogic/self.rb
|
21
|
-
lib/resourcelogic/sibling.rb
|
22
|
-
lib/resourcelogic/singleton.rb
|
23
|
-
lib/resourcelogic/sub_views.rb
|
24
|
-
lib/resourcelogic/urligence.rb
|
25
|
-
lib/resourcelogic/version.rb
|
@@ -1,51 +0,0 @@
|
|
1
|
-
module Resourcelogic # :nodoc:
|
2
|
-
# A class for describing the current version of a library. The version
|
3
|
-
# consists of three parts: the +major+ number, the +minor+ number, and the
|
4
|
-
# +tiny+ (or +patch+) number.
|
5
|
-
class Version
|
6
|
-
include Comparable
|
7
|
-
|
8
|
-
# A convenience method for instantiating a new Version instance with the
|
9
|
-
# given +major+, +minor+, and +tiny+ components.
|
10
|
-
def self.[](major, minor, tiny)
|
11
|
-
new(major, minor, tiny)
|
12
|
-
end
|
13
|
-
|
14
|
-
attr_reader :major, :minor, :tiny
|
15
|
-
|
16
|
-
# Create a new Version object with the given components.
|
17
|
-
def initialize(major, minor, tiny)
|
18
|
-
@major, @minor, @tiny = major, minor, tiny
|
19
|
-
end
|
20
|
-
|
21
|
-
# Compare this version to the given +version+ object.
|
22
|
-
def <=>(version)
|
23
|
-
to_i <=> version.to_i
|
24
|
-
end
|
25
|
-
|
26
|
-
# Converts this version object to a string, where each of the three
|
27
|
-
# version components are joined by the '.' character. E.g., 2.0.0.
|
28
|
-
def to_s
|
29
|
-
@to_s ||= [@major, @minor, @tiny].join(".")
|
30
|
-
end
|
31
|
-
|
32
|
-
# Converts this version to a canonical integer that may be compared
|
33
|
-
# against other version objects.
|
34
|
-
def to_i
|
35
|
-
@to_i ||= @major * 1_000_000 + @minor * 1_000 + @tiny
|
36
|
-
end
|
37
|
-
|
38
|
-
def to_a
|
39
|
-
[@major, @minor, @tiny]
|
40
|
-
end
|
41
|
-
|
42
|
-
MAJOR = 0
|
43
|
-
MINOR = 11
|
44
|
-
TINY = 0
|
45
|
-
|
46
|
-
# The current version as a Version instance
|
47
|
-
CURRENT = new(MAJOR, MINOR, TINY)
|
48
|
-
# The current version as a String
|
49
|
-
STRING = CURRENT.to_s
|
50
|
-
end
|
51
|
-
end
|