padrino-core 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/padrino-core/server.rb +1 -2
- data/lib/padrino-core.rb +7 -25
- data/padrino-core.gemspec +2 -2
- data/test/test_core.rb +0 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.5
|
data/lib/padrino-core/server.rb
CHANGED
data/lib/padrino-core.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'usher'
|
2
2
|
require 'sinatra/base'
|
3
|
+
Dir[File.dirname(__FILE__) + '/padrino-core/*.rb'].each {|file| require file }
|
3
4
|
|
4
5
|
# Defines our PADRINO_ENV
|
5
6
|
PADRINO_ENV = ENV["PADRINO_ENV"] ||= ENV["RACK_ENV"] ||= "development" unless defined?(PADRINO_ENV)
|
@@ -60,31 +61,12 @@ module Padrino
|
|
60
61
|
end
|
61
62
|
|
62
63
|
##
|
63
|
-
#
|
64
|
+
# Return bundle status :+:locked+ if .bundle/environment.rb exist :+:unlocked if Gemfile exist
|
65
|
+
# otherwise return nil
|
64
66
|
#
|
65
|
-
def
|
66
|
-
|
67
|
-
|
68
|
-
Bundler.require :default, Padrino.env
|
69
|
-
puts "=> Loaded bundled gems for #{Padrino.env} with #{Padrino.support.to_s.humanize}"
|
70
|
-
rescue LoadError
|
71
|
-
if File.exist?(root("Gemfile"))
|
72
|
-
require 'bundler'
|
73
|
-
Bundler.setup
|
74
|
-
Bundler.require :default, Padrino.env
|
75
|
-
Dir[File.dirname(__FILE__) + '/padrino-core/*.rb'].each {|file| require file }
|
76
|
-
puts "=> Located Gemfile for #{Padrino.env} with #{Padrino.support.to_s.humanize}"
|
77
|
-
else
|
78
|
-
Dir[File.dirname(__FILE__) + '/padrino-core/*.rb'].each {|file| require file }
|
79
|
-
end
|
67
|
+
def bundle
|
68
|
+
return :locked if File.exist?(root('.bundle/environment.rb'))
|
69
|
+
return :unlocked if File.exist?(root("Gemfile"))
|
80
70
|
end
|
81
71
|
end # self
|
82
|
-
end # Padrino
|
83
|
-
|
84
|
-
##
|
85
|
-
# When we require this file is necessary check if we have a gemfile o bundled gems,
|
86
|
-
# this because we load ExtLib or ActiveSupport if some of our dependencies
|
87
|
-
# just require them. This prevent for example to load ActiveSupport
|
88
|
-
# when we require only 'dm-core'.
|
89
|
-
#
|
90
|
-
Padrino.require_dependencies!
|
72
|
+
end # Padrino
|
data/padrino-core.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{padrino-core}
|
8
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu"]
|
12
|
-
s.date = %q{2010-02-
|
12
|
+
s.date = %q{2010-02-09}
|
13
13
|
s.default_executable = %q{padrino}
|
14
14
|
s.description = %q{The Padrino core gem required for use of this framework}
|
15
15
|
s.email = %q{padrinorb@gmail.com}
|
data/test/test_core.rb
CHANGED
@@ -9,7 +9,6 @@ class TestCore < Test::Unit::TestCase
|
|
9
9
|
assert_respond_to Padrino, :env
|
10
10
|
assert_respond_to Padrino, :application
|
11
11
|
assert_respond_to Padrino, :set_encoding
|
12
|
-
assert_respond_to Padrino, :require_dependencies!
|
13
12
|
assert_respond_to Padrino, :load!
|
14
13
|
assert_respond_to Padrino, :reload!
|
15
14
|
assert_respond_to Padrino, :version
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: padrino-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Padrino Team
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2010-02-
|
15
|
+
date: 2010-02-09 00:00:00 +01:00
|
16
16
|
default_executable: padrino
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|