rhodes 3.0.0 → 3.0.1.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/Rakefile +9 -2
- data/doc/application.txt +1 -1
- data/doc/build.txt +49 -70
- data/doc/device-caps.txt +22 -97
- data/doc/extensions.txt +1 -1
- data/doc/nfc.txt +542 -0
- data/doc/rhom.txt +7 -5
- data/doc/simulator.txt +116 -0
- data/doc/ui.txt +1 -1
- data/lib/build/jake.rb +5 -5
- data/lib/extensions/debugger/debugger.rb +63 -35
- data/lib/extensions/nfc/ext/nfc/platform/android/AndroidManifest.xml +8 -6
- data/lib/extensions/nfc/ext/nfc/platform/android/jni/src/nfc.cpp +1070 -249
- data/lib/extensions/nfc/ext/nfc/platform/android/res/xml/filter_nfc.xml +1 -5
- data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/Nfc.java +894 -72
- data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/NfcActivity.java +82 -18
- data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/NfcMessage.java +65 -0
- data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/NfcRecord.java +88 -24
- data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/NfcTechActivity.java +3 -0
- data/lib/extensions/nfc/ext/nfc/shared/ruby/nfc.i +204 -3
- data/lib/extensions/nfc/ext/nfc/shared/ruby/nfc_wrap.c +1047 -5
- data/lib/extensions/nfc/nfc.rb +635 -91
- data/lib/extensions/rhoxml/rexml/encodings/CP-1252.rb +103 -0
- data/lib/extensions/rhoxml/rexml/encodings/ISO-8859-1.rb +7 -0
- data/lib/framework/dateME.rb +26 -0
- data/lib/framework/rho/render.rb +21 -9
- data/lib/framework/rho/rho.rb +12 -0
- data/lib/framework/rho/rhoevent_bb.rb +3 -0
- data/lib/framework/rho/rhoevent_c.rb +3 -0
- data/lib/framework/rhodes.rb +1 -1
- data/lib/framework/rhom/rhom_db_adapter.rb +9 -9
- data/lib/framework/rhosystem.rb +17 -0
- data/lib/framework/stringio.rb +18 -0
- data/lib/framework/version.rb +1 -1
- data/lib/rhodes.rb +1 -1
- data/platform/android/Rhodes/AndroidManifest.xml +2 -2
- data/platform/android/Rhodes/res/xml/filter_nfc.xml +1 -5
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +0 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushReceiver.java +10 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoCryptImpl.java +29 -18
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +67 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivityListener.java +14 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +102 -28
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +35 -66
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java +5 -5
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java +69 -41
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/PopupActivity.java +7 -5
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/util/PerformOnUiThread.java +68 -35
- data/platform/android/build/RhodesSRC_build.files +1 -0
- data/platform/android/build/android.rake +2 -2
- data/platform/bb/RubyVM/src/com/rho/RhoConf.java +1 -0
- data/platform/bb/RubyVM/src/com/rho/db/DBAdapter.java +18 -6
- data/platform/bb/build/bb.rake +1 -1
- data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +5 -4
- data/platform/iphone/Classes/SimpleMainView.m +1 -1
- data/platform/iphone/Info.plist +1 -1
- data/platform/shared/common/RhodesApp.cpp +9 -3
- data/platform/shared/curl/lib/rhossl.c +5 -2
- data/platform/shared/db/DBAdapter.cpp +9 -0
- data/platform/shared/net/CURLNetRequest.cpp +8 -3
- data/platform/shared/net/iphone/sslimpl.cpp +3 -2
- data/platform/shared/net/ssl.cpp +8 -0
- data/platform/shared/ruby/ext/rho/rhoruby.c +10 -0
- data/platform/shared/ruby/ext/rho/rhoruby.h +1 -0
- data/platform/shared/ruby/ext/sqlite3_api/sqlite3_api_wrap.c +3 -4
- data/platform/win32/RhoSimulator/QtCore4.dll +0 -0
- data/platform/win32/RhoSimulator/QtGui4.dll +0 -0
- data/platform/win32/RhoSimulator/QtNetwork4.dll +0 -0
- data/platform/win32/RhoSimulator/QtWebKit4.dll +0 -0
- data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
- data/platform/win32/RhoSimulator/imageformats/qgif4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qico4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qjpeg4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qmng4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qsvg4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qtiff4.dll +0 -0
- data/platform/win32/RhoSimulator/libeay32.dll +0 -0
- data/platform/win32/RhoSimulator/ssleay32.dll +0 -0
- data/platform/wm/build/wm.rake +27 -3
- data/platform/wm/rhodes/Rhodes.cpp +4 -0
- data/platform/wm/rhodes/emulator/MainWindowCallback.h +1 -0
- data/platform/wm/rhodes/emulator/MainWindowProxy.cpp +3 -1
- data/platform/wm/rhodes/emulator/MainWindowQt.cpp +23 -12
- data/platform/wm/rhodes/emulator/MainWindowQt.h +5 -1
- data/platform/wm/rhodes/emulator/QtMainWindow.cpp +39 -6
- data/platform/wm/rhodes/emulator/QtMainWindow.h +1 -1
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +5 -0
- data/platform/wp7/IronRuby/{Bin → bin}/Silverlight3Release/IronRuby.Libraries.dll +0 -0
- data/platform/wp7/IronRuby/{Bin → bin}/Silverlight3Release/IronRuby.dll +0 -0
- data/platform/wp7/IronRuby/bin/Silverlight3Release/Microsoft.Dynamic.dll +0 -0
- data/platform/wp7/IronRuby/{Bin → bin}/Silverlight3Release/Microsoft.Scripting.Core.dll +0 -0
- data/platform/wp7/IronRuby/{Bin → bin}/Silverlight3Release/Microsoft.Scripting.dll +0 -0
- data/platform/wp7/RhoAppRunner/Program.cs +2 -2
- data/platform/wp7/RhoRubyLib/RhoRuby.cs +8 -0
- data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +29 -7
- data/platform/wp7/RhoRubyLib/db/DBAdapter.cs +5 -2
- data/platform/wp7/RhoRubyLib/logging/RhoLogger.cs +12 -0
- data/platform/wp7/RhoRubyLib/net/HttpServer.cs +2 -0
- data/platform/wp7/RhoRubyLib/net/NetRequest.cs +1 -1
- data/platform/wp7/RhoRubyLib/rubyext/RhoAsyncHttp.cs +52 -7
- data/platform/wp7/RhoRubyLib/rubyext/RhoDatabase.cs +85 -18
- data/platform/wp7/RhoRubyLib/rubyext/RhoJSON.cs +38 -3
- data/platform/wp7/RhoRubyLib/rubyext/RhoKernelOps.cs +27 -2
- data/platform/wp7/RhoRubyLib/rubyext/RhoNativeBar.cs +111 -15
- data/platform/wp7/RhoRubyLib/rubyext/RhoSyncEngine.cs +330 -55
- data/platform/wp7/RhoRubyLib/rubyext/RhoWebView.cs +61 -4
- data/platform/wp7/build/wp.rake +89 -72
- data/platform/wp7/rhodes/App.xaml.cs +1 -1
- data/rakefile.rb +9 -2
- data/rhodes.gemspec +1 -3
- data/spec/phone_spec/app/spec/asynchttp_spec.rb +7 -9
- data/spec/phone_spec/app/spec/uri_spec.rb +75 -0
- data/spec/phone_spec/app/spec_runner.rb +4 -0
- metadata +21 -15
- data/Manifest.txt +0 -6403
- data/platform/win32/RhoSimulator/codecs/qcncodecs4.dll +0 -0
- data/platform/win32/RhoSimulator/codecs/qjpcodecs4.dll +0 -0
- data/platform/win32/RhoSimulator/codecs/qkrcodecs4.dll +0 -0
- data/platform/win32/RhoSimulator/codecs/qtwcodecs4.dll +0 -0
- data/platform/wp7/IronRuby/Bin/Silverlight3Release/Microsoft.Dynamic.dll +0 -0
@@ -11,6 +11,8 @@ namespace rho.rubyext
|
|
11
11
|
[RubyModule("WebView")]
|
12
12
|
public static class RhoWebView
|
13
13
|
{
|
14
|
+
private static RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() :
|
15
|
+
new RhoLogger("RhoWebView");
|
14
16
|
private static CRhoRuby RhoRuby { get { return CRhoRuby.Instance; } }
|
15
17
|
private static CRhodesApp RHODESAPP() { return CRhodesApp.Instance; }
|
16
18
|
|
@@ -23,25 +25,80 @@ namespace rho.rubyext
|
|
23
25
|
[RubyMethodAttribute("navigate", RubyMethodAttributes.PublicSingleton)]
|
24
26
|
public static void Navigate(RubyModule/*!*/ self, [NotNull]String/*!*/ url)
|
25
27
|
{
|
26
|
-
|
28
|
+
try
|
29
|
+
{
|
30
|
+
RHODESAPP().processWebNavigate(url);
|
31
|
+
}
|
32
|
+
catch (Exception ex)
|
33
|
+
{
|
34
|
+
Exception rubyEx = self.Context.CurrentException;
|
35
|
+
if (rubyEx == null)
|
36
|
+
{
|
37
|
+
rubyEx = RubyExceptionData.InitializeException(new RuntimeError(ex.Message.ToString()), ex.Message);
|
38
|
+
}
|
39
|
+
LOG.ERROR("navigate", ex);
|
40
|
+
throw rubyEx;
|
41
|
+
}
|
27
42
|
}
|
28
43
|
|
29
44
|
[RubyMethodAttribute("execute_js", RubyMethodAttributes.PublicSingleton)]
|
30
45
|
public static void execute_js(RubyModule/*!*/ self, [NotNull]String/*!*/ strScript)
|
31
46
|
{
|
32
|
-
|
47
|
+
try
|
48
|
+
{
|
49
|
+
RHODESAPP().processInvokeScript(strScript);
|
50
|
+
}
|
51
|
+
catch (Exception ex)
|
52
|
+
{
|
53
|
+
Exception rubyEx = self.Context.CurrentException;
|
54
|
+
if (rubyEx == null)
|
55
|
+
{
|
56
|
+
rubyEx = RubyExceptionData.InitializeException(new RuntimeError(ex.Message.ToString()), ex.Message);
|
57
|
+
}
|
58
|
+
LOG.ERROR("execute_js", ex);
|
59
|
+
throw rubyEx;
|
60
|
+
}
|
33
61
|
}
|
34
62
|
|
35
63
|
[RubyMethodAttribute("current_location", RubyMethodAttributes.PublicSingleton)]
|
36
64
|
public static String currentLocation(RubyModule/*!*/ self)
|
37
65
|
{
|
38
|
-
|
66
|
+
String res = "";
|
67
|
+
try
|
68
|
+
{
|
69
|
+
res = RHODESAPP().getCurrentUrl(0);
|
70
|
+
}
|
71
|
+
catch (Exception ex)
|
72
|
+
{
|
73
|
+
Exception rubyEx = self.Context.CurrentException;
|
74
|
+
if (rubyEx == null)
|
75
|
+
{
|
76
|
+
rubyEx = RubyExceptionData.InitializeException(new RuntimeError(ex.Message.ToString()), ex.Message);
|
77
|
+
}
|
78
|
+
LOG.ERROR("current_location", ex);
|
79
|
+
throw rubyEx;
|
80
|
+
}
|
81
|
+
|
82
|
+
return res;
|
39
83
|
}
|
40
84
|
|
41
85
|
[RubyMethodAttribute("set_menu_items", RubyMethodAttributes.PublicSingleton)]
|
42
86
|
public static void setMenuItems(RubyModule/*!*/ self, Hash valMenu)
|
43
87
|
{
|
44
|
-
|
88
|
+
try
|
89
|
+
{
|
90
|
+
RHODESAPP().setMenuItems(valMenu);
|
91
|
+
}
|
92
|
+
catch (Exception ex)
|
93
|
+
{
|
94
|
+
Exception rubyEx = self.Context.CurrentException;
|
95
|
+
if (rubyEx == null)
|
96
|
+
{
|
97
|
+
rubyEx = RubyExceptionData.InitializeException(new RuntimeError(ex.Message.ToString()), ex.Message);
|
98
|
+
}
|
99
|
+
LOG.ERROR("set_menu_items", ex);
|
100
|
+
throw rubyEx;
|
101
|
+
}
|
45
102
|
}
|
46
103
|
|
47
104
|
#endregion
|
data/platform/wp7/build/wp.rake
CHANGED
@@ -141,7 +141,9 @@ end
|
|
141
141
|
cp File.join( iron_path, "bin/Silverlight3Release/Microsoft.Scripting.Core.dll" ), iron_release
|
142
142
|
end
|
143
143
|
|
144
|
-
task :rhodes
|
144
|
+
task :rhodes do #=> ["config:wp", "build:wp:rhobundle"] do
|
145
|
+
chdir $startdir
|
146
|
+
|
145
147
|
out_dir = $startdir + "/"+ $config["build"]["wppath"] +"/rhodes"
|
146
148
|
cp $app_path + "/icon/icon.png", out_dir if File.exists? $app_path + "/icon/icon.ico"
|
147
149
|
|
@@ -149,7 +151,7 @@ end
|
|
149
151
|
|
150
152
|
doc = REXML::Document.new(File.open($startdir+"/"+$config["build"]["wppath"]+"/rhodes/Properties/WMAppManifest.xml"))
|
151
153
|
doc.elements.each("Deployment/App") {
|
152
|
-
|
154
|
+
|element| element.attributes["ProductID"] = "{"+$app_config["wp"]["productid"]+"}"
|
153
155
|
element.attributes["Title"] = $app_config["name"]
|
154
156
|
}
|
155
157
|
File.open($startdir+"/"+$config["build"]["wppath"]+"/rhodes/Properties/WMAppManifest.xml", "w") { |f| doc.write f; f.close }
|
@@ -167,6 +169,9 @@ end
|
|
167
169
|
chdir $startdir
|
168
170
|
end
|
169
171
|
|
172
|
+
task :rhobundle_production => [:rhobundle, :rhobundlemap] do
|
173
|
+
end
|
174
|
+
|
170
175
|
task :devrhobundleRelease do #=> [:rhobundle, :rhobundlemap, "device:wp:addbundletoxapRelease"] do
|
171
176
|
#out_dir = $startdir + "/" + $vcbindir + "/rhodes/Release/"
|
172
177
|
#doc = REXML::Document.new(File.open(out_dir + "XapCacheFile.xml"))
|
@@ -174,11 +179,11 @@ end
|
|
174
179
|
#Dir.glob(File.join("**", '*.*')).each do |f|
|
175
180
|
# doc.root[1,0] = REXML::Element.new "file lastWriteTime='" + File.mtime(f).strftime("%m/%d/%Y %I:%M:%S %p") + "' source='" + $srcdir.gsub("/", "\\") + "\\" + f.gsub("/", "\\") + "' archivePath='" + f.gsub("/", "\\") + "'"
|
176
181
|
# end
|
177
|
-
|
182
|
+
# File.open(out_dir + "XapCacheFile.xml", "w") { |f| doc.write f, 2; f.close }
|
178
183
|
|
179
|
-
|
184
|
+
# chdir $startdir
|
180
185
|
|
181
|
-
|
186
|
+
# mkdir_p $config["build"]["wppath"] + "/rhodes/obj/Release" if not File.exists? $config["build"]["wppath"] + "/rhodes/obj/Release"
|
182
187
|
# cp out_dir + "XapCacheFile.xml", $config["build"]["wppath"] + "/rhodes/obj/Release"
|
183
188
|
end
|
184
189
|
|
@@ -260,7 +265,17 @@ end
|
|
260
265
|
end
|
261
266
|
|
262
267
|
desc "Build production for device or emulator"
|
263
|
-
task :production => ["
|
268
|
+
task :production => ["build:wp:rhobundle_production","build:wp:rhodes", "device:wp:addbundletoxapRelease"] do
|
269
|
+
#out_dir = $startdir + "/" + $vcbindir + "/#{$sdk}" + "/rhodes/Release/"
|
270
|
+
out_dir = $startdir + "/" + $vcbindir + "/rhodes/Release/"
|
271
|
+
cp out_dir + "rhodes.xap", out_dir + $appname + ".xap"
|
272
|
+
|
273
|
+
mkdir_p $bindir if not File.exists? $bindir
|
274
|
+
mkdir_p $targetdir if not File.exists? $targetdir
|
275
|
+
mv out_dir + $appname + ".xap", $targetdir
|
276
|
+
end
|
277
|
+
|
278
|
+
task :production_noxap => ["build:wp:rhobundle_production","build:wp:rhodes"] do
|
264
279
|
#out_dir = $startdir + "/" + $vcbindir + "/#{$sdk}" + "/rhodes/Release/"
|
265
280
|
out_dir = $startdir + "/" + $vcbindir + "/rhodes/Release/"
|
266
281
|
cp out_dir + "rhodes.xap", out_dir + $appname + ".xap"
|
@@ -275,13 +290,13 @@ end
|
|
275
290
|
|
276
291
|
namespace "clean" do
|
277
292
|
desc "Clean wp"
|
278
|
-
task :wp => "clean:
|
279
|
-
namespace "
|
293
|
+
task :wp => "clean:wp:all"
|
294
|
+
namespace "wp" do
|
280
295
|
task :rhodes => ["config:wp"] do
|
281
296
|
rm_rf $vcbindir
|
282
297
|
rm_rf $targetdir
|
283
298
|
end
|
284
|
-
task :all => "clean:
|
299
|
+
task :all => "clean:wp:rhodes"
|
285
300
|
end
|
286
301
|
end
|
287
302
|
|
@@ -292,40 +307,41 @@ namespace "run" do
|
|
292
307
|
end
|
293
308
|
|
294
309
|
desc "Build, install .xap and run on WP7 emulator"
|
295
|
-
task :wp => ["
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
File.delete($app_path + "/started") if File.exists?($app_path + "/started")
|
300
|
-
run_rho_log_server()
|
301
|
-
puts "RhoLogServer is starting"
|
302
|
-
while(1)
|
303
|
-
if File.exists?($app_path + "/started")
|
304
|
-
break
|
305
|
-
end
|
306
|
-
end
|
310
|
+
task :wp => ["device:wp:production_noxap"] do
|
311
|
+
|
312
|
+
if $app_config["wp"] && $app_config["wp"]["productid"] != nil
|
313
|
+
#system("START " + $wp7logserver + " " + $app_path + "/rholog.txt")
|
307
314
|
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
315
|
+
File.delete($app_path + "/started") if File.exists?($app_path + "/started")
|
316
|
+
run_rho_log_server()
|
317
|
+
puts "RhoLogServer is starting"
|
318
|
+
while(1)
|
319
|
+
if File.exists?($app_path + "/started")
|
320
|
+
break
|
321
|
+
end
|
322
|
+
end
|
312
323
|
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
324
|
+
Rake::Task["device:wp:addbundletoxapRelease"].invoke
|
325
|
+
out_dir = $startdir + "/" + $vcbindir + "/rhodes/Release/"
|
326
|
+
cp out_dir + "rhodes.xap", out_dir + $appname + ".xap"
|
327
|
+
mv out_dir + $appname + ".xap", $targetdir
|
328
|
+
|
329
|
+
args = []
|
330
|
+
args << $app_config["wp"]["productid"]
|
331
|
+
args << $app_config["name"]
|
332
|
+
args << $app_path + "/icon/icon.png"
|
333
|
+
args << $targetdir + "/" + $appname + ".xap"
|
334
|
+
args << "emu"
|
335
|
+
puts Jake.run($wp7runner, args)
|
336
|
+
|
337
|
+
#while(1)
|
338
|
+
# sleep(1000)
|
339
|
+
#end
|
340
|
+
#$rhologfile.close
|
341
|
+
else
|
342
|
+
puts "productid must be set in build.yml"
|
343
|
+
puts "productid's format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
344
|
+
end
|
329
345
|
|
330
346
|
end
|
331
347
|
|
@@ -367,39 +383,40 @@ namespace "run" do
|
|
367
383
|
end
|
368
384
|
|
369
385
|
desc "Build, install .xap and run on WP7 device"
|
370
|
-
task :device => ["
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
386
|
+
task :device => ["device:wp:production_noxap"] do
|
387
|
+
|
388
|
+
if $app_config["wp"] && $app_config["wp"]["productid"] != nil
|
389
|
+
#system("START " + $wp7logserver + " " + $app_path + "/rholog.txt")
|
390
|
+
File.delete($app_path + "/started") if File.exists?($app_path + "/started")
|
391
|
+
run_rho_log_server()
|
392
|
+
puts "RhoLogServer is starting"
|
393
|
+
while(1)
|
394
|
+
if File.exists?($app_path + "/started")
|
395
|
+
break
|
396
|
+
end
|
379
397
|
end
|
380
|
-
end
|
381
398
|
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
399
|
+
Rake::Task["device:wp:addbundletoxapRelease"].invoke
|
400
|
+
out_dir = $startdir + "/" + $vcbindir + "/rhodes/Release/"
|
401
|
+
cp out_dir + "rhodes.xap", out_dir + $appname + ".xap"
|
402
|
+
mv out_dir + $appname + ".xap", $targetdir
|
403
|
+
|
404
|
+
args = []
|
405
|
+
args << $app_config["wp"]["productid"]
|
406
|
+
args << $app_config["name"]
|
407
|
+
args << $app_path + "/icon/icon.png"
|
408
|
+
args << $targetdir + "/" + $appname + ".xap"
|
409
|
+
args << "dev"
|
410
|
+
puts Jake.run($wp7runner, args)
|
411
|
+
|
412
|
+
#while(1)
|
413
|
+
# sleep(1000)
|
414
|
+
#end
|
415
|
+
#$rhologfile.close
|
416
|
+
else
|
417
|
+
puts "productid must be set in build.yml"
|
418
|
+
puts "productid's format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
419
|
+
end
|
403
420
|
end
|
404
421
|
end
|
405
422
|
end
|
data/rakefile.rb
CHANGED
@@ -518,14 +518,18 @@ end
|
|
518
518
|
def process_exclude_folders
|
519
519
|
excl = []
|
520
520
|
|
521
|
+
exclude_platform = $config['platform']
|
522
|
+
exclude_platform = "bb6" if $bb6
|
523
|
+
exclude_platform = "wm" if exclude_platform == 'win32'
|
524
|
+
|
521
525
|
if $app_config["excludedirs"]
|
522
526
|
excl << $app_config["excludedirs"]['all'] if $app_config["excludedirs"]['all']
|
523
|
-
excl << $app_config["excludedirs"][
|
527
|
+
excl << $app_config["excludedirs"][exclude_platform] if $app_config["excludedirs"][exclude_platform]
|
524
528
|
end
|
525
529
|
|
526
530
|
if $config["excludedirs"]
|
527
531
|
excl << $config["excludedirs"]['all'] if $config["excludedirs"]['all']
|
528
|
-
excl << $config["excludedirs"][
|
532
|
+
excl << $config["excludedirs"][exclude_platform] if $config["excludedirs"][exclude_platform]
|
529
533
|
end
|
530
534
|
|
531
535
|
if excl
|
@@ -684,6 +688,9 @@ namespace "build" do
|
|
684
688
|
|
685
689
|
rm "#{$srcdir}/bb.rb"
|
686
690
|
|
691
|
+
chdir $srcdir
|
692
|
+
Dir.glob("**/*.erb") { |f| rm f }
|
693
|
+
|
687
694
|
chdir startdir
|
688
695
|
cp_r "platform/shared/db/res/db", $srcdir
|
689
696
|
end
|
data/rhodes.gemspec
CHANGED
@@ -3,7 +3,7 @@ require "lib/rhodes.rb"
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = %q{rhodes}
|
6
|
-
s.version =
|
6
|
+
s.version = "3.0.1.beta.2"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.authors = ["Rhomobile"]
|
@@ -14,8 +14,6 @@ Gem::Specification.new do |s|
|
|
14
14
|
files = Array.new
|
15
15
|
IO.read("Manifest.txt").each_line {|x| files << x.chomp}
|
16
16
|
s.files = files
|
17
|
-
# disable rdoc until we fix the docs
|
18
|
-
s.has_rdoc = false
|
19
17
|
s.homepage = %q{http://www.rhomobile.com}
|
20
18
|
s.rdoc_options = ["--inline-source", "--charset=UTF-8"]
|
21
19
|
s.require_paths = ["lib"]
|
@@ -154,8 +154,8 @@ describe "AsyncHttp" do
|
|
154
154
|
res['body'].index('The requested method PUT is not allowed for the URL').should_not be_nil
|
155
155
|
|
156
156
|
end
|
157
|
-
|
158
|
-
|
157
|
+
|
158
|
+
it "should upload with body" do
|
159
159
|
return unless $is_network_available
|
160
160
|
|
161
161
|
server = 'http://rhologs.heroku.com'
|
@@ -179,7 +179,7 @@ describe "AsyncHttp" do
|
|
179
179
|
File.exists?(file_name).should == true
|
180
180
|
end
|
181
181
|
|
182
|
-
|
182
|
+
it "should upload miltiple" do
|
183
183
|
return unless $is_network_available
|
184
184
|
|
185
185
|
server = 'http://rhologs.heroku.com'
|
@@ -209,15 +209,13 @@ describe "AsyncHttp" do
|
|
209
209
|
File.exists?(file_name).should == true
|
210
210
|
end
|
211
211
|
|
212
|
-
|
213
|
-
=begin
|
214
|
-
def httpsget_test
|
212
|
+
it "should send https request" do
|
215
213
|
return unless $is_network_available
|
216
214
|
|
217
215
|
res = Rho::AsyncHttp.get(
|
218
|
-
:url => 'https://
|
216
|
+
:url => 'https://rhologs.heroku.com' )
|
219
217
|
|
220
|
-
|
218
|
+
puts "res : #{res}"
|
221
219
|
|
222
220
|
res['status'].should == 'ok'
|
223
221
|
|
@@ -229,5 +227,5 @@ describe "AsyncHttp" do
|
|
229
227
|
end
|
230
228
|
|
231
229
|
end
|
232
|
-
|
230
|
+
|
233
231
|
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
describe "URI" do
|
2
|
+
|
3
|
+
before(:all) do
|
4
|
+
@@file_name = File.join(Rho::RhoApplication::get_base_app_path(), 'local_file.txt')
|
5
|
+
unless File.exists?(@@file_name)
|
6
|
+
write_data = "this is rhodes test"
|
7
|
+
f = File.new(@@file_name, "w")
|
8
|
+
f.write(write_data)
|
9
|
+
f.close
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
after(:all) do
|
14
|
+
File.delete(@@file_name) if File.exists?(@@file_name)
|
15
|
+
end
|
16
|
+
|
17
|
+
it "test navigate local page" do
|
18
|
+
WebView.navigate "/app"
|
19
|
+
end
|
20
|
+
|
21
|
+
it "test navigate external http" do
|
22
|
+
WebView.navigate "http://rhomobile.com/wp-content/themes/rhomobile/img/imgs_21.jpg?rho_open_target=_blanck"
|
23
|
+
end
|
24
|
+
|
25
|
+
it "test navigate local file" do
|
26
|
+
puts "runnuni open local file: #{@@file_name}"
|
27
|
+
WebView.navigate "file://" + @@file_name
|
28
|
+
end
|
29
|
+
|
30
|
+
it "test navigate phone uri" do
|
31
|
+
WebView.navigate "tel:1234567"
|
32
|
+
end
|
33
|
+
|
34
|
+
it "test navigate sms uri" do
|
35
|
+
WebView.navigate "sms:+1234567?body=test%20sms%20message"
|
36
|
+
end
|
37
|
+
|
38
|
+
it "test navigate mailto URI" do
|
39
|
+
WebView.navigate "mailto:dev@rhomobile.com?body=test%20phone%20spec%20mail%20message"
|
40
|
+
end
|
41
|
+
|
42
|
+
it "test navigate video" do
|
43
|
+
WebView.navigate "video.avi"
|
44
|
+
end
|
45
|
+
|
46
|
+
it "test open local page" do
|
47
|
+
WebView.navigate "/app"
|
48
|
+
end
|
49
|
+
|
50
|
+
it "test open external http" do
|
51
|
+
WebView.navigate "http://rhomobile.com/wp-content/themes/rhomobile/img/imgs_21.jpg?rho_open_target=_blanck"
|
52
|
+
end
|
53
|
+
|
54
|
+
it "test open local file" do
|
55
|
+
puts "runnuni open local file: #{@@file_name}"
|
56
|
+
System.open_url "file://" + @@file_name
|
57
|
+
end
|
58
|
+
|
59
|
+
it "test open phone uri" do
|
60
|
+
System.open_url "tel:1234567"
|
61
|
+
end
|
62
|
+
|
63
|
+
it "test open sms uri" do
|
64
|
+
System.open_url "sms:+1234567?body=test%20sms%20message"
|
65
|
+
end
|
66
|
+
|
67
|
+
it "test open mailto URI" do
|
68
|
+
System.open_url "mailto:dev@rhomobile.com?body=test%20phone%20spec%20mail%20message"
|
69
|
+
end
|
70
|
+
|
71
|
+
it "test open video" do
|
72
|
+
System.open_url "video.avi"
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|