Adds multi_json gem as a dependency and loads it automatically #96

Merged
merged 2 commits into from Aug 16, 2013

Projects

None yet

3 participants

@kgrz
Member
kgrz commented Mar 29, 2013
  • Loads the "multi_json" gem automatically so that the user need not bother with that
  • Loads the helpers automatically in modular-style apps. These are loaded automatically in classic style code (check lib/sinatra/contrib.rb) and this change preserves consistency of style.
  • Adds multi_json gem as dependency. Some tests fails since "yajl-ruby" is used. This is added as a development dependency.
@kgrz kgrz Adds multi_json gem as a dependency and loads it automatically
* Loads the "multi_json" gem automatically so that the user need not
* bother

* Loads the helpers automatically in modular-style apps. These are
* loaded automatically in classic style code (check
* lib/sinatra/contrib.rb) and this change preserves consistency of
* style.

* Adds multi_json gem as dependency. Some tests fails since "yajl-ruby"
* is used. This is added as a development dependency.
89e88b5
@kgrz
Member
kgrz commented Mar 29, 2013

Note: Before merging the changes, I'd like to point out that one spec failed with the latest Sinatra. Fiddled around with loading a different sinatra version but I'm not sure if I was able to do it properly.

......................................................................................................................................................................................
...........................................................................................................F.........................................................................
......................................................................................................................................................................................
......................................................................................................................................................................................
................................................................................................

Failures:

  1) Sinatra::Decompile
     Failure/Error: it { should decompile(":name.:format") }
       expected Sinatra::Application to decompile 
       /\A((?:[^\.\/?#%]|(?:%[^2].|%[2][^Ee]))+)(?:\.|%2[Ee])((?:[^\/?#%]|(?:%[^2].|%[2][^Ee]))+)\z/ 
       with ["name", "format"] 
       to ":name.:format", 
       but was /\A((?:[^\.\/?#%]|(?:%[^2].|%[2][^Ee]))+)(?:\.|%2[Ee])((?:[^\/?#%]|(?:%[^2].|%[2][^Ee]))+)\z/
     # ./spec/decompile_spec.rb:30:in `block (2 levels) in <top (required)>'

Finished in 4.85 seconds
824 examples, 1 failure

Failed examples:

rspec ./spec/decompile_spec.rb:30 # Sinatra::Decompile
@kgrz kgrz referenced this pull request Apr 2, 2013
Closed

Doesn't work with sinatra 1.4 #98

@zzak
Member
zzak commented Aug 11, 2013

I have no problem with this patch, since it's already used internally, why not at least make it dependency?

If noone objects I will merge this.

@tedpennings

+1

@zzak zzak added a commit that referenced this pull request Aug 16, 2013
@zzak zzak merge #96 33c19ce
@zzak zzak merged commit 34d693f into sinatra:master Aug 16, 2013

1 check failed

Details default The Travis build could not complete due to an error
@zzak zzak added a commit to zzak/sinatra-contrib that referenced this pull request Jul 22, 2016
@zzak zzak merge #96 cdc3338
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment