RubyApp 0.0.43 → 0.0.44

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- RubyApp (0.0.43)
4
+ RubyApp (0.0.44)
5
5
  BlueCloth
6
6
  chronic
7
7
  chronic_duration
@@ -5,19 +5,24 @@
5
5
  this.translation = {code:'#{RubyApp::Language.locale.code}', title:'#{RubyApp::Language.locale.title}'},
6
6
  this.interval = #{self.interval * 1000};
7
7
  this._interval = 0;
8
- this.sendEvent = function(event) {
8
+ this.queueEvent = function(event) {
9
9
  event.session_id = '#{RubyApp::Session.session_id}';
10
10
  event.now = new Date().toString();
11
- request = $.post(location.href, event);
12
- request
13
- .success( function(event) {
14
- $.each(event.statements, function(index, statement) {
15
- eval(statement);
16
- } );
17
- } )
18
- .error( function(request, message, exception) {
19
- RubyApp.confirm_refresh(#{RubyApp::Elements::Base::BasePage.translate.error.to_json});
20
- } )
11
+ $(window).queue( function() {
12
+ request = $.post(location.href, event);
13
+ request
14
+ .success( function(event) {
15
+ $.each(event.statements, function(index, statement) {
16
+ eval(statement);
17
+ } );
18
+ } )
19
+ .error( function(request, message, exception) {
20
+ RubyApp.confirm_refresh(#{RubyApp::Elements::Base::BasePage.translate.error.to_json});
21
+ } )
22
+ .complete( function() {
23
+ $(window).dequeue();
24
+ } )
25
+ } );
21
26
  },
22
27
  this.alert = function(message) {
23
28
  alert(message);
@@ -64,7 +69,7 @@
64
69
  $(window).bind('scroll', function() {
65
70
  centerDialog(id);
66
71
  } );
67
- RubyApp.sendEvent({_class:'RubyApp::Elements::Dialog::ShownEvent', source_id:id});
72
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Dialog::ShownEvent', source_id:id});
68
73
  } );
69
74
  },
70
75
  this.hide = function(id) {
@@ -72,7 +77,7 @@
72
77
  $(window).unbind('resize');
73
78
  $('body div.overlay').hide();
74
79
  $('#'+id).remove();
75
- RubyApp.sendEvent({_class:'RubyApp::Elements::Dialog::HiddenEvent', source_id:id});
80
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Dialog::HiddenEvent', source_id:id});
76
81
  },
77
82
  this.updateElement = function(id) {
78
83
  response = $.get('/#{RubyApp::Language.locale.code}/elements/' + id + '.html');
@@ -99,10 +104,10 @@
99
104
  };
100
105
 
101
106
  $(window).load(function() {
102
- RubyApp.sendEvent({_class:'RubyApp::Elements::Page::LoadedEvent', source_id:$('html').attr('id')});
107
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Page::LoadedEvent', source_id:$('html').attr('id')});
103
108
  if ( RubyApp.interval > 0 ) {
104
109
  RubyApp._interval = window.setInterval(function() {
105
- RubyApp.sendEvent({_class:'RubyApp::Elements::Page::TriggeredEvent', source_id:$('html').attr('id')});
110
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Page::TriggeredEvent', source_id:$('html').attr('id')});
106
111
  }, RubyApp.interval);
107
112
  }
108
113
  });
@@ -111,7 +116,7 @@
111
116
  if ( RubyApp.interval > 0 ) {
112
117
  window.clearInterval(RubyApp._interval);
113
118
  }
114
- // RubyApp.sendEvent({_class:'RubyApp::Elements::Page::UnloadedEvent', source_id:$('html').attr('id')});
119
+ // RubyApp.queueEvent({_class:'RubyApp::Elements::Page::UnloadedEvent', source_id:$('html').attr('id')});
115
120
  });
116
121
 
117
122
  = yield
@@ -4,15 +4,15 @@
4
4
  $(document).ready(function() {
5
5
  $('div.month > table > thead > tr > td.left > a.previous').live('click', function(event) {
6
6
  event.preventDefault();
7
- RubyApp.sendEvent({_class:'RubyApp::Elements::Calendars::Month::MovedEvent', source_id:$(this).parents('div.month').attr('id'), unit:'month', amount:-1});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Calendars::Month::MovedEvent', source_id:$(this).parents('div.month').attr('id'), unit:'month', amount:-1});
8
8
  });
9
9
  $('div.month > table > thead > tr > td.right > a.next').live('click', function(event) {
10
10
  event.preventDefault();
11
- RubyApp.sendEvent({_class:'RubyApp::Elements::Calendars::Month::MovedEvent', source_id:$(this).parents('div.month').attr('id'), unit:'month', amount:1});
11
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Calendars::Month::MovedEvent', source_id:$(this).parents('div.month').attr('id'), unit:'month', amount:1});
12
12
  });
13
13
  $('div.month > table > tbody > tr > td > a.day').live('click', function(event) {
14
14
  event.preventDefault();
15
- RubyApp.sendEvent({_class:'RubyApp::Elements::Calendars::Month::ChangedEvent', source_id:$(this).parents('div.month').attr('id'), date:$(this).attr('date')});
15
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Calendars::Month::ChangedEvent', source_id:$(this).parents('div.month').attr('id'), date:$(this).attr('date')});
16
16
  });
17
17
  });
18
18
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('.click').live('click', function(event) {
6
6
  event.preventDefault();
7
- RubyApp.sendEvent({_class:'RubyApp::Elements::Click::ClickedEvent', source_id:$(this).attr('id')});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Click::ClickedEvent', source_id:$(this).attr('id')});
8
8
  });
9
9
  });
10
10
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('input[type="text"]').live('change', function(event) {
6
6
  event.preventDefault();
7
- RubyApp.sendEvent({_class:'RubyApp::Elements::Input::ChangedEvent', source_id:$(this).attr('id'), value:$(this).val()});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Input::ChangedEvent', source_id:$(this).attr('id'), value:$(this).val()});
8
8
  });
9
9
  });
10
10
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('ul.list > li.item > a.item').live('click', function(event) {
6
6
  event.preventDefault();
7
- RubyApp.sendEvent({_class:'RubyApp::Elements::List::ClickedEvent', source_id:$(this).parents('ul.list').attr('id'), index:$(this).attr('index')});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::List::ClickedEvent', source_id:$(this).parents('ul.list').attr('id'), index:$(this).attr('index')});
8
8
  });
9
9
  });
10
10
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('ul.select > li.item > a.item').live('click', function(event) {
6
6
  event.preventDefault();
7
- RubyApp.sendEvent({_class:'RubyApp::Elements::List::ClickedEvent', source_id:$(this).parents('ul.select').attr('id'), index:$(this).attr('index')});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::List::ClickedEvent', source_id:$(this).parents('ul.select').attr('id'), index:$(this).attr('index')});
8
8
  });
9
9
  });
10
10
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('div.markdown a').live('click', function(event) {
6
6
  event.preventDefault();
7
- RubyApp.sendEvent({_class:'RubyApp::Elements::Markdown::ClickedEvent', source_id:$(this).parents('div.markdown').attr('id'), name:$(this).attr('href')});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Markdown::ClickedEvent', source_id:$(this).parents('div.markdown').attr('id'), name:$(this).attr('href')});
8
8
  });
9
9
  });
10
10
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('div.breadcrumbs > a.breadcrumb').click(function(event) {
6
6
  event.preventDefault();
7
- RubyApp.sendEvent({_class:'RubyApp::Elements::Navigation::Breadcrumbs::ClickedEvent', source_id:$(this).parents('div.breadcrumbs').attr('id'), page_id:$(this).attr('page_id')});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Navigation::Breadcrumbs::ClickedEvent', source_id:$(this).parents('div.breadcrumbs').attr('id'), page_id:$(this).attr('page_id')});
8
8
  });
9
9
  });
10
10
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('span.link > a.page').click(function(event) {
6
6
  event.preventDefault();
7
- RubyApp.sendEvent({_class:'RubyApp::Elements::Navigation::PageLink::ClickedEvent', source_id:$(this).parents('span.link').attr('id'), page:$(this).attr('page')});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Navigation::PageLink::ClickedEvent', source_id:$(this).parents('span.link').attr('id'), page:$(this).attr('page')});
8
8
  });
9
9
  });
10
10
  = yield
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.0.43"
2
+ VERSION = "0.0.44"
3
3
  ROOT = File.expand_path(File.dirname(__FILE__))
4
4
  end
data/rakefile CHANGED
@@ -27,10 +27,12 @@ namespace :ruby_app do
27
27
  end
28
28
 
29
29
  desc 'Push to master, release, and increment version'
30
- task :release, :next_version do |task, arguments|
30
+ task :release_next_version, :next_version do |task, arguments|
31
31
  if arguments.next_version
32
32
  version_file = File.join(RubyApp::ROOT, %w[version.rb])
33
33
  system "git push origin master && rake release && sed 's|[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*|#{arguments.next_version}|g' < '#{version_file}' > '#{version_file}.out' && rm '#{version_file}' && mv '#{version_file}.out' '#{version_file}' && git commit --all --message='Incrementing version'"
34
+ else
35
+ puts "The next version is required."
34
36
  end
35
37
  end
36
38
 
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: 73
4
+ hash: 71
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 43
10
- version: 0.0.43
9
+ - 44
10
+ version: 0.0.44
11
11
  platform: ruby
12
12
  authors:
13
13
  - Frank G. Ficnar