initial import

master
Tom Vaughan 2012-08-19 21:38:16 -07:00
commit 27c36891ac
6 changed files with 94 additions and 0 deletions

4
Gemfile Normal file
View File

@ -0,0 +1,4 @@
source :rubygems
# Specify your gem's dependencies in middleman-deploy.gemspec
gemspec

12
Rakefile Normal file
View File

@ -0,0 +1,12 @@
require 'bundler'
Bundler::GemHelper.install_tasks
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
t.cucumber_opts = "--color --tags ~@wip --strict --format #{ENV['CUCUMBER_FORMAT'] || 'Fivemat'}"
end
require 'rake/clean'
task :test => ["cucumber"]

4
features/support/env.rb Normal file
View File

@ -0,0 +1,4 @@
PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
require "middleman-core"
require "middleman-core/step_definitions"
require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-deploy')

49
lib/middleman-deploy.rb Normal file
View File

@ -0,0 +1,49 @@
# Require core library
require "middleman-core"
# Extension namespace
module MyExtension
class << self
# Called when user `activate`s your extension
def registered(app, options={})
# Setup extension-specific config
app.set :config_variable, false
# Include class methods
# app.extend ClassMethods
# Include instance methods
# app.send :include, InstanceMethods
app.after_configuration do
# Do something
# config_variable is now either the default or the user's
# setting from config.rb
end
end
alias :included :registered
end
# module ClassMethods
# def a_class_method
# end
# end
# module InstanceMethods
# def an_instance_method
# end
# end
end
# Register extensions which can be activated
# Make sure we have the version of Middleman we expect
# ::Middleman::Extensions.register(:extension_name) do
#
# # Return the extension module
# ::MyExtension
#
# end

View File

@ -0,0 +1 @@
require "middleman-deploy"

24
middleman-deploy.gemspec Normal file
View File

@ -0,0 +1,24 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
Gem::Specification.new do |s|
s.name = "middleman-deploy"
s.version = "0.0.1"
s.platform = Gem::Platform::RUBY
# s.authors = ["Your Name"]
# s.email = ["email@example.com"]
# s.homepage = "http://example.com"
# s.summary = %q{A short summary of your extension}
# s.description = %q{A longer description of your extension}
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
# The version of middleman-core your extension depends on
s.add_runtime_dependency("middleman-core", [">= 3.0.0"])
# Additional dependencies
# s.add_runtime_dependency("gem-name", "gem-version")
end