File tree Expand file tree Collapse file tree 4 files changed +6
-16
lines changed
Expand file tree Collapse file tree 4 files changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -240,8 +240,6 @@ gon.rabl :as => 'alias'
240240
241241Use gon with [Jbuilder](https://github.com/rails/jbuilder) as with [Rabl](https://guthub.com/nesquena/rabl):
242242
243- Jbuilder works now only on Ruby 1.9+, so Gon support for Jbuilder works on 1.9+ only
244-
245243 0. Add jbuilder to your Gemfile (because of it depends on
246244 ActiveSuppurt ' ~ > 3.0 .0 ' )
247245
@@ -304,13 +302,13 @@ wouldn't work. You can read about this in common usage above.
304302Puts this line into ` Gemfile ` then run ` $ bundle ` :
305303
306304``` ruby
307- gem ' gon' , ' 2.2.2 '
305+ gem ' gon' , ' 2.3.0 '
308306```
309307
310308Or if you are old-school Rails 2 developer put this into ` config/environment.rb ` and run ` $ rake gems:install ` :
311309
312310``` ruby
313- config.gem ' gon' , :version => ' 2.2.2 '
311+ config.gem ' gon' , :version => ' 2.3.0 '
314312```
315313
316314Or manually install gon gem: ` $ gem install gon `
Original file line number Diff line number Diff line change 1- if RUBY_VERSION > '1.9' && defined? ( Jbuilder )
1+ if defined? ( Jbuilder )
22 gem 'blankslate'
33end
44require 'action_view'
1010if defined? ( Rabl )
1111 require 'gon/rabl'
1212end
13- if RUBY_VERSION > '1.9' && defined? ( Jbuilder )
13+ if defined? ( Jbuilder )
1414 require 'gon/jbuilder'
1515end
1616
Original file line number Diff line number Diff line change 11module Gon
2- VERSION = '2.2.2 '
2+ VERSION = '2.3.0 '
33end
Original file line number Diff line number Diff line change 7373 Gon . clear
7474 lambda { Gon . all_variables = 123 } . should raise_error
7575 lambda { Gon . rabl = 123 } . should raise_error
76+ lambda { Gon . request = 123 } . should raise_error
7677 end
7778
7879 describe '.rabl' do
142143
143144 end
144145
145- if RUBY_VERSION > '1.9'
146146 require 'jbuilder'
147147 require 'gon/jbuilder'
148148
170170
171171 end
172172
173- it 'should throw error if you use gon.jbuilder with ruby < 1.9+' do
174- RUBY_VERSION = '1.8.7'
175-
176- expect { Gon . jbuilder 'some_path' } . to raise_error ( NoMethodError , /1.9/ )
177- end
178-
179173 it 'should raise error if you use gon.jbuilder without requiring jbuilder gem' do
180- RUBY_VERSION = '1.9.2'
181174 Gon . send ( :remove_const , :Jbuilder )
182175
183176 expect { Gon . jbuilder 'some_path' } . to raise_error ( NameError )
220213 end
221214 end
222215
223- end
224216
225217 def request
226218 @request ||= double 'request' , :env => { }
You can’t perform that action at this time.
0 commit comments