dataset_explorer 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +64 -62
- data/lib/dataset_explorer/item_collector.rb +13 -3
- data/lib/dataset_explorer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 788e4dd9aa7ed70db9482c9eb8c5cc35fabae5039232dc2c10e0276fa97caf14
|
4
|
+
data.tar.gz: 0d14ebb6e7ae2363dfe47236b1a89565fbda381fecb4dc8732448dd27fbe82bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eae4397828a7fb6c88da601ed429292893a9925089e37c4b7be57d3879c664605bcdeb40736e27da2522c7a8e1fdd587d91419d59b22fb5912d4b96523a0b1f2
|
7
|
+
data.tar.gz: c41ee84d680ce45f9d22e46b732bf31fc6490b0ded9f18f7ad721df4d91b9670747a83d375fcf78128e7e06e78993f93d5874870882d668940d37e02316d782d
|
data/README.md
CHANGED
@@ -34,10 +34,12 @@ end
|
|
34
34
|
|
35
35
|
# somewhere
|
36
36
|
|
37
|
-
|
38
|
-
|
37
|
+
DatasetExplorer::Collector.explain('type-of-request')
|
38
|
+
# or
|
39
|
+
DatasetExplorer::Collector.explain_all
|
39
40
|
```
|
40
41
|
|
42
|
+
Example:
|
41
43
|
|
42
44
|
```ruby
|
43
45
|
require 'bundler/setup'
|
@@ -68,70 +70,72 @@ Explanation will be:
|
|
68
70
|
|
69
71
|
```ruby
|
70
72
|
{
|
71
|
-
github:
|
72
|
-
jekyll
|
73
|
-
jekyll-sass-converter
|
74
|
-
kramdown
|
75
|
-
jekyll-commonmark-ghpages
|
76
|
-
liquid
|
77
|
-
rouge
|
78
|
-
github-pages-health-check
|
79
|
-
jekyll-redirect-from
|
80
|
-
jekyll-sitemap
|
81
|
-
jekyll-feed
|
82
|
-
jekyll-gist
|
83
|
-
jekyll-paginate
|
84
|
-
jekyll-coffeescript
|
85
|
-
jekyll-seo-tag
|
86
|
-
jekyll-github-metadata
|
87
|
-
jekyll-avatar
|
88
|
-
jekyll-remote-theme
|
89
|
-
jemoji
|
90
|
-
jekyll-mentions
|
91
|
-
jekyll-relative-links
|
92
|
-
jekyll-optional-front-matter
|
93
|
-
jekyll-readme-index
|
94
|
-
jekyll-default-layout
|
95
|
-
jekyll-titles-from-headings
|
96
|
-
jekyll-swiss
|
97
|
-
minima
|
98
|
-
jekyll-theme-primer
|
99
|
-
jekyll-theme-architect
|
100
|
-
jekyll-theme-cayman
|
101
|
-
jekyll-theme-dinky
|
102
|
-
jekyll-theme-hacker
|
103
|
-
jekyll-theme-leap-day
|
104
|
-
jekyll-theme-merlot
|
105
|
-
jekyll-theme-midnight
|
106
|
-
jekyll-theme-minimal
|
107
|
-
jekyll-theme-modernist
|
108
|
-
jekyll-theme-slate
|
109
|
-
jekyll-theme-tactile
|
110
|
-
jekyll-theme-time-machine
|
111
|
-
ruby
|
112
|
-
github-pages
|
113
|
-
html-pipeline
|
114
|
-
sass
|
115
|
-
safe_yaml
|
116
|
-
nokogiri
|
73
|
+
github: [
|
74
|
+
"jekyll",
|
75
|
+
"jekyll-sass-converter",
|
76
|
+
"kramdown",
|
77
|
+
"jekyll-commonmark-ghpages",
|
78
|
+
"liquid",
|
79
|
+
"rouge",
|
80
|
+
"github-pages-health-check",
|
81
|
+
"jekyll-redirect-from",
|
82
|
+
"jekyll-sitemap",
|
83
|
+
"jekyll-feed",
|
84
|
+
"jekyll-gist",
|
85
|
+
"jekyll-paginate",
|
86
|
+
"jekyll-coffeescript",
|
87
|
+
"jekyll-seo-tag",
|
88
|
+
"jekyll-github-metadata",
|
89
|
+
"jekyll-avatar",
|
90
|
+
"jekyll-remote-theme",
|
91
|
+
"jemoji",
|
92
|
+
"jekyll-mentions",
|
93
|
+
"jekyll-relative-links",
|
94
|
+
"jekyll-optional-front-matter",
|
95
|
+
"jekyll-readme-index",
|
96
|
+
"jekyll-default-layout",
|
97
|
+
"jekyll-titles-from-headings",
|
98
|
+
"jekyll-swiss",
|
99
|
+
"minima",
|
100
|
+
"jekyll-theme-primer",
|
101
|
+
"jekyll-theme-architect",
|
102
|
+
"jekyll-theme-cayman",
|
103
|
+
"jekyll-theme-dinky",
|
104
|
+
"jekyll-theme-hacker",
|
105
|
+
"jekyll-theme-leap-day",
|
106
|
+
"jekyll-theme-merlot",
|
107
|
+
"jekyll-theme-midnight",
|
108
|
+
"jekyll-theme-minimal",
|
109
|
+
"jekyll-theme-modernist",
|
110
|
+
"jekyll-theme-slate",
|
111
|
+
"jekyll-theme-tactile",
|
112
|
+
"jekyll-theme-time-machine",
|
113
|
+
"ruby",
|
114
|
+
"github-pages",
|
115
|
+
"html-pipeline",
|
116
|
+
"sass",
|
117
|
+
"safe_yaml",
|
118
|
+
"nokogiri",
|
117
119
|
],
|
118
120
|
github_repo: [
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
121
|
+
"name",
|
122
|
+
"path",
|
123
|
+
"sha",
|
124
|
+
"size",
|
125
|
+
"url",
|
126
|
+
"html_url",
|
127
|
+
"git_url",
|
128
|
+
"download_url",
|
129
|
+
"type",
|
130
|
+
"_links.self",
|
131
|
+
"_links.git",
|
132
|
+
"_links.html"
|
131
133
|
]
|
132
134
|
}
|
133
135
|
```
|
134
136
|
|
137
|
+
Or if you try like this
|
138
|
+
|
135
139
|
```ruby
|
136
140
|
data = {
|
137
141
|
user: {
|
@@ -163,8 +167,6 @@ result = DatasetExplorer::Collector.explain_all(:achievements)
|
|
163
167
|
]
|
164
168
|
```
|
165
169
|
|
166
|
-
Or if you try like this
|
167
|
-
|
168
170
|
## Development
|
169
171
|
|
170
172
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -9,16 +9,26 @@ module DatasetExplorer
|
|
9
9
|
attr_reader :values
|
10
10
|
|
11
11
|
def add(item)
|
12
|
+
unless item.is_a?(Array)
|
13
|
+
return add_item(item)
|
14
|
+
end
|
15
|
+
|
16
|
+
item.each do |i|
|
17
|
+
add_item(i, '[]')
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def add_item(item, prefix = nil)
|
12
24
|
new_values = item.keys.map do |key|
|
13
|
-
map_keys(item[key], key)
|
25
|
+
map_keys(item[key], key, prefix)
|
14
26
|
end.flatten.map(&:to_s).uniq
|
15
27
|
|
16
28
|
@values << new_values
|
17
29
|
@values = @values.flatten.uniq
|
18
30
|
end
|
19
31
|
|
20
|
-
private
|
21
|
-
|
22
32
|
# rubocop:disable Metrics/MethodLength
|
23
33
|
def map_keys(value, key = nil, prefix = nil)
|
24
34
|
prefix = [prefix, key].compact.join('.')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dataset_explorer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcelo Jacobus
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Explore and maps fields from a dataset - I.E. Api response
|
14
14
|
email:
|