debian/0000755000000000000000000000000012324653056007174 5ustar debian/changelog0000644000000000000000000000023712324653056011050 0ustar ruby-fog-json (1.0.0-1) unstable; urgency=low * Initial release (Closes: #743643) -- Pirate Praveen Sun, 20 Apr 2014 10:37:55 +0530 debian/copyright0000644000000000000000000000247712324651167011142 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: fog-json Source: http://rubygems.org/gems/fog-json Files: * Copyright: 2014 Wes Beary License: Expat Files: debian/* Copyright: 2014 Praveen Arimbrathodiyil License: Expat License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/control0000644000000000000000000000172312324652617010604 0ustar Source: ruby-fog-json Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Pirate Praveen Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.7.5~), ruby-multi-json, ruby-fog-core, ruby-minitest Standards-Version: 3.9.5 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-fog-json.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-fog-json.git;a=summary Homepage: http://github.com/fog/fog-json XS-Ruby-Versions: all Package: ruby-fog-json Architecture: all XB-Ruby-Versions: ${ruby:Versions} Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, ruby-multi-json Description: JSON parsing for fog providers Extraction of the JSON parsing tools shared between a number of providers in the 'fog' gem. . This library allows a standard interface to JSON encoding and decoding on top of MultiJson but with errors support. debian/ruby-fog-json.docs0000644000000000000000000000001212324651737012544 0ustar README.md debian/patches/0000755000000000000000000000000012324651167010624 5ustar debian/patches/skip-encoding-test.patch0000644000000000000000000000312312324651167015353 0ustar Description: skip encoding tests due to incompatibilities with ruby versions Forwarded: yes Bug-Upstream: https://github.com/fog/fog-json/issues/3 --- a/test/json_decode_test.rb +++ b/test/json_decode_test.rb @@ -2,12 +2,15 @@ require "fog/json" class TestJSONDecoding < Minitest::Test - def test_decode_with_valid_string - @json = %q{{"key":"value", "array": ["one", "two", "three"]}} - @expected = { - "key" => "value", - "array" => %W(one two three) - } + def test_decode_array + @json = %q{["one", "two", "three"]} + @expected = %w(one two three) + assert_equal @expected, Fog::JSON.decode(@json) + end + + def test_decode_hash + @json = %q{{"key":"value"}} + @expected = { "key" => "value" } assert_equal @expected, Fog::JSON.decode(@json) end --- a/test/json_encode_test.rb +++ b/test/json_encode_test.rb @@ -2,16 +2,22 @@ require "fog/json" class TestJSONEncoding < Minitest::Test - def test_encode_with_valid_hash + def test_encode_array + @array = %W(one two three) + @expected = %q{["one","two","three"]} + assert_equal @expected, Fog::JSON.encode(@array) + end + + def test_encode_hash @hash = { - "key" => "value", - "array" => %W(one two three) + "key" => "value" } - @expected = %q{{"key":"value","array":["one","two","three"]}} + @expected = %q{{"key":"value"}} assert_equal @expected, Fog::JSON.encode(@hash) end def test_encode_with_bad_input + skip if %w(1.8.7 2.0.0).include?(RUBY_VERSION) assert_raises(Fog::JSON::EncodeError) { Fog::JSON.encode("\x82\xAC\xEF") } end end debian/patches/series0000644000000000000000000000003112324651167012033 0ustar skip-encoding-test.patch debian/ruby-test-files.yaml0000644000000000000000000000012712324651167013117 0ustar --- - test/json_decode_test.rb - test/json_encode_test.rb - test/json_sanitize_test.rb debian/compat0000644000000000000000000000000212324651167010373 0ustar 7 debian/watch0000644000000000000000000000014512324651167010226 0ustar version=3 http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/fog-json .*/fog-json-(.*).tar.gz debian/rules0000755000000000000000000000067712324651167010267 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 # # Uncomment to ignore all test failures (but the tests will run anyway) #export DH_RUBY_IGNORE_TESTS=all # # Uncomment to ignore some test failures (but the tests will run anyway). # Valid values: #export DH_RUBY_IGNORE_TESTS=ruby2.0 ruby2.1 require-rubygems # # If you need to specify the .gemspec (eg there is more than one) #export DH_RUBY_GEMSPEC=gem.gemspec %: dh $@ --buildsystem=ruby --with ruby debian/source/0000755000000000000000000000000012324651121010463 5ustar debian/source/format0000644000000000000000000000001412324651167011703 0ustar 3.0 (quilt)