Giter Site home page Giter Site logo

jeweler's Introduction

Jeweler maintenance has now shifted to Fred Mitchell. I am now maintaining both Jeweler and its fork, juwelier. I will keep Jeweler at least functional with the latest Ruby releases, but put new features in Juwelier. Your input on this is more than welcome.

Jeweler: Craft the perfect RubyGem

Join the chat at https://gitter.im/technicalpickles/jeweler

Jeweler provides the noble ruby developer with two primary features:

  • a library for managing and releasing RubyGem projects
  • a scaffold generator for starting new RubyGem projects

PLEASE NOTE that if you are starting afresh, please use the successor Juwelier I (Fred Mitchell, flajann2) will be maintaining both Jeweler and Juwelier, but will be adding new features to Juwelier, and eventually "merge" this one into Juwelier after some namespace issues are dealt with.

Build Status Coverage Status Dependency Status Code Climate

Hello, world

Use RubyGems to install the heck out of jeweler to get started:

$ gem install jeweler

With jeweler installed, you can use the jeweler command to generate a new project. For the most basic use, just give it a name:

$ jeweler hello-gem

This requires some Git configuration (like name, email, GitHub account, etc), but jeweler will prompt along the way.

Your new hello-gem gem is ready in the hello-gem directory. Take a peek, and you'll see several files and directories

  • Rakefile setup for jeweler, running tests, generating documentation, and releasing to rubygems.org
  • README.rdoc with contribution guidelines and copyright info crediting you
  • LICENSE with the MIT licensed crediting you
  • Gemfile with development dependencies filled in
  • lib/hello-gem.rb waiting for you to code
  • test/ containing a (failing) shoulda test suite shoulda

More jeweler options

The jeweler command supports a lot of options. Mostly, they are for generating baked in support for this test framework, or that.

Check out jeweler --help for the most up to date options.

Hello, rake tasks

Beyond just editing source code, you'll be interacting with your gem using rake a lot. To see all the tasks available with a brief description, you can run:

$ rake -T

You'll need a version before you can start installing your gem locally. The easiest way is with the version:write Rake task. Let's imagine you start with 0.1.0

$ rake version:write MAJOR=0 MINOR=1 PATCH=0

You can now go forth and develop, now that there's an initial version defined. Eventually, you should install and test the gem:

$ rake install

The install rake task builds the gem and gem installs it. You're all set if you're using RVM, but you may need to run it with sudo if you have a system-installed ruby:

$ sudo rake install

Releasing

At last, it's time to ship it! Make sure you have everything committed and pushed, then go wild:

$ rake release

This will automatically:

  • Generate hello-gem.gemspec and commit it
  • Use git to tag v0.1.0 and push it
  • Build hello-gem-0.1.0.gem and push it to rubygems.org

rake release accepts REMOTE(default: origin), LOCAL_BRANCH(default: master), REMOTE_BRANCH(default: master) and BRANCH(default: master)as options.

$ rake release REMOTE=upstream LOCAL_BRANCH=critical-security-fix REMOTE_BRANCH=v3

This will tag and push the commits on your local branch named critical-security-fix to branch named v3 in remote named upstream (if you have commit rights on upstream) and release the gem.

$ rake release BRANCH=v3

If both remote and local branches are the same, use BRANCH option to simplify. This will tag and push the commits on your local branch named v3 to branch named v3 in remote named origin (if you have commit rights on origin) and release the gem.

Version bumping

It feels good to release code. Do it, do it often. But before that, bump the version. Then release it. There's a few ways to update the version:

# version:write like before
$ rake version:write MAJOR=0 MINOR=3 PATCH=0

# bump just major, ie 0.1.0 -> 1.0.0
$ rake version:bump:major

# bump just minor, ie 0.1.0 -> 0.2.0
$ rake version:bump:minor

# bump just patch, ie 0.1.0 -> 0.1.1
$ rake version:bump:patch

Then it's the same release we used before:

$ rake release

Customizing your gem

If you've been following along so far, your gem is just a blank slate. You're going to need to make it colorful and full of metadata.

You can customize your gem by updating your Rakefile. With a newly generated project, it will look something like this:

require 'jeweler'
Jeweler::Tasks.new do |gem|
  # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
  gem.name = "whatwhatwhat"
  gem.summary = %Q{TODO: one-line summary of your gem}
  gem.description = %Q{TODO: longer description of your gem}
  gem.email = "[email protected]"
  gem.homepage = "http://github.com/technicalpickles/whatwhatwhat"
  gem.authors = ["Joshua Nichols"]
end
Jeweler::RubygemsDotOrgTasks.new

It's crucial to understand the gem object is just a Gem::Specification. You can read up about it at guides.rubygems.org/specification-reference. This is the most basic way of specifying a gem, Jeweler-managed or not. Jeweler just exposes this to you, in addition to providing some reasonable defaults, which we'll explore now.

Project information

gem.name = "whatwhatwhat"

Every gem has a name. Among other things, the gem name is how you are able to gem install it. Reference

gem.summary = %Q{TODO: one-line summary of your gem}

This is a one line summary of your gem. This is displayed, for example, when you use gem list --details or view it on rubygems.org.

gem.description = %Q{TODO: longer description of your gem}

Description is a longer description. Scholars ascertain that knowledge of where the description is used was lost centuries ago.

gem.email = "[email protected]"

This should be a way to get a hold of you regarding the gem.

gem.homepage = "http://github.com/technicalpickles/whatwhatwhat"

The homepage should have more information about your gem. The jeweler generator guesses this based on the assumption your code lives on GitHub, using your Git configuration to find your GitHub username. This is displayed by gem list --details and on rubygems.org.

gem.authors = ["Joshua Nichols"]

Hey, this is you, the author (or me in this case). The jeweler generator also guesses this from your Git configuration. This is displayed by gem list --details and on rubygems.org.

Files

The quickest way to add more files is to git add them. Jeweler uses your Git repository to populate your gem's files by including added and committed and excluding .gitignored. In most cases, this is reasonable enough.

If you need to tweak the files, that's cool. Jeweler populates gem.files as a Rake::FileList. It's like a normal array, except you can include and exclude file globs:

gem.files.exclude 'tmp' # exclude temporary directory
gem.files.include 'lib/foo/bar.rb' # explicitly include lib/foo/bar.rb

If that's not enough, you can just set gem.files outright

gem.files = Dir.glob('lib/**/*.rb')

Dependencies

Dependencies let you define other gems that your gem needs to function. gem install your-gem will install your-gem's dependencies along with it, and when you use your-gem in an application, the dependencies will be made available. Use gem.add_dependency to register them. Reference

gem.add_dependency 'nokogiri'

This will ensure a version of nokogiri is installed, but it doesn't require anything more than that. You can provide extra args to be more specific:

gem.add_dependency 'nokogiri', '= 1.2.1' # exactly version 1.2.1
gem.add_dependency 'nokogiri', '>= 1.2.1' # greater than or equal to 1.2.1, ie, 1.2.1, 1.2.2, 1.3.0, 2.0.0, etc
gem.add_dependency 'nokogiri', '>= 1.2.1', '< 1.3.0' # greater than or equal to 1.2.1, but less than 1.3.0
gem.add_dependency 'nokogiri', '~> 1.2.1' # same thing, but more concise

When specifying which version is required, there's a bit of the condunrum. You want to allow the most versions possible, but you want to be sure they are compatible. Using >= 1.2.1 is fine most of the time, except until the point that 2.0.0 comes out and totally breaks backwards the API. That's when it's good to use ~> 1.2.1, which requires any version in the 1.2 family, starting with 1.2.1.

Executables

Executables let your gem install shell commands. Just put any executable scripts in the bin/ directory, make sure they are added using git, and Jeweler will take care of the rest.

When you need more finely grained control over it, you can set it yourself:

gem.executables = ['foo'] # note, it's the file name relative to `bin/`, not the project root

Versioning

We discussed earlier how to bump the version. The rake tasks are really just convience methods for manipulating the VERSION file. It just contains a version string, like 1.2.3.

VERSION is a convention used by Jeweler, and is used to populate gem.version. You can actually set this yourself, and Jeweler won't try to override it:

gem.version = '1.2.3'

A common pattern is to have this in a version constant in your library. This is convenient, because users of the library can query the version they are using at runtime.

# in lib/foo/version.rb
class Foo
  module Version
    MAJOR = 1
    MINOR = 2
    PATCH = 3
    BUILD = 'pre3'

    STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
  end
end

# in Rakefile
require 'jeweler'
require './lib/foo/version.rb'
Jeweler::Tasks.new do |gem|
  # snip
  gem.version = Foo::Version::STRING
end

Rake tasks

Jeweler lives inside of Rake. As a result, they are dear friends. But, that friendship doesn't interfere with typical Rake operations.

That means you can define your own namespaces, tasks, or use third party Rake libraries without cause for concern.

Contributing to Jeweler

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Ask on the mailing list for feedback on your proposal, to see if somebody else has done it.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for the feature/bugfix. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate it to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2008-2010 Josh Nichols. Copyright (c) 2016 Fred Mitchell. See LICENSE for details.

jeweler's People

Contributors

agrimm avatar aia avatar alloy avatar bmabey avatar bryanlarsen avatar cbliard avatar danryan avatar ddollar avatar dkubb avatar emilsoman avatar flajann2 avatar josevalim avatar jtrupiano avatar julik avatar kematzy avatar leereilly avatar mamady avatar marcandre avatar mattknox avatar mcornick avatar muratayusuke avatar namelessjon avatar pat avatar postmodern avatar priteau avatar rsanheim avatar sigmike avatar snusnu avatar technicalpickles avatar webmat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jeweler's Issues

Missleading error message in 'rescue'

The generated Rakefiles have the following rescue-clause.

rescue LoadError
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"

The problem here is that all errors are caught, not just a missing jeweler. Adding a 'raise' shows this:
$ rake -T
Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com
rake aborted!
no such file to load -- rubyforge
/home/*Rakefile:5
(See full trace by running task with --trace)

I suggest you either add the 'raise' or check what exactly is missing. The current solution is very very misleading to newcomers.

Cheers,
Reto

problems with `install` rake task

Please, put option --local in command variable within source jeweler/lib/jeweler/commands/install_gem.rb.

...
def run
  command = "gem install #{gemspec_helper.gem_path} --local" # here, command must run with option --local
  output.puts "Executing #{command.inspect}:"

  sh sudo_wrapper(command) # TODO where does sh actually come from!? - rake, apparently
end
...

Thanks.

Jeweler does not do its magic if gem not in the git root directory.

For example, git://github.com:/tablatom/hobo.git contains three gems in three subdirectories.

I could make it work by specifying the files manually, but it would be very nice if Jeweler could figure it out from git like it can for everybody else.

I've added this support in git://github.com/bryanlarsen/jeweler.git. A required change is also in git://github.com/bryanlarsen/ruby-git.git

Windows Compatibility

To support windows probably should make a change something like this. This assumes the user is running as admin on the windows box. Also added note for sh..

class Jeweler
module Commands
class InstallGem
def run
cmd_prefix = "sudo " if CONFIG['host_os'] =~ /mswin|windows/i
command = "#{cmd_prefix}gem install #{gemspec_helper.gem_path}"
output.puts "Executing #{command.inspect}:"
sh command # sh is from Rake FileUtils
end

end

end
end

rake rubyforge:setup creates duplicate packages

No biggie, but doing
@@@
rake rubyforge:setup
rake rubyforge:setup
@@@
will create two packages with the same name. No biggy, but ideally there would be a check first to avoid duplication. The crappy rubyforge interface makes it hard to delete the extra copies afterwards too!

Thanks

original LH ticket

This ticket has 0 attachment(s).

GitHub Pages - RDoc to Branch

First off - Jeweler rocks. I’m lazy and a noob so anything that takes thinking out of the equation is pretty good by my standards.

I just thought it would be good if Jeweler could automatically generate rdoc (which It can already) and put it in the ’gh-pages’ branch for GitHub.

Cheers,

Bryce

original LH ticket

This ticket has 0 attachment(s).

Rakefile specified version doesn't work with "build"

begin
  require 'jeweler'
   Jeweler::Tasks.new do |gemspec|
    gemspec.version      = Hobo::VERSION

...

$ rake build
WARNING:  no description specified
  Successfully built RubyGem
  Name: hobo
  Version: 
  File: hobo-.gem

gem specification indicates that the version is missing inside the gem too.

I'll put a fix on my fork: bryanlarsen/jeweler

The Umlaut problem: UTF-8 chars get converted to unicode entities

When using an UTF-8 character (like the german umlaut ü) in the Rakefile, it gets converted to (2!) UTF-8 entities it seems.

For example in Rakefile it reads:
gem.authors = ["Markus Hüberman"]

And in the resulting gemspec file after releasing it gets converted to:
s.authors = ["Markus H\303\274berman"]

Unable to read ~/.gitconfig

When trying to create a project with jeweler, I receive the following error:

$ jeweler some_project
/Library/Ruby/Gems/1.8/gems/git-1.2.2/lib/git/lib.rb:700:in command': git config '--list' '--file' '~/.gitconfig' 2>&1:fatal: unable to read config file ~/.gitconfig: No such file or directory (Git::GitExecuteError)`

My .gitconfig is there, though:

$ ls -l ~/.gitconfig
-rw-r--r-- 1 veez staff 344 Aug 2 19:47 /Users/veez/.gitconfig

Running git config '--list' '--file' '~/.gitconfig' from the command line causes the issue, running git config '--list' '--file' ~/.gitconfig does not.

Customizable location of the VERSION file and/or updating the VERSION constant.

According to:
http://weblog.rubyonrails.org/2009/9/1/gem-packaging-best-practices

My gem should not rely on resources outside of the lib directory. However, my VERSION constant is built by reading the VERSION.yml file so that it is the single point of truth for version information. So I'd like to store my version file in the lib directory.

Alternatively, I'd be happy to have Jeweler provide a simple way to update the VERSION constant within a ruby file whenever the version is changed.

version_required rake task has nonintuitive docstring

Upon creating my first gem with Jeweler, I thought, "Hmm, so there is no version out of the box. Lemme look at these rake tasks I remember being mentioned..." So when running rake -T I see "Setup initial version of 0.0.0" and think I'm off to the races. But that's not what it does at all.

desc "Setup initial version of 0.0.0"
  task :version_required do
    unless jeweler.version_exists?
      abort "Expected VERSION or VERSION.yml to exist. See version:write to create an initial one."
    end
end

So it's just a dependency task. Fine, but why's it in my rake -T listing? :-) This should either bootstrap a VERSION.yml with 0.0.0 if needed (preferable), or have the desc removed.

Create a task "gem" for compatibility with other libraries

The others libraries like jeweler (hoe, bones, etc...) use similar task names. I think it'd be nice, at least, to have rake gem (doing the same as rake gemspec build) which is the common task that an external user is going to use.

Jeweler adding footprint to all Rake tasks

Hey guys,

Today we noticed that just adding Jeweler to the Heroku client gem causes 4 specs to fail.

That seems to be related to Dir.chdir. We change to another dir while running those specs, while Jeweler and Git are also doing something similar. I don't know the exact reason yet, but for some reason when Jeweler is present the chdir in our spec doesn't take effect, and they end up running in the current folder I'm in.

This is certainly an issue itself, but I think the big picture here is Jeweler shouldn't add any footprint until explicitly called; it shouldn't parse my Git repo and build the gem spec if I'm just running my tests.

The patch to make Jeweler rake tasks lazy is here:
http://github.com/pedro/jeweler/commit/320ad5735e4ba72487c549207ea8b0ded26a4d0c

Thanks,
Pedro

Support setting description in gemspecs

Hey there - jeweler is great; I'm using it for almost all of my gems now. Thanks.

Eric Hodel has started sending out mail to maintainers of gems that are pushed to Rubyforge without a description in the gemspec. Since I like to avoid getting mail about things like this, I've added support for descriptions to jeweler. It works just like the existing summary support - you can pass a --description option to jeweler to set an explicit description; otherwise, it'll be set to TODO. One less thing to have to fill in later... This is all in my fork if you'd like to pull it in.

Project creation failing (adding origin remote)

Using the latest gem from rubyforge. Might just be something boneheaded on my end, but reporting the problem here as discussed in IRC.

Encountered an error while adding origin remote. Maybe you have some weird settings in ~/.gitconfig?
/opt/local/lib/ruby/gems/1.8/gems/peterwald-git-1.1.4/lib/git/lib.rb:653:in command&rsquo;: git remote &rsquo;add&rsquo; &rsquo;--&rsquo; &rsquo;origin&rsquo; &rsquo;[email protected]:zapnap/my-project-name.git&rsquo; 2>&1:Usage: git remote add [-f] [-t track]* [-m master] <name> <url> (Git::GitExecuteError) from /opt/local/lib/ruby/gems/1.8/gems/peterwald-git-1.1.4/lib/git/lib.rb:499:inremote_add’
from /opt/local/lib/ruby/gems/1.8/gems/peterwald-git-1.1.4/lib/git/base.rb:342:in add_remote&rsquo; from /opt/local/lib/ruby/gems/1.8/gems/jeweler-0.11.0/bin/../lib/jeweler/generator.rb:315:ingitify’
from /opt/local/lib/ruby/gems/1.8/gems/jeweler-0.11.0/bin/../lib/jeweler/generator.rb:55:in run&rsquo; from /opt/local/lib/ruby/gems/1.8/gems/jeweler-0.11.0/bin/../lib/jeweler/generator/application.rb:26:inrun!’
from /opt/local/lib/ruby/gems/1.8/gems/jeweler-0.11.0/bin/jeweler:8
from /opt/local/bin/jeweler:19:in `load’
from /opt/local/bin/jeweler:19

Fwiw, if I remove the ’--’ and reissue the command inside the partially created project directory, the remote is added just fine. Local git version is 1.5.4.4.

original LH ticket

This ticket has 0 attachment(s).

Cross-platform compilation, gem creation

I currently use echoe and it lets me package up my project (RedCloth) with tasks like:
rake java package
and
rake mingw package

Some sort of support for this would be nice in jeweler. Probably a "someday maybe" feature request, but it can’t hurt to ask.

original LH ticket

This ticket has 0 attachment(s).

rubyforge:release failing because rubyforge_project in config is not used

I’m really happy, I was able to release my gem to rubyforge!

I had to manually edit the rakefile in two places for the project name:
@@@

In the config (cool)

gem.rubyforge_project = "my_project_name"

In the rubyforge:release task (not so cool)

remote_dir = "/var/www/gforge-projects/set_to_gem_name_by_default/"

The latter should use the config’s rubyforge

I’m not sure how, otherwise I’d do it!

@@@
Thanks!

Great work with jeweler :-)

original LH ticket

This ticket has 0 attachment(s).

Strange gemspec Errors when jeweler included in rakefile - ruby 1.9

  1. create empty directory
  2. create new Rakefile
  3. put require 'jeweler' and save
  4. run rake -T

you should see many lines of errors like:

WARNING: #<NoMethodError: undefined method `>' for nil:NilClass>
WARNING: Invalid .gemspec format in
'/Users/adam/.gem/ruby/1.9.1/specifications/rake-0.8.7.gemspec'

creating gem hypen-gem builds a lib/hypen_gem.rb file

This behavior surprised me a bit, and the resulting config.gem "hyphen-name", :lib => "hypen_name" line in rails felt a bit strange. FWIW newgem keeps the hyphen and I believe others do as well. I think its the more obvious behavior, but want to just throw it out there and see what makes sense to others.

Thanks!

original LH ticket

This ticket has 0 attachment(s).

rspec template should require spec_helper differently

The flunking.rb template for rspec projects created by Jeweler has a require statement for ’spec_helper’ that assumes a relative path. This breaks the ability of autospec to run all tests. Please change the require in the flunking.rb template to something like the following:

require File.expand_path(File.dirname(FILE) + ’/spec_helper’)

Thanks in advance.

original LH ticket

This ticket has 0 attachment(s).

regular expression too big

In gems that contain a large amount of files, in my case nearly 2000 the rake task will choke on gemspec creation. It gives the error regular expression too big.

trace here

** Invoke gemspec:generate (first_time)
** Invoke VERSION.yml (first_time, not_needed)
** Execute gemspec:generate
rake aborted!
regular expression too big: /s.files\ =\ ["LICENSE",\ "README.rdoc",\ "Rakefile",\ "VERSION.yml",\ "bin/babygitter-report",\ "lib/babygitter/addedums/commit_addedum.rb",\ "lib/babygitter/addedums/ruby_addedum.rb",\ "lib/babygitter/assets/guides/bdd_stack.html.erb",\ "lib/babygitter/assets/guides/display_only.html.erb",\ "lib/babygitter/assets/image_assets/fancy_closebox.png",\ "lib/babygitter/assets/image_assets/fancy_left.png",\ "lib/babygitter/assets/image_assets/fancy_progress.png",\ "lib/babygitter/assets/image_assets/fancy_right.png",\ "lib/babygitter/assets/image_assets/fancy_shadow_e.png",\ "lib/babygitter/assets/image_assets/fancy_shadow_n.png",\ "lib/babygitter/assets/image_assets/fancy_shadow_ne.png",\ "lib/babygitter/assets/image_assets/fancy_shadow_nw.png",\ "lib/babygitter/assets/image_assets/fancy_shadow_s.png",\ "lib/babygitter/assets/image_assets/fancy_shadow_se.png",\ "lib/babygitter/assets/image_assets/fancy_sha
/opt/ruby/lib/ruby/gems/1.8/gems/jeweler-0.11.0/lib/jeweler/gemspec_helper.rb:66:in gsub&rsquo; /opt/ruby/lib/ruby/gems/1.8/gems/jeweler-0.11.0/lib/jeweler/gemspec_helper.rb:66:inprettyify_array’
/opt/ruby/lib/ruby/gems/1.8/gems/jeweler-0.11.0/lib/jeweler/gemspec_helper.rb:30:in write&rsquo; /opt/ruby/lib/ruby/gems/1.8/gems/jeweler-0.11.0/lib/jeweler/gemspec_helper.rb:28:inopen’
/opt/ruby/lib/ruby/gems/1.8/gems/jeweler-0.11.0/lib/jeweler/gemspec_helper.rb:28:in write&rsquo; /opt/ruby/lib/ruby/gems/1.8/gems/jeweler-0.11.0/lib/jeweler/commands/write_gemspec.rb:15:inrun’
/opt/ruby/lib/ruby/gems/1.8/gems/jeweler-0.11.0/lib/jeweler.rb:66:in write_gemspec&rsquo; /opt/ruby/lib/ruby/gems/1.8/gems/jeweler-0.11.0/lib/jeweler/tasks.rb:45:indefine’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in call&rsquo; /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:inexecute’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in each&rsquo; /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:inexecute’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in invoke_with_call_chain&rsquo; /opt/ruby/lib/ruby/1.8/monitor.rb:242:insynchronize’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in invoke_with_call_chain&rsquo; /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:ininvoke’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in invoke_task&rsquo; /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:intop_level’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in each&rsquo; /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:intop_level’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in standard_exception_handling&rsquo; /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:intop_level’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in run&rsquo; /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:instandard_exception_handling’
/opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in run&rsquo; /opt/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31 /opt/ruby/bin/rake:19:inload’
/opt/ruby/bin/rake:19

original LH ticket

This ticket has 0 attachment(s).

Jeweler can not read my ~/.gitconfig

The 'git' gem that Jeweler uses to read git config files does not parse .gitconfig files that git itself can parse. Jeweler is, by extension, unable to read my valid ~/.gitconfig

Missing documentation in README for rubyforge projects

In the README, 3 lines are missing to get all the rake tasks required for publishing to rubyforge:

Jeweler::RubyforgeTasks.new do |rubyforge|
  rubyforge.doc_task = "rdoc"
end

Without them, you don't have the rake rubyforge:setup, rake rubyforge:release:gems and rake rubyforge:release:docs tasks.

Creating a new project with the --rubyforge flag correctly defines the RakeFile though.

Don't commit on version bump

There is a way to disable automatic commits with git in jeweler? They almost never fit my workflow. On the other hand, releasing to Github with tagging is awesome. :)

gem install issues

The peterwald-git gem jeweler depends on, isn’t on rubyforge, only on github. So if the user hasn’t added github gems to his local rubygems sources list (gem sources -a "http://gems.github.com"), a pure ’gem install jeweler’ will fail as it won’t install the dependencies.

Adding github gems to local rubygems sources list or installing with sources option set to github gems both solve the problem on the user side.

Releasing peterwald-git on rubyforge will prevent this issue.

original LH ticket

This ticket has 0 attachment(s).

.gitignore files showing up in s.test_files section of gemspec

Any files listed in .gitignore are ignored in the s.files section of the gemspec, but are included in the s.test_files section still:

-- .gitignore
test/random.rb

-- my_gem.gemspec
Gem::Specification.new do |s|
...
s.test_files = [
"test/my_gem_test.rb",
"test/random.rb",
"test/test_helper.rb"
]
...

no such file to load -- shoulda (LoadError)

I get these errors when i try to do a 'rake test':

WARNING: Invalid .gemspec format in '/usr/local/lib/ruby/gems/1.9.1/specifications/merb-core-1.0.12.gemspec'
/usr/local/bin/ruby -I"lib:lib:test" "/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/dragongoserver_test.rb"
/home/tp/dragongoserver/test/test_helper.rb:3:in require': no such file to load -- shoulda (LoadError) from /home/tp/dragongoserver/test/test_helper.rb:3:in<top (required)>'
from test/dragongoserver_test.rb:1:in require' from test/dragongoserver_test.rb:1:in<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in load' from /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:inblock in

'
from /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in each' from /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in'
rake aborted!
Command failed with status (1): [/usr/local/bin/ruby -I"lib:lib:test" "/usr...]

(See full trace by running task with --trace)

Gem creation fails at git config on Ruby 1.9

Players

  • ruby 1.9.1p243
  • jeweler 1.2.1
  • git (gem) 1.2.2
  • git (the program) 1.6.4.1

Test case

jeweler blah

Output

create  .gitignore
create  Rakefile
create  LICENSE
create  README.rdoc
create  .document
create  lib
create  lib/blah.rb
create  test
create  test/test_helper.rb
create  test/blah_test.rb
/opt/local/lib/ruby/gems/1.9.1/gems/git-1.2.2/lib/git/lib.rb:345:in `chdir': wrong number of arguments (1 for 0) (ArgumentError)
from /opt/local/lib/ruby/gems/1.9.1/gems/git-1.2.2/lib/git/lib.rb:345:in `config_list'
from /opt/local/lib/ruby/gems/1.9.1/gems/git-1.2.2/lib/git/lib.rb:315:in `config_remote'
from /opt/local/lib/ruby/gems/1.9.1/gems/git-1.2.2/lib/git/remote.rb:8:in `initialize'
from /opt/local/lib/ruby/gems/1.9.1/gems/git-1.2.2/lib/git/base.rb:343:in `new'
from /opt/local/lib/ruby/gems/1.9.1/gems/git-1.2.2/lib/git/base.rb:343:in `add_remote'
from /opt/local/lib/ruby/gems/1.9.1/gems/jeweler-1.2.1/lib/jeweler/generator.rb:274:in `gitify'
from /opt/local/lib/ruby/gems/1.9.1/gems/jeweler-1.2.1/lib/jeweler/generator.rb:92:in `run'
from /opt/local/lib/ruby/gems/1.9.1/gems/jeweler-1.2.1/lib/jeweler/generator/application.rb:31:in `run!'
from /opt/local/lib/ruby/gems/1.9.1/gems/jeweler-1.2.1/bin/jeweler:8:in `<top (required)>'
from /opt/local/bin/jeweler:19:in `load'
from /opt/local/bin/jeweler:19:in `<main>'

Result

Sadness.

'rake release' not idempotent after failure

We just tried to do a deploy. It failed for some non-jeweler reason. So we fixed the problem and tried it again. It failed again, and this time was jeweler's fault. It seemed that jeweler was expecting a "git commit" to succeed, since it had just modified the gemspec file. But it hadnt modified the file, since it was the same version as before, so the contents didn't change, so "git commit" failed. We had to bump up the version number a few times to get this to work right.

I think you can also duplicate this if you specify the wrong VERSION on the rake command line.

allow for extensions

if there are files in the ext directory, typically it'll be
ext/
extconf.rb (Sometimes it's called mkrf_conf.rb)
some_file.c
some_other_file.c

I'd move that those

be added as extensions. Though I suppose the user could add them in manually, now that I think about it...

-r

Jeweler is setting some git related environment config that is colliding with our dev task

If you take a glance at http://github.com/rspec/meta/commit/3f97424e1d5eee5b68da7fd3927eade72d5e4e38

The current dev setup is to have all the projects checked out under a given path, so meta, mocks, core, and expectations exist at the same level. Meta can manage the other repos via a simple rake task the manipulates git. If we require jeweler and the jeweler gem task the git operations immediately fail as git is locked to the meta repo.

rubyforge:release failing because no processor_id or release_id configured for

Hi!
I’m trying to release ’backports’ to rubyforge (first time, just got my "project" marcandre approved) and I get this strange message...

What am I doing wrong?

[15:07][~/backports(master)]$ rake rubyforge:release
(in /Users/work/backports)
Generated: backports.gemspec
backports.gemspec is valid.
Successfully built RubyGem
Name: backports
Version: 1.0.0
File: backports-1.0.0.gem
Logging in rubyforge
Releasing backports-1.0.0 to marcandre
rake aborted!
no <processor_id> configured for

(See full trace by running task with --trace)

original LH ticket

This ticket has 0 attachment(s).

version bumps fail with no changes to commit

hey Josh

I feel like I'm missing something here, as I've used this plenty of times with out issue. But this is happening in my latest version bump attempts:

~/src/oss/runcoderun-gem (master)$ rake version:bump:minor
(in /Users/rsanheim/src/oss/runcoderun-gem)
Current version: 0.2.2
rake aborted!
git commit '-m' 'Version bump to 0.3.0'  2>&1:# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   version.yml
#
no changes added to commit (use "git add" and/or "git commit -a")

(See full trace by running task with --trace)
~/src/oss/runcoderun-gem (master)$ 

Jeweler breaks with the git gem version 1.2.1

Seems to be some bugs with getting the correct git version in the new git gem. If your version of git doesn't have a minor revision number the new git gem is borked. eg. 1.6.4 instead of 1.6.4.1. The problems can be found on lines 649 - 665 in the lib.rb of the git gem. Figured you could atleast lock the gemspec version req to 1.1.1 for now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.