goospell 0.0.1 → 0.0.2

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.
data/README.md CHANGED
@@ -18,8 +18,57 @@ Or install it yourself as:
18
18
 
19
19
  $ gem install goospell
20
20
 
21
- Usage
22
- -----
21
+
22
+ Commandline Usage
23
+ -----------------
24
+
25
+ goospell "Thas sentnince iss spellleded awell rong"
26
+ ---
27
+ Thas:
28
+ - This
29
+ - Th as
30
+ - Th-as
31
+ - Thais
32
+ - Thaws
33
+ - Thad
34
+ sentnince:
35
+ - sentence
36
+ - sentience
37
+ - sentences
38
+ - sentencing
39
+ - sentience's
40
+ iss:
41
+ - is
42
+ - Isa
43
+ - Issi
44
+ - Issy
45
+ - OSS
46
+ - USS
47
+ spellleded:
48
+ - spelled
49
+ - pelleted
50
+ - spilled
51
+ - superseded
52
+ - secluded
53
+ awell:
54
+ - a well
55
+ - aw ell
56
+ - aw-ell
57
+ - awe ll
58
+ - awe-ll
59
+ - Ewell
60
+ rong:
61
+ - Ring
62
+ - ring
63
+ - tong
64
+ - wrong
65
+ - Rog
66
+
67
+ goospell
68
+
69
+
70
+ Ruby Usage
71
+ ----------
23
72
 
24
73
  Goospell::spell('Thas sentnince iss spellleded awell rong')
25
74
  #{"Thas"=>["This", "Th as", "Th-as", "Thais", "Thaws", "Thad"], "sentnince"=>["sentence", "sentience", "sentences", "sentencing", "sentience's"], "iss"=>["is", "Isa", "Issi", "Issy", "OSS", "USS"], "spellleded"=>["spelled", "pelleted", "spilled", "superseded", "secluded"], "awell"=>["a well", "aw ell", "aw-ell", "awe ll", "awe-ll", "Ewell"], "rong"=>["Ring", "ring", "tong", "wrong", "Rog"]}
data/bin/goospell ADDED
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env ruby
2
+ require 'goospell'
3
+ require 'yaml'
4
+ require 'json'
5
+ require 'to_xml'
6
+ require 'optparse'
7
+
8
+ options = {}
9
+
10
+ optparse = OptionParser.new do|opts|
11
+ opts.banner = "Usage: goospell [options] text"
12
+
13
+ options[:lang] = 'en'
14
+ opts.on( '--lang [LANG]', [:en, :fr, :es], 'Choose a language [en] fr es' ) do |l|
15
+ options[:lang] = l
16
+ end
17
+
18
+ options[:format] = 'yaml'
19
+ opts.on( '--format [FORMAT]', [:yaml, :json, :xml], 'Choose format [yaml] json xml' ) do |f|
20
+ options[:format] = f
21
+ end
22
+
23
+ opts.on_tail('--version', 'Show version') do
24
+ puts Goospell::VERSION
25
+ exit
26
+ end
27
+
28
+ opts.on( '-h', '--help', 'Display this screen' ) do
29
+ puts opts
30
+ exit
31
+ end
32
+ end
33
+
34
+ optparse.parse!
35
+
36
+ if ARGV[0].nil?
37
+ puts "Nothing to check use --help for more information"
38
+ else
39
+ result=Goospell::spell(ARGV[0], options[:lang])
40
+ case options[:format]
41
+ when :json
42
+ puts result
43
+ when :xml
44
+ puts result.to_xml
45
+ else
46
+ puts result.to_yaml
47
+ end
48
+ end
data/goospell.gemspec CHANGED
@@ -10,13 +10,15 @@ Gem::Specification.new do |gem|
10
10
  gem.email = ["shane@domain7.com"]
11
11
  gem.description = %q{Spell checker that uses the undocumented Google Spell API}
12
12
  gem.summary = %q{Spell checker that uses the undocumented Google Spell API}
13
- gem.homepage = ""
13
+ gem.homepage = "https://github.com/domain7/goospell"
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
 
20
+ gem.add_runtime_dependency('to_xml')
21
+
20
22
  gem.add_dependency('rexml-expansion-fix')
21
23
 
22
24
  gem.add_development_dependency('rake')
@@ -1,3 +1,3 @@
1
1
  module Goospell
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goospell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-25 00:00:00.000000000 Z
12
+ date: 2012-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: to_xml
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: rexml-expansion-fix
16
32
  requirement: !ruby/object:Gem::Requirement
@@ -46,7 +62,8 @@ dependencies:
46
62
  description: Spell checker that uses the undocumented Google Spell API
47
63
  email:
48
64
  - shane@domain7.com
49
- executables: []
65
+ executables:
66
+ - goospell
50
67
  extensions: []
51
68
  extra_rdoc_files: []
52
69
  files:
@@ -55,11 +72,12 @@ files:
55
72
  - LICENSE.txt
56
73
  - README.md
57
74
  - Rakefile
75
+ - bin/goospell
58
76
  - goospell.gemspec
59
77
  - lib/goospell.rb
60
78
  - lib/goospell/version.rb
61
79
  - test/test_goospell.rb
62
- homepage: ''
80
+ homepage: https://github.com/domain7/goospell
63
81
  licenses: []
64
82
  post_install_message:
65
83
  rdoc_options: []