datahunter 0.0.2 → 0.0.3

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/hunter +36 -9
  3. data/lib/datahunter/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e4d4478e7323e34ca503580bbf59da071163ad2
4
- data.tar.gz: 0ba9b85ce2fc9e94f4bc51546c3827ead64ff6e5
3
+ metadata.gz: e49d1f617fcbb9d2374ca33fa8c23e37628406dd
4
+ data.tar.gz: 6d6c00bc69b7bb30d1eea9030cfbc433357b0639
5
5
  SHA512:
6
- metadata.gz: 53c55c138cd897009376f4b80504bb1459929aede453e1764f7c77a5a3baf88309847dd097502b271368c09c6bc4a55aa64bcc774fc98b05dfe9aa3657f7bf33
7
- data.tar.gz: 25d3043502c2b02d64d8563713fcc02b5c09cbc9d5090acc19e70df4ee35cbf4450c5e8c747a1b0fbfcc1194321c26a059830bf60d53afb39c14a31dc0845b26
6
+ metadata.gz: ce5b6e7e68543ef2e5a47730960dc32ef81d050b885627c2e60d48aeb2ce65a9da6d4317a593c9f156caf3da79ebca17b9cf671b889b09a603dac4e90a54cf1b
7
+ data.tar.gz: 14052b66fddb63d34582015f9301e69c9a6e20c94933357ea764e7dadc0f7983917319108c1ddf2fd5ea57294bf58b15719279bd1a9975901f26eb332ad0c7fd
data/bin/hunter CHANGED
@@ -8,9 +8,11 @@ require 'rest_client'
8
8
  require 'launchy'
9
9
  require 'colorize'
10
10
 
11
- program :version, '0.0.2'
11
+ program :version, '0.0.3'
12
12
  program :description, 'Find open data easily and quicker than ever'
13
13
 
14
+ feedback_url = "https://docs.google.com/forms/d/1yNzZjCCXvWHQCbWz4sx-nui3LafeeLcT7FF9T-vbKvw/viewform"
15
+
14
16
  command :find do |c|
15
17
  c.syntax = 'hunter find keyword [spatial-coverage] [temporal-coverage]'
16
18
  c.summary = 'Returns the 3 most popular (most reused, viewed, etc) datasets corresponding to the triple keyword, spatial-coverage and temporal-coverage'
@@ -21,7 +23,7 @@ command :find do |c|
21
23
  geo = args[1]
22
24
  temp = args[2]
23
25
 
24
- tag = tag.downcase if tag
26
+ tag = tag.downcase.split.first if tag
25
27
  geo = geo.downcase if geo
26
28
 
27
29
  start_time = Time.now
@@ -59,7 +61,12 @@ command :find do |c|
59
61
  when 'n'
60
62
  if ds[1].nil?
61
63
  puts ("Remember, this is a first prototype, there will surely be a lot more datasets indexed soon. If you want us to find a dataset for you, or if you just want to give us a feedback, don't hesitate!".colorize(:red))
62
- puts "nicolas@rawdatahunter.com".colorize(:blue)
64
+ case ask "### give feedback? (y/n)".colorize(:yellow)
65
+ when 'y'
66
+ Launchy.open(feedback_url, options = {})
67
+ when 'n'
68
+ puts "Bye for now!"
69
+ end
63
70
  else
64
71
  puts "### And this one?".colorize(:blue)
65
72
  puts
@@ -78,7 +85,12 @@ command :find do |c|
78
85
  when 'n'
79
86
  if ds[2].nil?
80
87
  puts ("Remember, this is a first prototype, there will surely be a lot more datasets indexed soon. If you want us to find a dataset for you, or if you just want to give us a feedback, don't hesitate!".colorize(:red))
81
- puts "nicolas@rawdatahunter.com".colorize(:blue)
88
+ case ask "### give feedback? (y/n)".colorize(:yellow)
89
+ when 'y'
90
+ Launchy.open(feedback_url, options = {})
91
+ when 'n'
92
+ puts "Bye for now!"
93
+ end
82
94
  else
83
95
  puts "### Last try...".colorize(:blue)
84
96
  puts
@@ -97,7 +109,12 @@ command :find do |c|
97
109
  when 'n'
98
110
  puts ("You may want to try: ".colorize(:red) + "'$ hunter search #{tag}'".colorize(:blue))
99
111
  puts ("Remember, this is a first prototype, there will surely be a lot more datasets indexed soon. If you want us to find a dataset for you, or if you just want to give us a feedback, don't hesitate: ".colorize(:red))
100
- puts "nicolas@rawdatahunter.com".colorize(:blue)
112
+ case ask "### give feedback? (y/n)".colorize(:yellow)
113
+ when 'y'
114
+ Launchy.open(feedback_url, options = {})
115
+ when 'n'
116
+ puts "Bye for now!"
117
+ end
101
118
  end
102
119
  end
103
120
  end
@@ -106,7 +123,12 @@ command :find do |c|
106
123
  when 500
107
124
  puts "We've found nothing for your query: as every good hunter... we are still learning".colorize(:red)
108
125
  puts ("Remember, this is a first prototype, there will surely be a lot more datasets indexed soon. If you want us to find a dataset for you, or if you just want to give us a feedback, don't hesitate!".colorize(:red))
109
- puts "nicolas@rawdatahunter.com".colorize(:blue)
126
+ case ask "### give feedback? (y/n)".colorize(:yellow)
127
+ when 'y'
128
+ Launchy.open(feedback_url, options = {})
129
+ when 'n'
130
+ puts "Bye for now!"
131
+ end
110
132
  else
111
133
  response.return!(request, result, &block)
112
134
  end
@@ -124,7 +146,7 @@ command :search do |c|
124
146
  geo = args[1]
125
147
  temp = args[2]
126
148
 
127
- tag = tag.downcase if tag
149
+ tag = tag.downcase.split.first if tag
128
150
  geo = geo.downcase if geo
129
151
 
130
152
  start_time = Time.now
@@ -156,7 +178,12 @@ command :search do |c|
156
178
  when 500
157
179
  puts "We've found nothing for your query: as every good hunter... we are still learning".colorize(:red)
158
180
  puts ("Remember, this is a first prototype, there will surely be a lot more datasets indexed soon. If you want us to find a dataset for you, or if you just want to give us a feedback, don't hesitate!".colorize(:red))
159
- puts "nicolas@rawdatahunter.com".colorize(:blue)
181
+ case ask "### give feedback? (y/n)".colorize(:yellow)
182
+ when 'y'
183
+ Launchy.open(feedback_url, options = {})
184
+ when 'n'
185
+ puts "Bye for now!"
186
+ end
160
187
  else
161
188
  response.return!(request, result, &block)
162
189
  end
@@ -196,7 +223,7 @@ $.........:8...............888888888888.
196
223
  puts "### Hunter is still a prototype, please don't hesitate to help us make open datasets research better!".colorize(:blue)
197
224
  case ask "### give feedback? (y/n)".colorize(:yellow)
198
225
  when 'y'
199
- Launchy.open("http://rawdatahunter.com/contact/", options = {})
226
+ Launchy.open(feedback_url, options = {})
200
227
  when 'n'
201
228
  puts "Bye for now!"
202
229
  end
@@ -1,3 +1,3 @@
1
1
  module Datahunter
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datahunter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terpo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-17 00:00:00.000000000 Z
11
+ date: 2014-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler