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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 933bae275859f21723bd9e0e88cfd6096bcbe620
4
- data.tar.gz: c9813e1b66f3f9a47b3fc813e3665f51132113fa
3
+ metadata.gz: 8ffeb08c48c259934fde7be79a695f5a15c547d0
4
+ data.tar.gz: ef381443933e01dcb96768902c287543ddd978ed
5
5
  SHA512:
6
- metadata.gz: adab8a6d459fa55dff7f89eab90377620a4e61f335d5154aae1221a3e88ae00376a567ada80d79df927140b698f62ac157a9b59adb1ff07c19465876da868c31
7
- data.tar.gz: 652b4dfa02d96d5c35dc24f6704c67262c5c4cffa29b3648acc556d4e2a513ae68f9b498c915d2bf3b5f8eacde3edf7cb74e04911b261f732dfd8060b5276d9f
6
+ metadata.gz: 836c1a52a021e4220417b85d5d390aecdcef8c5224566073417f6492501c97e81d46f337c98947f6cbe5511ce4a3d45c1c3ab7d4ea1c3915372b8650b534221d
7
+ data.tar.gz: e58f9e726416cfe2562825629b0d5803529bea5176d3621928866579c3f10fc05893c5b6028a3915fa59e16ebcc8349681f964e2b4089af5076b0667783d6cf3
data/README.md CHANGED
@@ -8,6 +8,7 @@ $ brew install mysql redis
8
8
 
9
9
  # From github (recommended)
10
10
  $ git clone git@github.com:r7kamura/magi
11
+ $ cd magi
11
12
  $ ./bin/magi setup
12
13
  $ ./bin/magi start
13
14
 
@@ -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
@@ -24,3 +24,5 @@ section.builds
24
24
  span.time= build.finished_at
25
25
 
26
26
  = paginate @resource.builds.page(params[:page])
27
+
28
+ = content_for :jobs_show
@@ -5,6 +5,7 @@ html
5
5
  = csrf_meta_tags
6
6
  = stylesheet_link_tag "application", media: "all"
7
7
  = javascript_include_tag "application"
8
+ = content_for :head
8
9
 
9
10
  body class = action_classes
10
11
  = yield
data/lib/magi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Magi
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -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({ "WORKSPACE_PATH" => Dir.pwd }, "cd #{Dir.pwd} && foreman start")
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
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-22 00:00:00.000000000 Z
11
+ date: 2013-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clockwork