Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Print banner, fix bundler error, fix permission of --with-bin #25

Merged
merged 5 commits into from

3 participants

@pjotrp
Collaborator

Some niceties.

@helios helios merged commit 871607e into helios:master
@wwood

Hey, thanks for writing this code and merging. I think a new gem release would be good - that bundler error is quite frustrating, and that code isn't in the newest gem 1.3.4.

@pjotrp
Collaborator

We need a new release, it appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 1, 2012
  1. @pjotrp

    Add search path to gem

    pjotrp authored
    Print banner by default
  2. @pjotrp

    Set binary to executable

    pjotrp authored
  3. @pjotrp

    Rename rootpath to gempath

    pjotrp authored
  4. @pjotrp
  5. @pjotrp

    remark

    pjotrp authored
This page is out of date. Refresh to see the latest.
View
4 lib/bio-gem/generator/render.rb
@@ -3,7 +3,7 @@
module Biogem
module Render
- # new hook for removing stuff
+ # new hook for removing stuff (FIXME: could use a test!!)
def after_render_template(source,buf)
if source == 'other_tasks.erb'
$stdout.puts "\tremove jeweler rcov lines"
@@ -92,7 +92,7 @@ def create_bin
mkdir_in_target bin_dir
output_template_in_target_generic path('bin/bio-plugin'), path(bin_dir, bin_name)
# TODO: set the file as executable (Windows?)
- File.chmod 0655, path(target_dir, bin_dir, bin_name)
+ File.chmod 0755, path(target_dir, bin_dir, bin_name)
end
def create_test_data
View
3  lib/bio-gem/mod/jeweler.rb
@@ -19,6 +19,9 @@ def initialize(options = {})
original_initialize(options)
# RCov is not properly supported in Ruby 1.9.2, so we remove it
development_dependencies.delete_if { |k,v| k == "rcov" }
+ # Jeweler has a bug for bundler
+ development_dependencies.delete_if { |k,v| k == "bundler" }
+ development_dependencies << ["bundler", ">= 1.0.21"]
# development_dependencies << ["bio-logger"]
development_dependencies << ["bio", ">= 1.4.2"]
# we add rdoc because of an upgrade of rake RDocTask causing errors
View
11 lib/bio-gem/templates/bin/bio-plugin
@@ -4,7 +4,16 @@
# Author:: <%= user_name %>
# Copyright:: <%= Time.now.year %>
- USAGE = "Describe <%= bin_name %>"
+USAGE = "Describe <%= bin_name %>"
+
+gempath = File.dirname(File.dirname(__FILE__))
+$: << File.join(gempath,'lib')
+
+VERSION_FILENAME=File.join(gempath,'VERSION')
+version = File.new(VERSION_FILENAME).read.chomp
+
+# print banner
+print "<%= bin_name %> #{version} by <%= user_name %> <%= Time.now.year %>\n"
if ARGV.size == 0
print USAGE
Something went wrong with that request. Please try again.