New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport of Nanoc::CLI.after_setup functionality #407

Merged
merged 4 commits into from Mar 31, 2014

Conversation

Projects
None yet
2 participants
@barraq
Contributor

barraq commented Mar 26, 2014

This commit backport the useful Nanoc::CLI.after_setup functionality from Nanoc 4.x to Nanoc 3.x

This backport is really useful to initiate the migration from Nanoc 3.x to Nanoc 4.x since developers can already start packaging their plugins following the Nanoc 4.x packaging style!

For instance, the plugin nanoc-photomator is packaged as follow for Nanoc 3.x

# encoding: utf-8

$LOAD_PATH.unshift(File.expand_path('../lib/', __FILE__))
require 'nanoc/photomator/version'

Gem::Specification.new do |s|
  s.name = 'nanoc-photomator'
  s.version = Nanoc::Photomator::VERSION
  s.homepage = 'https://github.com/barraq/nanoc-photomator'
  s.summary = 'Photo automation tools for Nanoc'
  s.description = 'Provides a set of commands and user interfaces for working with pictures in Nanoc'

  s.author = 'Rémi Barraquand'
  s.email = 'dev@remibarraquand.com'
  s.license = 'MIT'

  s.required_ruby_version = '>= 1.9.3'

  s.files = Dir['[A-Z]*'] +
      Dir['{lib,test}/**/*'] +
      ['nanoc-photomator.gemspec']
  s.require_paths = ['lib']

  s.rdoc_options = ['--main', 'README.md']
  s.extra_rdoc_files = ['LICENSE', 'README.md']

  # For Nanoc 4.x
  #s.add_runtime_dependency('nanoc-core')
  #s.add_runtime_dependency('nanoc-cli')

 # For Nanoc 3.x
  s.add_runtime_dependency('nanoc', '>= 3.6.7', '< 4.0.0')


  # Autoloading
  s.add_development_dependency('bundler', '~> 1.5')
end
Show outdated Hide outdated bin/nanoc
Show outdated Hide outdated lib/nanoc/cli.rb
@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Mar 26, 2014

Member

👍 apart from remarks.

Member

ddfreyne commented Mar 26, 2014

👍 apart from remarks.

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Mar 29, 2014

Member

Looks good. Will run some tests locally to make sure this doesn’t break anything, but if it doesn’t, I’ll merge.

Member

ddfreyne commented Mar 29, 2014

Looks good. Will run some tests locally to make sure this doesn’t break anything, but if it doesn’t, I’ll merge.

@barraq

This comment has been minimized.

Show comment
Hide comment
@barraq

barraq Mar 29, 2014

Contributor

Concerning the test, in nanoc-cli you have one test concerning the after_setup that maybe we should also add to the merge: https://github.com/nanoc/nanoc-cli/blob/8e49e1907741c54bcd053de8b7ae4eb732f82d0d/test/cli/test_cli.rb#L105

Contributor

barraq commented Mar 29, 2014

Concerning the test, in nanoc-cli you have one test concerning the after_setup that maybe we should also add to the merge: https://github.com/nanoc/nanoc-cli/blob/8e49e1907741c54bcd053de8b7ae4eb732f82d0d/test/cli/test_cli.rb#L105

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Mar 29, 2014

Member

Yup, would be great if you could move that over too.

Member

ddfreyne commented Mar 29, 2014

Yup, would be great if you could move that over too.

@barraq

This comment has been minimized.

Show comment
Hide comment
@barraq

barraq Mar 29, 2014

Contributor

ok, I'm running the test too before commiting

Contributor

barraq commented Mar 29, 2014

ok, I'm running the test too before commiting

ddfreyne added a commit that referenced this pull request Mar 31, 2014

Merge pull request #407 from barraq/feature/backport-cli-after_setup
Backport Nanoc::CLI.after_setup functionality from nanoc 4.0

@ddfreyne ddfreyne merged commit 70020f3 into nanoc:master Mar 31, 2014

1 check passed

default The Travis CI build passed
Details
@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Mar 31, 2014

Member

Cool stuff.

Member

ddfreyne commented Mar 31, 2014

Cool stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment