rjspotter-innate 2009.06.29

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.
Files changed (128) hide show
  1. data/AUTHORS +10 -0
  2. data/CHANGELOG +3261 -0
  3. data/COPYING +18 -0
  4. data/MANIFEST +127 -0
  5. data/README.md +563 -0
  6. data/Rakefile +39 -0
  7. data/example/app/retro_games.rb +60 -0
  8. data/example/app/todo/layout/default.xhtml +11 -0
  9. data/example/app/todo/spec/todo.rb +63 -0
  10. data/example/app/todo/start.rb +51 -0
  11. data/example/app/todo/view/index.xhtml +39 -0
  12. data/example/app/whywiki_erb/layout/wiki.html.erb +15 -0
  13. data/example/app/whywiki_erb/spec/wiki.rb +19 -0
  14. data/example/app/whywiki_erb/start.rb +42 -0
  15. data/example/app/whywiki_erb/view/edit.erb +6 -0
  16. data/example/app/whywiki_erb/view/index.erb +12 -0
  17. data/example/custom_middleware.rb +35 -0
  18. data/example/hello.rb +11 -0
  19. data/example/howto_spec.rb +35 -0
  20. data/example/link.rb +27 -0
  21. data/example/provides.rb +31 -0
  22. data/example/session.rb +38 -0
  23. data/innate.gemspec +41 -0
  24. data/lib/innate.rb +269 -0
  25. data/lib/innate/action.rb +137 -0
  26. data/lib/innate/adapter.rb +76 -0
  27. data/lib/innate/cache.rb +134 -0
  28. data/lib/innate/cache/api.rb +128 -0
  29. data/lib/innate/cache/drb.rb +58 -0
  30. data/lib/innate/cache/file_based.rb +44 -0
  31. data/lib/innate/cache/marshal.rb +20 -0
  32. data/lib/innate/cache/memory.rb +21 -0
  33. data/lib/innate/cache/yaml.rb +20 -0
  34. data/lib/innate/current.rb +35 -0
  35. data/lib/innate/dynamap.rb +96 -0
  36. data/lib/innate/helper.rb +185 -0
  37. data/lib/innate/helper/aspect.rb +124 -0
  38. data/lib/innate/helper/cgi.rb +54 -0
  39. data/lib/innate/helper/flash.rb +36 -0
  40. data/lib/innate/helper/link.rb +94 -0
  41. data/lib/innate/helper/redirect.rb +85 -0
  42. data/lib/innate/helper/render.rb +152 -0
  43. data/lib/innate/helper/send_file.rb +26 -0
  44. data/lib/innate/log.rb +20 -0
  45. data/lib/innate/log/color_formatter.rb +49 -0
  46. data/lib/innate/log/hub.rb +77 -0
  47. data/lib/innate/middleware_compiler.rb +65 -0
  48. data/lib/innate/mock.rb +49 -0
  49. data/lib/innate/node.rb +1029 -0
  50. data/lib/innate/options.rb +37 -0
  51. data/lib/innate/options/dsl.rb +205 -0
  52. data/lib/innate/options/stub.rb +7 -0
  53. data/lib/innate/request.rb +141 -0
  54. data/lib/innate/response.rb +24 -0
  55. data/lib/innate/route.rb +114 -0
  56. data/lib/innate/session.rb +133 -0
  57. data/lib/innate/session/flash.rb +94 -0
  58. data/lib/innate/spec.rb +1 -0
  59. data/lib/innate/spec/bacon.rb +28 -0
  60. data/lib/innate/state.rb +26 -0
  61. data/lib/innate/state/accessor.rb +130 -0
  62. data/lib/innate/traited.rb +90 -0
  63. data/lib/innate/trinity.rb +18 -0
  64. data/lib/innate/version.rb +3 -0
  65. data/lib/innate/view.rb +97 -0
  66. data/lib/innate/view/erb.rb +14 -0
  67. data/lib/innate/view/etanni.rb +33 -0
  68. data/lib/innate/view/none.rb +9 -0
  69. data/spec/example/app/retro_games.rb +30 -0
  70. data/spec/example/hello.rb +13 -0
  71. data/spec/example/link.rb +25 -0
  72. data/spec/example/provides.rb +16 -0
  73. data/spec/example/session.rb +22 -0
  74. data/spec/helper.rb +10 -0
  75. data/spec/innate/action/layout.rb +121 -0
  76. data/spec/innate/action/layout/file_layout.xhtml +1 -0
  77. data/spec/innate/cache/common.rb +47 -0
  78. data/spec/innate/cache/marshal.rb +5 -0
  79. data/spec/innate/cache/memory.rb +5 -0
  80. data/spec/innate/cache/yaml.rb +5 -0
  81. data/spec/innate/dynamap.rb +22 -0
  82. data/spec/innate/helper.rb +86 -0
  83. data/spec/innate/helper/aspect.rb +75 -0
  84. data/spec/innate/helper/cgi.rb +37 -0
  85. data/spec/innate/helper/flash.rb +115 -0
  86. data/spec/innate/helper/link.rb +139 -0
  87. data/spec/innate/helper/redirect.rb +171 -0
  88. data/spec/innate/helper/render.rb +165 -0
  89. data/spec/innate/helper/send_file.rb +21 -0
  90. data/spec/innate/helper/view/aspect_hello.xhtml +1 -0
  91. data/spec/innate/helper/view/locals.xhtml +1 -0
  92. data/spec/innate/helper/view/loop.xhtml +4 -0
  93. data/spec/innate/helper/view/num.xhtml +1 -0
  94. data/spec/innate/helper/view/partial.xhtml +1 -0
  95. data/spec/innate/helper/view/recursive.xhtml +7 -0
  96. data/spec/innate/mock.rb +84 -0
  97. data/spec/innate/modes.rb +61 -0
  98. data/spec/innate/node/mapping.rb +37 -0
  99. data/spec/innate/node/node.rb +135 -0
  100. data/spec/innate/node/resolve.rb +82 -0
  101. data/spec/innate/node/view/another_layout/another_layout.xhtml +3 -0
  102. data/spec/innate/node/view/bar.xhtml +1 -0
  103. data/spec/innate/node/view/foo.html.xhtml +1 -0
  104. data/spec/innate/node/view/only_view.xhtml +1 -0
  105. data/spec/innate/node/view/with_layout.xhtml +1 -0
  106. data/spec/innate/node/wrap_action_call.rb +83 -0
  107. data/spec/innate/options.rb +123 -0
  108. data/spec/innate/parameter.rb +154 -0
  109. data/spec/innate/provides.rb +99 -0
  110. data/spec/innate/provides/list.html.xhtml +1 -0
  111. data/spec/innate/provides/list.txt.xhtml +1 -0
  112. data/spec/innate/request.rb +79 -0
  113. data/spec/innate/route.rb +135 -0
  114. data/spec/innate/session.rb +58 -0
  115. data/spec/innate/traited.rb +55 -0
  116. data/tasks/authors.rake +30 -0
  117. data/tasks/bacon.rake +66 -0
  118. data/tasks/changelog.rake +18 -0
  119. data/tasks/gem.rake +22 -0
  120. data/tasks/gem_setup.rake +99 -0
  121. data/tasks/grancher.rake +12 -0
  122. data/tasks/manifest.rake +4 -0
  123. data/tasks/rcov.rake +19 -0
  124. data/tasks/release.rake +53 -0
  125. data/tasks/reversion.rake +8 -0
  126. data/tasks/setup.rake +6 -0
  127. data/tasks/ycov.rake +84 -0
  128. metadata +218 -0
@@ -0,0 +1,8 @@
1
+ desc "update version.rb"
2
+ task :reversion do
3
+ File.open("lib/#{GEMSPEC.name}/version.rb", 'w+') do |file|
4
+ file.puts("module #{PROJECT_MODULE}")
5
+ file.puts(' VERSION = %p' % GEMSPEC.version.to_s)
6
+ file.puts('end')
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ desc 'install dependencies from gemspec'
2
+ task :setup => [:gem_setup] do
3
+ GemSetup.new :verbose => true do
4
+ setup_gemspec GEMSPEC
5
+ end
6
+ end
@@ -0,0 +1,84 @@
1
+ begin
2
+ require 'yard'
3
+
4
+ task 'Show Documentation coverage'
5
+ task :ycov => ['.yardoc'] do
6
+ YARD::Registry.load_yardoc
7
+ code_objects = YARD::Registry.paths.map{|path| YARD::Registry.at(path) }
8
+ code_objects.delete_if{|obj| obj.type == :root }
9
+ without_doc, with_doc = code_objects.partition{|obj| obj.docstring.empty? }
10
+
11
+ documented = with_doc.size
12
+ undocumented = without_doc.size
13
+ total = documented + undocumented
14
+ percentage = (documented / 0.01) / total
15
+
16
+ puts "Documentation coverage is %d/%d (%3.1f%%)" % [documented, total, percentage]
17
+ end
18
+
19
+ task 'ycov-full' => ['.yardoc'] do
20
+ require 'builder'
21
+
22
+ YARD::Registry.load_yardoc
23
+ code_objects = YARD::Registry.paths.map{|path| YARD::Registry.at(path) }
24
+ code_objects.delete_if{|obj| obj.type == :root }
25
+ without_doc, with_doc = code_objects.partition{|obj| obj.docstring.empty? }
26
+
27
+ list_objects = lambda{|body, list|
28
+ body.table(:width => '100%') do |table|
29
+ list.group_by{|obj| obj.type }.
30
+ sort_by{|k,v| k.to_s }.each do |type, objects|
31
+
32
+ table.tr do |tr|
33
+ tr.th(type.to_s, :colspan => 2)
34
+ end
35
+
36
+ objects.sort_by{|obj| obj.path }.each do |obj|
37
+ table.tr do |tr|
38
+ tr.td obj.path
39
+ tr.td "#{obj.file} +#{obj.line}"
40
+ end
41
+ end
42
+ end
43
+ end
44
+ }
45
+
46
+ File.open('ycov.html', 'w+') do |ycov|
47
+ builder = Builder::XmlMarkup.new(:target => ycov, :indent=>2)
48
+ builder.html do |html|
49
+ html.head do |head|
50
+ head.title 'YARD Coverage report'
51
+ end
52
+
53
+ html.body do |body|
54
+ body.h1 'YARD Coverage report'
55
+
56
+ body.h2 "#{without_doc.size} Undocumented objects"
57
+ list_objects[body, without_doc]
58
+
59
+ body.h2 "#{with_doc.size} Documented objects"
60
+ list_objects[body, with_doc]
61
+ end
62
+ end
63
+ end
64
+ end
65
+
66
+ file '.yardoc' => FileList['lib/**/*.rb'] do
67
+ files = ['lib/**/*.rb']
68
+ options = ['--no-output', '--private']
69
+ YARD::CLI::Yardoc.run(*(options + files))
70
+ end
71
+
72
+ desc 'Generate YARD documentation'
73
+ task :yardoc => ['.yardoc'] do
74
+ files = ['lib/**/*.rb']
75
+ options = [
76
+ '--output-dir', 'ydoc',
77
+ '--readme', PROJECT_README,
78
+ '--db', '.yardoc',
79
+ '--private']
80
+ YARD::CLI::Yardoc.run(*(options + files))
81
+ end
82
+ rescue LoadError
83
+ # you'll survive
84
+ end
metadata ADDED
@@ -0,0 +1,218 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rjspotter-innate
3
+ version: !ruby/object:Gem::Version
4
+ version: 2009.06.29
5
+ platform: ruby
6
+ authors:
7
+ - Michael 'manveru' Fellinger
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-06-30 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rack
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: 1.0.0
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: bacon
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.1.0
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: json
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 1.1.6
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: rack-test
47
+ type: :development
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 0.3.0
54
+ version:
55
+ description: Simple, straight-forward base for web-frameworks.
56
+ email: m.fellinger@gmail.com
57
+ executables: []
58
+
59
+ extensions: []
60
+
61
+ extra_rdoc_files: []
62
+
63
+ files:
64
+ - AUTHORS
65
+ - CHANGELOG
66
+ - COPYING
67
+ - MANIFEST
68
+ - README.md
69
+ - Rakefile
70
+ - example/app/retro_games.rb
71
+ - example/app/todo/layout/default.xhtml
72
+ - example/app/todo/spec/todo.rb
73
+ - example/app/todo/start.rb
74
+ - example/app/todo/view/index.xhtml
75
+ - example/app/whywiki_erb/layout/wiki.html.erb
76
+ - example/app/whywiki_erb/spec/wiki.rb
77
+ - example/app/whywiki_erb/start.rb
78
+ - example/app/whywiki_erb/view/edit.erb
79
+ - example/app/whywiki_erb/view/index.erb
80
+ - example/custom_middleware.rb
81
+ - example/hello.rb
82
+ - example/howto_spec.rb
83
+ - example/link.rb
84
+ - example/provides.rb
85
+ - example/session.rb
86
+ - innate.gemspec
87
+ - lib/innate.rb
88
+ - lib/innate/action.rb
89
+ - lib/innate/adapter.rb
90
+ - lib/innate/cache.rb
91
+ - lib/innate/cache/api.rb
92
+ - lib/innate/cache/drb.rb
93
+ - lib/innate/cache/file_based.rb
94
+ - lib/innate/cache/marshal.rb
95
+ - lib/innate/cache/memory.rb
96
+ - lib/innate/cache/yaml.rb
97
+ - lib/innate/current.rb
98
+ - lib/innate/dynamap.rb
99
+ - lib/innate/helper.rb
100
+ - lib/innate/helper/aspect.rb
101
+ - lib/innate/helper/cgi.rb
102
+ - lib/innate/helper/flash.rb
103
+ - lib/innate/helper/link.rb
104
+ - lib/innate/helper/redirect.rb
105
+ - lib/innate/helper/render.rb
106
+ - lib/innate/helper/send_file.rb
107
+ - lib/innate/log.rb
108
+ - lib/innate/log/color_formatter.rb
109
+ - lib/innate/log/hub.rb
110
+ - lib/innate/middleware_compiler.rb
111
+ - lib/innate/mock.rb
112
+ - lib/innate/node.rb
113
+ - lib/innate/options.rb
114
+ - lib/innate/options/dsl.rb
115
+ - lib/innate/options/stub.rb
116
+ - lib/innate/request.rb
117
+ - lib/innate/response.rb
118
+ - lib/innate/route.rb
119
+ - lib/innate/session.rb
120
+ - lib/innate/session/flash.rb
121
+ - lib/innate/spec.rb
122
+ - lib/innate/spec/bacon.rb
123
+ - lib/innate/state.rb
124
+ - lib/innate/state/accessor.rb
125
+ - lib/innate/traited.rb
126
+ - lib/innate/trinity.rb
127
+ - lib/innate/version.rb
128
+ - lib/innate/view.rb
129
+ - lib/innate/view/erb.rb
130
+ - lib/innate/view/etanni.rb
131
+ - lib/innate/view/none.rb
132
+ - spec/example/app/retro_games.rb
133
+ - spec/example/hello.rb
134
+ - spec/example/link.rb
135
+ - spec/example/provides.rb
136
+ - spec/example/session.rb
137
+ - spec/helper.rb
138
+ - spec/innate/action/layout.rb
139
+ - spec/innate/action/layout/file_layout.xhtml
140
+ - spec/innate/cache/common.rb
141
+ - spec/innate/cache/marshal.rb
142
+ - spec/innate/cache/memory.rb
143
+ - spec/innate/cache/yaml.rb
144
+ - spec/innate/dynamap.rb
145
+ - spec/innate/helper.rb
146
+ - spec/innate/helper/aspect.rb
147
+ - spec/innate/helper/cgi.rb
148
+ - spec/innate/helper/flash.rb
149
+ - spec/innate/helper/link.rb
150
+ - spec/innate/helper/redirect.rb
151
+ - spec/innate/helper/render.rb
152
+ - spec/innate/helper/send_file.rb
153
+ - spec/innate/helper/view/aspect_hello.xhtml
154
+ - spec/innate/helper/view/locals.xhtml
155
+ - spec/innate/helper/view/loop.xhtml
156
+ - spec/innate/helper/view/num.xhtml
157
+ - spec/innate/helper/view/partial.xhtml
158
+ - spec/innate/helper/view/recursive.xhtml
159
+ - spec/innate/mock.rb
160
+ - spec/innate/modes.rb
161
+ - spec/innate/node/mapping.rb
162
+ - spec/innate/node/node.rb
163
+ - spec/innate/node/resolve.rb
164
+ - spec/innate/node/view/another_layout/another_layout.xhtml
165
+ - spec/innate/node/view/bar.xhtml
166
+ - spec/innate/node/view/foo.html.xhtml
167
+ - spec/innate/node/view/only_view.xhtml
168
+ - spec/innate/node/view/with_layout.xhtml
169
+ - spec/innate/node/wrap_action_call.rb
170
+ - spec/innate/options.rb
171
+ - spec/innate/parameter.rb
172
+ - spec/innate/provides.rb
173
+ - spec/innate/provides/list.html.xhtml
174
+ - spec/innate/provides/list.txt.xhtml
175
+ - spec/innate/request.rb
176
+ - spec/innate/route.rb
177
+ - spec/innate/session.rb
178
+ - spec/innate/traited.rb
179
+ - tasks/authors.rake
180
+ - tasks/bacon.rake
181
+ - tasks/changelog.rake
182
+ - tasks/gem.rake
183
+ - tasks/gem_setup.rake
184
+ - tasks/grancher.rake
185
+ - tasks/manifest.rake
186
+ - tasks/rcov.rake
187
+ - tasks/release.rake
188
+ - tasks/reversion.rake
189
+ - tasks/setup.rake
190
+ - tasks/ycov.rake
191
+ has_rdoc: true
192
+ homepage: http://github.com/manveru/innate
193
+ post_install_message:
194
+ rdoc_options: []
195
+
196
+ require_paths:
197
+ - lib
198
+ required_ruby_version: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: "0"
203
+ version:
204
+ required_rubygems_version: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: "0"
209
+ version:
210
+ requirements: []
211
+
212
+ rubyforge_project: innate
213
+ rubygems_version: 1.2.0
214
+ signing_key:
215
+ specification_version: 2
216
+ summary: Powerful web-framework wrapper for Rack.
217
+ test_files: []
218
+