hyperscore 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/hyperscore.rb CHANGED
@@ -6,5 +6,4 @@ module Hyperscore
6
6
  # Your code goes here...
7
7
  end
8
8
 
9
- require_relative 'hyperscore/client'
10
- require_relative 'hyperscore/coercions'
9
+ require_relative 'hyperscore/client'
@@ -1,15 +1,20 @@
1
1
  require 'hyperclient'
2
2
 
3
+ require_relative 'coercions'
4
+
3
5
  module Hyperscore
4
6
 
5
7
  class Client
6
8
  include Hyperclient
7
9
 
8
- entry_point 'http://cs-api.heroku.com/api/'
10
+ #entry_point 'http://cs-api.heroku.com/api/'
11
+ entry_point 'http://cyberscore.dev/api'
9
12
 
10
13
  def news
11
14
  links.news.resources.news.map do |news|
12
- Hyperscore::Coercions::News.new( news.attributes )
15
+ Hyperscore::Coercions::News.new( news.attributes.merge({
16
+ :source => news.url
17
+ }) )
13
18
  end
14
19
  end
15
20
 
@@ -1,4 +1,5 @@
1
1
  require 'virtus'
2
+ require 'uri'
2
3
 
3
4
  module Hyperscore::Coercions
4
5
 
@@ -8,6 +9,7 @@ module Hyperscore::Coercions
8
9
  attribute :id, Integer
9
10
  attribute :headline, String
10
11
  attribute :date, Date
12
+ attribute :source, String
11
13
  end
12
14
 
13
15
  end
@@ -1,3 +1,3 @@
1
1
  module Hyperscore
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyperscore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: