Skip to content

Commit a42c60b

Browse files
committed
Update Rails to 4.1.6. And add boot.rb file.
1 parent ed1fb43 commit a42c60b

10 files changed

Lines changed: 54 additions & 41 deletions

File tree

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
gem 'activemodel', '4.0.4'
4-
gem 'activesupport', '4.0.4'
3+
gem 'activemodel', '4.1.6'
4+
gem 'activesupport', '4.1.6'
55
gem 'rake'
66
gem 'sqlite3'

Gemfile.lock

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activemodel (4.0.4)
5-
activesupport (= 4.0.4)
6-
builder (~> 3.1.0)
7-
activesupport (4.0.4)
4+
activemodel (4.1.6)
5+
activesupport (= 4.1.6)
6+
builder (~> 3.1)
7+
activesupport (4.1.6)
88
i18n (~> 0.6, >= 0.6.9)
9-
minitest (~> 4.2)
10-
multi_json (~> 1.3)
9+
json (~> 1.7, >= 1.7.7)
10+
minitest (~> 5.1)
1111
thread_safe (~> 0.1)
12-
tzinfo (~> 0.3.37)
13-
atomic (1.1.16)
14-
builder (3.1.4)
15-
i18n (0.6.9)
16-
minitest (4.7.5)
17-
multi_json (1.9.2)
18-
rake (10.1.1)
12+
tzinfo (~> 1.1)
13+
builder (3.2.2)
14+
i18n (0.6.11)
15+
json (1.8.1)
16+
minitest (5.4.1)
17+
rake (10.3.2)
1918
sqlite3 (1.3.9)
20-
thread_safe (0.3.1)
21-
atomic (>= 1.1.7, < 2)
22-
tzinfo (0.3.39)
19+
thread_safe (0.3.4)
20+
tzinfo (1.2.2)
21+
thread_safe (~> 0.1)
2322

2423
PLATFORMS
2524
ruby
2625

2726
DEPENDENCIES
28-
activemodel (= 4.0.4)
29-
activesupport (= 4.0.4)
27+
activemodel (= 4.1.6)
28+
activesupport (= 4.1.6)
3029
rake
3130
sqlite3

config.ru

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Start with: shotgun -I. -Ilib
2-
# Under Windows: rackup -I. -Ilib (CTRL+C and restart on each change)
1+
# Start with: shotgun
2+
# Under Windows: rackup (CTRL+C and restart on each change)
33

44
class App
55
def call(env)

lib/boot.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Boot the framework. Similar to Rails' `config/boot.rb`.
2+
3+
# Activate Bundler. Set up gems listed in the Gemfile.
4+
require 'bundler/setup'
5+
6+
# Add our framework code (lib/) to the load path.
7+
$LOAD_PATH.unshift "lib"
8+
9+
# Add the current directory to load path too so we can `require 'config/routes'` for example.
10+
$LOAD_PATH.unshift "."
11+
12+
# Add all directories of app/ to the load path.
13+
Dir["app/*"].each do |path|
14+
$LOAD_PATH << path
15+
end

lib/core_ext.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/connection_adapter_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
require File.dirname(__FILE__) + '/test_helper'
1+
require "test_helper"
22
require "connection_adapter"
33

4-
class ConnectionAdapterTest < Test::Unit::TestCase
4+
class ConnectionAdapterTest < ActiveSupport::TestCase
55
def setup
66
@adapter = SqliteAdapter.new
77
end

test/filters_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require File.dirname(__FILE__) + '/test_helper'
1+
require "test_helper"
22
require "action_controller"
33
require "app/controllers/application_controller"
44

@@ -37,7 +37,7 @@ def index
3737
end
3838
end
3939

40-
class FiltersTest < Test::Unit::TestCase
40+
class FiltersTest < ActiveSupport::TestCase
4141
def test_filters
4242
out = []
4343
FiltersTestController.new(out).process(:index)

test/rendering_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
require File.dirname(__FILE__) + '/test_helper'
1+
require "test_helper"
22
require "action_controller"
3-
require "app/controllers/application_controller"
4-
require "app/controllers/home_controller"
3+
require "application_controller"
4+
require "home_controller"
55

6-
class RenderingTest < Test::Unit::TestCase
6+
class RenderingTest < ActiveSupport::TestCase
77
def setup
88
@controller = HomeController.new
99
end

test/test_helper.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
Dir.chdir File.expand_path("../../", __FILE__)
2-
$LOAD_PATH.unshift ".", "lib", "test"
1+
require_relative "../lib/boot"
32

4-
require "test/unit"
3+
# Load ActiveSupport testing stuff
4+
require 'active_support/testing/autorun'
5+
require 'active_support/test_case'
6+
7+
# Remove warning from ActiveSupport
8+
I18n.enforce_available_locales = true

test/user_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
require File.dirname(__FILE__) + '/test_helper'
2-
require "app/models/user"
1+
require "test_helper"
2+
require "user"
33

4-
class UserTest < Test::Unit::TestCase
4+
class UserTest < ActiveSupport::TestCase
55

66
end

0 commit comments

Comments
 (0)