padrino-core 0.12.7 → 0.12.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e2b679c2f627848d7a686d7a22aae78af6dee3ab
4
- data.tar.gz: 327234ca54d5e028496a5a11fe66f85196549cdc
3
+ metadata.gz: 78f71f2d86fc1e52bb94e5f50413c20b76a2217f
4
+ data.tar.gz: 49772a5da604d36b84dc8313cb61f71356bff70a
5
5
  SHA512:
6
- metadata.gz: 9d0c849a2894bbe47abe5cbc22725823c032dfc7d3fff4a27cca3ffe75863d0368cf0b225b612783c1ead2404ef05048b5aaa1f566873b7bd38d1a035b9f4603
7
- data.tar.gz: 7fb0617986ee7ed545c6e3cc883bb6895926636463019b0f821b049af678d1f32db3f0181d81dae04115f528ac7374c11d29f92fc68fbb7d217c04aef105ab07
6
+ metadata.gz: fe6bc9aed4287efa00b2f034994579939318b312ddee7470accbb47609323ab6c2fff2fd661c032fd6c305651ec63099a4c1faf2854a73d5ddf6526c66c726f4
7
+ data.tar.gz: 2fee72c650f535cfc0cc38342c70b89ddcfe86c36fb6543bd3fcf8cbb88a72d5b5611dfb8eaa93c70621c50c43ae8293e7194aaea65c89c0420fe899773e21c8
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
- require 'rubygems' unless defined?(Gem)
3
- require 'bundler/setup' if %w(Gemfile .components).all? { |f| File.exist?(f) }
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
@@ -6,7 +6,7 @@
6
6
  #
7
7
  module Padrino
8
8
  # The version constant for the current version of Padrino.
9
- VERSION = '0.12.7' unless defined?(Padrino::VERSION)
9
+ VERSION = '0.12.8' unless defined?(Padrino::VERSION)
10
10
 
11
11
  #
12
12
  # The current 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.12.7
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-05-25 00:00:00.000000000 Z
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.7
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.7
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.5.1
241
+ rubygems_version: 2.6.4
241
242
  signing_key:
242
243
  specification_version: 4
243
244
  summary: The required Padrino core gem