jsc 0.2.0 → 0.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.
data/jsc.gemspec ADDED
@@ -0,0 +1,66 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{jsc}
8
+ s.version = "0.2.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Davide Saurino"]
12
+ s.date = %q{2010-02-22}
13
+ s.email = %q{davide.saurino@gmail.com}
14
+ s.executables = ["jsc", "#jsc#"]
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".bnsignore",
21
+ ".gitignore",
22
+ "History.txt",
23
+ "LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "TODO.org",
27
+ "VERSION",
28
+ "bin/jsc",
29
+ "features/run_command.feature",
30
+ "features/support/env.rb",
31
+ "js/compiled_code.js",
32
+ "js/errors.js",
33
+ "js/warnings.js",
34
+ "lib/jsc.rb",
35
+ "lib/jsc/closure_compiler.rb",
36
+ "plugins/jsc.el",
37
+ "spec/jsc_spec.rb",
38
+ "spec/spec_helper.rb",
39
+ "tasks/jsc.rake",
40
+ "test/test_jsc.rb"
41
+ ]
42
+ s.homepage = %q{http://github.com/sub/jsc}
43
+ s.rdoc_options = ["--charset=UTF-8"]
44
+ s.require_paths = ["lib"]
45
+ s.rubygems_version = %q{1.3.5}
46
+ s.summary = %q{Ruby API to Google Closure Compiler Web service}
47
+ s.test_files = [
48
+ "spec/jsc_spec.rb",
49
+ "spec/spec_helper.rb",
50
+ "test/test_jsc.rb"
51
+ ]
52
+
53
+ if s.respond_to? :specification_version then
54
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
55
+ s.specification_version = 3
56
+
57
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
58
+ s.add_runtime_dependency(%q<term-ansicolor>, ["= 1.0.4"])
59
+ else
60
+ s.add_dependency(%q<term-ansicolor>, ["= 1.0.4"])
61
+ end
62
+ else
63
+ s.add_dependency(%q<term-ansicolor>, ["= 1.0.4"])
64
+ end
65
+ end
66
+
@@ -1,9 +1,9 @@
1
1
  require 'rubygems' # include RubyGems
2
- gem 'activesupport' # load ActiveSupport
3
- require 'activesupport' # include ActiveSupport
2
+ #gem 'active_support' # load ActiveSupport
3
+ require 'active_support' # include ActiveSupport
4
4
  require 'active_support/core_ext/integer/inflections'
5
5
 
6
- require 'json'
6
+ #require 'json'
7
7
  require 'net/http'
8
8
 
9
9
  # Link to Google Closure Compiler service
@@ -109,7 +109,7 @@ module JSCompiler
109
109
  # * <b>response</b>: the server response
110
110
  def parse_json_output(response)
111
111
  out = ""
112
- parsed_response = JSON.parse(response, :max_nesting => false)
112
+ parsed_response = ActiveSupport::JSON.decode(response)
113
113
 
114
114
  if parsed_response.has_key?("serverErrors")
115
115
  result = parsed_response['serverErrors']
data/lib/jsc.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module JSCompiler
2
2
 
3
3
  # :stopdoc:
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  # LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
6
6
  # PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
7
7
  # :startdoc: