dao 5.1.1 → 5.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ source 'https://rubygems.org'
2
+
3
+
4
+
5
+ gem 'rails' , ' >= 3.1'
6
+ gem 'map' , ' >= 6.0.0'
7
+ gem 'fattr' , ' >= 2.2'
8
+ gem 'coerce' , ' >= 0.0.3'
9
+ gem 'tagz' , ' >= 9.8'
10
+ gem 'multi_json' , ' >= 1.0.3'
11
+ gem 'uuidtools' , ' >= 2.1.2'
12
+ gem 'wrap' , ' >= 1.5.0'
13
+ gem 'rails_current' , ' >= 1.7.0'
14
+ gem 'rails_errors2html' , ' >= 1.3.0'
15
+ gem 'pry'
16
+
@@ -0,0 +1,118 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ actionmailer (3.2.13)
5
+ actionpack (= 3.2.13)
6
+ mail (~> 2.5.3)
7
+ actionpack (3.2.13)
8
+ activemodel (= 3.2.13)
9
+ activesupport (= 3.2.13)
10
+ builder (~> 3.0.0)
11
+ erubis (~> 2.7.0)
12
+ journey (~> 1.0.4)
13
+ rack (~> 1.4.5)
14
+ rack-cache (~> 1.2)
15
+ rack-test (~> 0.6.1)
16
+ sprockets (~> 2.2.1)
17
+ activemodel (3.2.13)
18
+ activesupport (= 3.2.13)
19
+ builder (~> 3.0.0)
20
+ activerecord (3.2.13)
21
+ activemodel (= 3.2.13)
22
+ activesupport (= 3.2.13)
23
+ arel (~> 3.0.2)
24
+ tzinfo (~> 0.3.29)
25
+ activeresource (3.2.13)
26
+ activemodel (= 3.2.13)
27
+ activesupport (= 3.2.13)
28
+ activesupport (3.2.13)
29
+ i18n (= 0.6.1)
30
+ multi_json (~> 1.0)
31
+ arel (3.0.2)
32
+ builder (3.0.4)
33
+ chronic (0.9.1)
34
+ coderay (1.0.9)
35
+ coerce (0.0.4)
36
+ chronic (>= 0.6.2)
37
+ erubis (2.7.0)
38
+ fattr (2.2.1)
39
+ hike (1.2.3)
40
+ i18n (0.6.1)
41
+ journey (1.0.4)
42
+ json (1.8.0)
43
+ mail (2.5.4)
44
+ mime-types (~> 1.16)
45
+ treetop (~> 1.4.8)
46
+ map (6.5.1)
47
+ method_source (0.8.1)
48
+ mime-types (1.23)
49
+ multi_json (1.7.6)
50
+ polyglot (0.3.3)
51
+ pry (0.9.12.2)
52
+ coderay (~> 1.0.5)
53
+ method_source (~> 0.8)
54
+ slop (~> 3.4)
55
+ rack (1.4.5)
56
+ rack-cache (1.2)
57
+ rack (>= 0.4)
58
+ rack-ssl (1.3.3)
59
+ rack
60
+ rack-test (0.6.2)
61
+ rack (>= 1.0)
62
+ rails (3.2.13)
63
+ actionmailer (= 3.2.13)
64
+ actionpack (= 3.2.13)
65
+ activerecord (= 3.2.13)
66
+ activeresource (= 3.2.13)
67
+ activesupport (= 3.2.13)
68
+ bundler (~> 1.0)
69
+ railties (= 3.2.13)
70
+ rails_current (1.7.0)
71
+ map (>= 6.0.1)
72
+ rails_errors2html (1.4.2)
73
+ fattr (>= 2.2.1)
74
+ map (>= 6.2.0)
75
+ rails_view (>= 1.0.1)
76
+ rails_view (1.0.1)
77
+ railties (3.2.13)
78
+ actionpack (= 3.2.13)
79
+ activesupport (= 3.2.13)
80
+ rack-ssl (~> 1.3.2)
81
+ rake (>= 0.8.7)
82
+ rdoc (~> 3.4)
83
+ thor (>= 0.14.6, < 2.0)
84
+ rake (10.0.4)
85
+ rdoc (3.12.2)
86
+ json (~> 1.4)
87
+ slop (3.4.5)
88
+ sprockets (2.2.2)
89
+ hike (~> 1.2)
90
+ multi_json (~> 1.0)
91
+ rack (~> 1.0)
92
+ tilt (~> 1.1, != 1.3.0)
93
+ tagz (9.8.0)
94
+ thor (0.18.1)
95
+ tilt (1.4.1)
96
+ treetop (1.4.14)
97
+ polyglot
98
+ polyglot (>= 0.3.1)
99
+ tzinfo (0.3.37)
100
+ uuidtools (2.1.4)
101
+ wrap (1.5.0)
102
+ map (>= 4.7.1)
103
+
104
+ PLATFORMS
105
+ ruby
106
+
107
+ DEPENDENCIES
108
+ coerce (>= 0.0.3)
109
+ fattr (>= 2.2)
110
+ map (>= 6.0.0)
111
+ multi_json (>= 1.0.3)
112
+ pry
113
+ rails (>= 3.1)
114
+ rails_current (>= 1.7.0)
115
+ rails_errors2html (>= 1.3.0)
116
+ tagz (>= 9.8)
117
+ uuidtools (>= 2.1.2)
118
+ wrap (>= 1.5.0)
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'erubis' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('erubis', 'erubis')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rackup' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rack', 'rackup')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rails' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('railties', 'rails')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rake' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rake', 'rake')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rdoc' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rdoc', 'rdoc')
data/bin/ri ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'ri' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rdoc', 'ri')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'sprockets' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('sprockets', 'sprockets')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'thor' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('thor', 'thor')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'tilt' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('tilt', 'tilt')
data/bin/tt ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'tt' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('treetop', 'tt')
@@ -3,14 +3,27 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "dao"
6
- spec.version = "5.1.1"
6
+ spec.version = "5.1.2"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "dao"
9
9
  spec.description = "description: dao kicks the ass"
10
10
 
11
11
  spec.files =
12
- ["README",
12
+ ["Gemfile",
13
+ "Gemfile.lock",
14
+ "README",
13
15
  "Rakefile",
16
+ "bin",
17
+ "bin/erubis",
18
+ "bin/rackup",
19
+ "bin/rails",
20
+ "bin/rake",
21
+ "bin/rdoc",
22
+ "bin/ri",
23
+ "bin/sprockets",
24
+ "bin/thor",
25
+ "bin/tilt",
26
+ "bin/tt",
14
27
  "dao.gemspec",
15
28
  "lib",
16
29
  "lib/dao",
@@ -95,7 +108,7 @@ Gem::Specification::new do |spec|
95
108
  "test/testing.rb",
96
109
  "test/validations_test.rb"]
97
110
 
98
- spec.executables = []
111
+ spec.executables = ["erubis", "rackup", "rails", "rake", "rdoc", "ri", "sprockets", "thor", "tilt", "tt"]
99
112
 
100
113
  spec.require_path = "lib"
101
114
 
@@ -110,7 +123,7 @@ Gem::Specification::new do |spec|
110
123
 
111
124
  spec.add_dependency(*["coerce", " >= 0.0.3"])
112
125
 
113
- spec.add_dependency(*["tagz", " >= 9.6"])
126
+ spec.add_dependency(*["tagz", " >= 9.8"])
114
127
 
115
128
  spec.add_dependency(*["multi_json", " >= 1.0.3"])
116
129
 
data/lib/dao.rb CHANGED
@@ -11,7 +11,7 @@
11
11
  # dao libs
12
12
  #
13
13
  module Dao
14
- Version = '5.1.1' unless defined?(Version)
14
+ Version = '5.1.2' unless defined?(Version)
15
15
 
16
16
  def version
17
17
  Dao::Version
@@ -23,7 +23,7 @@
23
23
  'map' => [ 'map' , ' >= 6.0.0' ] ,
24
24
  'fattr' => [ 'fattr' , ' >= 2.2' ] ,
25
25
  'coerce' => [ 'coerce' , ' >= 0.0.3' ] ,
26
- 'tagz' => [ 'tagz' , ' >= 9.6' ] ,
26
+ 'tagz' => [ 'tagz' , ' >= 9.8' ] ,
27
27
  'multi_json' => [ 'multi_json' , ' >= 1.0.3' ] ,
28
28
  'uuidtools' => [ 'uuidtools' , ' >= 2.1.2' ] ,
29
29
  'wrap' => [ 'wrap' , ' >= 1.5.0' ] ,
@@ -36,16 +36,15 @@ module Dao
36
36
  @dsl ||= DSL.new(api=self)
37
37
  @dsl.evaluate(&block)
38
38
  end
39
+ alias_method('configure', 'evaluate')
39
40
  end
40
41
  end
41
42
 
42
43
  def Dao.api(&block)
43
44
  if block
44
- api = Class.new(Api)
45
- api.evaluate(&block)
46
- api
45
+ Class.new(Api).tap{|api| api.evaluate(&block)}
47
46
  else
48
- Api
47
+ Class.new(Api)
49
48
  end
50
49
  end
51
50
  end
@@ -33,10 +33,12 @@ module Dao
33
33
  end
34
34
  end
35
35
  end
36
+ alias_method(:#{ mode.upcase }, :#{ mode })
36
37
 
37
38
  def #{ mode }?(&block)
38
39
  mode?(#{ mode.inspect }, &block)
39
40
  end
41
+ alias_method(:#{ mode.upcase }?, :#{ mode }?)
40
42
  __
41
43
 
42
44
  modes.push(mode)
@@ -47,6 +49,10 @@ module Dao
47
49
  end
48
50
  end
49
51
 
52
+ def on(mode, *args, &block)
53
+ send(mode.to_s.downcase, *args, &block)
54
+ end
55
+
50
56
  def mode=(mode)
51
57
  @mode = Mode.for(mode)
52
58
  end
@@ -335,7 +335,7 @@ module Dao
335
335
  block ? block.call(attributes.get(keys)) : options.delete(:value)
336
336
  end
337
337
 
338
- textarea_(options_for(options, :name => name, :class => klass, :id => id, :data_error => error)){ value.to_s }
338
+ textarea_(options_for(options, :name => name, :class => klass, :id => id, :data_error => error)){ value }
339
339
  end
340
340
 
341
341
  def select(*args, &block)
@@ -505,7 +505,9 @@ module Dao
505
505
 
506
506
  def value_for(map, keys)
507
507
  return nil unless map.has?(keys)
508
+
508
509
  value = map.get(keys)
510
+
509
511
  value =
510
512
  case value
511
513
  when Hash, Array
@@ -513,7 +515,6 @@ module Dao
513
515
  else
514
516
  value
515
517
  end
516
- value.respond_to?(:html_safe) ? value : Tagz.escapeHTML(value)
517
518
  end
518
519
 
519
520
  def Form.prefix_for(name)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dao
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.1
4
+ version: 5.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-29 00:00:00.000000000 Z
12
+ date: 2013-06-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -82,7 +82,7 @@ dependencies:
82
82
  requirements:
83
83
  - - ! '>='
84
84
  - !ruby/object:Gem::Version
85
- version: '9.6'
85
+ version: '9.8'
86
86
  type: :runtime
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  requirements:
91
91
  - - ! '>='
92
92
  - !ruby/object:Gem::Version
93
- version: '9.6'
93
+ version: '9.8'
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: multi_json
96
96
  requirement: !ruby/object:Gem::Requirement
@@ -173,12 +173,34 @@ dependencies:
173
173
  version: 1.3.0
174
174
  description: ! 'description: dao kicks the ass'
175
175
  email: ara.t.howard@gmail.com
176
- executables: []
176
+ executables:
177
+ - erubis
178
+ - rackup
179
+ - rails
180
+ - rake
181
+ - rdoc
182
+ - ri
183
+ - sprockets
184
+ - thor
185
+ - tilt
186
+ - tt
177
187
  extensions: []
178
188
  extra_rdoc_files: []
179
189
  files:
190
+ - Gemfile
191
+ - Gemfile.lock
180
192
  - README
181
193
  - Rakefile
194
+ - bin/erubis
195
+ - bin/rackup
196
+ - bin/rails
197
+ - bin/rake
198
+ - bin/rdoc
199
+ - bin/ri
200
+ - bin/sprockets
201
+ - bin/thor
202
+ - bin/tilt
203
+ - bin/tt
182
204
  - dao.gemspec
183
205
  - lib/dao.rb
184
206
  - lib/dao/active_record.rb
@@ -260,6 +282,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
260
282
  - - ! '>='
261
283
  - !ruby/object:Gem::Version
262
284
  version: '0'
285
+ segments:
286
+ - 0
287
+ hash: 829554688336043917
263
288
  required_rubygems_version: !ruby/object:Gem::Requirement
264
289
  none: false
265
290
  requirements:
@@ -273,4 +298,3 @@ signing_key:
273
298
  specification_version: 3
274
299
  summary: dao
275
300
  test_files: []
276
- has_rdoc: