Skip to content

Commit

Permalink
add dev plugin option
Browse files Browse the repository at this point in the history
  • Loading branch information
greeneca committed Feb 12, 2018
1 parent 131a342 commit eb513d9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Expand Up @@ -4,3 +4,5 @@ source 'https://rubygems.org'

# Specify your gem's dependencies in roku_builder.gemspec
gemspec

# During developemnt you will need to add any gems here that plugins require
8 changes: 4 additions & 4 deletions Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
roku_builder (4.5.1)
roku_builder (4.5.2)
faraday (~> 0.13)
faraday-digestauth (~> 0.2)
git (~> 1.3)
Expand All @@ -17,7 +17,7 @@ GEM
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
ansi (1.5.0)
ast (2.3.0)
ast (2.4.0)
byebug (9.1.0)
coderay (1.1.2)
coveralls (0.8.21)
Expand All @@ -29,7 +29,7 @@ GEM
crack (0.4.3)
safe_yaml (~> 1.0.0)
docile (1.1.5)
faraday (0.13.1)
faraday (0.14.0)
multipart-post (>= 1.2, < 3)
faraday-digestauth (0.2.1)
faraday (~> 0.7)
Expand Down Expand Up @@ -78,7 +78,7 @@ GEM
notiffany (0.1.1)
nenv (~> 0.1)
shellany (~> 0.0)
oga (2.12)
oga (2.14)
ast
ruby-ll (~> 2.1)
pry (0.11.3)
Expand Down
17 changes: 17 additions & 0 deletions lib/roku_builder.rb
Expand Up @@ -98,6 +98,23 @@ def self.load_plugins
end
end
end
load_dev_plugin
end

def self.load_dev_plugin
dev_path = nil
ARGV.each_index do |i|
if ARGV[i] == "--dev-plugin"
dev_path = ARGV[i+1]
2.times {ARGV.delete_at(i)}
break
end
end
if dev_path
Dir.glob(File.join(dev_path, "lib", "roku_builder", "plugins", "*")).each do |path|
require path
end
end
end

def self.process_plugins
Expand Down
2 changes: 1 addition & 1 deletion lib/roku_builder/version.rb
Expand Up @@ -2,5 +2,5 @@

module RokuBuilder
# Version of the RokuBuilder Gem
VERSION = "4.5.1"
VERSION = "4.5.2"
end

0 comments on commit eb513d9

Please sign in to comment.