golf 0.0.1 → 0.0.2

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.
Files changed (123) hide show
  1. data/golf.gemspec +1 -1
  2. data/lib/golf/version.rb +1 -1
  3. metadata +1 -121
  4. data/golf-java/README.markdown +0 -41
  5. data/golf-java/THANKS.markdown +0 -14
  6. data/golf-java/build/classes.zip +0 -0
  7. data/golf-java/build/com/thinkminimo/golf/GolfResource$MimeMapping$MimeMappingSingleton.class +0 -0
  8. data/golf-java/build/com/thinkminimo/golf/GolfResource$MimeMapping.class +0 -0
  9. data/golf-java/build/com/thinkminimo/golf/GolfResource.class +0 -0
  10. data/golf-java/build/com/thinkminimo/golf/GolfServlet$1.class +0 -0
  11. data/golf-java/build/com/thinkminimo/golf/GolfServlet$GolfContext.class +0 -0
  12. data/golf-java/build/com/thinkminimo/golf/GolfServlet$GolfParams.class +0 -0
  13. data/golf-java/build/com/thinkminimo/golf/GolfServlet$GolfSession.class +0 -0
  14. data/golf-java/build/com/thinkminimo/golf/GolfServlet$PermanentRedirectException.class +0 -0
  15. data/golf-java/build/com/thinkminimo/golf/GolfServlet$RedirectException.class +0 -0
  16. data/golf-java/build/com/thinkminimo/golf/GolfServlet$StoredJSVM.class +0 -0
  17. data/golf-java/build/com/thinkminimo/golf/GolfServlet.class +0 -0
  18. data/golf-java/build/com/thinkminimo/golf/JsonpTunnel.class +0 -0
  19. data/golf-java/build/com/thinkminimo/golf/Main$1.class +0 -0
  20. data/golf-java/build/com/thinkminimo/golf/Main$RingList.class +0 -0
  21. data/golf-java/build/com/thinkminimo/golf/Main.class +0 -0
  22. data/golf-java/build/com/thinkminimo/golf/ProxyServlet.class +0 -0
  23. data/golf-java/build/com/yahoo/platform/yui/compressor/CssCompressor.class +0 -0
  24. data/golf-java/build/com/yahoo/platform/yui/compressor/JarClassLoader.class +0 -0
  25. data/golf-java/build/com/yahoo/platform/yui/compressor/JavaScriptCompressor.class +0 -0
  26. data/golf-java/build/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.class +0 -0
  27. data/golf-java/build/com/yahoo/platform/yui/compressor/JavaScriptToken.class +0 -0
  28. data/golf-java/build/com/yahoo/platform/yui/compressor/ScriptOrFnScope.class +0 -0
  29. data/golf-java/build/depends.zip +0 -0
  30. data/golf-java/build/golf +0 -2
  31. data/golf-java/build/org/json/JSONArray.class +0 -0
  32. data/golf-java/build/org/json/JSONException.class +0 -0
  33. data/golf-java/build/org/json/JSONObject$1.class +0 -0
  34. data/golf-java/build/org/json/JSONObject$Null.class +0 -0
  35. data/golf-java/build/org/json/JSONObject.class +0 -0
  36. data/golf-java/build/org/json/JSONString.class +0 -0
  37. data/golf-java/build/org/json/JSONStringer.class +0 -0
  38. data/golf-java/build/org/json/JSONTokener.class +0 -0
  39. data/golf-java/build/org/json/JSONWriter.class +0 -0
  40. data/golf-java/build/resources.zip +0 -0
  41. data/golf-java/build.xml +0 -174
  42. data/golf-java/dist/golf.zip +0 -0
  43. data/golf-java/lib/ant-launcher.jar +0 -0
  44. data/golf-java/lib/ant.jar +0 -0
  45. data/golf-java/lib/commons-codec-1.4.jar +0 -0
  46. data/golf-java/lib/commons-collections-3.2.1.jar +0 -0
  47. data/golf-java/lib/commons-fileupload-1.2.1.jar +0 -0
  48. data/golf-java/lib/commons-httpclient-3.1.jar +0 -0
  49. data/golf-java/lib/commons-io-1.4.jar +0 -0
  50. data/golf-java/lib/commons-lang-2.4.jar +0 -0
  51. data/golf-java/lib/commons-logging-1.1.1.jar +0 -0
  52. data/golf-java/lib/cssparser-0.9.5.jar +0 -0
  53. data/golf-java/lib/getopt-0.1-dev.jar +0 -0
  54. data/golf-java/lib/htmlunit-2.6.jar +0 -0
  55. data/golf-java/lib/htmlunit-core-js-2.6.jar +0 -0
  56. data/golf-java/lib/java-xmlbuilder-1.jar +0 -0
  57. data/golf-java/lib/jets3t-0.7.0.jar +0 -0
  58. data/golf-java/lib/jetty-6.1.15.jar +0 -0
  59. data/golf-java/lib/jetty-util-6.1.15.jar +0 -0
  60. data/golf-java/lib/log4j-1.2.15.jar +0 -0
  61. data/golf-java/lib/nekohtml-1.9.13.jar +0 -0
  62. data/golf-java/lib/sac-1.3.jar +0 -0
  63. data/golf-java/lib/serializer-2.7.1.jar +0 -0
  64. data/golf-java/lib/servlet-api-2.5-20081211.jar +0 -0
  65. data/golf-java/lib/xalan-2.7.1.jar +0 -0
  66. data/golf-java/lib/xercesImpl-2.9.1.jar +0 -0
  67. data/golf-java/lib/xml-apis-1.3.04.jar +0 -0
  68. data/golf-java/resources/app_error.html +0 -60
  69. data/golf-java/resources/error.html +0 -29
  70. data/golf-java/resources/forcebot.txt +0 -0
  71. data/golf-java/resources/forceclient.txt +0 -0
  72. data/golf-java/resources/forceproxy.txt +0 -0
  73. data/golf-java/resources/head.html +0 -0
  74. data/golf-java/resources/jquery.address.js +0 -439
  75. data/golf-java/resources/jquery.golf.js +0 -945
  76. data/golf-java/resources/jquery.js +0 -4376
  77. data/golf-java/resources/jsdetect.html +0 -23
  78. data/golf-java/resources/loading.gif +0 -0
  79. data/golf-java/resources/new.html +0 -45
  80. data/golf-java/resources/new.static.html +0 -45
  81. data/golf-java/resources/noscript.forceclient.html +0 -11
  82. data/golf-java/resources/noscript.html +0 -18
  83. data/golf-java/resources/noscript.static.html +0 -15
  84. data/golf-java/resources/project.xml +0 -21
  85. data/golf-java/resources/proxy_project.xml +0 -11
  86. data/golf-java/resources/proxy_web.xml +0 -40
  87. data/golf-java/resources/static_project.xml +0 -37
  88. data/golf-java/resources/version +0 -1
  89. data/golf-java/resources/web.xml +0 -36
  90. data/golf-java/resources/welcome2golf.html +0 -50
  91. data/golf-java/src/com/thinkminimo/golf/GolfResource.java +0 -582
  92. data/golf-java/src/com/thinkminimo/golf/GolfServlet.java +0 -1055
  93. data/golf-java/src/com/thinkminimo/golf/JsonpTunnel.java +0 -86
  94. data/golf-java/src/com/thinkminimo/golf/Main.java +0 -1299
  95. data/golf-java/src/com/thinkminimo/golf/ProxyServlet.java +0 -577
  96. data/golf-java/src/com/yahoo/platform/yui/compressor/CssCompressor.java +0 -188
  97. data/golf-java/src/com/yahoo/platform/yui/compressor/JarClassLoader.java +0 -158
  98. data/golf-java/src/com/yahoo/platform/yui/compressor/JavaScriptCompressor.java +0 -1281
  99. data/golf-java/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java +0 -55
  100. data/golf-java/src/com/yahoo/platform/yui/compressor/JavaScriptToken.java +0 -28
  101. data/golf-java/src/com/yahoo/platform/yui/compressor/ScriptOrFnScope.java +0 -160
  102. data/golf-java/src/org/json/JSONArray.java +0 -934
  103. data/golf-java/src/org/json/JSONException.java +0 -27
  104. data/golf-java/src/org/json/JSONObject.java +0 -1550
  105. data/golf-java/src/org/json/JSONString.java +0 -18
  106. data/golf-java/src/org/json/JSONStringer.java +0 -78
  107. data/golf-java/src/org/json/JSONTokener.java +0 -422
  108. data/golf-java/src/org/json/JSONWriter.java +0 -323
  109. data/golf-java/test/client/golftest/README.markdown +0 -3
  110. data/golf-java/test/client/golftest/components/com/thinkminimo/golf/test/Harness.css +0 -114
  111. data/golf-java/test/client/golftest/components/com/thinkminimo/golf/test/Harness.html +0 -17
  112. data/golf-java/test/client/golftest/components/com/thinkminimo/golf/test/Harness.js +0 -81
  113. data/golf-java/test/client/golftest/components/com/thinkminimo/golf/test/Harness.res/asc.gif +0 -0
  114. data/golf-java/test/client/golftest/components/com/thinkminimo/golf/test/Harness.res/bg.gif +0 -0
  115. data/golf-java/test/client/golftest/components/com/thinkminimo/golf/test/Harness.res/desc.gif +0 -0
  116. data/golf-java/test/client/golftest/components/com/thinkminimo/golf/test/Harness.res/test/test.html +0 -1
  117. data/golf-java/test/client/golftest/controller.js +0 -131
  118. data/golf-java/test/client/golftest/forceclient.txt +0 -0
  119. data/golf-java/test/client/golftest/forceproxy.txt +0 -0
  120. data/golf-java/test/client/golftest/head.html +0 -1
  121. data/golf-java/test/client/golftest/scripts/jquery.tablesort.js +0 -75
  122. data/golf-java/test/client/golftest/styles/style.css +0 -18
  123. data/golf-java/test/client/golftest/test/test.html +0 -1
@@ -1,55 +0,0 @@
1
- /*
2
- * YUI Compressor
3
- * Author: Julien Lecomte <jlecomte@yahoo-inc.com>
4
- * Copyright (c) 2007, Yahoo! Inc. All rights reserved.
5
- * Code licensed under the BSD License:
6
- * http://developer.yahoo.net/yui/license.txt
7
- */
8
-
9
- package com.yahoo.platform.yui.compressor;
10
-
11
- import net.sourceforge.htmlunit.corejs.javascript.Token;
12
-
13
- /**
14
- * JavaScriptIdentifier represents a variable/function identifier.
15
- */
16
- class JavaScriptIdentifier extends JavaScriptToken {
17
-
18
- private int refcount = 0;
19
- private String mungedValue;
20
- private ScriptOrFnScope declaredScope;
21
- private boolean markedForMunging = true;
22
-
23
- JavaScriptIdentifier(String value, ScriptOrFnScope declaredScope) {
24
- super(Token.NAME, value);
25
- this.declaredScope = declaredScope;
26
- }
27
-
28
- ScriptOrFnScope getDeclaredScope() {
29
- return declaredScope;
30
- }
31
-
32
- void setMungedValue(String value) {
33
- mungedValue = value;
34
- }
35
-
36
- String getMungedValue() {
37
- return mungedValue;
38
- }
39
-
40
- void preventMunging() {
41
- markedForMunging = false;
42
- }
43
-
44
- boolean isMarkedForMunging() {
45
- return markedForMunging;
46
- }
47
-
48
- void incrementRefcount() {
49
- refcount++;
50
- }
51
-
52
- int getRefcount() {
53
- return refcount;
54
- }
55
- }
@@ -1,28 +0,0 @@
1
- /*
2
- * YUI Compressor
3
- * Author: Julien Lecomte <jlecomte@yahoo-inc.com>
4
- * Copyright (c) 2007, Yahoo! Inc. All rights reserved.
5
- * Code licensed under the BSD License:
6
- * http://developer.yahoo.net/yui/license.txt
7
- */
8
-
9
- package com.yahoo.platform.yui.compressor;
10
-
11
- public class JavaScriptToken {
12
-
13
- private int type;
14
- private String value;
15
-
16
- JavaScriptToken(int type, String value) {
17
- this.type = type;
18
- this.value = value;
19
- }
20
-
21
- int getType() {
22
- return type;
23
- }
24
-
25
- String getValue() {
26
- return value;
27
- }
28
- }
@@ -1,160 +0,0 @@
1
- /*
2
- * YUI Compressor
3
- * Author: Julien Lecomte <jlecomte@yahoo-inc.com>
4
- * Copyright (c) 2007, Yahoo! Inc. All rights reserved.
5
- * Code licensed under the BSD License:
6
- * http://developer.yahoo.net/yui/license.txt
7
- */
8
-
9
- package com.yahoo.platform.yui.compressor;
10
-
11
- import java.util.ArrayList;
12
- import java.util.Enumeration;
13
- import java.util.Hashtable;
14
-
15
- class ScriptOrFnScope {
16
-
17
- private int braceNesting;
18
- private ScriptOrFnScope parentScope;
19
- private ArrayList subScopes;
20
- private Hashtable identifiers = new Hashtable();
21
- private Hashtable hints = new Hashtable();
22
- private boolean markedForMunging = true;
23
- private int varcount = 0;
24
-
25
- ScriptOrFnScope(int braceNesting, ScriptOrFnScope parentScope) {
26
- this.braceNesting = braceNesting;
27
- this.parentScope = parentScope;
28
- this.subScopes = new ArrayList();
29
- if (parentScope != null) {
30
- parentScope.subScopes.add(this);
31
- }
32
- }
33
-
34
- int getBraceNesting() {
35
- return braceNesting;
36
- }
37
-
38
- ScriptOrFnScope getParentScope() {
39
- return parentScope;
40
- }
41
-
42
- JavaScriptIdentifier declareIdentifier(String symbol) {
43
- JavaScriptIdentifier identifier = (JavaScriptIdentifier) identifiers.get(symbol);
44
- if (identifier == null) {
45
- identifier = new JavaScriptIdentifier(symbol, this);
46
- identifiers.put(symbol, identifier);
47
- }
48
- return identifier;
49
- }
50
-
51
- JavaScriptIdentifier getIdentifier(String symbol) {
52
- return (JavaScriptIdentifier) identifiers.get(symbol);
53
- }
54
-
55
- void addHint(String variableName, String variableType) {
56
- hints.put(variableName, variableType);
57
- }
58
-
59
- void preventMunging() {
60
- if (parentScope != null) {
61
- // The symbols in the global scope don't get munged,
62
- // but the sub-scopes it contains do get munged.
63
- markedForMunging = false;
64
- }
65
- }
66
-
67
- private ArrayList getUsedSymbols() {
68
- ArrayList result = new ArrayList();
69
- Enumeration elements = identifiers.elements();
70
- while (elements.hasMoreElements()) {
71
- JavaScriptIdentifier identifier = (JavaScriptIdentifier) elements.nextElement();
72
- String mungedValue = identifier.getMungedValue();
73
- if (mungedValue == null) {
74
- mungedValue = identifier.getValue();
75
- }
76
- result.add(mungedValue);
77
- }
78
- return result;
79
- }
80
-
81
- private ArrayList getAllUsedSymbols() {
82
- ArrayList result = new ArrayList();
83
- ScriptOrFnScope scope = this;
84
- while (scope != null) {
85
- result.addAll(scope.getUsedSymbols());
86
- scope = scope.parentScope;
87
- }
88
- return result;
89
- }
90
-
91
- int incrementVarCount() {
92
- varcount++;
93
- return varcount;
94
- }
95
-
96
- void munge() {
97
-
98
- if (!markedForMunging) {
99
- // Stop right here if this scope was flagged as unsafe for munging.
100
- return;
101
- }
102
-
103
- int pickFromSet = 1;
104
-
105
- // Do not munge symbols in the global scope!
106
- if (parentScope != null) {
107
-
108
- ArrayList freeSymbols = new ArrayList();
109
-
110
- freeSymbols.addAll(JavaScriptCompressor.ones);
111
- freeSymbols.removeAll(getAllUsedSymbols());
112
- if (freeSymbols.size() == 0) {
113
- pickFromSet = 2;
114
- freeSymbols.addAll(JavaScriptCompressor.twos);
115
- freeSymbols.removeAll(getAllUsedSymbols());
116
- }
117
- if (freeSymbols.size() == 0) {
118
- pickFromSet = 3;
119
- freeSymbols.addAll(JavaScriptCompressor.threes);
120
- freeSymbols.removeAll(getAllUsedSymbols());
121
- }
122
- if (freeSymbols.size() == 0) {
123
- throw new IllegalStateException("The YUI Compressor ran out of symbols. Aborting...");
124
- }
125
-
126
- Enumeration elements = identifiers.elements();
127
- while (elements.hasMoreElements()) {
128
- if (freeSymbols.size() == 0) {
129
- pickFromSet++;
130
- if (pickFromSet == 2) {
131
- freeSymbols.addAll(JavaScriptCompressor.twos);
132
- } else if (pickFromSet == 3) {
133
- freeSymbols.addAll(JavaScriptCompressor.threes);
134
- } else {
135
- throw new IllegalStateException("The YUI Compressor ran out of symbols. Aborting...");
136
- }
137
- // It is essential to remove the symbols already used in
138
- // the containing scopes, or some of the variables declared
139
- // in the containing scopes will be redeclared, which can
140
- // lead to errors.
141
- freeSymbols.removeAll(getAllUsedSymbols());
142
- }
143
-
144
- String mungedValue;
145
- JavaScriptIdentifier identifier = (JavaScriptIdentifier) elements.nextElement();
146
- if (identifier.isMarkedForMunging()) {
147
- mungedValue = (String) freeSymbols.remove(0);
148
- } else {
149
- mungedValue = identifier.getValue();
150
- }
151
- identifier.setMungedValue(mungedValue);
152
- }
153
- }
154
-
155
- for (int i = 0; i < subScopes.size(); i++) {
156
- ScriptOrFnScope scope = (ScriptOrFnScope) subScopes.get(i);
157
- scope.munge();
158
- }
159
- }
160
- }