fix a bad commit and fix multijson deprecation warnings

This commit is contained in:
John Bintz 2012-04-23 09:30:56 -04:00
parent 65137186c8
commit 9b41a36841
4 changed files with 7 additions and 7 deletions

View File

@ -23,7 +23,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'jasmine-core'
s.add_runtime_dependency 'coffee-script'
s.add_runtime_dependency 'rainbow'
s.add_runtime_dependency 'multi_json'
s.add_runtime_dependency 'multi_json', '>= 1.2.0'
s.add_runtime_dependency 'sprockets'
s.add_runtime_dependency 'sprockets-vendor_gems'
end

View File

@ -33,11 +33,11 @@ module Jasmine::Headless
end
def serialize(data)
MultiJson.encode(data)
MultiJson.dump(data)
end
def unserialize(data)
MultiJson.decode(data)
MultiJson.load(data)
end
end
end

View File

@ -6,7 +6,7 @@
<script type="text/javascript" src="<%= Jasmine::Headless.root.join('vendor/assets/javascripts/prolog.js') %>"></script>
<%= files.join("\n") %>
<script type="text/javascript">
if (window.JHW) { HeadlessReporterResult.specLineNumbers = <%= MultiJson.encode(spec_lines) %>; }
if (window.JHW) { HeadlessReporterResult.specLineNumbers = <%= MultiJson.dump(spec_lines) %>; }
</script>
</head>
<body>

View File

@ -11,16 +11,16 @@ window.Intense = {
methods:
foreground: (color) ->
if Intense.useColors
"\x33[3#{Intense.colors[color]}m#{this}\x33[0m"
'\x1b' + "[3#{Intense.colors[color]}m#{this}" + '\x1b' + "[0m"
else
this
bright: ->
if Intense.useColors
"\x33[1m#{this}\x33[0m"
'\x1b' + "[1m#{this}" + '\x1b' + "[0m"
else
this
useColors: true
moveBack: (count = 1) -> "\x33[#{count}D"
moveBack: (count = 1) -> '\x1b' + "[#{count}D"
}
for method, code of Intense.methods