poms 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dccdc2780462de90296dda670e17e107b71905cb
4
- data.tar.gz: d691d12eaa202695c16f998561faf77e108031b0
3
+ metadata.gz: 00ab9cce38b12ee17ca704abf46808b3d0562091
4
+ data.tar.gz: 175e9d570b19b23685040600356d41ffef65671c
5
5
  SHA512:
6
- metadata.gz: 6fe92626ff7a206431796f435a2498fb8b7a5f17f55fe4a70d05ab358c95028ac5707e4d3a102a9286ca7d7d534dcb5fe8b807130e1cbac961bba09b7dba3423
7
- data.tar.gz: cfd565f94e8f6a6e331a30e590b3b533b630c19d869bfb8256ec351bbc366b3628cbf8b8856482e618dc7fd4df073b74c3ec7fa756422b214fe7f32c13b8352e
6
+ metadata.gz: a77fd94b2ed70bfa5160be1b57df107da8a71769dc303d79d2f41097c7888ecf05c7f637f2922bb55cdc4e0e2c7412ac515d13280a7fb2eb73c38be72b0a7205
7
+ data.tar.gz: d163d7b2e147e3a026d1a649478857dd43cfc799b4d71018b6f2b8c7ae9e38d691e00e0a9380319e4c939cb85bd074e4729664168dd790b2f03e7b071c6b5186
data/Rakefile CHANGED
@@ -5,3 +5,8 @@ RSpec::Core::RakeTask.new
5
5
 
6
6
  task :default => :spec
7
7
  task :test => :spec
8
+
9
+ desc "Open an irb session preloaded with this library"
10
+ task :console do
11
+ sh "irb -rubygems -I lib -r poms.rb"
12
+ end
@@ -111,14 +111,14 @@ module Poms
111
111
  end
112
112
 
113
113
  def get_json(uri)
114
- get_bare_json([URL, uri].join)
114
+ get_bare_json(URI.escape([URL, uri].join))
115
115
  end
116
116
 
117
117
  private
118
118
 
119
119
  def get_bare_json(uri)
120
120
  begin
121
- JSON.parse(open(URI.escape(uri)).read)
121
+ JSON.parse(open(uri).read)
122
122
  rescue OpenURI::HTTPError => e
123
123
  raise e unless e.message.match(/404/)
124
124
  nil
@@ -1,3 +1,3 @@
1
1
  module Poms
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -22,7 +22,7 @@ describe Poms do
22
22
 
23
23
  it "fetches a group" do
24
24
  response = File.read 'spec/fixtures/poms_broadcast.json'
25
- url = 'http://docs.poms.omroep.nl/media/_design/media/_view/by-group?include_docs=true&key=%2522POMS_S_NPO_823012%2522&reduce=false'
25
+ url = 'http://docs.poms.omroep.nl/media/_design/media/_view/by-group?include_docs=true&key=%22POMS_S_NPO_823012%22&reduce=false'
26
26
  FakeWeb.register_uri(:get, url, body: response)
27
27
  expect(Poms.fetch_group('POMS_S_NPO_823012')).to eq(JSON.parse response)
28
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Kruijsen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-03-30 00:00:00.000000000 Z
13
+ date: 2015-03-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler