kmdata 0.0.3 → 0.0.4

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
2
  SHA1:
3
- metadata.gz: 20631034148f7e58e7e6c2b1fbcc877609dee837
4
- data.tar.gz: 332e1967f58e34e826ac531ea30feece4a1b5f0b
3
+ metadata.gz: 55e10a655f1452b3e9c2ad2632aa1ac93e6eda1e
4
+ data.tar.gz: ce654076ca18790927a9ca21babd6888d70cc057
5
5
  SHA512:
6
- metadata.gz: f5ccc95d034c84795f36832726b5f2c3155a6a5f5ebf68519111be9bf09c1b484e6530c1d46ea0f7a0598b12603bcf2ea45286a7a1dc6f5aec1dac48bb9728bf
7
- data.tar.gz: a96294f18d0108e658819a0a0d2aec6d37456412bed1594b004ea90b197735e0781527978e5ae14ed97899b2edff4ef03811f659cc95d133a6264375e045a813
6
+ metadata.gz: f5fac0f014f41fa56340f56ee7115d3f9465173a6b93a0a1255331ce7230d2b2f6ca9e04257b69aef73bec3f7b1468142558583eff37de83a0221325205d2243
7
+ data.tar.gz: 936c53cdc5063a08ee1e590d4c32ecde778bab55a994378ea94dfc575a9fe802cab135c7fb58bcf2292c01adacbceb16da6c8c797d3c12fe1b451ccef9cc0825
data/bin/kmdata CHANGED
@@ -6,8 +6,10 @@ person = KMData.get("people", q: ARGV[0])
6
6
 
7
7
  if person.any?
8
8
  person.each do |p|
9
+ puts "\n"
9
10
  p.to_h.each do |k, v|
10
11
  puts "#{k}: #{v}"
11
12
  end
12
13
  end
14
+ puts "\n"
13
15
  end
data/kmdata.gemspec CHANGED
@@ -25,5 +25,4 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_runtime_dependency "json"
27
27
  spec.add_runtime_dependency "recursive-open-struct"
28
-
29
28
  end
@@ -1,3 +1,3 @@
1
1
  module KMData
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/kmdata.rb CHANGED
@@ -1,23 +1,16 @@
1
1
  require "kmdata/version"
2
- require 'net/http'
3
- require 'json'
4
- require 'ostruct'
5
- require 'recursive-open-struct'
6
- require 'pp'
2
+ require "net/http"
3
+ require "json"
4
+ require "ostruct"
5
+ require "recursive-open-struct"
7
6
 
8
7
  module KMData
9
8
  class << self
10
9
 
11
- #
12
- #
13
- #
14
10
  def endpoint
15
11
  "kmdata.osu.edu"
16
12
  end
17
13
 
18
- #
19
- #
20
- #
21
14
  def get(path, params = {})
22
15
  path = path_with_params("/api/#{path}.json", params)
23
16
 
@@ -36,9 +29,6 @@ module KMData
36
29
  end
37
30
  end
38
31
 
39
- #
40
- #
41
- #
42
32
  def http
43
33
  @http ||= begin
44
34
  http = Net::HTTP.new(endpoint, 443)
@@ -49,12 +39,9 @@ module KMData
49
39
 
50
40
  protected
51
41
 
52
- #
53
- #
54
- #
55
42
  def path_with_params(path, params)
56
43
  encoded_params = URI.encode_www_form(params)
57
- [path, encoded_params].join('?')
44
+ [path, encoded_params].join("?")
58
45
  end
59
46
  end
60
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kmdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Decot