beefcake 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -241,7 +241,16 @@ module Beefcake
241
241
  out = "%s %s, %s, %d" % [label, name, type, f.number]
242
242
 
243
243
  if f.default_value
244
- out += ", :default => #{f.default_value}"
244
+ v = case f.type
245
+ when T::TYPE_ENUM
246
+ "%s::%s" % [type, f.default_value]
247
+ when T::TYPE_STRING, T::TYPE_BYTES
248
+ '"%s"' % [f.default_value.gsub('"', '\"')]
249
+ else
250
+ f.default_value
251
+ end
252
+
253
+ out += ", :default => #{v}"
245
254
  end
246
255
 
247
256
  puts out
@@ -1,3 +1,3 @@
1
1
  module Beefcake
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beefcake
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 6
10
- version: 0.3.6
9
+ - 7
10
+ version: 0.3.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Blake Mizerany
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-10 00:00:00 -04:00
18
+ date: 2011-09-29 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21