rangefinder-sst 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4918617e2140d8b7c976b4873a522a6f442478aa
4
- data.tar.gz: c53b93a2baf0521593c8ed14a6ca279862a032c5
3
+ metadata.gz: 3d2b4c5d33bedad8ec844bd51febbb5e2c87dd6d
4
+ data.tar.gz: f7b77be8d09faa1e49cf1158add16685cfccedc0
5
5
  SHA512:
6
- metadata.gz: fad5dd53e3cb8ed5409c9a83d5a8beae8dd4e880029ba018e3decc71b93c9c5252b3156bbef7a2e06a58055e39e1844a38c30a09a1aea913085b6905a6bf488b
7
- data.tar.gz: 4803678ce0b9f0a6bd555f5d98662676a8667d4b14ef5db359187f7a876d3d8dfac16e8c1999ac9390e317bb6ed0215c553c6afaf1d10f377ba51606d86a7575
6
+ metadata.gz: 5232414d64f9d3d4b970629dcc250a7bba531341ee42b25cbea0011821e45768f9fa3ce831a27fcfd50333d6f17ff74123fc127cb8eaa106e2b1213aa884436b
7
+ data.tar.gz: 9d7d58355ea39aa72956038d122510217d106ffd085bec398fb2be9e8392b24af315f200976acbbf5b0445843e2ed5a9968aab8a9054939af12ba0b5137f64b5
@@ -1,5 +1,5 @@
1
1
  module Rangefinder
2
2
  class SST
3
- VERSION = "0.0.2"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -55,5 +55,16 @@ module Rangefinder
55
55
  @socket = UDPSocket.new
56
56
  @socket.connect(@endpoint, @port)
57
57
  end
58
+
59
+ def code
60
+ <<eos
61
+ <script type="text/javascript">
62
+ var _rangefinder_queue = _rangefinder_queue || [];
63
+ _rangefinder_queue.push(['track', #{@site_id.to_s}, #{@server_id.to_s}]);
64
+ document.write(unescape("%3Cscript src='//#{@script}' type='text/javascript'%3E%3C/script%3E"));
65
+ </script>
66
+ eos
67
+ end
68
+
58
69
  end
59
70
  end
@@ -20,6 +20,8 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.5"
22
22
  spec.add_development_dependency "rake", '~> 10'
23
+ spec.add_development_dependency "rack", '~> 1.5'
24
+ spec.add_development_dependency "sinatra", '~> 1.4'
23
25
 
24
26
  spec.add_dependency "addressable", '~> 2.3'
25
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rangefinder-sst
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dirk Gadsden
@@ -38,6 +38,34 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rack
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.5'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.5'
55
+ - !ruby/object:Gem::Dependency
56
+ name: sinatra
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.4'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.4'
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: addressable
43
71
  requirement: !ruby/object:Gem::Requirement