waqi 0.0.1 → 0.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3c007eefec0933a9ee71b23f34d1e10fb8ab735c
4
- data.tar.gz: e42046b21152bf858860b241a2ae7e69506c1621
2
+ SHA256:
3
+ metadata.gz: 4c5b7b54fd42bfdfe74341dc7c3088098aa5d3bb1a173812ec326579b893e80b
4
+ data.tar.gz: 7deac837de5eaf81ac0d690b97c2f81d4a4acb1e46d9be4d4e754199871a94c6
5
5
  SHA512:
6
- metadata.gz: f28fab63e0a514ecf219ead617a9e66beb8d01cec590fec892978fd4b2636265f54169578308366555ab577f90116554e4a5fd7f00f3e45f3dc77553226c1e8a
7
- data.tar.gz: 9f2886682a72158aa1af31d4addfa8d2bfbe2e07f3fdd3cd0177f8a98016a26ff5e4cfeef0b91eb92e6d0d33ddd94c8c4b4d39e48df5175aa5616ac9264c4641
6
+ metadata.gz: f3f30dd476fbb2b583b90803713d9313fc8c67f5d46d505e60813f8abd239c6f9f10ba3135943d72212aab4ac75eb71663f56f397b0f7b267224ee5129176931
7
+ data.tar.gz: a993ced92428ae26023d174a1bf1fd4f0452d0f506f9aa758bee10cb44e92254790a3dfc55ab87f1d701f00103c52b4cf3b13ddfcff31810527efeefc3c07b97
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 Luis Ezcurdia
3
+ Copyright (c) 2019 Luis Ezcurdia
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,7 +1,11 @@
1
1
  # Waqi
2
- [![Build Status](https://travis-ci.org/3zcurdia/waqi.svg?branch=master)](https://travis-ci.org/3zcurdia/waqi)
2
+ [![CI](https://github.com/3zcurdia/waqi/actions/workflows/ci.yml/badge.svg)](https://github.com/3zcurdia/waqi/actions/workflows/ci.yml)
3
3
 
4
- Air Quality Open Data Platform gem wrapper
4
+ [Air Quality Open Data Platform](http://aqicn.org/api/) ruby wrapper
5
+
6
+ ## Requirements
7
+
8
+ Ruby >= 4.0.0
5
9
 
6
10
  ## Installation
7
11
 
@@ -19,7 +23,59 @@ Or install it yourself as:
19
23
 
20
24
  ## Usage
21
25
 
22
- TODO: Write usage instructions here
26
+ Initialize the client
27
+
28
+ ```ruby
29
+ require 'waqi'
30
+ client = Waqi::Client.new(token: 'secret token')
31
+ ```
32
+ City feed, it returns StationData
33
+
34
+ ```ruby
35
+ client.city_feed('shanghai')
36
+ ```
37
+
38
+ Station feed, it returns StationData
39
+
40
+ ```ruby
41
+ client.station_feed(400)
42
+ ```
43
+
44
+ Geolocalized feed, it returns StationData
45
+
46
+ ```ruby
47
+ client.geo_feed(37.774929, -122.419416)
48
+ ```
49
+
50
+ Local feed, it returns the nearest StationData
51
+
52
+ ```ruby
53
+ client.local_feed
54
+ ```
55
+
56
+ Feed map within bounds, it returns an array of StationPin
57
+
58
+ ```ruby
59
+ client.map_stations(39.379436, 116.091230, 40.235643, 116.784382)
60
+ ```
61
+
62
+ Search by keyword, it returns an array of StationData
63
+
64
+ ```ruby
65
+ client.search('bangalore')
66
+ ```
67
+
68
+ ## Error handling
69
+
70
+ API errors raise `Waqi::Error`, a subclass of `RuntimeError`:
71
+
72
+ ```ruby
73
+ begin
74
+ client.city_feed('shanghai')
75
+ rescue Waqi::Error => e
76
+ puts e.message
77
+ end
78
+ ```
23
79
 
24
80
  ## Contributing
25
81
 
data/changelog.md ADDED
@@ -0,0 +1,31 @@
1
+ # Changelog
2
+
3
+ ## v0.1.0
4
+
5
+ ### Breaking changes
6
+ - Minimum supported Ruby version is now 4.0.0; Ruby 2.3–3.x are no longer supported.
7
+ - Upgraded Faraday from 1.x to 2.x (`~> 2.0`).
8
+ - Development dependencies upgraded to minitest 6.x, pry 0.16.x, and webmock 4.x.
9
+
10
+ ### Changed
11
+ - Replaced deprecated `URI.escape` with `URI::RFC2396_PARSER.escape` in `Waqi::Service::City`.
12
+ - Updated RuboCop target Ruby version to 4.0.
13
+ - Moved development dependencies from the gemspec to the `Gemfile`.
14
+ - Added gemspec metadata (homepage, source code, changelog URIs, MFA required).
15
+ - Replaced `git ls-files` with an explicit file list in the gemspec.
16
+ - Added `Waqi::Error` (subclass of `RuntimeError`) raised for API and JSON parse errors.
17
+ - Replaced Travis CI with GitHub Actions (`.github/workflows/ci.yml`).
18
+ - Removed `.travis.yml`.
19
+
20
+ ## v0.0.1..v0.0.2
21
+
22
+ * [de87561](https://github.com/3zcurdia/waqi/commit/de875614abdfd1c01b73ae8d73b9e16be6916e1b) update version [Luis Ezcurdia](mailto:ing.ezcurdia@gmail.com)
23
+ * [ca6765c](https://github.com/3zcurdia/waqi/commit/ca6765cab08de087f8101948abdd92bf90c7dc46) update readme [Luis Ezcurdia](mailto:ing.ezcurdia@gmail.com)
24
+ * [105b7c9](https://github.com/3zcurdia/waqi/commit/105b7c9dda8cf8021b94cb83e074d43ed59889cd) station feed wrapper [Luis Ezcurdia](mailto:ing.ezcurdia@gmail.com)
25
+ * [a937425](https://github.com/3zcurdia/waqi/commit/a93742511df0d9702d7547b4c3cedb5fadf45261) specify ruby required version [Luis Ezcurdia](mailto:ing.ezcurdia@gmail.com)
26
+ * [7c2bde1](https://github.com/3zcurdia/waqi/commit/7c2bde1ddec85502edb6268221c2106f74e80ad8) minor parsing corrections [Luis Ezcurdia](mailto:ing.ezcurdia@gmail.com)
27
+ * [4e30065](https://github.com/3zcurdia/waqi/commit/4e30065aec714a5ad4c14425342d71217f040410) add usage on readme [Luis Ezcurdia](mailto:ing.ezcurdia@gmail.com)
28
+ * [c7bf946](https://github.com/3zcurdia/waqi/commit/c7bf9460cfad0ab1b56e0c43cf58ec4f9ca76a11) clearup args [Luis Ezcurdia](mailto:ing.ezcurdia@gmail.com)
29
+ * [066c736](https://github.com/3zcurdia/waqi/commit/066c736b2ffbde1442b0e79d3b6cfd67e95ce2d8) create stations service [Luis Ezcurdia](mailto:ing.ezcurdia@gmail.com)
30
+ * [8927258](https://github.com/3zcurdia/waqi/commit/89272584dec40048f33481425b11c763811971eb) Update README.md [Luis Ezcurdia](mailto:ing.ezcurdia@gmail.com)
31
+
data/lib/waqi/client.rb CHANGED
@@ -1,4 +1,5 @@
1
- require 'json'
1
+ # frozen_string_literal: true
2
+
2
3
  require 'waqi/services'
3
4
 
4
5
  module Waqi
@@ -7,18 +8,23 @@ module Waqi
7
8
  @token = token
8
9
  end
9
10
 
11
+ def station_feed(station_id)
12
+ response = Service::Station.new(station_id).get(token: @token)
13
+ StationData.parse(response)
14
+ end
15
+
10
16
  def city_feed(city_name)
11
17
  response = Service::City.new(city_name).get(token: @token)
12
18
  StationData.parse(response)
13
19
  end
14
20
 
15
21
  def geo_feed(lat, lon)
16
- response = Service::Geolocation.new(lat,lon).get(token: @token)
22
+ response = Service::Geolocation.new(lat, lon).get(token: @token)
17
23
  StationData.parse(response)
18
24
  end
19
25
 
20
26
  def local_feed
21
- response = Service::City.new().get(token: @token)
27
+ response = Service::City.new.get(token: @token)
22
28
  StationData.parse(response)
23
29
  end
24
30
 
data/lib/waqi/error.rb ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Waqi
4
+ class Error < RuntimeError; end
5
+ end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Waqi
2
- class Attribution < Struct.new(:name, :url)
4
+ Attribution = Struct.new(:name, :url) do
3
5
  def self.parse(hash)
4
6
  new(*hash.values_at(*members))
5
7
  end
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Waqi
2
- class City < Struct.new(:name, :geo, :url)
4
+ City = Struct.new(:name, :geo, :url) do
3
5
  def self.parse(hash)
4
- new(*hash.values_at(*self.members))
6
+ new(*hash.values_at(*members))
5
7
  end
6
8
  end
7
9
  end
@@ -1,9 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Waqi
2
4
  class Station
3
5
  attr_reader :city, :attributions
6
+
4
7
  def self.parse(hash)
5
- city = hash[:city] ? City.parse(hash[:city]) : (hash[:name] ? City.parse(hash) : {})
6
- attributions = hash[:attributions] ? hash[:attributions] : []
8
+ city = if hash[:city]
9
+ City.parse(hash[:city])
10
+ elsif hash[:name]
11
+ City.parse(hash)
12
+ end
13
+ attributions = hash[:attributions] || []
7
14
  new(city: city, attributions: attributions.map { |a| Attribution.parse(a) })
8
15
  end
9
16
 
@@ -1,28 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'date'
4
+
1
5
  module Waqi
2
6
  class StationData
3
7
  attr_reader :aqi, :idx, :uid, :station, :dominant_pollution, :weather_condition, :timestamp
8
+
4
9
  def self.parse(data)
5
- wheather_condition = data[:iaqi] ? WeatherCondition.new(data[:iaqi]) : {}
6
- station = data[:station] ? Station.parse(data[:station]) : Station.parse(data)
10
+ weather_condition = data[:iaqi] ? WeatherCondition.new(data[:iaqi]) : nil
11
+ station = Station.parse(data[:station] || data)
7
12
  new(
8
13
  aqi: data[:aqi],
9
14
  idx: data[:idx],
10
15
  uid: data[:uid],
11
16
  dominant_pollution: data[:dominentpol],
12
17
  station: station,
13
- weather_condition: wheather_condition,
14
- timestamp: DateTime.parse("#{data[:time][:s] || data[:time][:stime]}#{data[:time][:tz]}")
18
+ weather_condition: weather_condition,
19
+ timestamp: parse_time(data[:time])
15
20
  )
16
21
  end
17
22
 
18
- def initialize(aqi: nil, idx: nil, uid: nil, station: nil, dominant_pollution: nil, weather_condition: nil, timestamp: nil)
19
- @aqi = aqi
20
- @idx = idx
21
- @uid = uid
22
- @station = station
23
- @dominant_pollution = dominant_pollution
24
- @weather_condition = weather_condition
25
- @timestamp = timestamp
23
+ def self.parse_time(time_data)
24
+ DateTime.parse("#{time_data[:s] || time_data[:stime]}#{time_data[:tz]}")
25
+ rescue StandardError
26
+ nil
27
+ end
28
+
29
+ def initialize(args = {})
30
+ @aqi = args[:aqi]
31
+ @idx = args[:idx]
32
+ @uid = args[:uid]
33
+ @station = args[:station]
34
+ @dominant_pollution = args[:dominant_pollution]
35
+ @weather_condition = args[:weather_condition]
36
+ @timestamp = args[:timestamp]
26
37
  end
27
38
  end
28
39
  end
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Waqi
2
- class StationPin < Struct.new(:lat, :lon, :uid, :aqi)
4
+ StationPin = Struct.new(:lat, :lon, :uid, :aqi) do
3
5
  def self.parse(hash)
4
- new(*hash.values_at(*self.members))
6
+ new(*hash.values_at(*members))
5
7
  end
6
8
  end
7
9
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Waqi
2
4
  class WeatherCondition
3
5
  attr_reader :carbon_monoxyde, :dew, :relative_humidity, :nitrogen_dioxide,
data/lib/waqi/models.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'waqi/models/attribution'
2
4
  require 'waqi/models/city'
3
5
  require 'waqi/models/station'
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'faraday'
2
4
  require 'json'
3
5
  module Waqi
4
6
  module Service
5
7
  class Base
6
- BASE_URL = 'https://api.waqi.info'.freeze
8
+ BASE_URL = 'https://api.waqi.info'
7
9
 
8
10
  def initialize(params = {})
9
11
  @connection = Faraday.new(url: BASE_URL)
@@ -11,19 +13,22 @@ module Waqi
11
13
  end
12
14
 
13
15
  def get(options = {})
14
- parse(@connection.get(self.path, @params.merge(options)))
16
+ parse(@connection.get(path, @params.merge(options)))
15
17
  end
16
18
 
17
19
  def path
18
- raise "path has not beed defined"
20
+ raise NotImplementedError, 'path has not been defined'
19
21
  end
20
22
 
21
23
  private
22
24
 
23
25
  def parse(response)
24
26
  parsed_response = JSON.parse(response.body, symbolize_names: true)
25
- raise "API Error: #{parsed_response[:data]}" if parsed_response[:status] == 'error'
27
+ raise Waqi::Error, "API Error: #{parsed_response[:data]}" if parsed_response[:status] == 'error'
28
+
26
29
  parsed_response[:data]
30
+ rescue JSON::ParserError
31
+ raise Waqi::Error, "Invalid JSON response (HTTP #{response.status})"
27
32
  end
28
33
  end
29
34
  end
@@ -1,3 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'uri'
4
+
1
5
  module Waqi
2
6
  module Service
3
7
  class City < Base
@@ -7,7 +11,7 @@ module Waqi
7
11
  end
8
12
 
9
13
  def path
10
- "/feed/#{@name}/"
14
+ URI::RFC2396_PARSER.escape("/feed/#{@name}/")
11
15
  end
12
16
  end
13
17
  end
@@ -1,9 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Waqi
2
4
  module Service
3
5
  class Geolocation < Base
4
6
  def initialize(lat, lon)
5
7
  super()
6
- @lat, @lon = lat, lon
8
+ @lat = lat
9
+ @lon = lon
7
10
  end
8
11
 
9
12
  def path
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Waqi
2
4
  module Service
3
5
  class Map < Base
@@ -6,7 +8,7 @@ module Waqi
6
8
  end
7
9
 
8
10
  def path
9
- '/map/bounds/'.freeze
11
+ '/map/bounds/'
10
12
  end
11
13
  end
12
14
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Waqi
2
4
  module Service
3
5
  class Search < Base
@@ -6,7 +8,7 @@ module Waqi
6
8
  end
7
9
 
8
10
  def path
9
- '/search/'.freeze
11
+ '/search/'
10
12
  end
11
13
  end
12
14
  end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Waqi
4
+ module Service
5
+ class Station < City
6
+ def initialize(uid)
7
+ super("@#{uid}")
8
+ end
9
+ end
10
+ end
11
+ end
data/lib/waqi/services.rb CHANGED
@@ -1,5 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'waqi/services/base'
2
4
  require 'waqi/services/city'
3
5
  require 'waqi/services/geolocation'
4
6
  require 'waqi/services/map'
7
+ require 'waqi/services/station'
5
8
  require 'waqi/services/search'
data/lib/waqi/version.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Waqi
2
- VERSION = '0.0.1'.freeze
4
+ VERSION = '0.1.0'
3
5
  end
data/lib/waqi.rb CHANGED
@@ -1,4 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'waqi/version'
4
+ require 'waqi/error'
2
5
  require 'waqi/models'
3
6
  require 'waqi/client'
4
7
 
metadata CHANGED
@@ -1,115 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waqi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Ezcurdia
8
- autorequire:
9
- bindir: exe
8
+ bindir: bin
10
9
  cert_chain: []
11
- date: 2017-02-16 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: pry
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 0.10.3
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 0.10.3
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.13'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.13'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '10.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '10.0'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '5.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '5.0'
69
- - !ruby/object:Gem::Dependency
70
- name: vcr
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '3.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '3.0'
83
- - !ruby/object:Gem::Dependency
84
- name: webmock
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '2.3'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '2.3'
97
12
  - !ruby/object:Gem::Dependency
98
13
  name: faraday
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '0.10'
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '0.10'
111
- - !ruby/object:Gem::Dependency
112
- name: json
113
14
  requirement: !ruby/object:Gem::Requirement
114
15
  requirements:
115
16
  - - "~>"
@@ -129,16 +30,12 @@ executables: []
129
30
  extensions: []
130
31
  extra_rdoc_files: []
131
32
  files:
132
- - ".gitignore"
133
- - ".travis.yml"
134
- - Gemfile
135
33
  - LICENSE
136
34
  - README.md
137
- - Rakefile
138
- - bin/console
139
- - bin/setup
35
+ - changelog.md
140
36
  - lib/waqi.rb
141
37
  - lib/waqi/client.rb
38
+ - lib/waqi/error.rb
142
39
  - lib/waqi/models.rb
143
40
  - lib/waqi/models/attribution.rb
144
41
  - lib/waqi/models/city.rb
@@ -152,13 +49,16 @@ files:
152
49
  - lib/waqi/services/geolocation.rb
153
50
  - lib/waqi/services/map.rb
154
51
  - lib/waqi/services/search.rb
52
+ - lib/waqi/services/station.rb
155
53
  - lib/waqi/version.rb
156
- - waqi.gemspec
157
54
  homepage: https://github.com/3zcurdia/waqi
158
55
  licenses:
159
56
  - MIT
160
- metadata: {}
161
- post_install_message:
57
+ metadata:
58
+ homepage_uri: https://github.com/3zcurdia/waqi
59
+ source_code_uri: https://github.com/3zcurdia/waqi
60
+ changelog_uri: https://github.com/3zcurdia/waqi/blob/master/changelog.md
61
+ rubygems_mfa_required: 'true'
162
62
  rdoc_options: []
163
63
  require_paths:
164
64
  - lib
@@ -166,16 +66,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
166
66
  requirements:
167
67
  - - ">="
168
68
  - !ruby/object:Gem::Version
169
- version: '0'
69
+ version: 4.0.0
170
70
  required_rubygems_version: !ruby/object:Gem::Requirement
171
71
  requirements:
172
72
  - - ">="
173
73
  - !ruby/object:Gem::Version
174
74
  version: '0'
175
75
  requirements: []
176
- rubyforge_project:
177
- rubygems_version: 2.6.7
178
- signing_key:
76
+ rubygems_version: 4.0.20
179
77
  specification_version: 4
180
78
  summary: World Air Quality ruby wrapper
181
79
  test_files: []
data/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- .DS_Store
2
- /.bundle/
3
- /.yardoc
4
- /Gemfile.lock
5
- /_yardoc/
6
- /coverage/
7
- /doc/
8
- /pkg/
9
- /spec/reports/
10
- /tmp/
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.4.0
5
- - 2.3.3
6
- before_install: gem install bundler -v 1.13.2
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in waqi.gemspec
4
- gemspec
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rake/testtask'
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << 'test'
6
- t.libs << 'lib'
7
- t.test_files = FileList['test/**/*_test.rb']
8
- end
9
-
10
- task default: :test
data/bin/console DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'bundler/setup'
4
- require 'waqi'
5
-
6
- require 'pry'
7
- Pry.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/waqi.gemspec DELETED
@@ -1,30 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'waqi/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = 'waqi'
8
- spec.version = Waqi::VERSION
9
- spec.authors = ['Luis Ezcurdia']
10
- spec.email = ['ing.ezcurdia@gmail.com']
11
- spec.license = 'MIT'
12
- spec.summary = 'World Air Quality ruby wrapper'
13
- spec.description = 'Air Quality Open Data Platform ruby wrapper'
14
- spec.homepage = 'https://github.com/3zcurdia/waqi'
15
-
16
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- spec.bindir = 'exe'
18
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
- spec.require_paths = ['lib']
20
-
21
- spec.add_development_dependency 'pry', '~> 0.10.3'
22
- spec.add_development_dependency 'bundler', '~> 1.13'
23
- spec.add_development_dependency 'rake', '~> 10.0'
24
- spec.add_development_dependency 'minitest', '~> 5.0'
25
- spec.add_development_dependency 'vcr', '~> 3.0'
26
- spec.add_development_dependency 'webmock', '~> 2.3'
27
-
28
- spec.add_dependency 'faraday', '~> 0.10'
29
- spec.add_dependency 'json', '~> 2.0'
30
- end