Skip to content

Commit 67e968a

Browse files
authored
Merge pull request #103 from pusher/899-report-name-and-version
[PROD-899] report name and version in X-Pusher-Library header
2 parents c09addd + a30f522 commit 67e968a

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

lib/pusher.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def default_client
6060
end
6161
end
6262

63+
require 'pusher/version'
6364
require 'pusher/channel'
6465
require 'pusher/request'
6566
require 'pusher/resource'

lib/pusher/request.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ class Request
88

99
def initialize(client, verb, uri, params, body = nil)
1010
@client, @verb, @uri = client, verb, uri
11-
@head = {}
11+
@head = {
12+
'X-Pusher-Library' => 'pusher-http-ruby ' + Pusher::VERSION
13+
}
1214

1315
@body = body
1416
if body

lib/pusher/version.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Pusher
2+
VERSION = '1.2.0.rc2'
3+
end

pusher.gemspec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# -*- encoding: utf-8 -*-
2+
3+
require File.expand_path('../lib/pusher/version', __FILE__)
4+
25
Gem::Specification.new do |s|
36
s.name = "pusher"
4-
s.version = "1.2.0.rc2"
7+
s.version = Pusher::VERSION
58
s.platform = Gem::Platform::RUBY
69
s.authors = ["Pusher"]
710
s.email = ["support@pusher.com"]

0 commit comments

Comments
 (0)