diy 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/{README.txt → README.rdoc} +1 -4
- data/Rakefile +24 -23
- data/diy.gemspec +131 -0
- data/lib/diy.rb +1 -1
- data/lib/diy/factory.rb +36 -0
- data/test/files/factory/beef.rb +5 -0
- data/test/files/factory/dog.rb +6 -0
- data/test/files/factory/factory.yml +19 -0
- data/test/files/factory/farm/llama.rb +7 -0
- data/test/files/factory/farm/pork.rb +7 -0
- data/test/files/factory/kitten.rb +13 -0
- metadata +18 -36
- data/Manifest.txt +0 -89
- data/homepage/Notes.txt +0 -27
- data/homepage/Rakefile +0 -14
- data/homepage/diy_example.png +0 -0
- data/homepage/index.erb +0 -36
- data/homepage/index.html +0 -45
- data/homepage/objects_yml.png +0 -0
- data/homepage/page_header.graffle +0 -0
- data/homepage/page_header.html +0 -9
- data/homepage/page_header.png +0 -0
data/History.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== 1.1.2 / 2009-11-30
|
2
|
+
* Converted to Jeweler for gem packaging
|
3
|
+
* diy/factory.rb was somehow missing from the 1.1.1 gem on gemcutter. This has been fixed as part of the Jeweler changeover.
|
4
|
+
* Rebuilt homepage http://atomicobject.github.com/diy
|
5
|
+
|
1
6
|
== 1.1.1 / 2008-05-21
|
2
7
|
* Fixed bug that did not allow a method to be properly injected into an object
|
3
8
|
|
data/{README.txt → README.rdoc}
RENAMED
@@ -1,7 +1,6 @@
|
|
1
1
|
== DIY
|
2
2
|
|
3
|
-
* http://
|
4
|
-
* http://rubyforge.org/projects/atomicobjectrb/
|
3
|
+
* http://atomicobject.github.com/diy
|
5
4
|
|
6
5
|
== DESCRIPTION:
|
7
6
|
|
@@ -59,8 +58,6 @@ Sample code for Engine's constructor:
|
|
59
58
|
Writing code like that is repetetive; that's why we created the Constructor gem, which lets you
|
60
59
|
specify object components using the "constructor" class method:
|
61
60
|
|
62
|
-
* http://atomicobjectrb.rubyforge.org/constructor
|
63
|
-
|
64
61
|
Using constructor, you can write Engine like this:
|
65
62
|
|
66
63
|
class Engine
|
data/Rakefile
CHANGED
@@ -1,32 +1,33 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require 'hoe'
|
3
|
-
|
4
|
-
|
5
|
-
$: << "lib"
|
6
|
-
require 'diy.rb'
|
7
2
|
|
8
3
|
task :default => [ :test ]
|
9
4
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
p.description = p.paragraphs_of('README.txt', 3).join("\n\n")
|
16
|
-
p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
|
17
|
-
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
|
18
|
-
p.test_globs = 'test/*_test.rb'
|
19
|
-
p.extra_deps << ['constructor', '>= 1.0.0']
|
5
|
+
require 'rake/testtask'
|
6
|
+
Rake::TestTask.new do |t|
|
7
|
+
t.libs << "test"
|
8
|
+
t.test_files = FileList['test/**/*_test.rb']
|
9
|
+
t.verbose = true
|
20
10
|
end
|
21
11
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
12
|
+
|
13
|
+
begin
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gemspec|
|
16
|
+
$: << "lib"
|
17
|
+
require 'diy.rb'
|
18
|
+
gemspec.name = 'diy'
|
19
|
+
gemspec.version = DIY::VERSION
|
20
|
+
gemspec.summary = 'Constructor-based dependency injection container using YAML input.'
|
21
|
+
gemspec.description = 'Constructor-based dependency injection container using YAML input.'
|
22
|
+
gemspec.homepage = 'http://atomicobject.github.com/diy'
|
23
|
+
gemspec.authors = 'Atomic Object'
|
24
|
+
gemspec.email = 'github@atomicobject.com'
|
25
|
+
gemspec.test_files = FileList['test/*_test.rb']
|
26
|
+
gemspec.add_dependency 'constructor', '>= 1.0.0'
|
28
27
|
end
|
29
28
|
|
30
|
-
|
31
|
-
|
29
|
+
Jeweler::GemcutterTasks.new
|
30
|
+
|
31
|
+
rescue LoadError
|
32
|
+
puts "(jeweler not installed)"
|
32
33
|
end
|
data/diy.gemspec
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{diy}
|
8
|
+
s.version = "1.1.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Atomic Object"]
|
12
|
+
s.date = %q{2009-12-01}
|
13
|
+
s.description = %q{Constructor-based dependency injection container using YAML input.}
|
14
|
+
s.email = %q{github@atomicobject.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"README.rdoc"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
"History.txt",
|
20
|
+
"README.rdoc",
|
21
|
+
"Rakefile",
|
22
|
+
"TODO.txt",
|
23
|
+
"diy.gemspec",
|
24
|
+
"lib/diy.rb",
|
25
|
+
"lib/diy/factory.rb",
|
26
|
+
"sample_code/car.rb",
|
27
|
+
"sample_code/chassis.rb",
|
28
|
+
"sample_code/diy_example.rb",
|
29
|
+
"sample_code/engine.rb",
|
30
|
+
"sample_code/objects.yml",
|
31
|
+
"test/constructor.rb",
|
32
|
+
"test/diy_test.rb",
|
33
|
+
"test/factory_test.rb",
|
34
|
+
"test/files/broken_construction.yml",
|
35
|
+
"test/files/cat/cat.rb",
|
36
|
+
"test/files/cat/extra_conflict.yml",
|
37
|
+
"test/files/cat/heritage.rb",
|
38
|
+
"test/files/cat/needs_input.yml",
|
39
|
+
"test/files/cat/the_cat_lineage.rb",
|
40
|
+
"test/files/dog/dog_model.rb",
|
41
|
+
"test/files/dog/dog_presenter.rb",
|
42
|
+
"test/files/dog/dog_view.rb",
|
43
|
+
"test/files/dog/file_resolver.rb",
|
44
|
+
"test/files/dog/other_thing.rb",
|
45
|
+
"test/files/dog/simple.yml",
|
46
|
+
"test/files/donkey/foo.rb",
|
47
|
+
"test/files/donkey/foo/bar/qux.rb",
|
48
|
+
"test/files/factory/beef.rb",
|
49
|
+
"test/files/factory/dog.rb",
|
50
|
+
"test/files/factory/factory.yml",
|
51
|
+
"test/files/factory/farm/llama.rb",
|
52
|
+
"test/files/factory/farm/pork.rb",
|
53
|
+
"test/files/factory/kitten.rb",
|
54
|
+
"test/files/fud/objects.yml",
|
55
|
+
"test/files/fud/toy.rb",
|
56
|
+
"test/files/functions/attached_things_builder.rb",
|
57
|
+
"test/files/functions/invalid_method.yml",
|
58
|
+
"test/files/functions/method_extractor.rb",
|
59
|
+
"test/files/functions/nonsingleton_objects.yml",
|
60
|
+
"test/files/functions/objects.yml",
|
61
|
+
"test/files/functions/thing.rb",
|
62
|
+
"test/files/functions/thing_builder.rb",
|
63
|
+
"test/files/functions/things_builder.rb",
|
64
|
+
"test/files/gnu/objects.yml",
|
65
|
+
"test/files/gnu/thinger.rb",
|
66
|
+
"test/files/goat/base.rb",
|
67
|
+
"test/files/goat/can.rb",
|
68
|
+
"test/files/goat/goat.rb",
|
69
|
+
"test/files/goat/objects.yml",
|
70
|
+
"test/files/goat/paper.rb",
|
71
|
+
"test/files/goat/plane.rb",
|
72
|
+
"test/files/goat/shirt.rb",
|
73
|
+
"test/files/goat/wings.rb",
|
74
|
+
"test/files/horse/holder_thing.rb",
|
75
|
+
"test/files/horse/objects.yml",
|
76
|
+
"test/files/namespace/animal/bird.rb",
|
77
|
+
"test/files/namespace/animal/cat.rb",
|
78
|
+
"test/files/namespace/animal/reptile/hardshell/turtle.rb",
|
79
|
+
"test/files/namespace/animal/reptile/lizard.rb",
|
80
|
+
"test/files/namespace/bad_module_specified.yml",
|
81
|
+
"test/files/namespace/class_name_combine.yml",
|
82
|
+
"test/files/namespace/hello.txt",
|
83
|
+
"test/files/namespace/no_module_specified.yml",
|
84
|
+
"test/files/namespace/objects.yml",
|
85
|
+
"test/files/namespace/road.rb",
|
86
|
+
"test/files/namespace/sky.rb",
|
87
|
+
"test/files/namespace/subcontext.yml",
|
88
|
+
"test/files/non_singleton/air.rb",
|
89
|
+
"test/files/non_singleton/fat_cat.rb",
|
90
|
+
"test/files/non_singleton/objects.yml",
|
91
|
+
"test/files/non_singleton/pig.rb",
|
92
|
+
"test/files/non_singleton/thread_spinner.rb",
|
93
|
+
"test/files/non_singleton/tick.rb",
|
94
|
+
"test/files/non_singleton/yard.rb",
|
95
|
+
"test/files/yak/core_model.rb",
|
96
|
+
"test/files/yak/core_presenter.rb",
|
97
|
+
"test/files/yak/core_view.rb",
|
98
|
+
"test/files/yak/data_source.rb",
|
99
|
+
"test/files/yak/fringe_model.rb",
|
100
|
+
"test/files/yak/fringe_presenter.rb",
|
101
|
+
"test/files/yak/fringe_view.rb",
|
102
|
+
"test/files/yak/giant_squid.rb",
|
103
|
+
"test/files/yak/krill.rb",
|
104
|
+
"test/files/yak/my_objects.yml",
|
105
|
+
"test/files/yak/sub_sub_context_test.yml",
|
106
|
+
"test/test_helper.rb"
|
107
|
+
]
|
108
|
+
s.homepage = %q{http://atomicobject.github.com/diy}
|
109
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
110
|
+
s.require_paths = ["lib"]
|
111
|
+
s.rubygems_version = %q{1.3.5}
|
112
|
+
s.summary = %q{Constructor-based dependency injection container using YAML input.}
|
113
|
+
s.test_files = [
|
114
|
+
"test/diy_test.rb",
|
115
|
+
"test/factory_test.rb"
|
116
|
+
]
|
117
|
+
|
118
|
+
if s.respond_to? :specification_version then
|
119
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
120
|
+
s.specification_version = 3
|
121
|
+
|
122
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
123
|
+
s.add_runtime_dependency(%q<constructor>, [">= 1.0.0"])
|
124
|
+
else
|
125
|
+
s.add_dependency(%q<constructor>, [">= 1.0.0"])
|
126
|
+
end
|
127
|
+
else
|
128
|
+
s.add_dependency(%q<constructor>, [">= 1.0.0"])
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
data/lib/diy.rb
CHANGED
data/lib/diy/factory.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
module DIY #:nodoc:#
|
2
|
+
class FactoryDef #:nodoc:
|
3
|
+
attr_accessor :name, :target, :class_name, :library
|
4
|
+
|
5
|
+
def initialize(opts)
|
6
|
+
@name, @target, @library, @auto_require =
|
7
|
+
opts[:name], opts[:target], opts[:library], opts[:auto_require]
|
8
|
+
|
9
|
+
@class_name = Infl.camelize(@target)
|
10
|
+
@library ||= Infl.underscore(@class_name) if @auto_require
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class Context
|
15
|
+
def construct_factory(key)
|
16
|
+
factory_def = @defs[key]
|
17
|
+
# puts "requiring #{factory_def.library}"
|
18
|
+
require factory_def.library if factory_def.library
|
19
|
+
|
20
|
+
big_c = get_class_for_name_with_module_delimeters(factory_def.class_name)
|
21
|
+
|
22
|
+
FactoryFactory.new(big_c)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class FactoryFactory
|
27
|
+
def initialize(clazz)
|
28
|
+
@class_to_create = clazz
|
29
|
+
end
|
30
|
+
|
31
|
+
def create *args
|
32
|
+
@class_to_create.new *args
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
cat_factory:
|
2
|
+
builds: kitten
|
3
|
+
library: kitten
|
4
|
+
|
5
|
+
dog_factory:
|
6
|
+
builds: dog
|
7
|
+
|
8
|
+
using_namespace Farm:
|
9
|
+
llama_factory:
|
10
|
+
builds: llama
|
11
|
+
|
12
|
+
+inny:
|
13
|
+
bull_factory:
|
14
|
+
builds: beef
|
15
|
+
|
16
|
+
+congress:
|
17
|
+
using_namespace Farm:
|
18
|
+
politician:
|
19
|
+
builds: pork
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Atomic Object
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-01 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,46 +22,22 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 1.0.0
|
24
24
|
version:
|
25
|
-
-
|
26
|
-
|
27
|
-
type: :development
|
28
|
-
version_requirement:
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 2.3.3
|
34
|
-
version:
|
35
|
-
description: |-
|
36
|
-
DIY (Dependency Injection in YAML) is a simple dependency injection library
|
37
|
-
which focuses on declarative composition of objects through constructor injection.
|
38
|
-
email: dev@atomicobject.com
|
25
|
+
description: Constructor-based dependency injection container using YAML input.
|
26
|
+
email: github@atomicobject.com
|
39
27
|
executables: []
|
40
28
|
|
41
29
|
extensions: []
|
42
30
|
|
43
31
|
extra_rdoc_files:
|
44
|
-
-
|
45
|
-
- Manifest.txt
|
46
|
-
- README.txt
|
47
|
-
- TODO.txt
|
48
|
-
- homepage/Notes.txt
|
32
|
+
- README.rdoc
|
49
33
|
files:
|
50
34
|
- History.txt
|
51
|
-
-
|
52
|
-
- README.txt
|
35
|
+
- README.rdoc
|
53
36
|
- Rakefile
|
54
37
|
- TODO.txt
|
55
|
-
-
|
56
|
-
- homepage/Rakefile
|
57
|
-
- homepage/diy_example.png
|
58
|
-
- homepage/index.erb
|
59
|
-
- homepage/index.html
|
60
|
-
- homepage/objects_yml.png
|
61
|
-
- homepage/page_header.graffle
|
62
|
-
- homepage/page_header.html
|
63
|
-
- homepage/page_header.png
|
38
|
+
- diy.gemspec
|
64
39
|
- lib/diy.rb
|
40
|
+
- lib/diy/factory.rb
|
65
41
|
- sample_code/car.rb
|
66
42
|
- sample_code/chassis.rb
|
67
43
|
- sample_code/diy_example.rb
|
@@ -69,6 +45,7 @@ files:
|
|
69
45
|
- sample_code/objects.yml
|
70
46
|
- test/constructor.rb
|
71
47
|
- test/diy_test.rb
|
48
|
+
- test/factory_test.rb
|
72
49
|
- test/files/broken_construction.yml
|
73
50
|
- test/files/cat/cat.rb
|
74
51
|
- test/files/cat/extra_conflict.yml
|
@@ -83,6 +60,12 @@ files:
|
|
83
60
|
- test/files/dog/simple.yml
|
84
61
|
- test/files/donkey/foo.rb
|
85
62
|
- test/files/donkey/foo/bar/qux.rb
|
63
|
+
- test/files/factory/beef.rb
|
64
|
+
- test/files/factory/dog.rb
|
65
|
+
- test/files/factory/factory.yml
|
66
|
+
- test/files/factory/farm/llama.rb
|
67
|
+
- test/files/factory/farm/pork.rb
|
68
|
+
- test/files/factory/kitten.rb
|
86
69
|
- test/files/fud/objects.yml
|
87
70
|
- test/files/fud/toy.rb
|
88
71
|
- test/files/functions/attached_things_builder.rb
|
@@ -137,13 +120,12 @@ files:
|
|
137
120
|
- test/files/yak/sub_sub_context_test.yml
|
138
121
|
- test/test_helper.rb
|
139
122
|
has_rdoc: true
|
140
|
-
homepage:
|
123
|
+
homepage: http://atomicobject.github.com/diy
|
141
124
|
licenses: []
|
142
125
|
|
143
126
|
post_install_message:
|
144
127
|
rdoc_options:
|
145
|
-
- --
|
146
|
-
- README.txt
|
128
|
+
- --charset=UTF-8
|
147
129
|
require_paths:
|
148
130
|
- lib
|
149
131
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -160,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
142
|
version:
|
161
143
|
requirements: []
|
162
144
|
|
163
|
-
rubyforge_project:
|
145
|
+
rubyforge_project:
|
164
146
|
rubygems_version: 1.3.5
|
165
147
|
signing_key:
|
166
148
|
specification_version: 3
|
data/Manifest.txt
DELETED
@@ -1,89 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
Manifest.txt
|
3
|
-
README.txt
|
4
|
-
Rakefile
|
5
|
-
TODO.txt
|
6
|
-
homepage/Notes.txt
|
7
|
-
homepage/Rakefile
|
8
|
-
homepage/diy_example.png
|
9
|
-
homepage/index.erb
|
10
|
-
homepage/index.html
|
11
|
-
homepage/objects_yml.png
|
12
|
-
homepage/page_header.graffle
|
13
|
-
homepage/page_header.html
|
14
|
-
homepage/page_header.png
|
15
|
-
lib/diy.rb
|
16
|
-
sample_code/car.rb
|
17
|
-
sample_code/chassis.rb
|
18
|
-
sample_code/diy_example.rb
|
19
|
-
sample_code/engine.rb
|
20
|
-
sample_code/objects.yml
|
21
|
-
test/constructor.rb
|
22
|
-
test/diy_test.rb
|
23
|
-
test/files/broken_construction.yml
|
24
|
-
test/files/cat/cat.rb
|
25
|
-
test/files/cat/extra_conflict.yml
|
26
|
-
test/files/cat/heritage.rb
|
27
|
-
test/files/cat/needs_input.yml
|
28
|
-
test/files/cat/the_cat_lineage.rb
|
29
|
-
test/files/dog/dog_model.rb
|
30
|
-
test/files/dog/dog_presenter.rb
|
31
|
-
test/files/dog/dog_view.rb
|
32
|
-
test/files/dog/file_resolver.rb
|
33
|
-
test/files/dog/other_thing.rb
|
34
|
-
test/files/dog/simple.yml
|
35
|
-
test/files/donkey/foo.rb
|
36
|
-
test/files/donkey/foo/bar/qux.rb
|
37
|
-
test/files/fud/objects.yml
|
38
|
-
test/files/fud/toy.rb
|
39
|
-
test/files/functions/attached_things_builder.rb
|
40
|
-
test/files/functions/invalid_method.yml
|
41
|
-
test/files/functions/method_extractor.rb
|
42
|
-
test/files/functions/nonsingleton_objects.yml
|
43
|
-
test/files/functions/objects.yml
|
44
|
-
test/files/functions/thing.rb
|
45
|
-
test/files/functions/thing_builder.rb
|
46
|
-
test/files/functions/things_builder.rb
|
47
|
-
test/files/gnu/objects.yml
|
48
|
-
test/files/gnu/thinger.rb
|
49
|
-
test/files/goat/base.rb
|
50
|
-
test/files/goat/can.rb
|
51
|
-
test/files/goat/goat.rb
|
52
|
-
test/files/goat/objects.yml
|
53
|
-
test/files/goat/paper.rb
|
54
|
-
test/files/goat/plane.rb
|
55
|
-
test/files/goat/shirt.rb
|
56
|
-
test/files/goat/wings.rb
|
57
|
-
test/files/horse/holder_thing.rb
|
58
|
-
test/files/horse/objects.yml
|
59
|
-
test/files/namespace/animal/bird.rb
|
60
|
-
test/files/namespace/animal/cat.rb
|
61
|
-
test/files/namespace/animal/reptile/hardshell/turtle.rb
|
62
|
-
test/files/namespace/animal/reptile/lizard.rb
|
63
|
-
test/files/namespace/bad_module_specified.yml
|
64
|
-
test/files/namespace/class_name_combine.yml
|
65
|
-
test/files/namespace/hello.txt
|
66
|
-
test/files/namespace/no_module_specified.yml
|
67
|
-
test/files/namespace/objects.yml
|
68
|
-
test/files/namespace/road.rb
|
69
|
-
test/files/namespace/sky.rb
|
70
|
-
test/files/namespace/subcontext.yml
|
71
|
-
test/files/non_singleton/air.rb
|
72
|
-
test/files/non_singleton/fat_cat.rb
|
73
|
-
test/files/non_singleton/objects.yml
|
74
|
-
test/files/non_singleton/pig.rb
|
75
|
-
test/files/non_singleton/thread_spinner.rb
|
76
|
-
test/files/non_singleton/tick.rb
|
77
|
-
test/files/non_singleton/yard.rb
|
78
|
-
test/files/yak/core_model.rb
|
79
|
-
test/files/yak/core_presenter.rb
|
80
|
-
test/files/yak/core_view.rb
|
81
|
-
test/files/yak/data_source.rb
|
82
|
-
test/files/yak/fringe_model.rb
|
83
|
-
test/files/yak/fringe_presenter.rb
|
84
|
-
test/files/yak/fringe_view.rb
|
85
|
-
test/files/yak/giant_squid.rb
|
86
|
-
test/files/yak/krill.rb
|
87
|
-
test/files/yak/my_objects.yml
|
88
|
-
test/files/yak/sub_sub_context_test.yml
|
89
|
-
test/test_helper.rb
|
data/homepage/Notes.txt
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
Wed Nov 21 21:49:27 EST 2007
|
2
|
-
crosby
|
3
|
-
|
4
|
-
1. Edit page_header.graffle
|
5
|
-
2. Export as HTML imagemap
|
6
|
-
3. Open ../sample_code/synopsis.rb
|
7
|
-
4. Screen shot, save as sample_code.png
|
8
|
-
5. rake (rewrites index.html)
|
9
|
-
6. cd ..
|
10
|
-
7. rake publish_docs
|
11
|
-
|
12
|
-
page_header.graffle
|
13
|
-
Export-as-HTML-Imagemap
|
14
|
-
Use png
|
15
|
-
Use 125% scale
|
16
|
-
Remember to use the style inspector to assign actions to things that should be links.
|
17
|
-
|
18
|
-
rake index
|
19
|
-
Rewrites index.html using index.erb and page_header.html (and some values in the Rakefile)
|
20
|
-
|
21
|
-
The code sample screenshot:
|
22
|
-
Taken with Snapz Pro X (this is important, as Snapz is providing the
|
23
|
-
dropshadow and about 28 extra pixels widthwise)
|
24
|
-
|
25
|
-
Should be 650 px wide to line up with the page header.
|
26
|
-
|
27
|
-
Transparency: be conscious of WHAT'S IN THE BACKGROUND
|
data/homepage/Rakefile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
desc "Rewrite index.html using index.erb and publisher_homepage.html"
|
2
|
-
task :index do
|
3
|
-
require 'erb'
|
4
|
-
@title = "DIY - atomicobject.rb"
|
5
|
-
@header_html = File.read("page_header.html")
|
6
|
-
html = ERB.new(File.read("index.erb")).result(binding)
|
7
|
-
fname = "index.html"
|
8
|
-
File.open(fname,"w") do |f|
|
9
|
-
f.print html
|
10
|
-
end
|
11
|
-
puts "Wrote #{fname}"
|
12
|
-
end
|
13
|
-
|
14
|
-
task :default => :index
|
data/homepage/diy_example.png
DELETED
Binary file
|
data/homepage/index.erb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title><%= @title %></title>
|
4
|
-
<style>
|
5
|
-
.code_sample_title {
|
6
|
-
border-top: 1px solid grey;
|
7
|
-
width: 625px;
|
8
|
-
font: bold 12pt Trebuchet MS;
|
9
|
-
text-align:left;
|
10
|
-
margin: 5px;
|
11
|
-
padding-top: 5px;
|
12
|
-
}
|
13
|
-
</style>
|
14
|
-
</head>
|
15
|
-
|
16
|
-
<body>
|
17
|
-
|
18
|
-
<div align="center">
|
19
|
-
|
20
|
-
<%= @header_html %>
|
21
|
-
|
22
|
-
<div class="code_sample_title">
|
23
|
-
objects.yml:
|
24
|
-
</div>
|
25
|
-
<a href="rdoc/index.html"><img border="0" src="objects_yml.png"></a>
|
26
|
-
|
27
|
-
<div class="code_sample_title">
|
28
|
-
diy_example.rb:
|
29
|
-
</div>
|
30
|
-
<a href="rdoc/index.html"><img border="0" src="diy_example.png"></a>
|
31
|
-
</div>
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
</body>
|
36
|
-
</html>
|
data/homepage/index.html
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>DIY - atomicobject.rb</title>
|
4
|
-
<style>
|
5
|
-
.code_sample_title {
|
6
|
-
border-top: 1px solid grey;
|
7
|
-
width: 625px;
|
8
|
-
font: bold 12pt Trebuchet MS;
|
9
|
-
text-align:left;
|
10
|
-
margin: 5px;
|
11
|
-
padding-top: 5px;
|
12
|
-
}
|
13
|
-
</style>
|
14
|
-
</head>
|
15
|
-
|
16
|
-
<body>
|
17
|
-
|
18
|
-
<div align="center">
|
19
|
-
|
20
|
-
<map name="GraffleExport">
|
21
|
-
<area shape=rect coords="486,91,635,108" href="http://atomicobjectrb.rubyforge.org/">
|
22
|
-
<area shape=rect coords="485,120,635,187" href="rdoc/index.html">
|
23
|
-
<area shape=rect coords="310,120,463,187" href="http://rubyforge.org/frs/?group_id=4897&release_id=16546">
|
24
|
-
<area shape=rect coords="14,91,206,108" href="http://atomicobject.com">
|
25
|
-
<area shape=rect coords="572,16,627,71" href="http://atomicobjectrb.rubyforge.org/">
|
26
|
-
<area shape=rect coords="21,13,83,75" href="http://atomicobject.com">
|
27
|
-
</map>
|
28
|
-
<img border=0 src="page_header.png" usemap="#GraffleExport">
|
29
|
-
|
30
|
-
|
31
|
-
<div class="code_sample_title">
|
32
|
-
objects.yml:
|
33
|
-
</div>
|
34
|
-
<a href="rdoc/index.html"><img border="0" src="objects_yml.png"></a>
|
35
|
-
|
36
|
-
<div class="code_sample_title">
|
37
|
-
diy_example.rb:
|
38
|
-
</div>
|
39
|
-
<a href="rdoc/index.html"><img border="0" src="diy_example.png"></a>
|
40
|
-
</div>
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
</body>
|
45
|
-
</html>
|
data/homepage/objects_yml.png
DELETED
Binary file
|
Binary file
|
data/homepage/page_header.html
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
<map name="GraffleExport">
|
2
|
-
<area shape=rect coords="486,91,635,108" href="http://atomicobjectrb.rubyforge.org/">
|
3
|
-
<area shape=rect coords="485,120,635,187" href="rdoc/index.html">
|
4
|
-
<area shape=rect coords="310,120,463,187" href="http://rubyforge.org/frs/?group_id=4897&release_id=16546">
|
5
|
-
<area shape=rect coords="14,91,206,108" href="http://atomicobject.com">
|
6
|
-
<area shape=rect coords="572,16,627,71" href="http://atomicobjectrb.rubyforge.org/">
|
7
|
-
<area shape=rect coords="21,13,83,75" href="http://atomicobject.com">
|
8
|
-
</map>
|
9
|
-
<img border=0 src="page_header.png" usemap="#GraffleExport">
|
data/homepage/page_header.png
DELETED
Binary file
|