Skip to content
Browse files

Gemify the project

  • Loading branch information...
1 parent 9d7bff5 commit 2edfaa76df7e6c82be17bc3f25abb6ced9bba171 @lukeredpath committed Jan 30, 2012
Showing with 136 additions and 13 deletions.
  1. +1 −11 Gemfile
  2. +9 −2 Gemfile.lock
  3. +77 −0 Rakefile
  4. +49 −0 xcodebuild-rb.gemspec
View
12 Gemfile
@@ -1,12 +1,2 @@
source :rubygems
-
-gem "state_machine"
-
-group :development do
- gem "rake"
- gem "rspec"
- gem "guard-rspec"
- gem "growl"
- gem "timecop"
- gem "chronic"
-end
+gemspec
View
11 Gemfile.lock
@@ -1,4 +1,11 @@
+PATH
+ remote: .
+ specs:
+ xcodebuild-rb (0.1.0)
+ state_machine (~> 1.1.2)
+
GEM
+ remote: http://rubygems.org/
specs:
chronic (0.6.6)
diff-lcs (1.1.3)
@@ -16,7 +23,7 @@ GEM
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
- state_machine (1.1.0)
+ state_machine (1.1.2)
thor (0.14.6)
timecop (0.3.5)
@@ -29,5 +36,5 @@ DEPENDENCIES
guard-rspec
rake
rspec
- state_machine
timecop
+ xcodebuild-rb!
View
77 Rakefile
@@ -81,3 +81,80 @@ task :simulate_clean_fail do
FileUtils.chmod(000, "resources/ExampleProject/build/Release-iphoneos/ExampleProject.app")
Rake::Task["examples:xcode:clean"].invoke
end
+
+require "rubygems"
+require "rubygems/package_task"
+require "rdoc/task"
+
+# 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 = "xcodebuild-rb"
+ s.version = "0.1.0"
+ s.summary = "Build Xcode projects using Rake"
+ s.author = "Luke Redpath"
+ s.email = "luke@lukeredpath.co.uk"
+ s.homepage = "http://github.com/lukeredpath/xcodebuild-rb"
+
+ s.has_rdoc = false
+ s.extra_rdoc_files = %w(README.md)
+ s.rdoc_options = %w(--main README.md)
+
+ # Add any extra files to include in the gem
+ s.files = %w(LICENSE README.md) + Dir.glob("{bin,spec,lib}/**/*")
+ s.executables = FileList["bin/**"].map { |f| File.basename(f) }
+ s.require_paths = ["lib"]
+
+ # If you want to depend on other gems, add them here, along with any
+ # relevant versions
+ s.add_dependency("state_machine", "~> 1.1.2")
+
+ # If your tests use any gems, include them here
+ s.add_development_dependency("rspec")
+ s.add_development_dependency("rake")
+ s.add_development_dependency("guard-rspec")
+ s.add_development_dependency("growl")
+ s.add_development_dependency("timecop")
+ s.add_development_dependency("chronic")
+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
+Gem::PackageTask.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
+RDoc::Task.new do |rd|
+ rd.main = "README.md"
+ rd.rdoc_files.include("README.md", "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
49 xcodebuild-rb.gemspec
@@ -0,0 +1,49 @@
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = "xcodebuild-rb"
+ s.version = "0.1.0"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Luke Redpath"]
+ s.date = "2012-01-30"
+ s.email = "luke@lukeredpath.co.uk"
+ s.executables = ["rbxcb"]
+ s.extra_rdoc_files = ["README.md"]
+ s.files = ["LICENSE", "README.md", "bin/rbxcb", "spec/build_task_spec.rb", "spec/output_translator_spec.rb", "spec/reporting", "spec/reporting/build_reporting_spec.rb", "spec/reporting/clean_reporting_spec.rb", "spec/spec_helper.rb", "spec/translations", "spec/translations/building_translations_spec.rb", "spec/translations/cleaning_translations_spec.rb", "lib/xcode_build", "lib/xcode_build/build_action.rb", "lib/xcode_build/build_step.rb", "lib/xcode_build/formatters", "lib/xcode_build/formatters/progress_formatter.rb", "lib/xcode_build/formatters.rb", "lib/xcode_build/output_translator.rb", "lib/xcode_build/reporter.rb", "lib/xcode_build/reporting", "lib/xcode_build/reporting/build_reporting.rb", "lib/xcode_build/reporting/clean_reporting.rb", "lib/xcode_build/tasks", "lib/xcode_build/tasks/build_task.rb", "lib/xcode_build/translations", "lib/xcode_build/translations/building.rb", "lib/xcode_build/translations/cleaning.rb", "lib/xcode_build/translations.rb", "lib/xcode_build/utilities", "lib/xcode_build/utilities/colorize.rb", "lib/xcode_build.rb", "lib/xcodebuild.rb"]
+ s.homepage = "http://github.com/lukeredpath/xcodebuild-rb"
+ s.rdoc_options = ["--main", "README.md"]
+ s.require_paths = ["lib"]
+ s.rubygems_version = "1.8.11"
+ s.summary = "Build Xcode projects using Rake"
+
+ if s.respond_to? :specification_version then
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<state_machine>, ["~> 1.1.2"])
+ s.add_development_dependency(%q<rspec>, [">= 0"])
+ s.add_development_dependency(%q<rake>, [">= 0"])
+ s.add_development_dependency(%q<guard-rspec>, [">= 0"])
+ s.add_development_dependency(%q<growl>, [">= 0"])
+ s.add_development_dependency(%q<timecop>, [">= 0"])
+ s.add_development_dependency(%q<chronic>, [">= 0"])
+ else
+ s.add_dependency(%q<state_machine>, ["~> 1.1.2"])
+ s.add_dependency(%q<rspec>, [">= 0"])
+ s.add_dependency(%q<rake>, [">= 0"])
+ s.add_dependency(%q<guard-rspec>, [">= 0"])
+ s.add_dependency(%q<growl>, [">= 0"])
+ s.add_dependency(%q<timecop>, [">= 0"])
+ s.add_dependency(%q<chronic>, [">= 0"])
+ end
+ else
+ s.add_dependency(%q<state_machine>, ["~> 1.1.2"])
+ s.add_dependency(%q<rspec>, [">= 0"])
+ s.add_dependency(%q<rake>, [">= 0"])
+ s.add_dependency(%q<guard-rspec>, [">= 0"])
+ s.add_dependency(%q<growl>, [">= 0"])
+ s.add_dependency(%q<timecop>, [">= 0"])
+ s.add_dependency(%q<chronic>, [">= 0"])
+ end
+end

0 comments on commit 2edfaa7

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