dao 2.2.3 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. data/Rakefile +68 -113
  2. data/TODO +3 -9
  3. data/a.rb +25 -0
  4. data/dao.gemspec +70 -14
  5. data/lib/dao.rb +8 -8
  6. data/lib/dao/api.rb +1 -0
  7. data/lib/dao/api/context.rb +48 -23
  8. data/lib/dao/api/dsl.rb +1 -1
  9. data/lib/dao/api/interfaces.rb +149 -117
  10. data/lib/dao/api/modes.rb +24 -23
  11. data/lib/dao/api/routes.rb +9 -0
  12. data/lib/dao/data.rb +9 -2
  13. data/lib/dao/errors.rb +15 -11
  14. data/lib/dao/form.rb +46 -37
  15. data/lib/dao/interface.rb +1 -1
  16. data/lib/dao/mode.rb +45 -20
  17. data/lib/dao/params.rb +35 -53
  18. data/lib/dao/path.rb +6 -9
  19. data/lib/dao/rails/lib/generators/dao/templates/api.rb +1 -1
  20. data/lib/dao/rails/lib/generators/dao/templates/dao_helper.rb +16 -0
  21. data/lib/dao/result.rb +26 -133
  22. data/lib/dao/route.rb +87 -0
  23. data/lib/dao/status.rb +96 -94
  24. data/lib/dao/support.rb +5 -3
  25. data/lib/dao/validations.rb +46 -442
  26. data/lib/dao/validations/base.rb +68 -0
  27. data/lib/dao/validations/common.rb +463 -0
  28. data/test/dao_test.rb +214 -33
  29. metadata +20 -112
  30. data/lib/dao/rails/app/api.rb +0 -55
  31. data/lib/dao/rails/app/controllers/api_controller.rb +0 -99
  32. data/sample/rails_app/Gemfile +0 -33
  33. data/sample/rails_app/Gemfile.lock +0 -88
  34. data/sample/rails_app/README +0 -1
  35. data/sample/rails_app/Rakefile +0 -7
  36. data/sample/rails_app/app/api.rb +0 -55
  37. data/sample/rails_app/app/controllers/api_controller.rb +0 -99
  38. data/sample/rails_app/app/controllers/application_controller.rb +0 -3
  39. data/sample/rails_app/app/helpers/application_helper.rb +0 -2
  40. data/sample/rails_app/app/views/layouts/application.html.erb +0 -14
  41. data/sample/rails_app/config.ru +0 -4
  42. data/sample/rails_app/config/application.rb +0 -51
  43. data/sample/rails_app/config/boot.rb +0 -13
  44. data/sample/rails_app/config/database.yml +0 -22
  45. data/sample/rails_app/config/environment.rb +0 -5
  46. data/sample/rails_app/config/environments/development.rb +0 -26
  47. data/sample/rails_app/config/environments/production.rb +0 -49
  48. data/sample/rails_app/config/environments/test.rb +0 -35
  49. data/sample/rails_app/config/initializers/backtrace_silencers.rb +0 -7
  50. data/sample/rails_app/config/initializers/inflections.rb +0 -10
  51. data/sample/rails_app/config/initializers/mime_types.rb +0 -5
  52. data/sample/rails_app/config/initializers/secret_token.rb +0 -7
  53. data/sample/rails_app/config/initializers/session_store.rb +0 -8
  54. data/sample/rails_app/config/locales/en.yml +0 -5
  55. data/sample/rails_app/config/routes.rb +0 -62
  56. data/sample/rails_app/db/development.sqlite3 +0 -0
  57. data/sample/rails_app/db/seeds.rb +0 -7
  58. data/sample/rails_app/doc/README_FOR_APP +0 -2
  59. data/sample/rails_app/log/development.log +0 -27
  60. data/sample/rails_app/log/production.log +0 -0
  61. data/sample/rails_app/log/server.log +0 -0
  62. data/sample/rails_app/log/test.log +0 -0
  63. data/sample/rails_app/pubic/javascripts/dao.js +0 -148
  64. data/sample/rails_app/public/404.html +0 -26
  65. data/sample/rails_app/public/422.html +0 -26
  66. data/sample/rails_app/public/500.html +0 -26
  67. data/sample/rails_app/public/favicon.ico +0 -0
  68. data/sample/rails_app/public/images/rails.png +0 -0
  69. data/sample/rails_app/public/index.html +0 -239
  70. data/sample/rails_app/public/javascripts/application.js +0 -2
  71. data/sample/rails_app/public/javascripts/controls.js +0 -965
  72. data/sample/rails_app/public/javascripts/dragdrop.js +0 -974
  73. data/sample/rails_app/public/javascripts/effects.js +0 -1123
  74. data/sample/rails_app/public/javascripts/prototype.js +0 -6001
  75. data/sample/rails_app/public/javascripts/rails.js +0 -175
  76. data/sample/rails_app/public/robots.txt +0 -5
  77. data/sample/rails_app/script/rails +0 -6
  78. data/sample/rails_app/test/performance/browsing_test.rb +0 -9
  79. data/sample/rails_app/test/test_helper.rb +0 -13
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  This.rubyforge_project = 'codeforpeople'
2
2
  This.author = "Ara T. Howard"
3
3
  This.email = "ara.t.howard@gmail.com"
4
- This.homepage = "http://github.com/ahoward/#{ This.lib }"
4
+ This.homepage = "https://github.com/ahoward/#{ This.lib }"
5
5
 
6
6
 
7
7
  task :default do
@@ -26,11 +26,10 @@ def run_tests!(which = nil)
26
26
 
27
27
  div = ('=' * 119)
28
28
  line = ('-' * 119)
29
- helper = nil #"-r ./test/helper.rb" if test(?e, "./test/helper.rb")
30
29
 
31
30
  test_rbs.each_with_index do |test_rb, index|
32
31
  testno = index + 1
33
- command = "#{ This.ruby } -I ./lib -I ./test/lib #{ helper } #{ test_rb }"
32
+ command = "#{ This.ruby } -I ./lib -I ./test/lib #{ test_rb }"
34
33
 
35
34
  puts
36
35
  say(div, :color => :cyan, :bold => true)
@@ -59,9 +58,9 @@ end
59
58
 
60
59
 
61
60
  task :gemspec do
62
- ignore_extensions = 'git', 'svn', 'tmp', /sw./, 'bak', 'gem'
63
- ignore_directories = %w[ pkg ]
64
- ignore_files = %w[ test/log ]
61
+ ignore_extensions = ['git', 'svn', 'tmp', /sw./, 'bak', 'gem']
62
+ ignore_directories = ['pkg']
63
+ ignore_files = ['test/log']
65
64
 
66
65
  shiteless =
67
66
  lambda do |list|
@@ -83,16 +82,14 @@ task :gemspec do
83
82
  end
84
83
 
85
84
  lib = This.lib
86
- namespace = This.namespace
85
+ object = This.object
87
86
  version = This.version
88
87
  files = shiteless[Dir::glob("**/**")]
89
88
  executables = shiteless[Dir::glob("bin/*")].map{|exe| File.basename(exe)}
90
- has_rdoc = true #File.exist?('doc')
89
+ #has_rdoc = true #File.exist?('doc')
91
90
  test_files = "test/#{ lib }.rb" if File.file?("test/#{ lib }.rb")
92
-
93
- summary = namespace.respond_to?(:summary) ? namespace.summary : "summary: #{ lib } kicks the ass"
94
- description = namespace.respond_to?(:description) ? namespace.description : "description: #{ lib } kicks the ass"
95
- dependencies = namespace.respond_to?(:dependencies) ? namespace.dependencies : []
91
+ summary = object.respond_to?(:summary) ? object.summary : "summary: #{ lib } kicks the ass"
92
+ description = object.respond_to?(:description) ? object.description : "description: #{ lib } kicks the ass"
96
93
 
97
94
  if This.extensions.nil?
98
95
  This.extensions = []
@@ -105,51 +102,45 @@ task :gemspec do
105
102
 
106
103
  template =
107
104
  if test(?e, 'gemspec.erb')
108
- IO.read('gemspec.erb')
105
+ Template{ IO.read('gemspec.erb') }
109
106
  else
110
- <<-__
111
- ## <%= lib %>.gemspec
112
- #
113
-
114
- Gem::Specification::new do |spec|
115
- spec.name = <%= lib.inspect %>
116
- spec.version = <%= version.inspect %>
117
- spec.platform = Gem::Platform::RUBY
118
- spec.summary = <%= lib.inspect %>
119
- spec.description = <%= description.inspect %>
120
-
121
- spec.files = <%= files.inspect %>
122
- spec.executables = <%= executables.inspect %>
123
-
124
- spec.require_path = "lib"
125
-
126
- spec.has_rdoc = <%= has_rdoc.inspect %>
127
-
128
- <% if defined?(test_files) %>
129
- spec.test_files = <%= test_files.inspect %>
130
- <% end %>
131
-
132
- <% dependencies.each do |dependency|
133
- lib, spec = dependency
134
- %>
135
- spec.add_dependency(*<%= spec.inspect %>)
136
- <% end %>
137
-
138
- spec.extensions.push(*<%= extensions.inspect %>)
139
-
140
- spec.rubyforge_project = <%= This.rubyforge_project.inspect %>
141
- spec.author = <%= This.author.inspect %>
142
- spec.email = <%= This.email.inspect %>
143
- spec.homepage = <%= This.homepage.inspect %>
144
- end
145
- __
146
- end
107
+ Template {
108
+ <<-__
109
+ ## #{ lib }.gemspec
110
+ #
111
+
112
+ Gem::Specification::new do |spec|
113
+ spec.name = #{ lib.inspect }
114
+ spec.version = #{ version.inspect }
115
+ spec.platform = Gem::Platform::RUBY
116
+ spec.summary = #{ lib.inspect }
117
+ spec.description = #{ description.inspect }
118
+
119
+ spec.files =\n#{ files.sort.pretty_inspect }
120
+ spec.executables = #{ executables.inspect }
121
+
122
+ spec.require_path = "lib"
123
+
124
+ spec.test_files = #{ test_files.inspect }
125
+
126
+ ### spec.add_dependency 'lib', '>= version'
127
+ #### spec.add_dependency 'map'
147
128
 
148
- template = Template{ template }
129
+ spec.extensions.push(*#{ extensions.inspect })
130
+
131
+ spec.rubyforge_project = #{ This.rubyforge_project.inspect }
132
+ spec.author = #{ This.author.inspect }
133
+ spec.email = #{ This.email.inspect }
134
+ spec.homepage = #{ This.homepage.inspect }
135
+ end
136
+ __
137
+ }
138
+ end
149
139
 
150
140
  Fu.mkdir_p(This.pkgdir)
151
- This.gemspec = File.join(This.dir, "#{ This.lib }.gemspec") #File.join(This.pkgdir, "gemspec.rb")
152
- open("#{ This.gemspec }", "w"){|fd| fd.puts(template)}
141
+ gemspec = "#{ lib }.gemspec"
142
+ open(gemspec, "w"){|fd| fd.puts(template)}
143
+ This.gemspec = gemspec
153
144
  end
154
145
 
155
146
  task :gem => [:clean, :gemspec] do
@@ -159,8 +150,8 @@ task :gem => [:clean, :gemspec] do
159
150
  `#{ cmd }`
160
151
  after = Dir['*.gem']
161
152
  gem = ((after - before).first || after.first) or abort('no gem!')
162
- Fu.mv gem, This.pkgdir
163
- This.gem = File.basename(gem)
153
+ Fu.mv(gem, This.pkgdir)
154
+ This.gem = File.join(This.pkgdir, File.basename(gem))
164
155
  end
165
156
 
166
157
  task :readme do
@@ -216,12 +207,18 @@ task :release => [:clean, :gemspec, :gem] do
216
207
  gems = Dir[File.join(This.pkgdir, '*.gem')].flatten
217
208
  raise "which one? : #{ gems.inspect }" if gems.size > 1
218
209
  raise "no gems?" if gems.size < 1
219
- cmd = "rubyforge login && rubyforge add_release #{ This.rubyforge_project } #{ This.lib } #{ This.version } #{ This.pkgdir }/#{ This.gem }"
210
+
211
+ cmd = "gem push #{ This.gem }"
220
212
  puts cmd
221
- system cmd
222
- cmd = "gem push #{ This.pkgdir }/#{ This.gem }"
213
+ puts
214
+ system(cmd)
215
+ abort("cmd(#{ cmd }) failed with (#{ $?.inspect })") unless $?.exitstatus.zero?
216
+
217
+ cmd = "rubyforge login && rubyforge add_release #{ This.rubyforge_project } #{ This.lib } #{ This.version } #{ This.gem }"
223
218
  puts cmd
224
- system cmd
219
+ puts
220
+ system(cmd)
221
+ abort("cmd(#{ cmd }) failed with (#{ $?.inspect })") unless $?.exitstatus.zero?
225
222
  end
226
223
 
227
224
 
@@ -237,7 +234,7 @@ BEGIN {
237
234
  require 'erb'
238
235
  require 'fileutils'
239
236
  require 'rbconfig'
240
- require 'yaml'
237
+ require 'pp'
241
238
 
242
239
  # fu shortcut
243
240
  #
@@ -251,70 +248,28 @@ BEGIN {
251
248
  This.dir = File.dirname(This.file)
252
249
  This.pkgdir = File.join(This.dir, 'pkg')
253
250
 
254
- # use pkg.yml iff present
255
- #
256
- pkg_config_yml = File.join(This.dir, 'pkg/config.yml')
257
- if test(?e, pkg_config_yml)
258
- pkg_config = YAML::load(ERB.new(IO.read(pkg_config_yml)).result)
259
-
260
- if pkg_config.is_a?(Hash)
261
- ENV['LIB'] ||= pkg_config['lib']
262
- ENV['AUTOREQUIRE'] ||= pkg_config['autorequire']
263
- ENV['VERSION'] ||= pkg_config['version']
264
- ENV['NAME'] ||= pkg_config['name']
265
- ENV['NAMESPACE'] ||= pkg_config['namespace']
266
- end
267
- end
268
-
269
251
  # grok lib
270
252
  #
271
253
  lib = ENV['LIB']
272
254
  unless lib
273
- lib = File.basename(This.dir).sub(/[-].*$/, '')
255
+ lib = File.basename(Dir.pwd).sub(/[-].*$/, '')
274
256
  end
275
257
  This.lib = lib
276
258
 
277
- # grok autorequire
278
- #
279
- autorequire = ENV['AUTOREQUIRE']
280
- unless autorequire
281
- autorequire = File.join(This.dir, 'lib', This.lib)
282
- end
283
- This.autorequire = autorequire
284
-
285
- # load the package
286
- #
287
- require This.autorequire
288
-
289
- # grok name
290
- #
291
- name = ENV['NAME']
292
- unless name
293
- name = This.lib.capitalize
294
- end
295
- This.name = name
296
-
297
- # grok namespace
298
- #
299
- namespace = ENV['NAMESPACE']
300
- unless namespace
301
- namespace = This.name
302
- end
303
- This.namespace = eval(namespace)
304
-
305
259
  # grok version
306
260
  #
307
261
  version = ENV['VERSION']
308
262
  unless version
309
- version = This.namespace.send(:version)
263
+ require "./lib/#{ This.lib }"
264
+ This.name = lib.capitalize
265
+ This.object = eval(This.name)
266
+ version = This.object.send(:version)
310
267
  end
311
268
  This.version = version
312
269
 
313
270
  # we need to know the name of the lib an it's version
314
271
  #
315
272
  abort('no lib') unless This.lib
316
- abort('no name') unless This.name
317
- abort('no namespace') unless This.namespace
318
273
  abort('no version') unless This.version
319
274
 
320
275
  # discover full path to this ruby executable
@@ -338,11 +293,11 @@ BEGIN {
338
293
  def unindent(s)
339
294
  indent = nil
340
295
  s.each_line do |line|
341
- next if line =~ %r/^\s*$/
342
- indent = line[%r/^\s*/] and break
343
- end
344
- indent ? s.gsub(%r/^#{ indent }/, "") : s
296
+ next if line =~ %r/^\s*$/
297
+ indent = line[%r/^\s*/] and break
345
298
  end
299
+ indent ? s.gsub(%r/^#{ indent }/, "") : s
300
+ end
346
301
  extend self
347
302
  end
348
303
 
@@ -350,11 +305,11 @@ BEGIN {
350
305
  #
351
306
  class Template
352
307
  def initialize(&block)
353
- @block = block.binding
308
+ @block = block
354
309
  @template = block.call.to_s
355
310
  end
356
311
  def expand(b=nil)
357
- ERB.new(Util.unindent(@template)).result(b||@block)
312
+ ERB.new(Util.unindent(@template)).result((b||@block).binding)
358
313
  end
359
314
  alias_method 'to_s', 'expand'
360
315
  end
data/TODO CHANGED
@@ -1,16 +1,10 @@
1
1
  todo:
2
-
3
- - auto apply?
4
-
5
- - pre-condition and parameter code
6
-
7
-
8
- - class level nested AR conversions
2
+ - class level nested AR conversions
9
3
  to_dao(:a, :b => [:foo, :bar])
10
4
 
11
-
12
-
13
5
  done:
6
+ - auto apply?
7
+ - pre-condition and parameter code
14
8
  - engine-ify the rails stuff? or what
15
9
  - generator api
16
10
  - controller
data/a.rb ADDED
@@ -0,0 +1,25 @@
1
+ Api =
2
+ Dao.api do
3
+ call('/users/:user_id/comments/:comment_id') do
4
+ p route
5
+ p path
6
+ p params
7
+ end
8
+ end
9
+
10
+ api = Api.new
11
+
12
+ result = api.call('/users/1/comments/2')
13
+ puts result.form.input(:user_id)
14
+ puts result.form.input(:comment_id)
15
+ puts
16
+
17
+ result = api.call('/users/comments', :user_id => 1, :comment_id => 2)
18
+ puts result.form.input(:user_id)
19
+ puts result.form.input(:comment_id)
20
+ puts
21
+
22
+ result = api.call('/users/:user_id/comments/:comment_id', :user_id => 1, :comment_id => 2)
23
+ puts result.form.input(:user_id)
24
+ puts result.form.input(:comment_id)
25
+ puts
@@ -2,33 +2,89 @@
2
2
  #
3
3
 
4
4
  Gem::Specification::new do |spec|
5
- spec.name = "dao"
6
- spec.version = "2.2.3"
5
+ spec.name = "dao"
6
+ spec.version = "3.1.0"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "dao"
9
9
  spec.description = "description: dao kicks the ass"
10
10
 
11
- spec.files = ["dao.gemspec", "lib", "lib/dao", "lib/dao/active_record.rb", "lib/dao/api", "lib/dao/api/context.rb", "lib/dao/api/dsl.rb", "lib/dao/api/endpoints.rb", "lib/dao/api/initializers.rb", "lib/dao/api/interfaces.rb", "lib/dao/api/modes.rb", "lib/dao/api.rb", "lib/dao/blankslate.rb", "lib/dao/data.rb", "lib/dao/db.rb", "lib/dao/endpoint.rb", "lib/dao/engine.rb", "lib/dao/errors.rb", "lib/dao/exceptions.rb", "lib/dao/form.rb", "lib/dao/instance_exec.rb", "lib/dao/interface.rb", "lib/dao/mode.rb", "lib/dao/mongo_mapper.rb", "lib/dao/params.rb", "lib/dao/path.rb", "lib/dao/presenter.rb", "lib/dao/rails", "lib/dao/rails/app", "lib/dao/rails/app/api.rb", "lib/dao/rails/app/controllers", "lib/dao/rails/app/controllers/api_controller.rb", "lib/dao/rails/lib", "lib/dao/rails/lib/generators", "lib/dao/rails/lib/generators/dao", "lib/dao/rails/lib/generators/dao/api_generator.rb", "lib/dao/rails/lib/generators/dao/dao_generator.rb", "lib/dao/rails/lib/generators/dao/templates", "lib/dao/rails/lib/generators/dao/templates/api.rb", "lib/dao/rails/lib/generators/dao/templates/api_controller.rb", "lib/dao/rails/lib/generators/dao/templates/dao.css", "lib/dao/rails/lib/generators/dao/templates/dao.js", "lib/dao/rails/lib/generators/dao/templates/dao_helper.rb", "lib/dao/rails/lib/generators/dao/USAGE", "lib/dao/rails.rb", "lib/dao/result.rb", "lib/dao/slug.rb", "lib/dao/status.rb", "lib/dao/stdext.rb", "lib/dao/support.rb", "lib/dao/validations.rb", "lib/dao.rb", "Rakefile", "README", "sample", "sample/rails_app", "sample/rails_app/app", "sample/rails_app/app/api.rb", "sample/rails_app/app/controllers", "sample/rails_app/app/controllers/api_controller.rb", "sample/rails_app/app/controllers/application_controller.rb", "sample/rails_app/app/helpers", "sample/rails_app/app/helpers/application_helper.rb", "sample/rails_app/app/mailers", "sample/rails_app/app/models", "sample/rails_app/app/views", "sample/rails_app/app/views/layouts", "sample/rails_app/app/views/layouts/application.html.erb", "sample/rails_app/config", "sample/rails_app/config/application.rb", "sample/rails_app/config/boot.rb", "sample/rails_app/config/database.yml", "sample/rails_app/config/environment.rb", "sample/rails_app/config/environments", "sample/rails_app/config/environments/development.rb", "sample/rails_app/config/environments/production.rb", "sample/rails_app/config/environments/test.rb", "sample/rails_app/config/initializers", "sample/rails_app/config/initializers/backtrace_silencers.rb", "sample/rails_app/config/initializers/inflections.rb", "sample/rails_app/config/initializers/mime_types.rb", "sample/rails_app/config/initializers/secret_token.rb", "sample/rails_app/config/initializers/session_store.rb", "sample/rails_app/config/locales", "sample/rails_app/config/locales/en.yml", "sample/rails_app/config/routes.rb", "sample/rails_app/config.ru", "sample/rails_app/db", "sample/rails_app/db/development.sqlite3", "sample/rails_app/db/seeds.rb", "sample/rails_app/doc", "sample/rails_app/doc/README_FOR_APP", "sample/rails_app/Gemfile", "sample/rails_app/Gemfile.lock", "sample/rails_app/lib", "sample/rails_app/lib/tasks", "sample/rails_app/log", "sample/rails_app/log/development.log", "sample/rails_app/log/production.log", "sample/rails_app/log/server.log", "sample/rails_app/log/test.log", "sample/rails_app/pubic", "sample/rails_app/pubic/javascripts", "sample/rails_app/pubic/javascripts/dao.js", "sample/rails_app/public", "sample/rails_app/public/404.html", "sample/rails_app/public/422.html", "sample/rails_app/public/500.html", "sample/rails_app/public/favicon.ico", "sample/rails_app/public/images", "sample/rails_app/public/images/rails.png", "sample/rails_app/public/index.html", "sample/rails_app/public/javascripts", "sample/rails_app/public/javascripts/application.js", "sample/rails_app/public/javascripts/controls.js", "sample/rails_app/public/javascripts/dragdrop.js", "sample/rails_app/public/javascripts/effects.js", "sample/rails_app/public/javascripts/prototype.js", "sample/rails_app/public/javascripts/rails.js", "sample/rails_app/public/robots.txt", "sample/rails_app/public/stylesheets", "sample/rails_app/Rakefile", "sample/rails_app/README", "sample/rails_app/script", "sample/rails_app/script/rails", "sample/rails_app/test", "sample/rails_app/test/fixtures", "sample/rails_app/test/functional", "sample/rails_app/test/integration", "sample/rails_app/test/performance", "sample/rails_app/test/performance/browsing_test.rb", "sample/rails_app/test/test_helper.rb", "sample/rails_app/test/unit", "sample/rails_app/tmp/cache", "sample/rails_app/tmp/pids", "sample/rails_app/tmp/sessions", "sample/rails_app/tmp/sockets", "sample/rails_app/vendor", "sample/rails_app/vendor/plugins", "test", "test/dao_test.rb", "test/helper.rb", "test/testing.rb", "test/units", "TODO"]
11
+ spec.files =
12
+ ["README",
13
+ "Rakefile",
14
+ "TODO",
15
+ "a.rb",
16
+ "dao.gemspec",
17
+ "lib",
18
+ "lib/dao",
19
+ "lib/dao.rb",
20
+ "lib/dao/active_record.rb",
21
+ "lib/dao/api",
22
+ "lib/dao/api.rb",
23
+ "lib/dao/api/context.rb",
24
+ "lib/dao/api/dsl.rb",
25
+ "lib/dao/api/endpoints.rb",
26
+ "lib/dao/api/initializers.rb",
27
+ "lib/dao/api/interfaces.rb",
28
+ "lib/dao/api/modes.rb",
29
+ "lib/dao/api/routes.rb",
30
+ "lib/dao/blankslate.rb",
31
+ "lib/dao/data.rb",
32
+ "lib/dao/db.rb",
33
+ "lib/dao/endpoint.rb",
34
+ "lib/dao/engine.rb",
35
+ "lib/dao/errors.rb",
36
+ "lib/dao/exceptions.rb",
37
+ "lib/dao/form.rb",
38
+ "lib/dao/instance_exec.rb",
39
+ "lib/dao/interface.rb",
40
+ "lib/dao/mode.rb",
41
+ "lib/dao/mongo_mapper.rb",
42
+ "lib/dao/params.rb",
43
+ "lib/dao/path.rb",
44
+ "lib/dao/presenter.rb",
45
+ "lib/dao/rails",
46
+ "lib/dao/rails.rb",
47
+ "lib/dao/rails/lib",
48
+ "lib/dao/rails/lib/generators",
49
+ "lib/dao/rails/lib/generators/dao",
50
+ "lib/dao/rails/lib/generators/dao/USAGE",
51
+ "lib/dao/rails/lib/generators/dao/api_generator.rb",
52
+ "lib/dao/rails/lib/generators/dao/dao_generator.rb",
53
+ "lib/dao/rails/lib/generators/dao/templates",
54
+ "lib/dao/rails/lib/generators/dao/templates/api.rb",
55
+ "lib/dao/rails/lib/generators/dao/templates/api_controller.rb",
56
+ "lib/dao/rails/lib/generators/dao/templates/dao.css",
57
+ "lib/dao/rails/lib/generators/dao/templates/dao.js",
58
+ "lib/dao/rails/lib/generators/dao/templates/dao_helper.rb",
59
+ "lib/dao/result.rb",
60
+ "lib/dao/route.rb",
61
+ "lib/dao/slug.rb",
62
+ "lib/dao/status.rb",
63
+ "lib/dao/stdext.rb",
64
+ "lib/dao/support.rb",
65
+ "lib/dao/validations",
66
+ "lib/dao/validations.rb",
67
+ "lib/dao/validations/base.rb",
68
+ "lib/dao/validations/common.rb",
69
+ "test",
70
+ "test/dao_test.rb",
71
+ "test/helper.rb",
72
+ "test/testing.rb",
73
+ "test/units"]
74
+
12
75
  spec.executables = []
13
76
 
14
77
  spec.require_path = "lib"
15
78
 
16
- spec.has_rdoc = true
17
-
18
-
79
+ spec.test_files = nil
19
80
 
20
-
21
- spec.add_dependency(*["tagz", "~> 8.2.0"])
22
-
23
- spec.add_dependency(*["map", "~> 2.7.0"])
24
-
25
- spec.add_dependency(*["yajl-ruby", "~> 0.8.1"])
26
-
81
+ ### spec.add_dependency 'lib', '>= version'
82
+ #### spec.add_dependency 'map'
27
83
 
28
84
  spec.extensions.push(*[])
29
85
 
30
86
  spec.rubyforge_project = "codeforpeople"
31
87
  spec.author = "Ara T. Howard"
32
88
  spec.email = "ara.t.howard@gmail.com"
33
- spec.homepage = "http://github.com/ahoward/dao"
89
+ spec.homepage = "https://github.com/ahoward/dao"
34
90
  end
data/lib/dao.rb CHANGED
@@ -10,7 +10,7 @@
10
10
  # dao libs
11
11
  #
12
12
  module Dao
13
- Version = '2.2.3' unless defined?(Version)
13
+ Version = '3.1.0' unless defined?(Version)
14
14
 
15
15
  def version
16
16
  Dao::Version
@@ -18,8 +18,8 @@
18
18
 
19
19
  def dependencies
20
20
  {
21
- 'map' => ['map' , '~> 2.7.0'],
22
- 'tagz' => ['tagz' , '~> 8.2.0'],
21
+ 'map' => ['map' , '~> 4.0.0'],
22
+ 'tagz' => ['tagz' , '~> 9.0.0'],
23
23
  'yajl' => ['yajl-ruby' , '~> 0.8.1']
24
24
  }
25
25
  end
@@ -71,16 +71,16 @@
71
71
  slug.rb
72
72
  stdext.rb
73
73
 
74
- result.rb
75
- params.rb
76
74
  status.rb
77
- data.rb
78
- form.rb
79
75
  errors.rb
76
+ form.rb
80
77
  validations.rb
81
- presenter.rb
78
+ data.rb
79
+ result.rb
80
+ params.rb
82
81
 
83
82
  mode.rb
83
+ route.rb
84
84
  path.rb
85
85
  interface.rb
86
86
  api.rb