grill 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +16 -0
- data/lib/grill.rb +9 -5
- data/lib/grill/version.rb +1 -1
- data/spec/grill_spec.rb +16 -0
- metadata +2 -2
data/README.md
CHANGED
@@ -44,6 +44,22 @@ Or, more handy way to use as below (since v0.2.1):
|
|
44
44
|
# ...
|
45
45
|
end
|
46
46
|
|
47
|
+
You can multiple implant as below (since v0.3.0):
|
48
|
+
|
49
|
+
# these args will be combined one file.
|
50
|
+
# so if first arg define "source" and second is not,
|
51
|
+
# second arg's `gem` is affected by that
|
52
|
+
|
53
|
+
Grill.implant <<-FOO, <<-BAR, :commontools
|
54
|
+
source :rubygems
|
55
|
+
gem "typhoeus"
|
56
|
+
gem "nokogiri"
|
57
|
+
FOO
|
58
|
+
gem "rack"
|
59
|
+
BAR
|
60
|
+
|
61
|
+
# You got typhoeus, nokogiri, rack, and :commontools
|
62
|
+
|
47
63
|
# Compatibility of Gemfile
|
48
64
|
|
49
65
|
It is completely compatible (you installed version) Bundler's Gemfile so you can use [full spec of it](http://gembundler.com/gemfile.html) for version fixation, `:require`, `:path`, etc.
|
data/lib/grill.rb
CHANGED
@@ -12,11 +12,15 @@ module Grill
|
|
12
12
|
home
|
13
13
|
end
|
14
14
|
|
15
|
-
def implant(
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
def implant(*args)
|
16
|
+
gems = ""
|
17
|
+
args.each do |arg|
|
18
|
+
if arg.class == Symbol
|
19
|
+
gems << File.read(File.join(home, arg.to_s))
|
20
|
+
else
|
21
|
+
gems << arg
|
22
|
+
end
|
23
|
+
gems << "\n"
|
20
24
|
end
|
21
25
|
|
22
26
|
fullpath = File.expand_path($0)
|
data/lib/grill/version.rb
CHANGED
data/spec/grill_spec.rb
CHANGED
@@ -52,6 +52,22 @@ describe Grill do
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
+
it "#implant multiple" do
|
56
|
+
cleanroom do
|
57
|
+
defined?(Dummy).should be_nil
|
58
|
+
defined?(Dummy2).should be_nil
|
59
|
+
|
60
|
+
Grill.implant <<-FOO, <<-BAR
|
61
|
+
gem "dummy", :path => "#{File.expand_path(".././support", __FILE__)}"
|
62
|
+
FOO
|
63
|
+
gem "dummy2", :path => "#{File.expand_path(".././support", __FILE__)}"
|
64
|
+
BAR
|
65
|
+
|
66
|
+
defined?(Dummy).should_not be_nil
|
67
|
+
defined?(Dummy2).should_not be_nil
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
55
71
|
it "separete Gemfile different contants" do
|
56
72
|
Grill.implant(<<-GEM)
|
57
73
|
gem "bundler"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grill
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|