RubyApp 0.6.64 → 0.6.65

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.
@@ -43,9 +43,10 @@
43
43
  $('div.overlay').css('display', 'none');
44
44
  }
45
45
  };
46
+ now = null;
46
47
  this.sendEvent = function(event, wait) {
47
48
  RubyApp.log('ENQUEUE event.class=' + event._class);
48
- event.now = new Date().toString();
49
+ event.now = RubyApp.now == undefined ? new Date().toString() : RubyApp.now;
49
50
  event.session = RubyApp.getData('session', null);
50
51
  var _wait = wait == undefined ? true : wait;
51
52
  RubyApp.enQueue ( function() {
@@ -69,9 +69,9 @@ module RubyApp
69
69
 
70
70
  route(RubyApp::Mixins::RouteMixin::POST, /.*/) do |method, path|
71
71
  begin
72
- #RubyApp::Request.POST.each do |name, value|
72
+ # RubyApp::Request.POST.each do |name, value|
73
73
  # RubyApp::Log.debug("POST #{name.to_sym.inspect}=#{value.inspect}")
74
- #end
74
+ # end
75
75
  event = RubyApp::Element::Event.from_hash(RubyApp::Request.POST)
76
76
  RubyApp::Log.duration(RubyApp::Log::INFO, "EVENT #{event.class}") do
77
77
  RubyApp::Session.process_event!(event)
@@ -0,0 +1,5 @@
1
+ add_step! (RubyApp::Element::Event) { |event| event.execute("RubyApp.now = new Date('01 January 1970');")
2
+ event.execute {} }
3
+ add_step! (RubyApp::Element::ExecutedEvent) { |event| event.assert("event.now == Time.parse('01 January 1970');") { event.now == Time.parse('01 January 1970') } }
4
+ add_step! (RubyApp::Element::AssertedEvent) { |event| event.execute("RubyApp.now = null;")
5
+ event.execute {} }
@@ -1,10 +1,13 @@
1
1
  var system = require('system');
2
+
2
3
  var arguments = system.args;
3
- console.log('MESSAGE Running test script on ' + arguments[1] + ' ...');
4
+ var url = arguments[1] + '?script=phantom';
4
5
 
5
6
  var page = require('webpage').create();
6
- page.open(arguments[1] + '?script=phantom');
7
7
 
8
+ page.onLoadStarted = function() {
9
+ console.log('MESSAGE Loading ' + url);
10
+ };
8
11
  page.onNavigationRequested = function(url, type, willNavigate, mainFrame) {
9
12
  console.log('NAVIGATE ' + url);
10
13
  };
@@ -19,3 +22,5 @@ page.onClosing = function(page) {
19
22
  console.log('SUCCESS ' + page.url);
20
23
  phantom.exit();
21
24
  };
25
+
26
+ page.open(url);
@@ -1,3 +1,4 @@
1
+ load_script! 'now'
1
2
  load_script! 'default'
2
3
  load_script! 'elements/buttons'
3
4
  load_script! 'elements/calendars/month'
@@ -1,5 +1,5 @@
1
1
  module RubyApp
2
- VERSION = "0.6.64"
2
+ VERSION = "0.6.65"
3
3
  ROOT = File.expand_path(File.dirname(__FILE__))
4
4
 
5
5
  def self.root
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RubyApp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 135
4
+ hash: 133
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 64
10
- version: 0.6.64
9
+ - 65
10
+ version: 0.6.65
11
11
  platform: ruby
12
12
  authors:
13
13
  - Frank G. Ficnar
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-02-17 00:00:00 Z
18
+ date: 2013-02-19 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement
@@ -1464,6 +1464,7 @@ files:
1464
1464
  - lib/ruby_app/scripts/elements/navigation/navigation_list.rb
1465
1465
  - lib/ruby_app/scripts/elements/swipe.rb
1466
1466
  - lib/ruby_app/scripts/elements/trigger.rb
1467
+ - lib/ruby_app/scripts/now.rb
1467
1468
  - lib/ruby_app/scripts/phantom.js
1468
1469
  - lib/ruby_app/scripts/phantom.rb
1469
1470
  - lib/ruby_app/scripts/standard_all.rb