shooting_star 3.2.0 → 3.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ *** 3.2.1 / 2007-08-09
2
+ + 1 critical bugfix:
3
+ + Fixed a behaviour of xhr client initialization.
4
+
1
5
  *** 3.2.0 / 2007-08-09
2
6
  + 3 major enhancements:
3
7
  + Automatic activation/deactivation of flash client.
data/lib/shooting_star.rb CHANGED
@@ -9,7 +9,7 @@ require 'shooting_star/config'
9
9
  require 'shooting_star/shooter'
10
10
 
11
11
  module ShootingStar
12
- VERSION = '3.2.0'
12
+ VERSION = '3.2.1'
13
13
  CONFIG = Config.new(
14
14
  :config => 'config/shooting_star.yml',
15
15
  :pid_file => 'tmp/pids/shooting_star.pid',
@@ -41,46 +41,49 @@
41
41
  return $A(tags).uniq().map(encode).join(',');
42
42
  };
43
43
  var ms = meteorStrike[channel] = meteorStrike[channel] || new Object;
44
- ms.getTags = function(){return TAGS};
45
- ms.getUid = function(){return UID};
46
- ms.execute = function(js){eval(js)};
47
- ms.event = function(params){
48
- if(params.event == 'init'){
49
- if(ms.connection) return Element.remove('#{iframe_id}');
50
- ms.connection = params.type;
51
- }
52
- (function(){#{options[:event]}})();
53
- };
54
- ms.update = function(uid, tags){
55
- new Ajax.Request(#{update_uri.to_json}, {postBody: $H({
56
- channel: channel, uid: uid || UID,
57
- tag: encodeTags(tags || TAGS), sig: #{sig.to_json}
58
- }).toQueryString(), asynchronous: true});
59
- UID = uid, TAGS = tags;
60
- };
61
- ms.tuneIn = function(tags){
62
- ms.update(UID, TAGS.concat(tags || []).uniq());
63
- };
64
- ms.tuneOut = function(tags){
65
- ms.update(UID, Array.prototype.without.apply(TAGS, tags));
66
- };
67
- ms.tuneInOut = function(tagsIn, tagsOut){
68
- var tags = TAGS.concat(tagsIn || []).uniq();
69
- ms.update(UID, Array.prototype.without.apply(tags, tagsOut));
70
- };
71
- ms.tuneOutIn = function(tagsOut, tagsIn){
72
- var tags = Array.prototype.without.apply(TAGS, tagsOut);
73
- ms.update(UID, tags.concat(tagsIn || []).uniq());
74
- };
75
- setTimeout(ms.connector = function(){
76
- if(ms.connection) return;
77
- var form = $("#{iframe_id}-form");
78
- form.uid.value = #{uid.to_json};
79
- form.tag.value = #{tag.to_json};
80
- form.sig.value = #{sig.to_json};
81
- form.submit();
82
- setTimeout(ms.connector, 3000);
83
- }, meteorStrike.getFlashVersion() >= 6 ? 3000 : 0);
44
+ Event.observe(window, 'load', function(){
45
+ ms.getTags = function(){return TAGS};
46
+ ms.getUid = function(){return UID};
47
+ ms.execute = function(js){eval(js)};
48
+ ms.event = function(params){
49
+ if(params.event == 'init'){
50
+ if(ms.connection) return Element.remove('#{iframe_id}');
51
+ ms.connection = params.type;
52
+ }
53
+ (function(){#{options[:event]}})();
54
+ };
55
+ ms.update = function(uid, tags){
56
+ new Ajax.Request(#{update_uri.to_json}, {postBody: $H({
57
+ channel: channel, uid: uid || UID,
58
+ tag: encodeTags(tags || TAGS), sig: #{sig.to_json}
59
+ }).toQueryString(), asynchronous: true});
60
+ UID = uid, TAGS = tags;
61
+ };
62
+ ms.tuneIn = function(tags){
63
+ ms.update(UID, TAGS.concat(tags || []).uniq());
64
+ };
65
+ ms.tuneOut = function(tags){
66
+ ms.update(UID, Array.prototype.without.apply(TAGS, tags));
67
+ };
68
+ ms.tuneInOut = function(tagsIn, tagsOut){
69
+ var tags = TAGS.concat(tagsIn || []).uniq();
70
+ ms.update(UID, Array.prototype.without.apply(tags, tagsOut));
71
+ };
72
+ ms.tuneOutIn = function(tagsOut, tagsIn){
73
+ var tags = Array.prototype.without.apply(TAGS, tagsOut);
74
+ ms.update(UID, tags.concat(tagsIn || []).uniq());
75
+ };
76
+ setTimeout(ms.connector = function(){
77
+ if(ms.connection) return;
78
+ var form = $("#{iframe_id}-form");
79
+ form.uid.value = #{uid.to_json};
80
+ form.tag.value = #{tag.to_json};
81
+ form.sig.value = #{sig.to_json};
82
+ var timerId = setTimeout(ms.connector, 3000);
83
+ $('#{iframe_id}').onload = function(){clearTimeout(timerId)};
84
+ form.submit();
85
+ }, meteorStrike.getFlashVersion() >= 6 ? 3000 : 0);
86
+ });
84
87
  })();
85
88
  function meteor_strike_#{@meteor_strike}_DoFSCommand(command, args){
86
89
  var ms = meteorStrike[#{channel.to_json}];
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.3
3
3
  specification_version: 1
4
4
  name: shooting_star
5
5
  version: !ruby/object:Gem::Version
6
- version: 3.2.0
6
+ version: 3.2.1
7
7
  date: 2007-08-09 00:00:00 +09:00
8
8
  summary: Our goal is development of practical comet server which will be achieving over 100,000 simultaneous connections per host. On this purpose, we abandon portability and use system calls depending on particular OS such as epoll and kqueue.
9
9
  require_paths:
@@ -125,5 +125,5 @@ dependencies:
125
125
  requirements:
126
126
  - - ">="
127
127
  - !ruby/object:Gem::Version
128
- version: 1.2.1
128
+ version: 1.2.2
129
129
  version: