Permalink
Browse files

New gemspec and version handling

  • Loading branch information...
1 parent 76b3baf commit d20c18450bb7fb8c582595bb9aaddd89d3e33b8d @imanel committed Nov 25, 2011
Showing with 29 additions and 88 deletions.
  1. +2 −3 .gitignore
  2. +3 −0 Gemfile
  3. +4 −19 Rakefile
  4. +1 −3 lib/libwebsocket.rb
  5. +3 −0 lib/libwebsocket/version.rb
  6. +16 −63 libwebsocket.gemspec
View
@@ -1,3 +1,2 @@
-doc
-.yardoc
-pkg
+pkg/
+Gemfile.lock
View
@@ -0,0 +1,3 @@
+source "http://rubygems.org"
+
+gemspec
View
@@ -1,26 +1,11 @@
-$:.unshift(File.dirname(__FILE__))
-require 'rake/testtask'
-require 'lib/libwebsocket'
+require 'bundler'
+Bundler::GemHelper.install_tasks
-task :default => :test
+require 'rake/testtask'
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/**/test_*.rb']
end
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gemspec|
- gemspec.name = "libwebsocket"
- gemspec.version = LibWebSocket::VERSION
- gemspec.summary = "Universal Ruby library to handle WebSocket protocol"
- gemspec.description = "Universal Ruby library to handle WebSocket protocol"
- gemspec.email = "bernard.potocki@imanel.org"
- gemspec.homepage = "http://github.com/imanel/libwebsocket"
- gemspec.authors = ["Bernard Potocki"]
- gemspec.files.exclude ".gitignore"
- end
-rescue LoadError
- puts "Jeweler not available. Install it with: gem install jeweler"
-end
+task :default => :test
View
@@ -3,8 +3,6 @@
# or clients to provide WebSocket support.
module LibWebSocket
- VERSION = '0.1.1' # Version of LibWebSocket
-
autoload :Cookie, "#{File.dirname(__FILE__)}/libwebsocket/cookie"
autoload :Frame, "#{File.dirname(__FILE__)}/libwebsocket/frame"
autoload :OpeningHandshake, "#{File.dirname(__FILE__)}/libwebsocket/opening_handshake"
@@ -14,4 +12,4 @@ module LibWebSocket
autoload :Stateful, "#{File.dirname(__FILE__)}/libwebsocket/stateful"
autoload :URL, "#{File.dirname(__FILE__)}/libwebsocket/url"
-end
+end
@@ -0,0 +1,3 @@
+module LibWebSocket
+ VERSION = '0.1.1'
+end
View
@@ -1,69 +1,22 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "libwebsocket/version"
Gem::Specification.new do |s|
- s.name = "libwebsocket"
- s.version = "0.1.1"
+ s.name = "libwebsocket"
+ s.version = LibWebSocket::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Bernard Potocki"]
+ s.email = ["bernard.potocki@imanel.org"]
+ s.homepage = "http://github.com/imanel/libwebsocket"
+ s.summary = %q{Universal Ruby library to handle WebSocket protocol}
+ s.description = %q{Universal Ruby library to handle WebSocket protocol}
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Bernard Potocki"]
- s.date = "2011-10-24"
- s.description = "Universal Ruby library to handle WebSocket protocol"
- s.email = "bernard.potocki@imanel.org"
- s.extra_rdoc_files = [
- "README.md"
- ]
- s.files = [
- "CHANGELOG.md",
- "README.md",
- "Rakefile",
- "examples/eventmachine_server.rb",
- "examples/plain_client.rb",
- "examples/thin_server.rb",
- "lib/libwebsocket.rb",
- "lib/libwebsocket/cookie.rb",
- "lib/libwebsocket/cookie/request.rb",
- "lib/libwebsocket/cookie/response.rb",
- "lib/libwebsocket/frame.rb",
- "lib/libwebsocket/message.rb",
- "lib/libwebsocket/opening_handshake.rb",
- "lib/libwebsocket/opening_handshake/client.rb",
- "lib/libwebsocket/opening_handshake/server.rb",
- "lib/libwebsocket/request.rb",
- "lib/libwebsocket/response.rb",
- "lib/libwebsocket/stateful.rb",
- "lib/libwebsocket/url.rb",
- "libwebsocket.gemspec",
- "test/libwebsocket/cookie/request.rb",
- "test/libwebsocket/cookie/response.rb",
- "test/libwebsocket/opening_handshake/test_client.rb",
- "test/libwebsocket/opening_handshake/test_server.rb",
- "test/libwebsocket/test_cookie.rb",
- "test/libwebsocket/test_frame.rb",
- "test/libwebsocket/test_message.rb",
- "test/libwebsocket/test_request_75.rb",
- "test/libwebsocket/test_request_76.rb",
- "test/libwebsocket/test_request_common.rb",
- "test/libwebsocket/test_response_75.rb",
- "test/libwebsocket/test_response_76.rb",
- "test/libwebsocket/test_response_common.rb",
- "test/libwebsocket/test_url.rb",
- "test/test_helper.rb"
- ]
- s.homepage = "http://github.com/imanel/libwebsocket"
- s.require_paths = ["lib"]
- s.rubygems_version = "1.8.11"
- s.summary = "Universal Ruby library to handle WebSocket protocol"
-
- if s.respond_to? :specification_version then
- s.specification_version = 3
+ s.add_dependency 'addressable'
+ s.add_development_dependency 'rake'
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- else
- end
- else
- end
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
end
-

0 comments on commit d20c184

Please sign in to comment.