middleman-iepab 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/Gemfile +21 -0
- data/LICENSE.md +18 -0
- data/README.md +39 -0
- data/Rakefile +14 -0
- data/features/activate.feature +15 -0
- data/features/iepab.feature +7 -0
- data/features/support/env.rb +4 -0
- data/fixtures/empty-app/config.rb +0 -0
- data/fixtures/empty-app/source/.gitkeep +0 -0
- data/fixtures/some-app/config.rb +6 -0
- data/fixtures/some-app/source/index.html +3 -0
- data/lib/middleman-iepab.rb +6 -0
- data/lib/middleman-iepab/extension.rb +27 -0
- data/middleman-iepab.gemspec +24 -0
- metadata +77 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 467a3f0dde68ecb128414528e981dcbd5b7b4117
|
4
|
+
data.tar.gz: dfe50d63778df6d100e65f8930dc38d1b916f01a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 54268436ade6a6e8611b9005f21c269026da598424c53e6dc1c3de43885d6d4b297546cf81f433698ae62efd6dc260591ee8b022bca6593bb29e3b2d91c3f3c7
|
7
|
+
data.tar.gz: c747fe18d33e2fc3eb312f9fb65e863ca634e018800c54087455a91d56d7510c2919d3e8fc19c84a8008774eef53ca083aae156aa9ebc973ef670735344b2c7e
|
data/.gitignore
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# If you do not have OpenSSL installed, update
|
2
|
+
# the following line to use "http://" instead
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in middleman-iepab.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem 'middleman-cli'
|
9
|
+
|
10
|
+
group :development do
|
11
|
+
gem 'rake'
|
12
|
+
gem 'rdoc'
|
13
|
+
gem 'yard'
|
14
|
+
end
|
15
|
+
|
16
|
+
group :test do
|
17
|
+
gem 'cucumber'
|
18
|
+
gem 'aruba'
|
19
|
+
gem 'rspec'
|
20
|
+
gem 'capybara'
|
21
|
+
end
|
data/LICENSE.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
Copyright (c) 2017 Susumu Yamazaki
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
5
|
+
the Software without restriction, including without limitation the rights to
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
7
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
8
|
+
subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
11
|
+
copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
15
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
16
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
18
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# Middleman-IEPAB extension
|
2
|
+
|
3
|
+
middleman-iepab is an extension for the [Middleman] static site generator that invokes external pipeline after building.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
If you're just getting started, install the `middleman` gem and generate a new
|
8
|
+
project:
|
9
|
+
|
10
|
+
```
|
11
|
+
gem install middleman
|
12
|
+
middleman init MY_PROJECT --template=blog
|
13
|
+
```
|
14
|
+
|
15
|
+
If you already have a Middleman project: Add `gem "middleman-iepab"` to your
|
16
|
+
`Gemfile` and run `bundle install`
|
17
|
+
|
18
|
+
## Configuration
|
19
|
+
|
20
|
+
Within the config.rb of the middleman project, include the line
|
21
|
+
|
22
|
+
```
|
23
|
+
activate :iepab, {
|
24
|
+
name: :echo,
|
25
|
+
command: "echo hello",
|
26
|
+
source: "./source",
|
27
|
+
latency: 1
|
28
|
+
}
|
29
|
+
```
|
30
|
+
|
31
|
+
This syntax and function is same to an external pipeline, but iepab invokes the target external pipeline **after building**, not before building like the original external pipeline.
|
32
|
+
|
33
|
+
## License
|
34
|
+
|
35
|
+
Copyright (c) 2017 Susumu Yamazaki. MIT Licensed, see [LICENSE] for details.
|
36
|
+
|
37
|
+
|
38
|
+
[middleman]: http://middlemanapp.com
|
39
|
+
[LICENSE]: https://github.com/zacky1972/middleman-iepab/blob/master/LICENSE.md
|
data/Rakefile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
Bundler::GemHelper.install_tasks
|
3
|
+
|
4
|
+
require 'cucumber/rake/task'
|
5
|
+
|
6
|
+
Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
|
7
|
+
t.cucumber_opts = '--color --tags ~@wip --strict'
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'rake/clean'
|
11
|
+
|
12
|
+
task test: ['cucumber']
|
13
|
+
|
14
|
+
task default: :test
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Feature: middleman-iepab is activated
|
2
|
+
Scenario: Activate middleman-iepab
|
3
|
+
Given a fixture app "empty-app"
|
4
|
+
And a file named "config.rb" with:
|
5
|
+
"""
|
6
|
+
activate :iepab, {
|
7
|
+
name: :echo,
|
8
|
+
command: "echo hello",
|
9
|
+
source: "./source",
|
10
|
+
latency: 1
|
11
|
+
}
|
12
|
+
"""
|
13
|
+
When I run `middleman build --verbose`
|
14
|
+
Then the output should not contain "Unknown Extension: iepab"
|
15
|
+
And the exit status should be 0
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Feature: middleman-iepab invokes external pipeline after building
|
2
|
+
Scenario: middleman-iepab invokes echo in external pipeline after building
|
3
|
+
Given a fixture app "some-app"
|
4
|
+
When I run `middleman build --verbose`
|
5
|
+
Then the output should contain "Request: index.html"
|
6
|
+
And the output should contain "External: hello"
|
7
|
+
And the exit status should be 0
|
File without changes
|
File without changes
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Require core library
|
2
|
+
require 'middleman-core'
|
3
|
+
require 'middleman-core/extensions/external_pipeline'
|
4
|
+
|
5
|
+
# Extension namespace
|
6
|
+
module Middleman
|
7
|
+
class IEPABExtension < ::Middleman::Extension
|
8
|
+
self.supports_multiple_instances = true
|
9
|
+
|
10
|
+
option :name, nil, 'The name of the pipeline', required: true
|
11
|
+
option :command, nil, 'The command to initialize', required: true
|
12
|
+
option :source, nil, 'Path to merge into sitemap', required: true
|
13
|
+
option :latency, 0.25, 'Latency between refreshes of source'
|
14
|
+
option :disable_background_execution, false, "Don't run the command in a separate background thread"
|
15
|
+
|
16
|
+
def initialize(app, config={}, &block)
|
17
|
+
super
|
18
|
+
@app = app
|
19
|
+
@config = config
|
20
|
+
@block = block
|
21
|
+
end
|
22
|
+
|
23
|
+
def after_build(builder)
|
24
|
+
::Middleman::Extensions::ExternalPipeline.new(@app, @config)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "middleman-iepab"
|
6
|
+
s.version = "0.0.1"
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.authors = ["Susumu Yamazaki"]
|
9
|
+
s.email = ["zacky1972@gmail.com"]
|
10
|
+
s.homepage = "https://github.com/zacky1972/middleman-iepab"
|
11
|
+
s.summary = %q{middleman-iepab is an extension for the Middleman static site generator that invokes external pipeline after building.}
|
12
|
+
s.description = %q{middleman-iepab is an extension for the Middleman static site generator that invokes external pipeline after building.}
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
|
19
|
+
# The version of middleman-core your extension depends on
|
20
|
+
s.add_runtime_dependency("middleman-core", [">= 4.2.1"])
|
21
|
+
|
22
|
+
# Additional dependencies
|
23
|
+
# s.add_runtime_dependency("gem-name", "gem-version")
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: middleman-iepab
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Susumu Yamazaki
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-12-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: middleman-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.2.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.2.1
|
27
|
+
description: middleman-iepab is an extension for the Middleman static site generator
|
28
|
+
that invokes external pipeline after building.
|
29
|
+
email:
|
30
|
+
- zacky1972@gmail.com
|
31
|
+
executables: []
|
32
|
+
extensions: []
|
33
|
+
extra_rdoc_files: []
|
34
|
+
files:
|
35
|
+
- ".gitignore"
|
36
|
+
- Gemfile
|
37
|
+
- LICENSE.md
|
38
|
+
- README.md
|
39
|
+
- Rakefile
|
40
|
+
- features/activate.feature
|
41
|
+
- features/iepab.feature
|
42
|
+
- features/support/env.rb
|
43
|
+
- fixtures/empty-app/config.rb
|
44
|
+
- fixtures/empty-app/source/.gitkeep
|
45
|
+
- fixtures/some-app/config.rb
|
46
|
+
- fixtures/some-app/source/index.html
|
47
|
+
- lib/middleman-iepab.rb
|
48
|
+
- lib/middleman-iepab/extension.rb
|
49
|
+
- middleman-iepab.gemspec
|
50
|
+
homepage: https://github.com/zacky1972/middleman-iepab
|
51
|
+
licenses: []
|
52
|
+
metadata: {}
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options: []
|
55
|
+
require_paths:
|
56
|
+
- lib
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
requirements: []
|
68
|
+
rubyforge_project:
|
69
|
+
rubygems_version: 2.6.13
|
70
|
+
signing_key:
|
71
|
+
specification_version: 4
|
72
|
+
summary: middleman-iepab is an extension for the Middleman static site generator that
|
73
|
+
invokes external pipeline after building.
|
74
|
+
test_files:
|
75
|
+
- features/activate.feature
|
76
|
+
- features/iepab.feature
|
77
|
+
- features/support/env.rb
|