Browse files

Merge branch 'release/0.1.0' closes #4

  * Genomer compatible with ruby 2.0.0 thanks to @robsyme
  * Use more secure https:// in genomer project Gemfile
  * Update all gem versions
  * Fix error where features were run from installed version
    of genomer rather than the version being developed.
  • Loading branch information...
2 parents bef2baf + 0af4b9d commit 06d26fb9a3139d6dce7b445b4dc4cc28e26a85ad @michaelbarton committed Aug 13, 2013
View
2 .gitignore
@@ -44,3 +44,5 @@ pkg
#
# For vim:
#*.swp
+
+Gemfile.lock
View
2 .travis.yml
@@ -1,4 +1,6 @@
language: ruby
rvm:
- 1.8.7
+ - 1.9.2
- 1.9.3
+ - 2.0.0
View
2 CHANGELOG.mkd
@@ -1,4 +1,4 @@
-== 0.0.9 ==
+## 0.0.9
* Genomer now has different behaviour dependent on whether inside or outside
a genomer project directory. These differences are as follows:
View
2 Gemfile
@@ -1,2 +1,2 @@
-source :rubygems
+source 'https://rubygems.org'
gemspec
View
9 README.mkd
@@ -54,6 +54,15 @@ be made there.
[github]: https://github.com/michaelbarton/genomer
+## Troubleshooting
+
+Genomer specifically requires the 1.2.x version of md2man. This is because
+later versions are not compatible with ruby 1.8.7 and I aim to keep genomer
+backwards compatible for as long as possible. If you find that there are errors
+running or developing genomer related to md2man please remove all versions from
+the systems and try reinstalling genomer. If you have further problems please
+contact the genomer mailing list found at the http://next.gs site.
+
## Copyright
Genomer copyright (c) 2010 by Michael Barton. Genomer is licensed under the MIT
View
4 features/cli/error.feature
@@ -6,6 +6,10 @@ Feature: Reporting genomer errors
Scenario: Calling a non-specified genomer plugin
Given I run the genomer command with the arguments "init project"
And I cd to "project"
+ And I overwrite "Gemfile" with:
+ """
+ gem 'genomer', :path => '../../../'
+ """
When I run the genomer command with the arguments "simple"
Then the exit status should be 1
And the output should contain:
View
13 features/cli/help.feature
@@ -26,6 +26,10 @@ Feature: Listing available commands
Scenario: Running genomer with no commands inside a project
Given I run the genomer command with the arguments "init project"
And I cd to "project"
+ And I overwrite "Gemfile" with:
+ """
+ gem 'genomer', :path => '../../../'
+ """
When I run the genomer command with no arguments
Then the exit status should be 0
And the output should contain:
@@ -39,6 +43,10 @@ Feature: Listing available commands
Scenario: Running genomer with the --version flag inside a project
Given I run the genomer command with the arguments "init project"
And I cd to "project"
+ And I overwrite "Gemfile" with:
+ """
+ gem 'genomer', :path => '../../../'
+ """
When I run the genomer command with the arguments "--version"
Then the exit status should be 0
And the output should match:
@@ -50,6 +58,10 @@ Feature: Listing available commands
Scenario: Running the genomer help command inside a genomer project
Given I run the genomer command with the arguments "init project"
And I cd to "project"
+ And I overwrite "Gemfile" with:
+ """
+ gem 'genomer', :path => '../../../'
+ """
When I run the genomer command with the arguments "help"
Then the exit status should be 0
And the output should contain:
@@ -73,6 +85,7 @@ Feature: Listing available commands
And I cd to "project"
And I overwrite "Gemfile" with:
"""
+ gem 'genomer', :path => '../../../'
gem 'genomer-plugin-simple', :path => '../../../genomer-plugin-simple'
"""
When I run the genomer command with the arguments "help"
View
4 features/cli/init.feature
@@ -51,9 +51,9 @@ Feature: Creating a new genomer project
And a file named "project/Gemfile" should exist
And the file "project/Gemfile" should contain exactly:
"""
- source :rubygems
+ source "https://rubygems.org"
- gem 'genomer', '~> 0.0.0'
+ gem 'genomer', '~> 0.1.0'
"""
View
4 features/cli/man.feature
@@ -18,6 +18,7 @@ Feature: Showing man pages for available commands
And I cd to "project"
And I overwrite "Gemfile" with:
"""
+ gem 'genomer', :path => '../../../'
gem 'genomer-plugin-simple', :path => '../../../genomer-plugin-simple'
"""
When I run the genomer command with the arguments "man simple"
@@ -30,6 +31,7 @@ Feature: Showing man pages for available commands
And I cd to "project"
And I overwrite "Gemfile" with:
"""
+ gem 'genomer', :path => '../../../'
gem 'genomer-plugin-simple', :path => '../../../genomer-plugin-simple'
"""
When I run the genomer command with the arguments "man simple subcommand"
@@ -42,6 +44,7 @@ Feature: Showing man pages for available commands
And I cd to "project"
And I overwrite "Gemfile" with:
"""
+ gem 'genomer', :path => '../../../'
gem 'genomer-plugin-simple', :path => '../../../genomer-plugin-simple'
"""
When I run the genomer command with the arguments "man unknown"
@@ -59,6 +62,7 @@ Feature: Showing man pages for available commands
And I cd to "project"
And I overwrite "Gemfile" with:
"""
+ gem 'genomer', :path => '../../../'
gem 'genomer-plugin-simple', :path => '../../../genomer-plugin-simple'
"""
When I run the genomer command with the arguments "man simple unknown"
View
2 features/cli/plugins.feature
@@ -9,6 +9,7 @@ Feature: Calling genomer plugins in a genomer project
And I cd to "project"
And I overwrite "Gemfile" with:
"""
+ gem 'genomer', :path => '../../../'
gem 'genomer-plugin-simple', :path => '../../../genomer-plugin-simple'
"""
When I run the genomer command with the arguments "simple"
@@ -24,6 +25,7 @@ Feature: Calling genomer plugins in a genomer project
And I cd to "project"
And I overwrite "Gemfile" with:
"""
+ gem 'genomer', :path => '../../../'
gem 'genomer-plugin-simple', :path => '../../../genomer-plugin-simple'
"""
When I run the genomer command with the arguments "simple echo some words"
View
16 genomer.gemspec
@@ -7,26 +7,26 @@ Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.authors = ["Michael Barton"]
s.email = ["mail@michaelbarton.me.uk"]
- s.homepage = "http://github.com/michaelbarton/genomer"
+ s.homepage = "http://next.gs"
s.summary = %Q{Build genome output files}
s.description = %Q{Turns scaffolded contigs and annotations into a genome.}
s.license = "MIT"
s.required_rubygems_version = ">= 1.8.0"
s.rubyforge_project = "genomer"
- s.add_dependency "rake", "~> 0.9.0"
- s.add_dependency "bundler", "> 1.1.0"
- s.add_dependency "configliere", "~> 0.4.8"
- s.add_dependency "scaffolder", "~> 0.4.0"
- s.add_dependency "scaffolder-annotation-locator", ">= 0.1.4"
+ s.add_dependency "rake", "~> 10.1.0"
+ s.add_dependency "bundler", "~> 1.3.0"
+ s.add_dependency "configliere", "~> 0.4.0"
+ s.add_dependency "scaffolder", "~> 0.5.0"
+ s.add_dependency "scaffolder-annotation-locator", "~> 0.2.0"
s.add_dependency "unindent", "~> 1.0.0"
s.add_dependency "md2man", "~> 1.2.0"
# Specs
- s.add_development_dependency "rspec", "~> 2.7.0"
+ s.add_development_dependency "rspec", "~> 2.14.0"
s.add_development_dependency "fakefs", "~> 0.4.0"
- s.add_development_dependency "rr", "~> 1.0.4"
+ s.add_development_dependency "rr", "~> 1.1.0"
s.add_development_dependency "scaffolder-test-helpers", "~> 0.4.0"
# Features
View
1 lib/genomer.rb
@@ -1,4 +1,5 @@
module Genomer
+ require 'yaml'
require 'genomer/error'
autoload :Runtime, 'genomer/runtime'
View
2 lib/genomer/files.rb
@@ -6,7 +6,7 @@ class << self
def gemfile
version = Genomer::VERSION.split('.')[0..1].<<(0).join('.')
<<-EOF.unindent
- source :rubygems
+ source "https://rubygems.org"
gem 'genomer', '~> #{version}'
EOF
View
2 lib/genomer/plugin.rb
@@ -82,7 +82,7 @@ def initialize(arguments,flags)
#
# @return [Array] An array of Scaffolder::Region instances
def scaffold
- YAML::ENGINE.yamler = 'syck' if defined?(YAML::ENGINE)
+ YAML::ENGINE.yamler = 'syck' if defined?(YAML::ENGINE) and Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
Scaffolder.new(YAML.load(File.read(scaffold_file)),sequence_file)
end
View
8 lib/genomer/runtime.rb
@@ -1,6 +1,6 @@
require 'unindent'
require 'tempfile'
-require 'md2man'
+require 'md2man/engine'
require 'genomer/version'
@@ -103,10 +103,14 @@ def man_file(arguments)
File.join(Genomer::Plugin.fetch(plugin).full_gem_path, 'man', page)
end
+ def render_man(input)
+ Md2Man::ENGINE.render input
+ end
+
def groffed_man_file(original_man_file)
converted_man = Tempfile.new("genome-manpage-")
File.open(converted_man.path,'w') do |out|
- out.puts Md2Man::ENGINE.render(File.read(original_man_file))
+ out.puts render_man(File.read(original_man_file))
end
converted_man
end
View
2 lib/genomer/version.rb
@@ -1,3 +1,3 @@
module Genomer
- VERSION = "0.0.10"
+ VERSION = "0.1.0"
end
View
10 spec/genomer/runtime_spec.rb
@@ -300,7 +300,7 @@
File.exists?(file).should be_true
File.read(file).should == <<-EOF.unindent
- source :rubygems
+ source "https://rubygems.org"
gem 'genomer', '~> #{version.join('.')}'
EOF
@@ -340,6 +340,14 @@
end
+ describe "#render_man" do
+
+ it "should render markdown to man page" do
+ subject.render_man("##Title").should_not be_nil
+ end
+
+ end
+
describe "#man_file" do
before do

0 comments on commit 06d26fb

Please sign in to comment.