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/TODO.org +12 -0
- data/bin/#jsc# +119 -0
- data/js/extra/alcadialer_im.js +559 -0
- data/js/extra/strophe.js +3543 -0
- data/jsc.gemspec +66 -0
- data/lib/jsc/closure_compiler.rb +4 -4
- data/lib/jsc.rb +1 -1
- data/rdoc/classes/JSCompiler.html +649 -0
- data/rdoc/classes/String.html +118 -0
- data/rdoc/created.rid +1 -0
- data/rdoc/files/README_rdoc.html +234 -0
- data/rdoc/files/lib/jsc/closure_compiler_rb.html +151 -0
- data/rdoc/files/lib/jsc_rb.html +101 -0
- data/rdoc/fr_class_index.html +28 -0
- data/rdoc/fr_file_index.html +29 -0
- data/rdoc/fr_method_index.html +38 -0
- data/rdoc/index.html +26 -0
- data/rdoc/rdoc-style.css +208 -0
- data/tmp/aruba/js/compiled_code.js +4 -0
- data/tmp/aruba/js/errors.js +4 -0
- data/tmp/aruba/js/warnings.js +5 -0
- metadata +23 -2
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
|
+
|
data/lib/jsc/closure_compiler.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
require 'rubygems' # include RubyGems
|
2
|
-
gem '
|
3
|
-
require '
|
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.
|
112
|
+
parsed_response = ActiveSupport::JSON.decode(response)
|
113
113
|
|
114
114
|
if parsed_response.has_key?("serverErrors")
|
115
115
|
result = parsed_response['serverErrors']
|