This repository has been archived by the owner on Jan 23, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting the application server via Harker works.
- Loading branch information
1 parent
7b02cbe
commit 48338a5
Showing
21 changed files
with
139 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class HarksController < ApplicationController | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module HarksHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class Hark < ActiveRecord::Base | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class CreateHarks < ActiveRecord::Migration | ||
def self.up | ||
create_table :harks do |t| | ||
t.string :tidings | ||
t.timestamps | ||
end | ||
end | ||
|
||
def self.down | ||
drop_table :harks | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Allow rubygems to load this app | ||
require File.dirname(__FILE__) + '/../config/boot' | ||
require File.dirname(__FILE__) + '/../config/environment' |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...est/functional/harkers_controller_test.rb → .../test/functional/harks_controller_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/sample/test/unit/harker_test.rb → test/sample/test/unit/hark_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
require 'test_helper' | ||
|
||
class HarksHelperTest < ActionView::TestCase | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,54 @@ | ||
require "test/unit" | ||
require "harker" | ||
require "rubygems" | ||
require "minitest/unit" | ||
require 'fileutils' | ||
|
||
class TestHarker < Test::Unit::TestCase | ||
def test_sanity | ||
flunk "write tests or I will kneecap you" | ||
require File.dirname(__FILE__) + "/../lib/harker" | ||
|
||
begin | ||
ENV['RAILS_ENV'] = 'production' | ||
gem 'sample_rails' | ||
rescue LoadError | ||
abort "You need the sample_rails gem installed: | ||
$ cd #{File.dirname(__FILE__) + '/sample'} && rake install_gem" | ||
end | ||
|
||
class TestHarker < MiniTest::Unit::TestCase | ||
ROOT = "/tmp/harker-test-#{Process.pid}" | ||
|
||
def setup | ||
suppress_out { Harker.launch('sample_rails', [ROOT, 'init']) } | ||
end | ||
|
||
def teardown | ||
FileUtils.rm_rf ROOT | ||
end | ||
|
||
def test_init | ||
assert File.exist?(ROOT) | ||
assert File.exist?(ROOT + '/database.yml') | ||
end | ||
|
||
# def test_start | ||
# flunk "not yet" | ||
# end | ||
|
||
# def test_stop | ||
# flunk "can't stop the funk" | ||
# end | ||
|
||
def test_migrate | ||
suppress_out { Harker.launch('sample_rails', [ROOT, 'migrate']) } | ||
assert_equal(['id', 'tidings', 'updated_at', 'created_at'].sort, | ||
Hark.columns.map{ |c| c.name }.sort) | ||
end | ||
|
||
private | ||
def suppress_out | ||
$stdout = StringIO.new | ||
yield | ||
ensure | ||
$stdout = STDOUT | ||
end | ||
end | ||
|
||
MiniTest::Unit.autorun |