checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
---
2
2
SHA256:
3
- metadata.gz: d828e5a8f23b8eaf0503e4d7315960f8e5a02b5fec0a95df8cc30ac052fc4076
4
- data.tar.gz: 005be0a1732288c48b08788060fb264c9d64cf1dc5330752aa02902f11cf8702
3
+ metadata.gz: efadc2eba3e0adf9b1f735434b44bf56f200ad64b5768631047007bf72ee1b3a
4
+ data.tar.gz: 1bc23b6e3f99efed877791949e07e5a2a487219136e14ca95c5cb8b44c5153fd
5
5
SHA512:
6
- metadata.gz: 9e263e201f1d039ecd309be7889f5508e4f95591f0f4f846a85d7ba8ca1887e8c76c2e378aef09363c82e2e0d51243c79f8cf30abb1b6445502320e480745106
7
- data.tar.gz: 3eb8e055baae11587c34f3083d5345f8c1ff698e2b279b5c70d6b78d63e2009af714a57bf453e290e5e1a1d56fcd6f82dc12fb633425cbd49726aa75d9ba5562
6
+ metadata.gz: 46878e84b8460fc2153d59e1ff26d540f8092ef59786fb281937fe46bfeb06a5d656d5cdd88c43dfe20e1cef11d579ef52a244b64aa5c5728b172e5c74a50c38
7
+ data.tar.gz: 47c0a45b1e9fb518d11ae365a5dc98bc1b7711ba4c1cbd37d46d21f281f6207e7b2cb4c3edd5feba2f5837142ba80db609f12735c5227fe811688b5ac170c0db
data/Gemfile.lock CHANGED
@@ -1,35 +1,24 @@
1
1
PATH
2
2
remote: .
3
3
specs:
4
- meraki (0.1.0)
4
+ meraki (0.1.1)
5
- activesupport (~> 6.0)
6
5
httparty (~> 0.17)
7
6
8
7
GEM
9
8
remote: https://rubygems.org/
10
9
specs:
11
- activesupport (6.0.2.1)
12
- concurrent-ruby (~> 1.0, >= 1.0.2)
13
- i18n (>= 0.7, < 2)
14
- minitest (~> 5.1)
15
- tzinfo (~> 1.1)
16
- zeitwerk (~> 2.2)
17
10
ast (2.4.0)
18
11
byebug (11.0.1)
19
12
coderay (1.1.2)
20
- concurrent-ruby (1.1.5)
21
13
diff-lcs (1.3)
22
14
httparty (0.17.3)
23
15
mime-types (~> 3.0)
24
16
multi_xml (>= 0.5.2)
25
- i18n (1.8.2)
26
- concurrent-ruby (~> 1.0)
27
17
jaro_winkler (1.5.4)
28
18
method_source (0.9.2)
29
19
mime-types (3.3.1)
30
20
mime-types-data (~> 3.2015)
31
21
mime-types-data (3.2019.1009)
32
- minitest (5.14.0)
33
22
multi_xml (0.6.0)
34
23
parallel (1.19.1)
35
24
parser (2.7.0.2)
@@ -60,11 +49,7 @@ GEM
60
49
ruby-progressbar (~> 1.7)
61
50
unicode-display_width (>= 1.4.0, < 1.7)
62
51
ruby-progressbar (1.10.1)
63
- thread_safe (0.3.6)
64
- tzinfo (1.2.6)
65
- thread_safe (~> 0.1)
66
52
unicode-display_width (1.6.0)
67
- zeitwerk (2.2.2)
68
53
69
54
PLATFORMS
70
55
ruby
data/lib/meraki/api.rb CHANGED
@@ -1,5 +1,4 @@
1
1
require 'httparty'
2
- require 'active_support/core_ext/hash'
3
2
4
3
module Meraki
5
4
# description TODO
@@ -19,19 +18,25 @@ module Meraki
19
18
end
20
19
21
20
def organizations
22
- get('/organizations').map(&:symbolize_keys)
21
+ get('/organizations').map { |h| symbolize_keys(h) }
23
22
end
24
23
25
24
def networks(organization_id)
26
- get("/organizations/#{organization_id}/networks").map(&:symbolize_keys)
25
+ get("/organizations/#{organization_id}/networks").map { |h| symbolize_keys(h) }
27
26
end
28
27
29
28
def devices(network_id)
30
- get("/networks/#{network_id}/devices").map(&:symbolize_keys)
29
+ get("/networks/#{network_id}/devices").map { |h| symbolize_keys(h) }
31
30
end
32
31
33
32
def get(path, **options)
34
33
@requestor.get(@base_url + path, @options.merge(options))
35
34
end
35
+
36
+ private
37
+
38
+ def symbolize_keys(hash)
39
+ Hash[hash.map{|(k,v)| [k.to_sym,v]}]
40
+ end
36
41
end
37
42
end
data/lib/meraki/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
module Meraki
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
end
data/meraki.gemspec CHANGED
@@ -22,7 +22,6 @@ Gem::Specification.new do |spec|
22
22
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
spec.require_paths = ['lib']
24
24
25
- spec.add_dependency 'activesupport', '~> 6.0'
26
25
spec.add_dependency 'httparty', '~> 0.17'
27
26
spec.add_development_dependency 'bundler', '~> 2.0'
28
27
spec.add_development_dependency 'byebug', '~> 11.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
--- !ruby/object:Gem::Specification
2
2
name: meraki
3
3
version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
platform: ruby
6
6
authors:
7
7
- Jonathan Ellington
@@ -11,20 +11,6 @@ cert_chain: []
11
11
date: 2020-01-14 00:00:00.000000000 Z
12
12
dependencies:
13
13
- !ruby/object:Gem::Dependency
14
- name: activesupport
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '6.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '6.0'
27
- - !ruby/object:Gem::Dependency
28
14
name: httparty
29
15
requirement: !ruby/object:Gem::Requirement
30
16
requirements: