magi 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/app/controllers/application_controller.rb +13 -0
- data/app/views/jobs/show.html.slim +2 -0
- data/app/views/layouts/application.html.slim +1 -0
- data/lib/magi/version.rb +1 -1
- data/spec/magi/command_spec.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ffeb08c48c259934fde7be79a695f5a15c547d0
|
4
|
+
data.tar.gz: ef381443933e01dcb96768902c287543ddd978ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 836c1a52a021e4220417b85d5d390aecdcef8c5224566073417f6492501c97e81d46f337c98947f6cbe5511ce4a3d45c1c3ab7d4ea1c3915372b8650b534221d
|
7
|
+
data.tar.gz: e58f9e726416cfe2562825629b0d5803529bea5176d3621928866579c3f10fc05893c5b6028a3915fa59e16ebcc8349681f964e2b4089af5076b0667783d6cf3
|
data/README.md
CHANGED
@@ -8,4 +8,17 @@ class ApplicationController < ActionController::Base
|
|
8
8
|
rescue_from WeakParameters::ValidationError do
|
9
9
|
head 400
|
10
10
|
end
|
11
|
+
|
12
|
+
# Cache to use `view_context.content_for` from controller.
|
13
|
+
# This hack is nice to hook view_context from a plugin.
|
14
|
+
#
|
15
|
+
# Examples
|
16
|
+
#
|
17
|
+
# JobsController.before_filter do
|
18
|
+
# view_context.content_for :jobs_show, "This is a footer."
|
19
|
+
# end
|
20
|
+
#
|
21
|
+
def view_context
|
22
|
+
@view_context ||= super
|
23
|
+
end
|
11
24
|
end
|
data/lib/magi/version.rb
CHANGED
data/spec/magi/command_spec.rb
CHANGED
@@ -13,13 +13,17 @@ describe Magi::Command do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
describe "#call" do
|
16
|
+
let(:env) do
|
17
|
+
{ "WORKSPACE_PATH" => Dir.pwd }
|
18
|
+
end
|
19
|
+
|
16
20
|
context "with `setup`" do
|
17
21
|
let(:arguments) do
|
18
22
|
["setup"]
|
19
23
|
end
|
20
24
|
|
21
25
|
it "executes setup script" do
|
22
|
-
command.should_receive(:system).with("cd #{Dir.pwd} && rake db:create db:migrate")
|
26
|
+
command.should_receive(:system).with(env, "cd #{Dir.pwd} && bundle install && bundle exec rake db:create db:migrate")
|
23
27
|
command.call
|
24
28
|
end
|
25
29
|
end
|
@@ -30,7 +34,7 @@ describe Magi::Command do
|
|
30
34
|
end
|
31
35
|
|
32
36
|
it "executes start script" do
|
33
|
-
command.should_receive(:system).with(
|
37
|
+
command.should_receive(:system).with(env, "cd #{Dir.pwd} && bundle exec foreman start")
|
34
38
|
command.call
|
35
39
|
end
|
36
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clockwork
|