utopia 0.12.2 → 0.12.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YjM5MDIzOGE4YTMyZDkzNzYzOTQ1ZWZjOGUxYTZmMzhjMGU1ZjY2Mw==
5
- data.tar.gz: !binary |-
6
- ZTA1MGI2OWUwNGNjN2Y3ODBkZDkwMTA1OGI5NTc4M2Q3MjA0ODlhNA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MmViNDIxNmI1MDU2YTQ5OGRkM2EwMmU4ZjhhZGMxMzVhYmE0NTFlZTEzNGYx
10
- NzQzNjQ4ZjRhNDUzOGI5NzViMDU2MGUwMjMyYjZmZTZlNDRhYTUxZGZhYTEw
11
- OGFiZjZkNWQzYzg2YWVmNjI1YTYyYTliNjU2M2EwNWI4ZGNjMmI=
12
- data.tar.gz: !binary |-
13
- YjE5YjhjMjAwNzY5YmY4YzRlNjVlZDM0NGZkNjMyMWJiZmU1Y2JkNDU1ZWRh
14
- MDU0NzdhYzFlY2IxM2FiOTI1MzI0YTFiZDkzYjVlMTg3NmZiMTUxYzJjNTE1
15
- MGQ1N2IwYTg2MzBkMDNhMDRiMjMxNTMzMjM1NDU4NWQzMmQ3N2I=
2
+ SHA1:
3
+ metadata.gz: 271d2102878ce11155fd1c8905e9093ab8f2b541
4
+ data.tar.gz: 6b058e1af05e631835443ba824697f665d16db81
5
+ SHA512:
6
+ metadata.gz: 140ca674a905f79bc81c5227fd1de2215818912027374343d89c73d50219335fd46e86a8d29f5fcb67daa409d8c152d80004e260d1233be68200aa4961c9ceee
7
+ data.tar.gz: 4bbfe5c730fa0415880285ac28d178b297ea8330fa3c0ba6837eab812ac97b0e2b71ead6753f941275e7d646adb7b77db5d2b19c63fb174e1ffef6147f5bedf9
@@ -1,9 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "1.8.7"
4
3
  - "1.9.3"
5
4
  - "2.0"
6
- - jruby-18mode # JRuby in 1.8 mode
7
- - jruby-19mode # JRuby in 1.9 mode
8
- - rbx-18mode
9
- - rbx-19mode
5
+ - "2.1"
data/Gemfile CHANGED
@@ -5,4 +5,9 @@ gemspec
5
5
 
6
6
  group :test do
7
7
  gem "rake"
8
+ gem "minitest"
9
+ end
10
+
11
+ group :development do
12
+ gem "thin"
8
13
  end
@@ -29,7 +29,7 @@ require 'trenni/template'
29
29
 
30
30
  module Utopia
31
31
  module Middleware
32
-
32
+
33
33
  class Content
34
34
  def initialize(app, options = {})
35
35
  @app = app
@@ -144,6 +144,7 @@ module Utopia
144
144
  end
145
145
 
146
146
  node.process!(request, response, attributes)
147
+
147
148
  return response.finish
148
149
  end
149
150
  else
@@ -60,9 +60,9 @@ module Utopia
60
60
 
61
61
  attr :deferred
62
62
 
63
- def defer(&block)
63
+ def defer(value = nil, &block)
64
64
  @deferred << block
65
-
65
+
66
66
  Tag.closed("deferred", :id => @deferred.size - 1).to_html
67
67
  end
68
68
 
@@ -217,6 +217,16 @@ module Utopia
217
217
  current.cdata(text)
218
218
  end
219
219
 
220
+ def deferred_tag(*args, &block)
221
+ if block_given?
222
+ current.defer(&block)
223
+ else
224
+ current.defer do
225
+ tag(*args)
226
+ end
227
+ end
228
+ end
229
+
220
230
  def tag_end(tag = nil)
221
231
  top = current
222
232
 
@@ -218,7 +218,7 @@ module Utopia
218
218
  elsif options[:content]
219
219
  body = [options[:content]]
220
220
  elsif status >= 300
221
- body = [Utopia::HTTP::STATUS_DESCRIPTIONS[status] || 'Status #{status}']
221
+ body = [Utopia::HTTP::STATUS_DESCRIPTIONS[status] || "Status #{status}"]
222
222
  end
223
223
 
224
224
  # Utopia::LOG.debug([status, headers, body].inspect)
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Utopia
22
- VERSION = "0.12.2"
22
+ VERSION = "0.12.3"
23
23
  end
@@ -18,11 +18,12 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
- require 'test/unit'
21
+ require 'minitest/autorun'
22
+
22
23
  require 'rack/mock'
23
24
  require 'utopia/middleware/content'
24
25
 
25
- class TestContentMiddleware < Test::Unit::TestCase
26
+ class TestContentMiddleware < MiniTest::Test
26
27
  APP = lambda {|env| [404, [], []]}
27
28
 
28
29
  class TestDelegate
@@ -18,11 +18,12 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
- require 'test/unit'
21
+ require 'minitest/autorun'
22
+
22
23
  require 'rack/mock'
23
24
  require 'utopia/middleware/controller'
24
25
 
25
- class TestControllerMiddleware < Test::Unit::TestCase
26
+ class TestControllerMiddleware < MiniTest::Test
26
27
  APP = lambda {|env| [404, [], []]}
27
28
 
28
29
  class TestController < Utopia::Middleware::Controller::Base
@@ -18,10 +18,10 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
- require 'test/unit'
21
+ require 'minitest/autorun'
22
22
  require 'utopia/path'
23
23
 
24
- class TestPath < Test::Unit::TestCase
24
+ class TestPath < MiniTest::Test
25
25
  def test_absolute_path_concatenation
26
26
  root = Utopia::Path["/"]
27
27
 
@@ -29,4 +29,3 @@ class TestPath < Test::Unit::TestCase
29
29
  assert_equal Utopia::Path["/foo/bar"], (root + Utopia::Path["foo/bar"])
30
30
  end
31
31
  end
32
-
@@ -3,30 +3,30 @@ lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'utopia/version'
5
5
 
6
- Gem::Specification.new do |gem|
7
- gem.name = "utopia"
8
- gem.version = Utopia::VERSION
9
- gem.authors = ["Samuel Williams"]
10
- gem.email = ["samuel.williams@oriontransfer.co.nz"]
11
- gem.description = <<-EOF
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "utopia"
8
+ spec.version = Utopia::VERSION
9
+ spec.authors = ["Samuel Williams"]
10
+ spec.email = ["samuel.williams@oriontransfer.co.nz"]
11
+ spec.description = <<-EOF
12
12
  Utopia is a website generation framework which provides a robust set of tools
13
13
  to build highly complex dynamic websites. It uses the filesystem heavily for
14
14
  content and provides frameworks for interacting with files and directories as
15
15
  structure representing the website.
16
16
  EOF
17
- gem.summary = %q{Utopia is a framework for building dynamic content-driven websites.}
18
- gem.homepage = "https://github.com/ioquatix/utopia"
17
+ spec.summary = %q{Utopia is a framework for building dynamic content-driven websites.}
18
+ spec.homepage = "https://github.com/ioquatix/utopia"
19
19
 
20
- gem.files = `git ls-files`.split($/)
21
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
22
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
23
- gem.require_paths = ["lib"]
20
+ spec.files = `git ls-files`.split($/)
21
+ spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
22
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
23
+ spec.require_paths = ["lib"]
24
24
 
25
- gem.add_dependency "trenni", "~> 1.2.0"
26
- gem.add_dependency "mime-types"
25
+ spec.add_dependency "trenni", "~> 1.2.0"
26
+ spec.add_dependency "mime-types"
27
27
 
28
- gem.add_dependency "rack", "~> 1.4"
29
- gem.add_dependency "rack-cache"
28
+ spec.add_dependency "rack", "~> 1.4"
29
+ spec.add_dependency "rack-cache"
30
30
 
31
- gem.add_dependency "mail"
31
+ spec.add_dependency "mail"
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utopia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.2
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-15 00:00:00.000000000 Z
11
+ date: 2014-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trenni
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: mime-types
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
@@ -56,31 +56,31 @@ dependencies:
56
56
  name: rack-cache
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mail
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ! '>='
73
+ - - '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ! '>='
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- description: ! "\t\tUtopia is a website generation framework which provides a robust
83
+ description: "\t\tUtopia is a website generation framework which provides a robust
84
84
  set of tools\n\t\tto build highly complex dynamic websites. It uses the filesystem
85
85
  heavily for\n\t\tcontent and provides frameworks for interacting with files and
86
86
  directories as\n\t\tstructure representing the website.\n"
@@ -164,17 +164,17 @@ require_paths:
164
164
  - lib
165
165
  required_ruby_version: !ruby/object:Gem::Requirement
166
166
  requirements:
167
- - - ! '>='
167
+ - - '>='
168
168
  - !ruby/object:Gem::Version
169
169
  version: '0'
170
170
  required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  requirements:
172
- - - ! '>='
172
+ - - '>='
173
173
  - !ruby/object:Gem::Version
174
174
  version: '0'
175
175
  requirements: []
176
176
  rubyforge_project:
177
- rubygems_version: 2.0.2
177
+ rubygems_version: 2.0.3
178
178
  signing_key:
179
179
  specification_version: 4
180
180
  summary: Utopia is a framework for building dynamic content-driven websites.
@@ -184,3 +184,4 @@ test_files:
184
184
  - test/test_content_middleware.rb
185
185
  - test/test_controller_middleware.rb
186
186
  - test/test_path.rb
187
+ has_rdoc: