jess 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1c4ee12ab3f054a1313667831afa2936b55abaa
4
- data.tar.gz: a87377cb5dec69ab89e41e0a875625539d07b410
3
+ metadata.gz: 48fd46f06e9a6c2d58d0de2f67688181dfc76fde
4
+ data.tar.gz: 5e470a373b74bc80c61798bb4a0bf34410324fdf
5
5
  SHA512:
6
- metadata.gz: 7cef11b0d500e5817ecb713166f92ebe1a9682665a8ebc53e093c7e26cf47a07a3eb07e2bcb708136858bfec257caa4928f3e6ba080796e3259c7662615a4924
7
- data.tar.gz: 6c40232501f9bef0f63580266243bc700eed446acc75aeabc5bc2eceb934240655fc0cec38c39f0addf85bb6e6a928aa407aa35a8d4fe59dc007e23e94d7fd36
6
+ metadata.gz: '098a0a6c1dd81cdcfcd866ca02b46848d36801b94c96a19b193e61a3a4797c6429fda18e044d452c94c7ef1aa3843302504adb2e047d68a32504dfa9d551feb9'
7
+ data.tar.gz: 03f400c779bd32cfc2f4822bface0f65be71f2c0324b7ea5958b15767b2b14562b66c6e0973e28e8e3d0c68bdb58d3df88cfa9975d5f6eb5b6799b7631ee00f6
data/CHANGELOG.md CHANGED
@@ -8,6 +8,10 @@ Jess is in a pre-1.0 state. This means that its APIs and behavior are subject to
8
8
 
9
9
  * Your contribution here!
10
10
 
11
+ ## [0.3.0][] (2017-03-17)
12
+
13
+ * Add `computers.all_ids` and `mobile_devices.all_ids`
14
+
11
15
  ## [0.2.0][] (2017-01-21)
12
16
 
13
17
  * Improved support for using jess in irb with `awesome_print` by implementing `to_hash` on resources
@@ -17,5 +21,6 @@ Jess is in a pre-1.0 state. This means that its APIs and behavior are subject to
17
21
  * Initial release
18
22
 
19
23
  [Semver]: http://semver.org
20
- [Unreleased]: https://github.com/mattbrictson/jess/compare/v0.2.0...HEAD
24
+ [Unreleased]: https://github.com/mattbrictson/jess/compare/v0.3.0...HEAD
25
+ [0.3.0]: https://github.com/mattbrictson/jess/compare/v0.2.0...v0.3.0
21
26
  [0.2.0]: https://github.com/mattbrictson/jess/compare/v0.1.0...v0.2.0
data/README.md CHANGED
@@ -88,7 +88,7 @@ computer.extension_attributes["My Ext Attr Name"] # => "value"
88
88
  If you ever need access to the raw JSON data of any object, use the `_json` method:
89
89
 
90
90
  ```ruby
91
- computer.extension_attributes._json # => [{ ... }]
91
+ computer._json["extension_attributes"] # => [{ ... }]
92
92
  ```
93
93
 
94
94
  ## Gotchas
@@ -14,5 +14,11 @@ module Jess
14
14
  json = JSON.parse(http_client.get("computers/id/#{id}"))
15
15
  Computer.new(json.fetch("computer"))
16
16
  end
17
+
18
+ # Get all computer IDs.
19
+ def all_ids
20
+ json = JSON.parse(http_client.get("computers"))
21
+ json["computers"].map { |c| c["id"] }
22
+ end
17
23
  end
18
24
  end
@@ -14,5 +14,11 @@ module Jess
14
14
  json = JSON.parse(http_client.get("mobiledevices/id/#{id}"))
15
15
  MobileDevice.new(json.fetch("mobile_device"))
16
16
  end
17
+
18
+ # Get all mobile device IDs.
19
+ def all_ids
20
+ json = JSON.parse(http_client.get("mobiledevices"))
21
+ json["mobile_devices"].map { |c| c["id"] }
22
+ end
17
23
  end
18
24
  end
data/lib/jess/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jess
2
- VERSION = "0.2.0".freeze
2
+ VERSION = "0.3.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jess
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brictson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-21 00:00:00.000000000 Z
11
+ date: 2017-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
204
  version: '0'
205
205
  requirements: []
206
206
  rubyforge_project:
207
- rubygems_version: 2.6.8
207
+ rubygems_version: 2.6.10
208
208
  signing_key:
209
209
  specification_version: 4
210
210
  summary: Lightweight, unofficial client for the JAMF Software Server (JSS) API