Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added gemspec and updated Rakefile

  • Loading branch information...
commit e05c921f8fec1a3b586283addaa42e484a73eac1 1 parent 82a14ee
@banister authored
Showing with 51 additions and 4 deletions.
  1. +2 −0  Gemfile
  2. +13 −4 Rakefile
  3. +36 −0 method_source.gemspec
View
2  Gemfile
@@ -0,0 +1,2 @@
+source :rubygems
+gemspec
View
17 Rakefile
@@ -22,15 +22,17 @@ def apply_spec_defaults(s)
s.add_dependency("ruby_parser","~>2.0.5")
s.add_development_dependency("bacon","~>1.1.0")
-
+ s.add_development_dependency("rake", "~>0.9")
s.homepage = "http://banisterfiend.wordpress.com"
s.has_rdoc = 'yard'
- s.files = Dir["ext/**/extconf.rb", "ext/**/*.h", "ext/**/*.c", "lib/**/*.rb",
- "test/*.rb", "CHANGELOG", "README.markdown", "Rakefile", ".gemtest"]
+ # s.files = Dir["ext/**/extconf.rb", "ext/**/*.h", "ext/**/*.c", "lib/**/*.rb",
+ # "test/*.rb", "CHANGELOG", "README.markdown", "Rakefile", ".gemtest"]
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- test/*`.split("\n")
end
task :test do
- sh "bacon -k #{direc}/test/test.rb"
+ sh "bacon -q #{direc}/test/test.rb"
end
desc "Set up and run tests"
@@ -46,6 +48,13 @@ namespace :ruby do
pkg.need_zip = false
pkg.need_tar = false
end
+
+ desc "Generate gemspec file"
+ task :gemspec do
+ File.open("#{spec.name}.gemspec", "w") do |f|
+ f << spec.to_ruby
+ end
+ end
end
desc "build all platform gems at once"
View
36 method_source.gemspec
@@ -0,0 +1,36 @@
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{method_source}
+ s.version = "0.6.6"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = [%q{John Mair (banisterfiend)}]
+ s.date = %q{2011-10-03}
+ s.description = %q{retrieve the sourcecode for a method}
+ s.email = %q{jrmair@gmail.com}
+ s.files = [%q{.gemtest}, %q{.travis.yml}, %q{.yardopts}, %q{LICENSE}, %q{README.markdown}, %q{Rakefile}, %q{lib/method_source.rb}, %q{lib/method_source/source_location.rb}, %q{lib/method_source/version.rb}, %q{test/test.rb}, %q{test/test_helper.rb}]
+ s.homepage = %q{http://banisterfiend.wordpress.com}
+ s.require_paths = [%q{lib}]
+ s.rubygems_version = %q{1.8.6}
+ s.summary = %q{retrieve the sourcecode for a method}
+ s.test_files = [%q{test/test.rb}, %q{test/test_helper.rb}]
+
+ 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<ruby_parser>, ["~> 2.0.5"])
+ s.add_development_dependency(%q<bacon>, ["~> 1.1.0"])
+ s.add_development_dependency(%q<rake>, ["~> 0.9"])
+ else
+ s.add_dependency(%q<ruby_parser>, ["~> 2.0.5"])
+ s.add_dependency(%q<bacon>, ["~> 1.1.0"])
+ s.add_dependency(%q<rake>, ["~> 0.9"])
+ end
+ else
+ s.add_dependency(%q<ruby_parser>, ["~> 2.0.5"])
+ s.add_dependency(%q<bacon>, ["~> 1.1.0"])
+ s.add_dependency(%q<rake>, ["~> 0.9"])
+ end
+end

0 comments on commit e05c921

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