Skip to content

Commit df9b004

Browse files
committed
Merge master into here
Conflicts: lib/gon.rb
1 parent 9b9494a commit df9b004

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,6 @@ gon.rabl :as => 'alias'
240240
241241
Use 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.
304302
Puts this line into `Gemfile` then run `$ bundle`:
305303

306304
``` ruby
307-
gem 'gon', '2.2.2'
305+
gem 'gon', '2.3.0'
308306
```
309307

310308
Or 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

316314
Or manually install gon gem: `$ gem install gon`

lib/gon.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if RUBY_VERSION > '1.9' && defined?(Jbuilder)
1+
if defined?(Jbuilder)
22
gem 'blankslate'
33
end
44
require 'action_view'
@@ -10,7 +10,7 @@
1010
if defined?(Rabl)
1111
require 'gon/rabl'
1212
end
13-
if RUBY_VERSION > '1.9' && defined?(Jbuilder)
13+
if defined?(Jbuilder)
1414
require 'gon/jbuilder'
1515
end
1616

lib/gon/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Gon
2-
VERSION = '2.2.2'
2+
VERSION = '2.3.0'
33
end

spec/gon/gon_spec.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
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
@@ -142,7 +143,6 @@
142143

143144
end
144145

145-
if RUBY_VERSION > '1.9'
146146
require 'jbuilder'
147147
require 'gon/jbuilder'
148148

@@ -170,14 +170,7 @@
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)
@@ -220,7 +213,6 @@
220213
end
221214
end
222215

223-
end
224216

225217
def request
226218
@request ||= double 'request', :env => {}

0 commit comments

Comments
 (0)