Skip to content
This repository
Browse code

Pull out primary gemspec into external file that can be used with `ge…

…m build`
  • Loading branch information...
commit 7cf3599daf5717d58a92d8672a3f47344cf5121a 1 parent adac805
Aman Gupta tmm1 authored

Showing 2 changed files with 19 additions and 96 deletions. Show diff stats Hide diff stats

  1. +2 70 Rakefile
  2. +17 26 eventmachine.gemspec
72 Rakefile
... ... @@ -1,5 +1,5 @@
1 1 #!/usr/bin/env rake
2   -#--
  2 +#
3 3 # Ruby/EventMachine
4 4 # http://rubyeventmachine.com
5 5 # Copyright (C) 2006-07 by Francis Cianfrocca
@@ -9,23 +9,6 @@
9 9 # COPYING in the EventMachine distribution for full licensing
10 10 # information.
11 11 #
12   -# $Id$
13   -#++
14   -
15   -### OLD RAKE: ###
16   -# # The tasks and external gemspecs we used to generate binary gems are now
17   -# # obsolete. Use Patrick Hurley's gembuilder to build binary gems for any
18   -# # desired platform.
19   -# # To build a binary gem on Win32, ensure that the include and lib paths
20   -# # both contain the proper references to OPENSSL. Use the static version
21   -# # of the libraries, not the dynamic, otherwise we expose the user to a
22   -# # runtime dependency.
23   -#
24   -# # To build a binary gem for win32, first build rubyeventmachine.so
25   -# # using VC6 outside of the build tree (the normal way: ruby extconf.rb,
26   -# # and then nmake). Then copy rubyeventmachine.so into the lib directory,
27   -# # and run rake gemwin32.
28   -#
29 12
30 13 require 'rubygems' unless defined?(Gem)
31 14 require 'rake' unless defined?(Rake)
@@ -72,53 +55,7 @@ task :clean do
72 55 Dir.glob('ext/**/conftest.dSYM').each{ |file| rm_rf file }
73 56 end
74 57
75   -Spec = Gem::Specification.new do |s|
76   - s.name = "eventmachine"
77   - s.summary = "Ruby/EventMachine library"
78   - s.platform = Gem::Platform::RUBY
79   -
80   - s.has_rdoc = true
81   - s.rdoc_options = %w(--title EventMachine --main README --line-numbers -x lib/em/version -x lib/emva -x lib/evma/ -x lib/jeventmachine)
82   - s.extra_rdoc_files = Dir['README,docs/*']
83   -
84   - excludes = %w(.gitignore)
85   - s.files = `git ls-files`.split("\n") - excludes rescue Errno::ENOENT
86   -
87   - s.require_path = 'lib'
88   -
89   - # TODO / XXX - should we enable this? rubygems fails the install if anything
90   - # is broken. What we could do is CI submission, though, and always terminate
91   - # with a positive code...
92   - # s.test_file = "tests/testem.rb"
93   -
94   - # XXX Using rake to compile extensions breaks when you have multiple ruby installations
95   - # and your path isn't set. We can switch back to this once the Gem.exec patch is merged.
96   - # s.extensions = "Rakefile"
97   - s.extensions = ["ext/extconf.rb", "ext/fastfilereader/extconf.rb"]
98   -
99   - s.author = "Francis Cianfrocca"
100   - s.email = "garbagecat10@gmail.com"
101   - s.rubyforge_project = 'eventmachine'
102   - s.homepage = "http://rubyeventmachine.com"
103   -
104   - # Pulled in from readme, as code to pull from readme was not working!
105   - # Might be worth removing as no one seems to use gem info anyway.
106   - s.description = <<-EOD
107   -EventMachine implements a fast, single-threaded engine for arbitrary network
108   -communications. It's extremely easy to use in Ruby. EventMachine wraps all
109   -interactions with IP sockets, allowing programs to concentrate on the
110   -implementation of network protocols. It can be used to create both network
111   -servers and clients. To create a server or client, a Ruby program only needs
112   -to specify the IP address and port, and provide a Module that implements the
113   -communications protocol. Implementations of several standard network protocols
114   -are provided with the package, primarily to serve as examples. The real goal
115   -of EventMachine is to enable programs to easily interface with other programs
116   -using TCP/IP, especially if custom protocols are required.
117   - EOD
118   -
119   - require 'lib/em/version'
120   - s.version = EventMachine::VERSION
121   -end
  58 +Spec = eval(File.read(File.expand_path('../eventmachine.gemspec', __FILE__)))
122 59
123 60 if RUBY_PLATFORM =~ /mswin/
124 61 Spec.platform = 'x86-mswin32-60'
@@ -359,11 +296,6 @@ namespace :gem do
359 296 task :uninstall do
360 297 gem_cmd(:uninstall, "#{Spec.name}", "-v=#{Spec.version}")
361 298 end
362   -
363   - desc "Generate new gemspec"
364   - task :spec => :clobber do
365   - open("eventmachine.gemspec", 'w') { |f| f.write Spec.to_ruby }
366   - end
367 299 end
368 300
369 301 task :clobber => :clean
43 eventmachine.gemspec
... ... @@ -1,13 +1,22 @@
1 1 # -*- encoding: utf-8 -*-
  2 +require File.expand_path('../lib/em/version', __FILE__)
2 3
3 4 Gem::Specification.new do |s|
4   - s.name = %q{eventmachine}
5   - s.version = "0.12.11"
  5 + s.date = "2010-11-13"
6 6
7   - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8   - s.authors = ["Francis Cianfrocca"]
9   - s.date = %q{2010-05-29}
10   - s.description = %q{EventMachine implements a fast, single-threaded engine for arbitrary network
  7 + s.name = 'eventmachine'
  8 + s.version = EventMachine::VERSION
  9 + s.homepage = 'http://rubyeventmachine.com'
  10 + s.rubyforge_project = 'eventmachine'
  11 +
  12 + s.authors = ["Francis Cianfrocca", "Aman Gupta"]
  13 + s.email = ["garbagecat10@gmail.com", "aman@tmm1.net"]
  14 +
  15 + s.files = `git ls-files`.split("\n")
  16 + s.extensions = ["ext/extconf.rb", "ext/fastfilereader/extconf.rb"]
  17 +
  18 + s.summary = 'Ruby/EventMachine library'
  19 + s.description = "EventMachine implements a fast, single-threaded engine for arbitrary network
11 20 communications. It's extremely easy to use in Ruby. EventMachine wraps all
12 21 interactions with IP sockets, allowing programs to concentrate on the
13 22 implementation of network protocols. It can be used to create both network
@@ -16,25 +25,7 @@ to specify the IP address and port, and provide a Module that implements the
16 25 communications protocol. Implementations of several standard network protocols
17 26 are provided with the package, primarily to serve as examples. The real goal
18 27 of EventMachine is to enable programs to easily interface with other programs
19   -using TCP/IP, especially if custom protocols are required.
20   -}
21   - s.email = %q{garbagecat10@gmail.com}
22   - s.extensions = ["ext/extconf.rb", "ext/fastfilereader/extconf.rb"]
23   - s.files = ["README", "Rakefile", "docs/COPYING", "docs/ChangeLog", "docs/DEFERRABLES", "docs/EPOLL", "docs/GNU", "docs/INSTALL", "docs/KEYBOARD", "docs/LEGAL", "docs/LIGHTWEIGHT_CONCURRENCY", "docs/PURE_RUBY", "docs/RELEASE_NOTES", "docs/SMTP", "docs/SPAWNED_PROCESSES", "docs/TODO", "eventmachine.gemspec", "examples/ex_channel.rb", "examples/ex_queue.rb", "examples/ex_tick_loop_array.rb", "examples/ex_tick_loop_counter.rb", "examples/helper.rb", "ext/binder.cpp", "ext/binder.h", "ext/cmain.cpp", "ext/cplusplus.cpp", "ext/ed.cpp", "ext/ed.h", "ext/em.cpp", "ext/em.h", "ext/emwin.cpp", "ext/emwin.h", "ext/epoll.cpp", "ext/epoll.h", "ext/eventmachine.h", "ext/eventmachine_cpp.h", "ext/extconf.rb", "ext/fastfilereader/extconf.rb", "ext/fastfilereader/mapper.cpp", "ext/fastfilereader/mapper.h", "ext/fastfilereader/rubymain.cpp", "ext/files.cpp", "ext/files.h", "ext/kb.cpp", "ext/page.cpp", "ext/page.h", "ext/pipe.cpp", "ext/project.h", "ext/rubymain.cpp", "ext/sigs.cpp", "ext/sigs.h", "ext/ssl.cpp", "ext/ssl.h", "java/.classpath", "java/.project", "java/src/com/rubyeventmachine/EmReactor.java", "java/src/com/rubyeventmachine/EmReactorException.java", "java/src/com/rubyeventmachine/EventableChannel.java", "java/src/com/rubyeventmachine/EventableDatagramChannel.java", "java/src/com/rubyeventmachine/EventableSocketChannel.java", "java/src/com/rubyeventmachine/application/Application.java", "java/src/com/rubyeventmachine/application/Connection.java", "java/src/com/rubyeventmachine/application/ConnectionFactory.java", "java/src/com/rubyeventmachine/application/DefaultConnectionFactory.java", "java/src/com/rubyeventmachine/application/PeriodicTimer.java", "java/src/com/rubyeventmachine/application/Timer.java", "java/src/com/rubyeventmachine/tests/ApplicationTest.java", "java/src/com/rubyeventmachine/tests/ConnectTest.java", "java/src/com/rubyeventmachine/tests/EMTest.java", "java/src/com/rubyeventmachine/tests/TestDatagrams.java", "java/src/com/rubyeventmachine/tests/TestServers.java", "java/src/com/rubyeventmachine/tests/TestTimers.java", "lib/em/buftok.rb", "lib/em/callback.rb", "lib/em/channel.rb", "lib/em/connection.rb", "lib/em/deferrable.rb", "lib/em/file_watch.rb", "lib/em/future.rb", "lib/em/iterator.rb", "lib/em/messages.rb", "lib/em/process_watch.rb", "lib/em/processes.rb", "lib/em/protocols.rb", "lib/em/protocols/header_and_content.rb", "lib/em/protocols/httpclient.rb", "lib/em/protocols/httpclient2.rb", "lib/em/protocols/line_and_text.rb", "lib/em/protocols/linetext2.rb", "lib/em/protocols/memcache.rb", "lib/em/protocols/object_protocol.rb", "lib/em/protocols/postgres3.rb", "lib/em/protocols/saslauth.rb", "lib/em/protocols/smtpclient.rb", "lib/em/protocols/smtpserver.rb", "lib/em/protocols/socks4.rb", "lib/em/protocols/stomp.rb", "lib/em/protocols/tcptest.rb", "lib/em/pure_ruby.rb", "lib/em/queue.rb", "lib/em/spawnable.rb", "lib/em/streamer.rb", "lib/em/tick_loop.rb", "lib/em/timers.rb", "lib/em/version.rb", "lib/eventmachine.rb", "lib/evma.rb", "lib/evma/callback.rb", "lib/evma/container.rb", "lib/evma/factory.rb", "lib/evma/protocol.rb", "lib/evma/reactor.rb", "lib/jeventmachine.rb", "setup.rb", "tasks/cpp.rake_example", "tests/client.crt", "tests/client.key", "tests/test_attach.rb", "tests/test_basic.rb", "tests/test_channel.rb", "tests/test_connection_count.rb", "tests/test_defer.rb", "tests/test_deferrable.rb", "tests/test_epoll.rb", "tests/test_error_handler.rb", "tests/test_errors.rb", "tests/test_exc.rb", "tests/test_file_watch.rb", "tests/test_futures.rb", "tests/test_get_sock_opt.rb", "tests/test_handler_check.rb", "tests/test_hc.rb", "tests/test_httpclient.rb", "tests/test_httpclient2.rb", "tests/test_inactivity_timeout.rb", "tests/test_kb.rb", "tests/test_ltp.rb", "tests/test_ltp2.rb", "tests/test_next_tick.rb", "tests/test_object_protocol.rb", "tests/test_pause.rb", "tests/test_pending_connect_timeout.rb", "tests/test_process_watch.rb", "tests/test_processes.rb", "tests/test_proxy_connection.rb", "tests/test_pure.rb", "tests/test_queue.rb", "tests/test_running.rb", "tests/test_sasl.rb", "tests/test_send_file.rb", "tests/test_servers.rb", "tests/test_smtpclient.rb", "tests/test_smtpserver.rb", "tests/test_spawn.rb", "tests/test_ssl_args.rb", "tests/test_ssl_methods.rb", "tests/test_ssl_verify.rb", "tests/test_tick_loop.rb", "tests/test_timers.rb", "tests/test_ud.rb", "tests/testem.rb"]
24   - s.homepage = %q{http://rubyeventmachine.com}
25   - s.rdoc_options = ["--title", "EventMachine", "--main", "README", "--line-numbers", "-x", "lib/em/version", "-x", "lib/emva", "-x", "lib/evma/", "-x", "lib/jeventmachine"]
26   - s.require_paths = ["lib"]
27   - s.rubyforge_project = %q{eventmachine}
28   - s.rubygems_version = %q{1.3.6}
29   - s.summary = %q{Ruby/EventMachine library}
30   -
31   - if s.respond_to? :specification_version then
32   - current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
33   - s.specification_version = 3
  28 +using TCP/IP, especially if custom protocols are required."
34 29
35   - if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
36   - else
37   - end
38   - else
39   - end
  30 + s.rdoc_options = ["--title", "EventMachine", "--main", "README", "-x", "lib/em/version", "-x", "lib/emva", "-x", "lib/evma/", "-x", "lib/jeventmachine"]
40 31 end

0 comments on commit 7cf3599

Please sign in to comment.
Something went wrong with that request. Please try again.