Permalink
Browse files

Generate new gemspec with 'gem this' so it works with bundler

  • Loading branch information...
1 parent 65b89b8 commit 7aaf154c895426dbf69be4f8a631810e3eb77151 @rlivsey committed May 20, 2011
Showing with 176 additions and 72 deletions.
  1. +2 −0 .gitignore
  2. +84 −0 Rakefile
  3. +62 −0 _vpim.gemspec
  4. +28 −72 vpim.gemspec
View
@@ -2,3 +2,5 @@ bin
doc
ex_ics_api.out
tags
+pkg
+rdoc
View
@@ -0,0 +1,84 @@
+require "rubygems"
+require "rake/gempackagetask"
+require "rake/rdoctask"
+
+require "rake/testtask"
+Rake::TestTask.new do |t|
+ t.libs << "test"
+ t.test_files = FileList["test/**/*_test.rb"]
+ t.verbose = true
+end
+
+
+task :default => ["test"]
+
+# This builds the actual gem. For details of what all these options
+# mean, and other ones you can add, check the documentation here:
+#
+# http://rubygems.org/read/chapter/20
+#
+spec = Gem::Specification.new do |s|
+
+ # Change these as appropriate
+ s.name = "vpim"
+ s.version = "1.1"
+ s.summary = "iCalendar and vCard support for ruby"
+
+ s.description = 'This is a pure-ruby library for decoding and encoding vCard and iCalendar data ("personal information") called vPim.'
+
+ s.author = "Sam Roberts"
+ s.email = "vieuxtech@gmail.com"
+ s.homepage = "http://vpim.rubyforge.org"
+ s.rubyforge_project = "vpim"
+
+ s.has_rdoc = true
+ s.extra_rdoc_files = ["README", "CHANGES", "COPYING", "samples/README.mutt" ]
+ s.rdoc_options = %w(--main README)
+
+ # Add any extra files to include in the gem
+ s.files = %w(CHANGES COPYING ex_fmt_convert.rb ex_ics_api.rb Makefile mbox2vcard.rb outline.sh profile.rb profile.txt README setup.rb stamp.rb THANKS vpim.gemspec) + Dir.glob("{test,lib}/**/*")
+ s.require_paths = ["lib"]
+
+ # If you want to depend on other gems, add them here, along with any
+ # relevant versions
+ # s.add_dependency("some_other_gem", "~> 0.1.0")
+
+ # If your tests use any gems, include them here
+ # s.add_development_dependency("mocha") # for example
+end
+
+# This task actually builds the gem. We also regenerate a static
+# .gemspec file, which is useful if something (i.e. GitHub) will
+# be automatically building a gem for this project. If you're not
+# using GitHub, edit as appropriate.
+#
+# To publish your gem online, install the 'gemcutter' gem; Read more
+# about that here: http://gemcutter.org/pages/gem_docs
+Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.gem_spec = spec
+end
+
+desc "Build the gemspec file #{spec.name}.gemspec"
+task :gemspec do
+ file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
+ File.open(file, "w") {|f| f << spec.to_ruby }
+end
+
+# If you don't want to generate the .gemspec file, just remove this line. Reasons
+# why you might want to generate a gemspec:
+# - using bundler with a git source
+# - building the gem without rake (i.e. gem build blah.gemspec)
+# - maybe others?
+task :package => :gemspec
+
+# Generate documentation
+Rake::RDocTask.new do |rd|
+ rd.main = "README"
+ rd.rdoc_files.include("README", "lib/**/*.rb")
+ rd.rdoc_dir = "rdoc"
+end
+
+desc 'Clear out RDoc and generated packages'
+task :clean => [:clobber_rdoc, :clobber_package] do
+ rm "#{spec.name}.gemspec"
+end
View
@@ -0,0 +1,62 @@
+author = "Sam Roberts"
+email = "vieuxtech@gmail.com"
+homepage = "http://vpim.rubyforge.org"
+rubyforge_project = "vpim"
+
+spec_vpim = Gem::Specification.new do |s|
+ s.author = author
+ s.email = email
+ s.homepage = homepage
+ s.rubyforge_project = rubyforge_project
+ s.name = "vpim"
+ s.version = `ruby stamp.rb`
+ s.summary = "iCalendar and vCard support for ruby"
+ s.description = <<'---'
+This is a pure-ruby library for decoding and encoding vCard and iCalendar data
+("personal information") called vPim.
+---
+ s.has_rdoc = true
+ s.extra_rdoc_files = ["README", "CHANGES", "COPYING", "samples/README.mutt" ]
+
+ candidates = FileList[
+ 'lib/vpim/**/*.rb',
+ 'lib/vpim.rb',
+ 'bin/*',
+ 'samples/*',
+ 'test/test_*.rb',
+ 'COPYING',
+ 'README',
+ 'CHANGES',
+ ].to_a
+
+ s.files = candidates
+ s.test_files = Dir.glob("test/test_*.rb")
+ s.executables = FileList["bin/*"].map{|path| File.basename(path)}
+
+ s.require_path = "lib"
+# s.add_dependency("plist")
+# s.autorequire = "vpim"
+end
+
+#pp [spec_vpim, spec_vpim.instance_variables]
+
+spec_vpim_icalendar = Gem::Specification.new do |s|
+ s.author = author
+ s.email = email
+ s.homepage = homepage
+ s.rubyforge_project = rubyforge_project
+ s.name = "vpim_icalendar"
+ s.version = "1.1"
+ s.summary = "Virtual gem depending on vPim's iCalendar support for ruby"
+ s.description = <<'---'
+This is a virtual gem, it exists to depend on vPim, which provides iCalendar
+support for ruby. You can install vPim directly.
+---
+ s.add_dependency("vpim")
+end
+
+if $0==__FILE__
+ Gem::Builder.new(spec_vpim).build
+ Gem::Builder.new(spec_vpim_icalendar).build
+end
+
View
@@ -1,74 +1,30 @@
-require 'ubygems'
-require 'pp'
-require 'rake'
-
-def info(s)
- {
- :author => "Sam Roberts",
- :email => "vieuxtech@gmail.com",
- :homepage => "http://vpim.rubyforge.org",
- :rubyforge_project => "vpim",
- }.each do |k,v|
- s.send(k.to_s+"=", v)
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{vpim}
+ s.version = "1.1"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Sam Roberts"]
+ s.date = %q{2011-05-20}
+ s.description = %q{This is a pure-ruby library for decoding and encoding vCard and iCalendar data ("personal information") called vPim.}
+ s.email = %q{vieuxtech@gmail.com}
+ s.extra_rdoc_files = ["README", "CHANGES", "COPYING", "samples/README.mutt"]
+ s.files = ["CHANGES", "COPYING", "ex_fmt_convert.rb", "ex_ics_api.rb", "Makefile", "mbox2vcard.rb", "outline.sh", "profile.rb", "profile.txt", "README", "setup.rb", "stamp.rb", "THANKS", "vpim.gemspec", "test/calendars", "test/calendars/weather.calendar", "test/calendars/weather.calendar/Events", "test/calendars/weather.calendar/Events/1205042405-0-0.ics", "test/calendars/weather.calendar/Events/1205128857-1-1205128857.ics", "test/calendars/weather.calendar/Events/1205215257-2--1884536782.ics", "test/calendars/weather.calendar/Events/1205301657-3--679062325.ics", "test/calendars/weather.calendar/Events/1205388057-4-526584932.ics", "test/calendars/weather.calendar/Events/1205474457-5-1732404989.ics", "test/calendars/weather.calendar/Events/1205560857-6--1356569450.ics", "test/calendars/weather.calendar/Events/1205647257-7--150403793.ics", "test/calendars/weather.calendar/Events/1205712057-8-1055761864.ics", "test/calendars/weather.calendar/Info.plist", "test/common.rb", "test/test_agent_atomize.rb", "test/test_agent_calendars.rb", "test/test_agent_ics.rb", "test/test_all.rb", "test/test_date.rb", "test/test_dur.rb", "test/test_field.rb", "test/test_ical.rb", "test/test_misc.rb", "test/test_repo.rb", "test/test_rrule.rb", "test/test_vcard.rb", "test/test_view.rb", "test/weekly.ics", "lib/vpim", "lib/vpim/address.rb", "lib/vpim/agent", "lib/vpim/agent/atomize.rb", "lib/vpim/agent/base.rb", "lib/vpim/agent/calendars.rb", "lib/vpim/agent/handler.rb", "lib/vpim/agent/ics.rb", "lib/vpim/attachment.rb", "lib/vpim/date.rb", "lib/vpim/dirinfo.rb", "lib/vpim/duration.rb", "lib/vpim/enumerator.rb", "lib/vpim/field.rb", "lib/vpim/icalendar.rb", "lib/vpim/maker", "lib/vpim/maker/vcard.rb", "lib/vpim/property", "lib/vpim/property/base.rb", "lib/vpim/property/common.rb", "lib/vpim/property/location.rb", "lib/vpim/property/priority.rb", "lib/vpim/property/recurrence.rb", "lib/vpim/property/resources.rb", "lib/vpim/repo.rb", "lib/vpim/rfc2425.rb", "lib/vpim/rrule.rb", "lib/vpim/time.rb", "lib/vpim/vcard.rb", "lib/vpim/version.rb", "lib/vpim/vevent.rb", "lib/vpim/view.rb", "lib/vpim/vjournal.rb", "lib/vpim/vpim.rb", "lib/vpim/vtodo.rb", "lib/vpim.rb", "samples/README.mutt"]
+ s.homepage = %q{http://vpim.rubyforge.org}
+ s.rdoc_options = ["--main", "README"]
+ s.require_paths = ["lib"]
+ s.rubyforge_project = %q{vpim}
+ s.rubygems_version = %q{1.3.7}
+ s.summary = %q{iCalendar and vCard support for ruby}
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ else
+ end
+ else
end
end
-
-spec_vpim = Gem::Specification.new do |s|
- info(s)
- s.name = "vpim"
- s.version = `ruby stamp.rb`
- s.summary = "iCalendar and vCard support for ruby"
- s.description = <<'---'
-This is a pure-ruby library for decoding and encoding vCard and iCalendar data
-("personal information") called vPim.
----
- s.has_rdoc = true
- s.extra_rdoc_files = ["README", "CHANGES", "COPYING", "samples/README.mutt" ]
-
- candidates = FileList[
- 'lib/vpim/**/*.rb',
- 'lib/vpim.rb',
- 'bin/*',
- 'samples/*',
- 'test/test_*.rb',
- 'COPYING',
- 'README',
- 'CHANGES',
- ].to_a
-
- s.files = candidates
- s.test_files = Dir.glob("test/test_*.rb")
- s.executables = FileList["bin/*"].map{|path| File.basename(path)}
-
- s.require_path = "lib"
-# s.add_dependency("plist")
-# s.autorequire = "vpim"
-end
-
-#pp [spec_vpim, spec_vpim.instance_variables]
-
-spec_vpim_icalendar = Gem::Specification.new do |s|
- info(s)
- s.name = "vpim_icalendar"
- s.version = "1.1"
- s.summary = "Virtual gem depending on vPim's iCalendar support for ruby"
- s.description = <<'---'
-This is a virtual gem, it exists to depend on vPim, which provides iCalendar
-support for ruby. You can install vPim directly.
----
- s.add_dependency("vpim")
-end
-
-#require 'hoe'
-#
-#Hoe.new(spec_vpim.name, spec_vpim.version) do |p|
-# p.rubyforge_name = "vpim"
-# p.remote_rdoc_dir = '' # Release to root
-#end
-#
-
-if $0==__FILE__
- Gem::Builder.new(spec_vpim).build
- Gem::Builder.new(spec_vpim_icalendar).build
-end
-

0 comments on commit 7aaf154

Please sign in to comment.