Skip to content

Commit

Permalink
rejig the rake file with bundle gem memoist
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewrudy committed Apr 16, 2014
1 parent a27eb18 commit 7dc696b
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 111 deletions.
18 changes: 17 additions & 1 deletion .gitignore
@@ -1 +1,17 @@
pkg/
*.gem
*.rbc
.bundle
.config
.yardoc
Gemfile.lock
InstalledFiles
_yardoc
coverage
doc/
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
4 changes: 4 additions & 0 deletions Gemfile
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in memoist.gemspec
gemspec
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -98,6 +98,15 @@ Everyone who contributed to it in the rails repository.
* José Valim
* Matthew Rudy Jacobs

Contributing
============

1. Fork it ( http://github.com/<my-github-username>/memoist/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

License
=======

Expand Down
95 changes: 1 addition & 94 deletions Rakefile
@@ -1,6 +1,5 @@
# encoding: utf-8
require "rubygems"
require "rubygems/package_task"
require "bundler/gem_tasks"

require "rake/testtask"
Rake::TestTask.new do |t|
Expand All @@ -9,96 +8,4 @@ Rake::TestTask.new do |t|
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
#

AUTHORS = [
["Joshua Peek", "josh@joshpeek.com"],
["Tarmo Tänav", "tarmo@itech.ee"],
["Jeremy Kemper", "jeremy@bitsweat.net"],
["Eugene Pimenov", "libc@mac.com"],
["Xavier Noria", "fxn@hashref.com"],
["Niels Ganser", "niels@herimedia.co"],
["Carl Lerche & Yehuda Katz", "wycats@gmail.com"],
["jeem", "jeem@hughesorama.com"],
["Jay Pignata", "john.pignata@gmail.com"],
["Damien Mathieu", "42@dmathieu.com"],
["José Valim", "jose.valim@gmail.com"],
["Matthew Rudy Jacobs", "matthewrudyjacobs@gmail.com"],
]

spec = Gem::Specification.new do |s|

# Change these as appropriate
s.name = "memoist"
s.version = "0.9.1"
s.summary = "memoize methods invocation"
s.authors = AUTHORS.map{ |name, email| name }
s.email = AUTHORS.map{ |name, email| email }
s.homepage = "https://github.com/matthewrudy/memoist"
s.license = "MIT"

s.has_rdoc = true
# You should probably have a README of some kind. Change the filename
# as appropriate
s.extra_rdoc_files = %w(README.md)
s.rdoc_options = %w(--main README.md)

# Add any extra files to include in the gem (like your README)
s.files = %w(README.md) + 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
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

begin
require "rdoc/task"

# Generate documentation
RDoc::Task.new do |rd|
rd.rdoc_files.include("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
rescue LoadError => e
warn e.message
end
3 changes: 3 additions & 0 deletions lib/memoist/version.rb
@@ -0,0 +1,3 @@
module Memoist
VERSION = "0.9.1"
end
50 changes: 34 additions & 16 deletions memoist.gemspec
@@ -1,19 +1,37 @@
# -*- encoding: utf-8 -*-
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'memoist/version'

Gem::Specification.new do |s|
s.name = "memoist"
s.version = "0.9.1"
AUTHORS = [
["Joshua Peek", "josh@joshpeek.com"],
["Tarmo Tänav", "tarmo@itech.ee"],
["Jeremy Kemper", "jeremy@bitsweat.net"],
["Eugene Pimenov", "libc@mac.com"],
["Xavier Noria", "fxn@hashref.com"],
["Niels Ganser", "niels@herimedia.co"],
["Carl Lerche & Yehuda Katz", "wycats@gmail.com"],
["jeem", "jeem@hughesorama.com"],
["Jay Pignata", "john.pignata@gmail.com"],
["Damien Mathieu", "42@dmathieu.com"],
["José Valim", "jose.valim@gmail.com"],
["Matthew Rudy Jacobs", "matthewrudyjacobs@gmail.com"],
]

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Joshua Peek", "Tarmo T\u{e4}nav", "Jeremy Kemper", "Eugene Pimenov", "Xavier Noria", "Niels Ganser", "Carl Lerche & Yehuda Katz", "jeem", "Jay Pignata", "Damien Mathieu", "Jos\u{e9} Valim"]
s.date = "2013-07-19"
s.email = ["josh@joshpeek.com", "tarmo@itech.ee", "jeremy@bitsweat.net", "libc@mac.com", "fxn@hashref.com", "niels@herimedia.co", "wycats@gmail.com", "jeem@hughesorama.com", "john.pignata@gmail.com", "42@dmathieu.com", "jose.valim@gmail.com"]
s.extra_rdoc_files = ["README.md"]
s.files = ["README.md", "test/memoist_test.rb", "test/test_helper.rb", "lib/memoist/core_ext/singleton_class.rb", "lib/memoist.rb"]
s.homepage = "https://github.com/matthewrudy/memoist"
s.licenses = ["MIT"]
s.rdoc_options = ["--main", "README.md"]
s.require_paths = ["lib"]
s.rubygems_version = "2.0.3"
s.summary = "memoize methods invocation"
Gem::Specification.new do |spec|
spec.name = "memoist"
spec.version = Memoist::VERSION
spec.authors = AUTHORS.map{ |name, email| name }
spec.email = AUTHORS.map{ |name, email| email }
spec.summary = %q{memoize methods invocation}
spec.homepage = "https://github.com/matthewrudy/memoist"
spec.license = "MIT"

spec.files = `git ls-files -z`.split("\x0")
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 1.5"
spec.add_development_dependency "rake"
end

0 comments on commit 7dc696b

Please sign in to comment.