weatai 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ module CWB
7
7
  class CWBApi
8
8
  URL = 'http://opendata.cwb.gov.tw/opendataapi'
9
9
 
10
- def self.config(credentials)
10
+ def self.config=(credentials)
11
11
  @config ? @config.update(credentials) : @config = credentials
12
12
  end
13
13
 
@@ -1,3 +1,3 @@
1
1
  module CWB
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
data/spec/weatai_spec.rb CHANGED
@@ -7,7 +7,7 @@ describe 'CWB specifications' do
7
7
  c.cassette_library_dir = 'cassettes'
8
8
  c.hook_into :webmock
9
9
 
10
- c.filter_sensitive_data('<KEY>') { CREDENTIALS[:key] }
10
+ # c.filter_sensitive_data('<KEY>') { CREDENTIALS[:key] }
11
11
  end
12
12
 
13
13
  before do
@@ -20,16 +20,12 @@ describe 'CWB specifications' do
20
20
  VCR.eject_cassette
21
21
  end
22
22
 
23
-
24
23
  # test 01
25
24
  it 'should be able to get raw info' do
26
- # testCWBApi = @cwb_api
27
- # testCWBApi.raw_info.wont_be_emptypi
28
- testCWB = CWB::Weather.find(dataid: 'O-A0003-001')
29
- testCWBA.instant_weather.wont_be_empty
30
-
25
+ # CWB::CWBApi.config
26
+ CWB::CWBApi.raw_info('O-A0003-001').wont_be_empty
31
27
  end
32
-
28
+ =begin
33
29
  #test 02
34
30
  it 'should be able to download the data file in hash format)' do
35
31
  CWB_RESPONSE.kind_of?(Hash).must_equal true
@@ -43,7 +39,7 @@ describe 'CWB specifications' do
43
39
  )
44
40
  testWeather.instant_weather.kind_of?(Hash).must_equal true
45
41
  end
46
- =begin
42
+
47
43
  #test 04
48
44
  it 'should get name of every Weather Stations' do
49
45
  testWeather = CWB::Weather.new(
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weatai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - soainfinite888
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-31 00:00:00.000000000 Z
11
+ date: 2016-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http