typekitty 0.2.0 → 0.2.1
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 +4 -4
- data/lib/typekitty/api.rb +1 -2
- data/lib/typekitty/cli.rb +3 -2
- data/lib/typekitty/kit.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7ded869856e23ad391a33bc726344a8b3def734
|
4
|
+
data.tar.gz: 9b04f9c1816220a5790dec1c0566737470fab227
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e74b4733f0ee4d0bb4b0b6f8c15a845a38c74f88148ed6620f7352cbf1a3a681b83a3f14318059137c7f9ae7547b1f92400683f404ec80176870178ba342f60
|
7
|
+
data.tar.gz: b5dd0b708483d50b0f8550fa11c84a9477d297acc8ba7802d345a32cb98e9c50494ea6d55e7911ae38c5983edd269e5e58a0d2d40d35fdf6733c6d2f88fed9c8
|
data/lib/typekitty/api.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'httparty'
|
2
|
-
require 'typekitty/kit'
|
3
2
|
|
4
3
|
module Typekitty
|
5
4
|
module API
|
@@ -20,7 +19,7 @@ module Typekitty
|
|
20
19
|
def self.kit id
|
21
20
|
response = handle_response get "/kits/#{id}"
|
22
21
|
|
23
|
-
|
22
|
+
response['kit']
|
24
23
|
end
|
25
24
|
|
26
25
|
def self.handle_response response
|
data/lib/typekitty/cli.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'pp'
|
1
2
|
require 'thor'
|
2
3
|
require 'typekitty/api'
|
3
4
|
|
@@ -6,13 +7,13 @@ module Typekitty
|
|
6
7
|
desc 'kits', 'Lists your kits'
|
7
8
|
option :token, :required => true
|
8
9
|
def kits
|
9
|
-
|
10
|
+
pp api.kits
|
10
11
|
end
|
11
12
|
|
12
13
|
desc 'kit KIT_ID', 'Get information about a kit'
|
13
14
|
option :token, :required => true
|
14
15
|
def kit id
|
15
|
-
|
16
|
+
pp api.kit id
|
16
17
|
end
|
17
18
|
|
18
19
|
no_commands do
|
data/lib/typekitty/kit.rb
CHANGED
@@ -12,11 +12,11 @@ module Typekitty
|
|
12
12
|
property :families, :required => true
|
13
13
|
|
14
14
|
def self.all
|
15
|
-
Typekitty::API.kits
|
15
|
+
Typekitty::API.kits.inject([]) { |kits, kit| kits << new(kit) }
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.find id
|
19
|
-
Typekitty::API.kit id
|
19
|
+
new Typekitty::API.kit id
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|