git-approvals 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -85,7 +85,12 @@ EOS
85
85
  register_formatter :js do |object|
86
86
  require 'uglifier'
87
87
  Uglifier.compile object,
88
- :output => { :beautify => true, :indent_level => 2 }
88
+ :output => {
89
+ :beautify => true,
90
+ :indent_level => 2,
91
+ :comments => :all,
92
+ :space_colon => true
93
+ }
89
94
  end
90
95
 
91
96
  def initialize( path, options={} ) # :nodoc:
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Approvals
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
5
5
  end
@@ -1,3 +1,6 @@
1
+ // Comments are preserved
1
2
  (function() {
2
- return "IT WERKS";
3
+ return {
4
+ status: "IT WERKS"
5
+ };
3
6
  })();
@@ -71,7 +71,10 @@ describe Git::Approvals::Approval do
71
71
  end
72
72
  it 'formats javascript' do
73
73
  approval = described_class.new './spec/fixtures/asset.js', :format => :js
74
- approval.diff( '(function(){return "IT WERKS";})();' ){ |diff| fail diff }
74
+ approval.diff( <<-EOS ){ |diff| fail diff }
75
+ // Comments are preserved
76
+ (function(){return {status:"IT WERKS"};})();
77
+ EOS
75
78
  end
76
79
  end
77
80
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-approvals
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: