bananajour 2.2 → 2.2.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.
data/Rakefile CHANGED
@@ -1,9 +1,7 @@
1
- require "rubygems"
2
-
3
1
  $:.unshift "#{File.dirname(__FILE__)}/lib"
4
2
 
5
- require "bananajour/version"
6
3
  require "bananajour/gem_dependencies"
4
+ require "bananajour/version"
7
5
 
8
6
  gem = Gem::Specification.new do |gem|
9
7
  gem.name = "bananajour"
@@ -1,8 +1,10 @@
1
+ require 'rubygems'
2
+
1
3
  module Bananajour
2
4
  # DRYs version number dependencies and provides a simple way require them
3
5
  module GemDependencies
4
6
  DEPENDENCIES = [
5
- %w( sinatra 0.9.2 ),
7
+ %w( sinatra 0.9.4 ),
6
8
  %w( json 1.1.7 ),
7
9
  %w( fancypath 0.5.13 ),
8
10
  %w( rainbow 1.0.1 ),
@@ -1,3 +1,3 @@
1
1
  module Bananajour
2
- VERSION = '2.2'
2
+ VERSION = '2.2.1'
3
3
  end
data/lib/bananajour.rb CHANGED
@@ -66,6 +66,11 @@ module Bananajour
66
66
 
67
67
  def host_name
68
68
  hn = Socket.gethostname
69
+
70
+ # if there is more than one period in the hostname then assume it's a FQDN
71
+ # and the user knows what they're doing
72
+ return hn if hn.count('.') > 1
73
+
69
74
  if hn =~ /\.local$/
70
75
  hn
71
76
  else
data/sinatra/app.rb CHANGED
@@ -2,14 +2,9 @@ Thread.abort_on_exception = true
2
2
 
3
3
  __DIR__ = File.dirname(__FILE__)
4
4
 
5
- require 'rubygems'
6
-
7
5
  require "#{__DIR__}/../lib/bananajour"
8
6
 
9
- Bananajour.require_gem 'rack'
10
-
11
- # Must require 'sinatra' from this file for Sinatra's magic to pick up lots of free stuff
12
- Bananajour::GemDependencies.for_name('sinatra').require_gem
7
+ Bananajour.gem 'sinatra'
13
8
  require 'sinatra'
14
9
 
15
10
  Bananajour.require_gem 'haml'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bananajour
3
3
  version: !ruby/object:Gem::Version
4
- version: "2.2"
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Lucas
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-14 00:00:00 +11:00
12
+ date: 2009-10-15 00:00:00 +11:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - "="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.9.2
23
+ version: 0.9.4
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json