padrino-core 0.12.7 → 0.12.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/padrino +2 -2
- data/lib/padrino-core/cli/binstub.rb +27 -0
- data/lib/padrino-core/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78f71f2d86fc1e52bb94e5f50413c20b76a2217f
|
4
|
+
data.tar.gz: 49772a5da604d36b84dc8313cb61f71356bff70a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe6bc9aed4287efa00b2f034994579939318b312ddee7470accbb47609323ab6c2fff2fd661c032fd6c305651ec63099a4c1faf2854a73d5ddf6526c66c726f4
|
7
|
+
data.tar.gz: 2fee72c650f535cfc0cc38342c70b89ddcfe86c36fb6543bd3fcf8cbb88a72d5b5611dfb8eaa93c70621c50c43ae8293e7194aaea65c89c0420fe899773e21c8
|
data/bin/padrino
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require '
|
3
|
-
|
2
|
+
require 'padrino-core/cli/binstub'
|
3
|
+
Padrino.replace_with_binstub('padrino')
|
4
4
|
|
5
5
|
padrino_core_path = File.expand_path('../../lib', __FILE__)
|
6
6
|
$:.unshift(padrino_core_path) if File.directory?(padrino_core_path) && !$:.include?(padrino_core_path)
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Padrino
|
2
|
+
##
|
3
|
+
# Replaces the current process with it's binstub.
|
4
|
+
#
|
5
|
+
def self.replace_with_binstub(executable)
|
6
|
+
begin
|
7
|
+
return if Bundler.definition.missing_specs.empty?
|
8
|
+
rescue NameError, NoMethodError
|
9
|
+
end
|
10
|
+
|
11
|
+
project_root = Dir.pwd
|
12
|
+
until project_root.empty?
|
13
|
+
break if File.file?(File.join(project_root, 'Gemfile'))
|
14
|
+
project_root = project_root.rpartition('/').first
|
15
|
+
end
|
16
|
+
|
17
|
+
if %w(Gemfile .components).all? { |file| File.file?(File.join(project_root, file)) }
|
18
|
+
binstub = File.join(project_root, 'bin', executable)
|
19
|
+
if File.file?(binstub)
|
20
|
+
exec Gem.ruby, binstub, *ARGV
|
21
|
+
else
|
22
|
+
puts 'Please run `bundler install --binstubs` from your project root to generate bundle-specific executables'
|
23
|
+
exit!
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/padrino-core/version.rb
CHANGED
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.12.
|
4
|
+
version: 0.12.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Padrino Team
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-
|
14
|
+
date: 2016-06-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: padrino-support
|
@@ -19,14 +19,14 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.12.
|
22
|
+
version: 0.12.8
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.12.
|
29
|
+
version: 0.12.8
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: rack
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,6 +137,7 @@ files:
|
|
137
137
|
- lib/padrino-core/caller.rb
|
138
138
|
- lib/padrino-core/cli/adapter.rb
|
139
139
|
- lib/padrino-core/cli/base.rb
|
140
|
+
- lib/padrino-core/cli/binstub.rb
|
140
141
|
- lib/padrino-core/cli/console.rb
|
141
142
|
- lib/padrino-core/cli/launcher.rb
|
142
143
|
- lib/padrino-core/cli/rake.rb
|
@@ -237,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
238
|
version: 1.3.6
|
238
239
|
requirements: []
|
239
240
|
rubyforge_project: padrino-core
|
240
|
-
rubygems_version: 2.
|
241
|
+
rubygems_version: 2.6.4
|
241
242
|
signing_key:
|
242
243
|
specification_version: 4
|
243
244
|
summary: The required Padrino core gem
|