basics 0.0.7 → 0.0.8
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/bin/basics +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e735f4998629c57443b691ed232541183132be26
|
4
|
+
data.tar.gz: fe1587117e7462f6765030acefd6bd8bed4af552
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18b42a817764b146766e604d3288e4f3ca61e247fb198464f7ed17bfe95ea67d35788c7f48d8d8acd120e10dd4885b974dfe72339daf25e6df3e851d12825584
|
7
|
+
data.tar.gz: f513aabfcae069b25ca7c0e42c5822c29c589487efed26605a97b24983a564c0088d5105b336de17683acba59090083119c4ec38abbe3e4163d170d471eb8bc8
|
data/bin/basics
CHANGED
@@ -78,3 +78,21 @@ tips.each do |tip|
|
|
78
78
|
puts "\n\n\n"
|
79
79
|
end
|
80
80
|
|
81
|
+
def vote ids
|
82
|
+
ids.each do |id|
|
83
|
+
puts to_ascii(open(URL + "vote/#{id}").read)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
puts "were any of these especially useful? (comma-separated values ok, or 'y' to mark all as useful):\n"
|
88
|
+
input = STDIN.gets.chomp
|
89
|
+
|
90
|
+
if ["y", "yes"].include?(input)
|
91
|
+
vote(tips.map { |t| t["id"] })
|
92
|
+
else
|
93
|
+
ids = input.split(",").map(&:to_i)
|
94
|
+
ids = ids.compact.reject { |id| id == 0 }
|
95
|
+
unless ids.empty?
|
96
|
+
vote(ids)
|
97
|
+
end
|
98
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: basics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aditya Bhargava
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|