rhodes 3.2.0.beta.8 → 3.2.0.beta.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +1 -0
- data/lib/extensions/debugger/CHANGELOG +3 -0
- data/lib/extensions/debugger/debugger.rb +39 -29
- data/lib/extensions/rexml/rexml/parsers/baseparser.rb +1 -1
- data/lib/extensions/rexml/rexml/source.rb +3 -3
- data/lib/extensions/rhoxml/rexml/parsers/baseparser.rb +1 -1
- data/lib/extensions/rhoxml/rexml/source.rb +2 -2
- data/lib/extensions/uri/uri/common.rb +5 -5
- data/platform/iphone/Classes/AppManager/AppManager.m +0 -8
- data/res/generators/templates/application/public/css/iphone.css +13 -6
- data/rhomobile-debug-1.0.4.gem +0 -0
- data/rhomobile-debug.gemspec +1 -1
- data/version +1 -1
- metadata +5 -4
data/Manifest.txt
CHANGED
@@ -4,6 +4,21 @@ require 'timeout'
|
|
4
4
|
DEBUGGER_STEP_TYPE = ['STEP','STOVER','STRET','SUSP']
|
5
5
|
DEBUGGER_STEP_COMMENT = ['Stepped into','Stepped over','Stepped return','Suspended']
|
6
6
|
|
7
|
+
DEBUGGER_LOG_LEVEL_DEBUG = 0
|
8
|
+
DEBUGGER_LOG_LEVEL_INFO = 1
|
9
|
+
DEBUGGER_LOG_LEVEL_WARN = 2
|
10
|
+
DEBUGGER_LOG_LEVEL_ERROR = 3
|
11
|
+
|
12
|
+
def debugger_log(level, msg)
|
13
|
+
if (level >= DEBUGGER_LOG_LEVEL_WARN)
|
14
|
+
puts "[Debugger] #{msg}"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def log_command(cmd)
|
19
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Received command: #{cmd}")
|
20
|
+
end
|
21
|
+
|
7
22
|
def debug_read_cmd(io,wait)
|
8
23
|
begin
|
9
24
|
if wait
|
@@ -13,8 +28,7 @@ def debug_read_cmd(io,wait)
|
|
13
28
|
cmd = io.read_nonblock(4096)
|
14
29
|
$_cmd << cmd if cmd !~ /^\s*$/
|
15
30
|
end
|
16
|
-
|
17
|
-
#$_s.write("get data from front end" + $_cmd.to_s + "\n")
|
31
|
+
# $_s.write("get data from front end" + $_cmd.to_s + "\n")
|
18
32
|
rescue
|
19
33
|
# puts $!.inspect
|
20
34
|
end
|
@@ -23,7 +37,7 @@ end
|
|
23
37
|
def execute_cmd(cmd, advanced)
|
24
38
|
#$_s.write("execute_cmd start\n")
|
25
39
|
cmd = URI.unescape(cmd.gsub(/\+/,' ')) if advanced
|
26
|
-
|
40
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Executing: #{cmd.inspect}")
|
27
41
|
result = ""
|
28
42
|
error = '0';
|
29
43
|
begin
|
@@ -83,10 +97,6 @@ def get_variables(scope)
|
|
83
97
|
end
|
84
98
|
end
|
85
99
|
|
86
|
-
def log_command(cmd)
|
87
|
-
# puts "[Debugger] Received command: #{cmd}"
|
88
|
-
end
|
89
|
-
|
90
100
|
def debug_handle_cmd(inline)
|
91
101
|
#$_s.write("start of debug_handle_cmd wait=" + inline.to_s + "\n")
|
92
102
|
|
@@ -97,7 +107,7 @@ def debug_handle_cmd(inline)
|
|
97
107
|
if cmd != ""
|
98
108
|
if cmd =~/^CONNECTED/
|
99
109
|
log_command(cmd)
|
100
|
-
|
110
|
+
debugger_log(DEBUGGER_LOG_LEVEL_INFO, "Connected to debugger")
|
101
111
|
processed = true
|
102
112
|
elsif cmd =~/^(BP|RM):/
|
103
113
|
log_command(cmd)
|
@@ -105,26 +115,26 @@ def debug_handle_cmd(inline)
|
|
105
115
|
bp = ary[1].gsub(/\|/,':') + ':' + ary[2].chomp
|
106
116
|
if (cmd =~/^RM:/)
|
107
117
|
$_breakpoint.delete(bp)
|
108
|
-
|
118
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Breakpoint removed: #{bp}")
|
109
119
|
else
|
110
120
|
$_breakpoint.store(bp,1)
|
111
|
-
|
121
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Breakpoint added: #{bp}")
|
112
122
|
end
|
113
123
|
processed = true
|
114
124
|
elsif cmd =~ /^RMALL/
|
115
125
|
log_command(cmd)
|
116
126
|
$_breakpoint.clear
|
117
|
-
|
127
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "All breakpoints removed")
|
118
128
|
processed = true
|
119
129
|
elsif cmd =~ /^ENABLE/
|
120
130
|
log_command(cmd)
|
121
131
|
$_breakpoints_enabled = true
|
122
|
-
|
132
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Breakpoints enabled")
|
123
133
|
processed = true
|
124
134
|
elsif cmd =~ /^DISABLE/
|
125
135
|
log_command(cmd)
|
126
136
|
$_breakpoints_enabled = false
|
127
|
-
|
137
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Breakpoints disabled")
|
128
138
|
processed = true
|
129
139
|
elsif inline and (cmd =~ /^STEPOVER/)
|
130
140
|
$_s.write("STEPOVER start\n")
|
@@ -133,7 +143,7 @@ def debug_handle_cmd(inline)
|
|
133
143
|
$_step_level = $_call_stack
|
134
144
|
$_resumed = true
|
135
145
|
wait = false
|
136
|
-
|
146
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Step over")
|
137
147
|
processed = true
|
138
148
|
elsif inline and (cmd =~ /^STEPRET/)
|
139
149
|
log_command(cmd)
|
@@ -147,7 +157,7 @@ def debug_handle_cmd(inline)
|
|
147
157
|
end
|
148
158
|
$_resumed = true
|
149
159
|
wait = false
|
150
|
-
|
160
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Step return" + comment)
|
151
161
|
processed = true
|
152
162
|
elsif inline and (cmd =~ /^STEP/)
|
153
163
|
log_command(cmd)
|
@@ -155,40 +165,40 @@ def debug_handle_cmd(inline)
|
|
155
165
|
$_step_level = -1
|
156
166
|
$_resumed = true
|
157
167
|
wait = false
|
158
|
-
|
168
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Step into")
|
159
169
|
processed = true
|
160
170
|
elsif inline and (cmd =~ /^CONT/)
|
161
171
|
log_command(cmd)
|
162
172
|
wait = false
|
163
173
|
$_step = 0
|
164
174
|
$_resumed = true
|
165
|
-
|
175
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Resuming")
|
166
176
|
processed = true
|
167
177
|
elsif cmd =~ /^SUSP/
|
168
178
|
log_command(cmd)
|
169
179
|
$_step = 4
|
170
180
|
$_step_level = -1
|
171
181
|
wait = true
|
172
|
-
|
182
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Suspend")
|
173
183
|
processed = true
|
174
184
|
elsif cmd =~ /^KILL/
|
175
185
|
log_command(cmd)
|
176
|
-
|
186
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Terminating...")
|
177
187
|
processed = true
|
178
188
|
System.exit
|
179
189
|
elsif inline and (cmd =~ /^EVL?:/)
|
180
190
|
log_command(cmd)
|
181
191
|
processed = true
|
182
|
-
|
192
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Calc evaluation...")
|
183
193
|
execute_cmd cmd.sub(/^EVL?:/,""), (cmd =~ /^EVL:/ ? true : false)
|
184
194
|
elsif inline and (cmd =~ /^[GLCI]VARS/)
|
185
195
|
log_command(cmd)
|
186
|
-
|
196
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, "Get variables...")
|
187
197
|
get_variables cmd
|
188
198
|
processed = true
|
189
199
|
elsif inline
|
190
200
|
log_command(cmd)
|
191
|
-
|
201
|
+
debugger_log(DEBUGGER_LOG_LEVEL_WARN, "Unknown command")
|
192
202
|
processed = true
|
193
203
|
end
|
194
204
|
end
|
@@ -230,7 +240,7 @@ $_tracefunc = lambda{|event, file, line, id, bind, classname|
|
|
230
240
|
fn = filename.gsub(/:/, '|')
|
231
241
|
cl = classname.to_s.gsub(/:/,'#')
|
232
242
|
$_s.write((step_stop ? DEBUGGER_STEP_TYPE[$_step-1] : "BP") + ":#{fn}:#{ln}:#{cl}:#{id}\n")
|
233
|
-
|
243
|
+
debugger_log(DEBUGGER_LOG_LEVEL_DEBUG, (step_stop ? DEBUGGER_STEP_COMMENT[$_step-1] : "Breakpoint") + " in #{fn} at #{ln}")
|
234
244
|
$_step = 0
|
235
245
|
$_step_level = -1
|
236
246
|
|
@@ -278,7 +288,7 @@ $_tracefunc = lambda{|event, file, line, id, bind, classname|
|
|
278
288
|
$_s = nil
|
279
289
|
|
280
290
|
begin
|
281
|
-
|
291
|
+
debugger_log(DEBUGGER_LOG_LEVEL_INFO, "Opening connection")
|
282
292
|
debug_host_env = ENV['RHOHOST']
|
283
293
|
debug_port_env = ENV['rho_debug_port']
|
284
294
|
debug_path_env = ENV['ROOT_PATH']
|
@@ -286,13 +296,13 @@ begin
|
|
286
296
|
debug_host = (debug_host_env.nil? or debug_host_env == "") ? '127.0.0.1' : debug_host_env
|
287
297
|
debug_port = (debug_port_env.nil? or debug_port_env == "") ? 9000 : debug_port_env
|
288
298
|
|
289
|
-
|
290
|
-
|
291
|
-
|
299
|
+
debugger_log(DEBUGGER_LOG_LEVEL_INFO, "host=" + debug_host_env.to_s)
|
300
|
+
debugger_log(DEBUGGER_LOG_LEVEL_INFO, "port=" + debug_port_env.to_s)
|
301
|
+
debugger_log(DEBUGGER_LOG_LEVEL_INFO, "path=" + debug_path_env.to_s)
|
292
302
|
|
293
303
|
$_s = timeout(30) { TCPSocket.open(debug_host, debug_port) }
|
294
304
|
|
295
|
-
|
305
|
+
debugger_log(DEBUGGER_LOG_LEVEL_WARN, "Connected: " + $_s.to_s)
|
296
306
|
$_s.write("CONNECT\nHOST=" + debug_host.to_s + "\nPORT=" + debug_port.to_s + "\n")
|
297
307
|
|
298
308
|
$_breakpoint = Hash.new
|
@@ -326,6 +336,6 @@ begin
|
|
326
336
|
}
|
327
337
|
|
328
338
|
rescue
|
329
|
-
|
339
|
+
debugger_log(DEBUGGER_LOG_LEVEL_ERROR, "Unable to open connection to debugger: " + $!.inspect)
|
330
340
|
$_s = nil
|
331
341
|
end
|
@@ -257,7 +257,7 @@ module REXML
|
|
257
257
|
md = @source.match(/\s*/um, true)
|
258
258
|
if @source.encoding == "UTF-8"
|
259
259
|
if @source.buffer.respond_to? :force_encoding
|
260
|
-
@source.buffer.force_encoding(Encoding::UTF_8)
|
260
|
+
@source.buffer.force_encoding("UTF-8") #Encoding::UTF_8)
|
261
261
|
end
|
262
262
|
end
|
263
263
|
end
|
@@ -60,7 +60,7 @@ module REXML
|
|
60
60
|
else
|
61
61
|
@to_utf = false
|
62
62
|
if @buffer.respond_to? :force_encoding
|
63
|
-
@buffer.force_encoding Encoding::UTF_8
|
63
|
+
@buffer.force_encoding "UTF-8" #Encoding::UTF_8
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|
@@ -166,7 +166,7 @@ module REXML
|
|
166
166
|
if !@to_utf and
|
167
167
|
@buffer.respond_to?(:force_encoding) and
|
168
168
|
@source.respond_to?(:external_encoding) and
|
169
|
-
@source.external_encoding !=
|
169
|
+
@source.external_encoding != "UTF-8" #::Encoding::UTF_8
|
170
170
|
@force_utf8 = true
|
171
171
|
else
|
172
172
|
@force_utf8 = false
|
@@ -261,7 +261,7 @@ module REXML
|
|
261
261
|
if @to_utf
|
262
262
|
decode(str)
|
263
263
|
else
|
264
|
-
str.force_encoding(
|
264
|
+
str.force_encoding("UTF-8") if @force_utf8
|
265
265
|
str
|
266
266
|
end
|
267
267
|
end
|
@@ -257,7 +257,7 @@ module REXML
|
|
257
257
|
md = @source.match(/\s*/um, true)
|
258
258
|
if @source.encoding == "UTF-8"
|
259
259
|
if @source.buffer.respond_to? :force_encoding
|
260
|
-
@source.buffer.force_encoding(Encoding::UTF_8)
|
260
|
+
@source.buffer.force_encoding("UTF-8") #Encoding::UTF_8)
|
261
261
|
end
|
262
262
|
end
|
263
263
|
end
|
@@ -60,7 +60,7 @@ module REXML
|
|
60
60
|
else
|
61
61
|
@to_utf = false
|
62
62
|
if @buffer.respond_to? :force_encoding
|
63
|
-
@buffer.force_encoding Encoding::UTF_8
|
63
|
+
@buffer.force_encoding "UTF-8" #Encoding::UTF_8
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|
@@ -197,7 +197,7 @@ module REXML
|
|
197
197
|
str = decode(str) if @to_utf and str
|
198
198
|
@buffer << str
|
199
199
|
if not @to_utf and @buffer.respond_to? :force_encoding
|
200
|
-
@buffer.force_encoding Encoding::UTF_8
|
200
|
+
@buffer.force_encoding "UTF-8" #Encoding::UTF_8
|
201
201
|
end
|
202
202
|
rescue Exception, NameError
|
203
203
|
@source = nil
|
@@ -744,13 +744,13 @@ module URI
|
|
744
744
|
end
|
745
745
|
str = str.to_s
|
746
746
|
if HTML5ASCIIINCOMPAT.include?(str.encoding)
|
747
|
-
str = str.encode(Encoding::UTF_8)
|
747
|
+
str = str.encode("UTF-8") #Encoding::UTF_8)
|
748
748
|
else
|
749
749
|
str = str.dup
|
750
750
|
end
|
751
|
-
str.force_encoding(Encoding::ASCII_8BIT)
|
751
|
+
str.force_encoding("ASCII-8BIT") #Encoding::ASCII_8BIT)
|
752
752
|
str.gsub!(/[^*\-.0-9A-Z_a-z]/, TBLENCWWWCOMP_)
|
753
|
-
str.force_encoding(Encoding::US_ASCII)
|
753
|
+
str.force_encoding("US-ASCII") #Encoding::US_ASCII)
|
754
754
|
end
|
755
755
|
|
756
756
|
# Decode given +str+ of URL-encoded form data.
|
@@ -758,7 +758,7 @@ module URI
|
|
758
758
|
# This decods + to SP.
|
759
759
|
#
|
760
760
|
# See URI.encode_www_form_component, URI.decode_www_form
|
761
|
-
def self.decode_www_form_component(str, enc=Encoding::UTF_8)
|
761
|
+
def self.decode_www_form_component(str, enc="UTF-8") #Encoding::UTF_8)
|
762
762
|
if TBLDECWWWCOMP_.empty?
|
763
763
|
tbl = {}
|
764
764
|
256.times do |i|
|
@@ -833,7 +833,7 @@ module URI
|
|
833
833
|
# p Hash[ary] # => {"a"=>"2", "b"=>"3"}
|
834
834
|
#
|
835
835
|
# See URI.decode_www_form_component, URI.encode_www_form
|
836
|
-
def self.decode_www_form(str, enc=Encoding::UTF_8)
|
836
|
+
def self.decode_www_form(str, enc="UTF-8") #Encoding::UTF_8)
|
837
837
|
return [] if str.empty?
|
838
838
|
unless /\A#{WFKV_}*=#{WFKV_}*(?:[;&]#{WFKV_}*=#{WFKV_}*)*\z/o =~ str
|
839
839
|
raise ArgumentError, "invalid data of application/x-www-form-urlencoded (#{str})"
|
@@ -217,14 +217,6 @@ BOOL isPathIsSymLink(NSFileManager *fileManager, NSString* path) {
|
|
217
217
|
|
218
218
|
BOOL restoreSymLinks_only = NO;
|
219
219
|
|
220
|
-
{
|
221
|
-
NSString* testName = [rhoRoot stringByAppendingPathComponent:@"lib"];
|
222
|
-
if (![fileManager fileExistsAtPath:testName]) {
|
223
|
-
restoreSymLinks_only = YES;
|
224
|
-
}
|
225
|
-
restoreSymLinks_only = NO;
|
226
|
-
}
|
227
|
-
|
228
220
|
BOOL contentChanged;
|
229
221
|
if (nameChanged)
|
230
222
|
contentChanged = YES;
|
@@ -787,14 +787,21 @@ h1 {
|
|
787
787
|
.ui-btn-left[data-icon="arrow-l"] {
|
788
788
|
margin-top: 2px;
|
789
789
|
-webkit-box-shadow: none;
|
790
|
-
|
791
|
-
-webkit-border-bottom-
|
792
|
-
-webkit-border-
|
793
|
-
|
794
|
-
|
795
|
-
|
790
|
+
/*
|
791
|
+
-webkit-border-bottom-left-radius: 200px 50px;
|
792
|
+
-webkit-border-top-left-radius: 200px 50px;
|
793
|
+
*/
|
794
|
+
border-color: transparent;
|
795
|
+
background-color: transparent;
|
796
|
+
background-image: none;
|
797
|
+
|
798
|
+
-webkit-border-bottom-right-radius: 7px 7px;
|
799
|
+
-webkit-border-top-right-radius: 7px 7px;
|
800
|
+
-webkit-border-image: url(../images/backButton.png) 2 7 2 13 stretch stretch;
|
801
|
+
border-width: 1px 5px 2px 13px;
|
796
802
|
width: auto;
|
797
803
|
}
|
804
|
+
|
798
805
|
a.ui-btn-left[data-rel="back"] .ui-icon,
|
799
806
|
a.ui-btn-left[data-icon="back"] .ui-icon,
|
800
807
|
a.ui-btn-left[data-icon="arrow-l"] .ui-icon {
|
Binary file
|
data/rhomobile-debug.gemspec
CHANGED
data/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.2.0.beta.
|
1
|
+
3.2.0.beta.9
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhodes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 62196465
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 2
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 3.2.0.beta.
|
11
|
+
- 9
|
12
|
+
version: 3.2.0.beta.9
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Rhomobile
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-10-
|
20
|
+
date: 2011-10-20 00:00:00 -07:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -4853,6 +4853,7 @@ files:
|
|
4853
4853
|
- res/icons/rhosim.psd
|
4854
4854
|
- rhobuild.yml.example
|
4855
4855
|
- rhodes.gemspec
|
4856
|
+
- rhomobile-debug-1.0.4.gem
|
4856
4857
|
- rhomobile-debug.gemspec
|
4857
4858
|
- spec/framework_spec/app/application.rb
|
4858
4859
|
- spec/framework_spec/app/index.erb
|