oak 0.0.3 → 0.4.1

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.
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
- # Make sure the secret is at least 30 characters and all random,
6
- # no regular words or you'll be exposed to dictionary attacks.
7
- Oak::Application.config.secret_token = 'c1cae0f52a3ef8efa369a127c63bd6ede539a4089fd952b33199100a6769c8455ab4969f2eefaf1ebcbe0208bd57531204c77f41f715207f961e7e45f139f4e7'
File without changes
@@ -1,29 +0,0 @@
1
- require 'rubygems'
2
- require 'bundler'
3
-
4
- begin
5
- Bundler.setup(:default, :development)
6
- rescue Bundler::BundlerError => e
7
- $stderr.puts e.message
8
- $stderr.puts "Run `bundle install` to install missing gems"
9
- exit e.status_code
10
- end
11
-
12
- require 'test/unit'
13
- require 'shoulda'
14
-
15
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
16
- $LOAD_PATH.unshift(File.dirname(__FILE__))
17
- require 'oak'
18
-
19
- class Test::Unit::TestCase
20
- def create_temp_file(oak_ref)
21
- oak_ref.destination_root = 'test_tmp'
22
- FileUtils.cp_r 'test/files', 'test_tmp'
23
- FileUtils.mv 'test_tmp/dot_gitignore', 'test_tmp/.gitignore'
24
- end
25
-
26
- def clear_temp_file(oak_ref)
27
- FileUtils.rm_rf oak_ref.destination_root
28
- end
29
- end
@@ -1,44 +0,0 @@
1
- require 'helper'
2
-
3
- class TestOak < Test::Unit::TestCase
4
- def setup
5
- @oak = Oak.new
6
- create_temp_file @oak
7
- end
8
-
9
- def teardown
10
- clear_temp_file @oak
11
- end
12
-
13
- def test_check_cfg
14
- FileUtils.cd @oak.destination_root do
15
- @oak.check_cfg
16
- assert_equal('config/config.yml', File.binread('.gitignore'))
17
- assert_equal('c1cae0f52a3ef8efa369a127c63bd6ede539a4089fd952b33199100a6769c8455ab4969f2eefaf1ebcbe0208bd57531204c77f41f715207f961e7e45f139f4e7', @oak.secret_token)
18
- ignored = File.binread(File.expand_path('~/.gitignore'))
19
- assert(ignored.include?('config/database.yml'))
20
- end
21
- end
22
-
23
- def test_create_config_on_deploy
24
- FileUtils.cd @oak.destination_root do
25
- @oak.check_cfg
26
- @oak.git_prepare
27
- @oak.create_config_on_deploy
28
- assert_equal('secret_token = ' + @oak.secret_token, File.binread('config/config.yml'))
29
- end
30
- end
31
-
32
- def test_setup
33
- @oak.setup @oak.destination_root
34
- FileUtils.chdir @oak.destination_root do
35
- File.open('.gitignore') do |f|
36
- lines = f.readlines
37
- assert_equal('config/config.yml', lines[0].chomp)
38
- end
39
-
40
- branch = `git symbolic-ref -q HEAD`.chomp
41
- assert_equal('refs/heads/master', branch)
42
- end
43
- end
44
- end