rhodes 3.0.1.beta.3 → 3.0.1.beta.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -194,6 +194,9 @@ Below, a product model is created using the response from the web service and th
194
194
  end
195
195
  end
196
196
 
197
+ **NOTE: For disable jQTouch caching (by default jQTouch cached your async HTTP request result and will show saved content instead of new requested content), change creation of jQTouch object in layout.erb to next line : <script>jQT = $.jQTouch({cacheGetRequests: false});</script>**
198
+
199
+
197
200
  ### Note About Animated Transitions
198
201
 
199
202
  If you deploy to platforms that don"t handle animated transitions (like Windows Mobile and BlackBerry), the controller will need to handle both cases. In your `AsyncHttp` request, you"ll need to set the `callback_param` with the `@request` variable.
@@ -1038,7 +1038,9 @@ public class Nfc implements RhodesActivityListener {
1038
1038
  public void run() {
1039
1039
  if (RhodesActivity.safeGetInstance().isForegroundNow()) {
1040
1040
  NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(RhodesActivity.getContext());
1041
- nfcAdapter.enableForegroundNdefPush(RhodesActivity.safeGetInstance(), ourP2PNdefMessage);
1041
+ if (nfcAdapter != null) {
1042
+ nfcAdapter.enableForegroundNdefPush(RhodesActivity.safeGetInstance(), ourP2PNdefMessage);
1043
+ }
1042
1044
  }
1043
1045
  }
1044
1046
  });
@@ -1052,7 +1054,9 @@ public class Nfc implements RhodesActivityListener {
1052
1054
  public void run() {
1053
1055
  if (RhodesActivity.safeGetInstance().isForegroundNow()) {
1054
1056
  NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(RhodesActivity.getContext());
1055
- nfcAdapter.disableForegroundNdefPush(RhodesActivity.safeGetInstance());
1057
+ if (nfcAdapter != null) {
1058
+ nfcAdapter.disableForegroundNdefPush(RhodesActivity.safeGetInstance());
1059
+ }
1056
1060
  }
1057
1061
  }
1058
1062
  });
@@ -12,8 +12,8 @@ module Rho
12
12
  end
13
13
  end
14
14
 
15
- params['start_date'] = params['start_date'].to_time unless params['start_date'].nil?
16
- params['end_date'] = params['end_date'].to_time unless params['end_date'].nil?
15
+ params['start_date'] = params['start_date'].to_time if !params['start_date'].nil? and !params['start_date'].is_a?(Time)
16
+ params['end_date'] = params['end_date'].to_time if !params['end_date'].nil? and !params['start_date'].is_a?(Time)
17
17
 
18
18
  params['start_date'] = MIN_TIME if params['start_date'].nil? or params['start_date'] < MIN_TIME
19
19
  params['end_date'] = MAX_TIME if params['end_date'].nil? or params['end_date'] > MAX_TIME
@@ -1504,14 +1504,14 @@ end
1504
1504
 
1505
1505
 
1506
1506
  def is_emulator_running
1507
- `#{$adb} devices`.split("\n")[1..-1].each do |line|
1507
+ `"#{$adb}" devices`.split("\n")[1..-1].each do |line|
1508
1508
  return true if line =~ /^emulator/
1509
1509
  end
1510
1510
  return false
1511
1511
  end
1512
1512
 
1513
1513
  def is_device_running
1514
- `#{$adb} devices`.split("\n")[1..-1].each do |line|
1514
+ `"#{$adb}" devices`.split("\n")[1..-1].each do |line|
1515
1515
  return true if line !~ /^emulator/
1516
1516
  end
1517
1517
  return false
@@ -1532,7 +1532,7 @@ end
1532
1532
 
1533
1533
  def application_running(flag, pkgname)
1534
1534
  pkg = pkgname.gsub(/\./, '\.')
1535
- `#{$adb} #{flag} shell ps`.split.each do |line|
1535
+ `"#{$adb}" #{flag} shell ps`.split.each do |line|
1536
1536
  return true if line =~ /#{pkg}/
1537
1537
  end
1538
1538
  false
@@ -149,7 +149,7 @@ namespace rho.net
149
149
 
150
150
  private NetRequest m_pNetRequest;
151
151
  String m_strResBody;
152
- private MutableString m_valBody;
152
+ private Object m_valBody;
153
153
 
154
154
  public RhoParams m_params;
155
155
  bool m_bInternal = false;
@@ -190,10 +190,8 @@ namespace rho.net
190
190
  m_mapHeaders.TryGetValue("content-type", out strContType);
191
191
  if ( strContType != null && strContType.indexOf("application/json") >=0 )
192
192
  {
193
- ///// RJSONTokener json = new RJSONTokener(resp.getCharData());
194
193
  try{
195
- ///// m_valBody = json.nextRValue();
196
- fastJSON.RJSONTokener.JsonDecode(resp.getCharData());
194
+ m_valBody = fastJSON.RJSONTokener.JsonDecode(resp.getCharData());
197
195
  return;
198
196
  }catch(Exception exc)
199
197
  {
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 = "3.0.1.beta.3"
6
+ s.version = "3.0.1.beta.4"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.authors = ["Rhomobile"]
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: 62196429
4
+ hash: 62196419
5
5
  prerelease: true
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
9
  - 1
10
10
  - beta
11
- - 3
12
- version: 3.0.1.beta.3
11
+ - 4
12
+ version: 3.0.1.beta.4
13
13
  platform: ruby
14
14
  authors:
15
15
  - Rhomobile