rabl 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.8.3
4
+
5
+ * Closes #421 bug with locals in engine
6
+
3
7
  ## 0.8.2
4
8
 
5
9
  * Passing locals when rendering templates via partials or inheritance (Thanks @simsalabim)
@@ -4,6 +4,7 @@ gem "rails", "~> 2.3.18"
4
4
  gem "sqlite3", :require => "sqlite3"
5
5
  gem 'json'
6
6
  gem 'rabl', :path => File.expand_path(File.dirname(__FILE__) + "/../../")
7
+ gem 'rake', "~> 0.9.2.2"
7
8
 
8
9
  gem 'riot', :group => "test"
9
10
  gem 'rack-test', :require => "rack/test", :group => "test"
@@ -9,7 +9,7 @@
9
9
  #
10
10
  # It's strongly recommended to check this file into your version control system.
11
11
 
12
- ActiveRecord::Schema.define(:version => 20111002075112) do
12
+ ActiveRecord::Schema.define(:version => 20111002092024) do
13
13
 
14
14
  create_table "phone_numbers", :force => true do |t|
15
15
  t.integer "user_id"
data/lib/rabl/engine.rb CHANGED
@@ -21,9 +21,9 @@ module Rabl
21
21
  # Rabl::Engine.new("...source...", { :format => "xml" }).render(scope, { :foo => "bar", :object => @user })
22
22
  def render(scope, locals, &block)
23
23
  reset_options!
24
- locals.merge!(locals.delete(:locals) || {})
25
24
  @_locals, @_scope = locals, scope
26
25
  self.copy_instance_variables_from(@_scope, [:@assigns, :@helpers])
26
+ locals.merge!(locals.delete(:locals) || {})
27
27
  locals.each { |k,v| instance_variable_set(:"@#{k}", v) }
28
28
  @_options[:scope] = @_scope
29
29
  @_options[:format] ||= self.request_format
data/lib/rabl/template.rb CHANGED
@@ -20,7 +20,7 @@ if defined?(Tilt)
20
20
  end
21
21
 
22
22
  # Rails 2.X Template
23
- if defined?(ActionView) && defined?(Rails) && Rails.version =~ /^2/
23
+ if defined?(ActionView) && defined?(Rails) && Rails.version.to_s =~ /^2/
24
24
  require 'action_view/base'
25
25
  require 'action_view/template'
26
26
 
@@ -41,7 +41,7 @@ if defined?(ActionView) && defined?(Rails) && Rails.version =~ /^2/
41
41
  end
42
42
 
43
43
  # Rails 3.X Template
44
- if defined?(ActionView) && defined?(Rails) && Rails.version =~ /^[34]/
44
+ if defined?(ActionView) && defined?(Rails) && Rails.version.to_s =~ /^[34]/
45
45
  module ActionView
46
46
  module Template::Handlers
47
47
  class Rabl
data/lib/rabl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rabl
2
- VERSION = "0.8.2"
2
+ VERSION = "0.8.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-27 00:00:00.000000000 Z
12
+ date: 2013-04-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -421,7 +421,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
421
421
  version: '0'
422
422
  segments:
423
423
  - 0
424
- hash: 1400362274549242151
424
+ hash: -2575398568646431341
425
425
  required_rubygems_version: !ruby/object:Gem::Requirement
426
426
  none: false
427
427
  requirements:
@@ -430,7 +430,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
430
430
  version: '0'
431
431
  segments:
432
432
  - 0
433
- hash: 1400362274549242151
433
+ hash: -2575398568646431341
434
434
  requirements: []
435
435
  rubyforge_project: rabl
436
436
  rubygems_version: 1.8.25