initial import
This commit is contained in:
commit
27c36891ac
4
Gemfile
Normal file
4
Gemfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
source :rubygems
|
||||||
|
|
||||||
|
# Specify your gem's dependencies in middleman-deploy.gemspec
|
||||||
|
gemspec
|
12
Rakefile
Normal file
12
Rakefile
Normal 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
4
features/support/env.rb
Normal 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
49
lib/middleman-deploy.rb
Normal 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
|
1
lib/middleman_extension.rb
Normal file
1
lib/middleman_extension.rb
Normal file
|
@ -0,0 +1 @@
|
||||||
|
require "middleman-deploy"
|
24
middleman-deploy.gemspec
Normal file
24
middleman-deploy.gemspec
Normal 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
|
Loading…
Reference in a new issue