Skip to content

Commit f6e307e

Browse files
committed
initial commit
0 parents  commit f6e307e

File tree

5 files changed

+82
-0
lines changed

5 files changed

+82
-0
lines changed

Gemfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source 'https://rubygems.org'
2+
3+
# Specify your gem's dependencies in huginn_agent.gemspec
4+
gemspec

LICENSE.txt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2014 Andrew Cantino
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# HuginnAgent
2+
3+
This is a dependency for new external Huginn Agent Gems.
4+
5+
## Installation
6+
7+
Add this line to your Agent's gemspec:
8+
9+
```ruby
10+
spec.add_runtime_dependency "huginn_agent"
11+
```
12+
13+
## Contributing
14+
15+
1. Fork it ( https://github.com/[my-github-username]/huginn_agent/fork )
16+
2. Create your feature branch (`git checkout -b my-new-feature`)
17+
3. Commit your changes (`git commit -am 'Add some feature'`)
18+
4. Push to the branch (`git push origin my-new-feature`)
19+
5. Create a new Pull Request

huginn_agent.gemspec

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# coding: utf-8
2+
lib = File.expand_path('../lib', __FILE__)
3+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4+
5+
Gem::Specification.new do |spec|
6+
spec.name = "huginn_agent"
7+
spec.version = '0.1'
8+
spec.authors = ["Andrew Cantino"]
9+
spec.email = ["[email protected]"]
10+
spec.summary = %q{Helpers for making new Huginn Agents}
11+
spec.homepage = "https://github.com/cantino/huginn"
12+
spec.license = "MIT"
13+
14+
spec.files = `git ls-files -z`.split("\x0")
15+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17+
spec.require_paths = ["lib"]
18+
19+
spec.add_development_dependency "bundler", "~> 1.7"
20+
spec.add_development_dependency "rake", "~> 10.0"
21+
spec.add_development_dependency "rspec"
22+
end

lib/huginn_agent.rb

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class HuginnAgent
2+
def self.register(*paths)
3+
@paths ||= []
4+
paths.each do |path|
5+
@paths << path
6+
end
7+
end
8+
9+
def self.require!
10+
@paths.each do |path|
11+
require path
12+
Agent::TYPES << "Agents::#{File.basename(path.to_s).camelize}"
13+
end
14+
end
15+
end

0 commit comments

Comments
 (0)