StormRETS 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/stormrets.rb +4 -13
  2. metadata +11 -6
data/lib/stormrets.rb CHANGED
@@ -1,16 +1,13 @@
1
-
2
1
  require 'rubygems'
3
2
  require 'httparty'
4
- require 'json'
5
3
 
6
4
  class StormRETS
7
5
  include HTTParty
8
6
  #debug_output $stdout
9
7
 
10
- attr_accessor :sub_domain, :api_key, :end_point, :format
8
+ attr_accessor :api_key, :end_point, :format
11
9
 
12
- def initialize(sub_domain, api_key, end_point, format)
13
- @sub_domain = sub_domain
10
+ def initialize(api_key, end_point, format)
14
11
  @api_key = api_key
15
12
  @end_point = end_point
16
13
  @format = format
@@ -18,12 +15,6 @@ class StormRETS
18
15
 
19
16
  def search(options={})
20
17
  options.merge!({:apikey => @api_key})
21
- data = self.class.get("http://#{@sub_domain}.stormrets.com#{@end_point}.#{@format}", :query => options)
22
- if @format == "json"
23
- return JSON.parse(data)
24
- else
25
- return data
26
- end
18
+ data = self.class.get("http://www.stormrets.com#{@end_point}.#{@format}", :query => options)
27
19
  end
28
-
29
- end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: StormRETS
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,19 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-07 00:00:00.000000000 Z
12
+ date: 2012-06-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
16
- requirement: &70150066910240 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.8.1
21
+ version: 0.8.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70150066910240
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.8.3
25
30
  description: A simple Ruby Gem for accessing the StormRETS Api based on httparty
26
31
  email: paul@stormrets.com
27
32
  executables: []
@@ -49,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
54
  version: '0'
50
55
  requirements: []
51
56
  rubyforge_project:
52
- rubygems_version: 1.8.5
57
+ rubygems_version: 1.8.23
53
58
  signing_key:
54
59
  specification_version: 3
55
60
  summary: StormRETS Ruby IDX Gem