dao 5.1.2 → 5.2.1

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.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YmZkMGJlMTI0MmUwZDM0OTBlMDY4YWU2NTI1OTc0MDU1YTQwOGI5Ng==
5
+ data.tar.gz: !binary |-
6
+ M2NlYjJiYjUxNzhmMGFiY2U0OTc2MWMxZmY0YTViOTRiZDRiN2FiZA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NjBjYzI3MGUxNGZmZTZlMjgwMmRhN2YwMjBjYTNjMzEzMTg5MTliNzQ3ZWUy
10
+ YzA3MTE5Njc0MzM4ZTQxMGU4YzBmYjBiMGZlODU1NTAxYmU5MDQwZDJmOGEx
11
+ YTRjYWFhZjI4YmYzMDAxZWEwMTI1Y2IxMjg5ZDdiY2MxYmY2NzQ=
12
+ data.tar.gz: !binary |-
13
+ NmUyYjZjZjFkNWJjOGViNDdiZmI2NzFkZDc5MDJhZDEwYzU4YmNjYWMzMjA1
14
+ MTc4NmUyMjdmNjdlOWU1MmUyOGFlMWVmOGE0ZjQ5MGEwYTBhZTc3ZmE5YjZj
15
+ NWIyZThkMTIyYjc2OTQxZmJmMjM4ODVkZWIyYWQ0MDkzNWU5MDE=
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "dao"
6
- spec.version = "5.1.2"
6
+ spec.version = "5.2.1"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "dao"
9
9
  spec.description = "description: dao kicks the ass"
@@ -13,17 +13,6 @@ Gem::Specification::new do |spec|
13
13
  "Gemfile.lock",
14
14
  "README",
15
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",
27
16
  "dao.gemspec",
28
17
  "lib",
29
18
  "lib/dao",
@@ -108,7 +97,7 @@ Gem::Specification::new do |spec|
108
97
  "test/testing.rb",
109
98
  "test/validations_test.rb"]
110
99
 
111
- spec.executables = ["erubis", "rackup", "rails", "rake", "rdoc", "ri", "sprockets", "thor", "tilt", "tt"]
100
+ spec.executables = []
112
101
 
113
102
  spec.require_path = "lib"
114
103
 
@@ -123,7 +112,7 @@ Gem::Specification::new do |spec|
123
112
 
124
113
  spec.add_dependency(*["coerce", " >= 0.0.3"])
125
114
 
126
- spec.add_dependency(*["tagz", " >= 9.8"])
115
+ spec.add_dependency(*["tagz", " >= 9.9.1"])
127
116
 
128
117
  spec.add_dependency(*["multi_json", " >= 1.0.3"])
129
118
 
data/lib/dao.rb CHANGED
@@ -11,7 +11,7 @@
11
11
  # dao libs
12
12
  #
13
13
  module Dao
14
- Version = '5.1.2' unless defined?(Version)
14
+ Version = '5.2.1' 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.8' ] ,
26
+ 'tagz' => [ 'tagz' , ' >= 9.9.1' ] ,
27
27
  'multi_json' => [ 'multi_json' , ' >= 1.0.3' ] ,
28
28
  'uuidtools' => [ 'uuidtools' , ' >= 2.1.2' ] ,
29
29
  'wrap' => [ 'wrap' , ' >= 1.5.0' ] ,
@@ -496,6 +496,10 @@ module Dao
496
496
  @helper ||= ::Helper.new
497
497
  end
498
498
 
499
+ def h(*args)
500
+ CGI.escapeHTML(args.join(' '))
501
+ end
502
+
499
503
  def raise!(*args, &block)
500
504
  self.class.raise!(*args, &block)
501
505
  end
@@ -38,7 +38,7 @@ module Dao
38
38
 
39
39
  suffixes = /(Conducer|Resource|Importer|Presenter|Conductor|Cell)\Z/o
40
40
 
41
- name = self.name.to_s
41
+ name = self.name.split('::').last.to_s
42
42
  name.sub!(suffixes, '') unless name.sub(suffixes, '').blank?
43
43
  name.sub!(/(:|_)+$/, '')
44
44
 
@@ -195,6 +195,8 @@ module Dao
195
195
  block ? block.call(attributes.get(keys)) : options.delete(:value)
196
196
  end
197
197
 
198
+ value = escape_html(value)
199
+
198
200
  input_(options_for(options, :type => type, :name => name, :value => value, :class => klass, :id => id, :data_error => error)){}
199
201
  end
200
202
 
@@ -224,6 +226,9 @@ module Dao
224
226
 
225
227
  content = (block ? block.call : (options.delete(:content) || 'Submit'))
226
228
 
229
+ value = escape_html(value)
230
+ content = escape_html(content)
231
+
227
232
  button_(options_for(options, :type => type, :name => name, :value => value, :class => klass, :id => id, :data_error => error)){ content }
228
233
  end
229
234
 
@@ -335,6 +340,8 @@ module Dao
335
340
  block ? block.call(attributes.get(keys)) : options.delete(:value)
336
341
  end
337
342
 
343
+ value = escape_html(value)
344
+
338
345
  textarea_(options_for(options, :name => name, :class => klass, :id => id, :data_error => error)){ value }
339
346
  end
340
347
 
@@ -515,6 +522,12 @@ module Dao
515
522
  else
516
523
  value
517
524
  end
525
+
526
+ escape_html(value)
527
+ end
528
+
529
+ def escape_html(string)
530
+ Tagz.escape_html(string)
518
531
  end
519
532
 
520
533
  def Form.prefix_for(name)
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dao
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.2
5
- prerelease:
4
+ version: 5.2.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ara T. Howard
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-09 00:00:00.000000000 Z
11
+ date: 2013-07-26 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: map
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: fattr
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: coerce
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ! '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ! '>='
76
67
  - !ruby/object:Gem::Version
@@ -78,23 +69,20 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: tagz
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ! '>='
84
74
  - !ruby/object:Gem::Version
85
- version: '9.8'
75
+ version: 9.9.1
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ! '>='
92
81
  - !ruby/object:Gem::Version
93
- version: '9.8'
82
+ version: 9.9.1
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: multi_json
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ! '>='
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ! '>='
108
95
  - !ruby/object:Gem::Version
@@ -110,7 +97,6 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: uuidtools
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ! '>='
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ! '>='
124
109
  - !ruby/object:Gem::Version
@@ -126,7 +111,6 @@ dependencies:
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: wrap
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
115
  - - ! '>='
132
116
  - !ruby/object:Gem::Version
@@ -134,7 +118,6 @@ dependencies:
134
118
  type: :runtime
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
122
  - - ! '>='
140
123
  - !ruby/object:Gem::Version
@@ -142,7 +125,6 @@ dependencies:
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: rails_current
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
129
  - - ! '>='
148
130
  - !ruby/object:Gem::Version
@@ -150,7 +132,6 @@ dependencies:
150
132
  type: :runtime
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
136
  - - ! '>='
156
137
  - !ruby/object:Gem::Version
@@ -158,7 +139,6 @@ dependencies:
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: rails_errors2html
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
143
  - - ! '>='
164
144
  - !ruby/object:Gem::Version
@@ -166,24 +146,13 @@ dependencies:
166
146
  type: :runtime
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
150
  - - ! '>='
172
151
  - !ruby/object:Gem::Version
173
152
  version: 1.3.0
174
153
  description: ! 'description: dao kicks the ass'
175
154
  email: ara.t.howard@gmail.com
176
- executables:
177
- - erubis
178
- - rackup
179
- - rails
180
- - rake
181
- - rdoc
182
- - ri
183
- - sprockets
184
- - thor
185
- - tilt
186
- - tt
155
+ executables: []
187
156
  extensions: []
188
157
  extra_rdoc_files: []
189
158
  files:
@@ -191,16 +160,6 @@ files:
191
160
  - Gemfile.lock
192
161
  - README
193
162
  - 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
204
163
  - dao.gemspec
205
164
  - lib/dao.rb
206
165
  - lib/dao/active_record.rb
@@ -272,29 +231,25 @@ files:
272
231
  - test/validations_test.rb
273
232
  homepage: https://github.com/ahoward/dao
274
233
  licenses: []
234
+ metadata: {}
275
235
  post_install_message:
276
236
  rdoc_options: []
277
237
  require_paths:
278
238
  - lib
279
239
  required_ruby_version: !ruby/object:Gem::Requirement
280
- none: false
281
240
  requirements:
282
241
  - - ! '>='
283
242
  - !ruby/object:Gem::Version
284
243
  version: '0'
285
- segments:
286
- - 0
287
- hash: 829554688336043917
288
244
  required_rubygems_version: !ruby/object:Gem::Requirement
289
- none: false
290
245
  requirements:
291
246
  - - ! '>='
292
247
  - !ruby/object:Gem::Version
293
248
  version: '0'
294
249
  requirements: []
295
250
  rubyforge_project: codeforpeople
296
- rubygems_version: 1.8.23
251
+ rubygems_version: 2.0.3
297
252
  signing_key:
298
- specification_version: 3
253
+ specification_version: 4
299
254
  summary: dao
300
255
  test_files: []
data/bin/erubis DELETED
@@ -1,16 +0,0 @@
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')
data/bin/rackup DELETED
@@ -1,16 +0,0 @@
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')
data/bin/rails DELETED
@@ -1,16 +0,0 @@
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')
data/bin/rake DELETED
@@ -1,16 +0,0 @@
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')
data/bin/rdoc DELETED
@@ -1,16 +0,0 @@
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 DELETED
@@ -1,16 +0,0 @@
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')
@@ -1,16 +0,0 @@
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')
data/bin/thor DELETED
@@ -1,16 +0,0 @@
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')
data/bin/tilt DELETED
@@ -1,16 +0,0 @@
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 DELETED
@@ -1,16 +0,0 @@
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')