cheatly 0.0.4 → 0.0.5
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 +8 -8
- data/README.md +4 -0
- data/lib/cheatly/sheet.rb +6 -2
- data/lib/cheatly/version.rb +1 -1
- data/lib/cheatly.rb +1 -1
- data/sheets/help.yml +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MGMyM2JmZjdkNDRmYTFlYjY1MGZlZmRiNmFmOTY2YTQ5YzU4ZWRkYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmE0ZGQ2ZDY3ZmRmMjYxY2YzNzk5ZGQ1N2ExMzAwNTljNTIwOGJmNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWM5MmQxMmEyYWQ4YjEyMDBkOGYzNDZkZGJiYjY1YzNlZjIzNzVmOGNmYmE3
|
10
|
+
OGI1MzdkNjc2YjVkN2VhMzllY2Q4M2NlNDAxYmU0ZjFlODZlYTZmYTAyMzc1
|
11
|
+
NmFmOTEwOWY0NDY3MjQ1YWM3NzJlNzZjYjEwYzdkNDNhOWZhYWM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjIzMTJiNDBkMzQwMzU5MWIxYzc3Zjc3MWQyZjI5ZDFiYTIyZGM2OTJkN2E3
|
14
|
+
ZWQxMGY0MDU5NDM1OTNhZWIzMzYzMDJhNjQwNWY3Y2JlOGVlMjgwZDQzMDBm
|
15
|
+
YmJiNmQ2NDQ4NThlNGM2MzE2OWI3ODI1NzUwZDg4M2ZkMDgxNTQ=
|
data/README.md
CHANGED
data/lib/cheatly/sheet.rb
CHANGED
@@ -84,12 +84,16 @@ module Cheatly
|
|
84
84
|
include HTTParty
|
85
85
|
base_uri 'https://api.github.com'
|
86
86
|
|
87
|
+
def headers
|
88
|
+
{ :headers => {"User-Agent" => "Cheatly Gem"} }
|
89
|
+
end
|
90
|
+
|
87
91
|
def base_path
|
88
92
|
"/repos/arthurnn/cheatly/contents/sheets"
|
89
93
|
end
|
90
94
|
|
91
95
|
def find(path)
|
92
|
-
response = self.class.get("#{base_path}/#{path}.yml")
|
96
|
+
response = self.class.get("#{base_path}/#{path}.yml", headers)
|
93
97
|
json = JSON.parse(response.body)
|
94
98
|
sheet_yaml = Base64.decode64(json["content"])
|
95
99
|
yml = YAML.load(sheet_yaml).first
|
@@ -97,7 +101,7 @@ module Cheatly
|
|
97
101
|
end
|
98
102
|
|
99
103
|
def all
|
100
|
-
response = self.class.get(base_path)
|
104
|
+
response = self.class.get(base_path, headers)
|
101
105
|
json = JSON.parse(response.body)
|
102
106
|
json.map { |entry| entry["name"].gsub('.yml', '') }
|
103
107
|
end
|
data/lib/cheatly/version.rb
CHANGED
data/lib/cheatly.rb
CHANGED
data/sheets/help.yml
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
---
|
2
|
-
help: ! "cheatly help\n------------\nusage: $cheatly list\n To list the available
|
3
|
-
sheets\n\n $cheatly show (sheetname)\n To see the sheet\n\n
|
2
|
+
help: ! "cheatly help\n------------\nusage: $ cheatly list\n To list the available
|
3
|
+
sheets\n\n $ cheatly show (sheetname)\n To see the sheet\n\n To
|
4
|
+
create a new sheet local:\n 1. Clone the project: https://github.com/arthurnn/cheatly\n
|
5
|
+
\ 2. $ cheatly new (sheetname)\n 3. Create a PR\n\n $ cheatly
|
4
6
|
help\n To see this\n happy cheating !\n"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cheatly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arthur Neves
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|