lyracyst 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lyracyst.rb +4 -8
  3. data/readme.md +10 -5
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58a980e0fde9e3c2924a28c3a7e72968564aa7be
4
- data.tar.gz: 600427e32f40f28b791473e20d391e76c8368e75
3
+ metadata.gz: d0908c49df1d2227c292db829c4e3fdff8de74ac
4
+ data.tar.gz: 2c6ff3ecb444c661be18a91246612742fb94b7e6
5
5
  SHA512:
6
- metadata.gz: 00f2d7c0a6753333c51600dd6b4614bc80652e6bdd0df08bce169965468d3c1abe0210922424dd609163a0a70a784e3d2ae261dbd009303b957a73fc34aa0e76
7
- data.tar.gz: ff477c269a4f9bcd9aad42aa2c27b0dd2c40596f8f7227873e879007faadf37e3af4010766584938b02e8bc313a7d8de2857de878cdb768aae4ca8b3b4e4f1fc
6
+ metadata.gz: e45738b4d2275a0ec747493af2c8d38b97332f012f25eb6e6a1a7fe5fa2342cda887a3f131ee5aa4b6660e5ef47fffe3d5ca6f30b382ff1b2ec2d98619f369f8
7
+ data.tar.gz: 43104cc0ad14f9c3769fe89d6862347c877e67aaacef7fc396a160559e1b6e71565e6146dfd1bc1be6ee0bae952d878883ac5420d315bc5a90ee3c079e28e613
data/lib/lyracyst.rb CHANGED
@@ -7,12 +7,10 @@ require 'multi_json'
7
7
  #require 'nokogiri'
8
8
  require 'open-uri/cached'
9
9
  require 'wordnik'
10
+ require 'commander.rb'
10
11
  OpenURI::Cache.cache_path = 'tmp/open-uri' #transparent caching
11
12
  environment='ruby'
12
13
  result=''
13
- program :name, 'lyracyst'
14
- program :version, '0.0.1'
15
- program :description, 'A powerful word search tool that fetches definitions, related words, and rhymes.'
16
14
  #search='test' # (urlencoded string)
17
15
  #print "Enter a word: " #change commenting here to convert between command line and test modes
18
16
  class Fetch
@@ -128,7 +126,9 @@ class Search
128
126
  print "\n"
129
127
  end
130
128
  end
131
-
129
+ program :name, 'lyracyst'
130
+ program :version, '0.0.1'
131
+ program :description, 'A powerful word search tool that fetches definitions, related words, and rhymes.'
132
132
  command :get do |c|
133
133
  c.syntax = 'lyracyst get [options]'
134
134
  c.summary = 'Fetches all sources'
@@ -143,7 +143,6 @@ command :get do |c|
143
143
  s.rhyme(search)
144
144
  end
145
145
  end
146
-
147
146
  command :define do |c|
148
147
  c.syntax = 'lyracyst define [options]'
149
148
  c.summary = 'Fetches definitions'
@@ -156,7 +155,6 @@ command :define do |c|
156
155
  s.define(search)
157
156
  end
158
157
  end
159
-
160
158
  command :related do |c|
161
159
  c.syntax = 'lyracyst related [options]'
162
160
  c.summary = 'Fetches related words'
@@ -170,7 +168,6 @@ command :related do |c|
170
168
  s.related(search)
171
169
  end
172
170
  end
173
-
174
171
  command :rhyme do |c|
175
172
  c.syntax = 'lyracyst rhyme [options]'
176
173
  c.summary = 'Fetches rhymes'
@@ -183,4 +180,3 @@ command :rhyme do |c|
183
180
  s.rhyme(search)
184
181
  end
185
182
  end
186
-
data/readme.md CHANGED
@@ -24,15 +24,15 @@ Search [Wordnik](http://www.wordnik.com/), [thesaurus.altervista.org](http://the
24
24
 
25
25
  ### Usage
26
26
 
27
- bundle install
28
- rake
27
+ gem install lyracyst
28
+ lyracyst get test
29
29
 
30
30
  ### Code Example
31
31
 
32
32
  s=Search.new
33
- s.nik(search) # Wordnik definitions
34
- s.syn(search) # Altervista synonyms
35
- s.rhy(search) # Arpabet rhymes
33
+ s.define(search) # Wordnik definitions
34
+ s.related(search, result) # Altervista related words
35
+ s.rhyme(search) # Arpabet rhymes
36
36
 
37
37
  ### Motivation
38
38
 
@@ -42,6 +42,11 @@ I do a lot of writing and I wanted a tool for constructing song lyrics, poetry,
42
42
 
43
43
  TODO
44
44
 
45
+ ### Developers
46
+
47
+ bundle install
48
+ rake lyracyst:get[test]
49
+
45
50
  ### Contributing workflow
46
51
 
47
52
  Here’s how we suggest you go about proposing a change to this project:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lyracyst
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drew Prentice