yard-spellcheck 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/ChangeLog.md +6 -0
- data/LICENSE.txt +1 -1
- data/README.md +5 -5
- data/Rakefile +7 -7
- data/gemspec.yml +3 -4
- data/lib/yard/spellcheck.rb +3 -0
- data/lib/yard/spellcheck/version.rb +6 -0
- data/spec/spec_helper.rb +1 -1
- data/yard-spellcheck.gemspec +103 -13
- metadata +79 -61
data/.gitignore
ADDED
data/ChangeLog.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# yard-spellcheck
|
2
2
|
|
3
|
-
* [Homepage](
|
4
|
-
* [Issues](
|
3
|
+
* [Homepage](https://github.com/postmodern/yard-spellcheck)
|
4
|
+
* [Issues](https://github.com/postmodern/yard-spellcheck/issues)
|
5
5
|
* [Email](postmodern.mod3 at gmail.com)
|
6
6
|
|
7
7
|
## Description
|
@@ -14,8 +14,8 @@ Spellcheck your YARD documentation.
|
|
14
14
|
|
15
15
|
## Requirements
|
16
16
|
|
17
|
-
* [yard](
|
18
|
-
* [ffi-hunspell](
|
17
|
+
* [yard](https://github.com/lsegal/yard) ~> 0.6
|
18
|
+
* [ffi-hunspell](https://github.com/postmodern/ffi-hunspell) ~> 0.2
|
19
19
|
|
20
20
|
## Install
|
21
21
|
|
@@ -23,6 +23,6 @@ Spellcheck your YARD documentation.
|
|
23
23
|
|
24
24
|
## Copyright
|
25
25
|
|
26
|
-
Copyright (c) 2011 Hal Brodigan
|
26
|
+
Copyright (c) 2011-2012 Hal Brodigan
|
27
27
|
|
28
28
|
See {file:LICENSE.txt} for details.
|
data/Rakefile
CHANGED
@@ -2,17 +2,17 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
|
4
4
|
begin
|
5
|
-
gem '
|
6
|
-
require '
|
5
|
+
gem 'rubygems-tasks', '~> 0.1'
|
6
|
+
require 'rubygems/tasks'
|
7
7
|
|
8
|
-
|
8
|
+
Gem::Tasks.new
|
9
9
|
rescue LoadError => e
|
10
|
-
|
11
|
-
|
10
|
+
warn e.message
|
11
|
+
warn "Run `gem install rubygems-tasks` to install 'rubygems/tasks'."
|
12
12
|
end
|
13
13
|
|
14
14
|
begin
|
15
|
-
gem 'rspec', '~> 2.4
|
15
|
+
gem 'rspec', '~> 2.4'
|
16
16
|
require 'rspec/core/rake_task'
|
17
17
|
|
18
18
|
RSpec::Core::RakeTask.new
|
@@ -24,7 +24,7 @@ end
|
|
24
24
|
task :default => :spec
|
25
25
|
|
26
26
|
begin
|
27
|
-
gem 'yard', '~> 0.6
|
27
|
+
gem 'yard', '~> 0.6'
|
28
28
|
require 'yard'
|
29
29
|
|
30
30
|
YARD::Rake::YardocTask.new
|
data/gemspec.yml
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
name: yard-spellcheck
|
2
|
-
version: 0.1.4
|
3
2
|
summary: Spellcheck your YARD documentat
|
4
3
|
description:
|
5
4
|
Adds the 'spellcheck' command to YARD, which will spellcheck every
|
@@ -8,13 +7,13 @@ description:
|
|
8
7
|
license: MIT
|
9
8
|
authors: Postmodern
|
10
9
|
email: postmodern.mod3@gmail.com
|
11
|
-
homepage:
|
10
|
+
homepage: https://github.com/postmodern/yard-spellcheck#readme
|
12
11
|
has_yard: true
|
13
12
|
|
14
13
|
dependencies:
|
15
14
|
yard: ~> 0.6
|
16
|
-
ffi-hunspell: ~> 0.2
|
15
|
+
ffi-hunspell: ~> 0.2
|
17
16
|
|
18
17
|
development_dependencies:
|
19
|
-
|
18
|
+
rubygems-tasks: ~> 0.1
|
20
19
|
rspec: ~> 2.4
|
data/spec/spec_helper.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
gem 'rspec', '~> 2.4
|
1
|
+
gem 'rspec', '~> 2.4'
|
2
2
|
require 'rspec'
|
data/yard-spellcheck.gemspec
CHANGED
@@ -1,15 +1,105 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
Gem::Specification.new do |gemspec|
|
6
|
+
root = File.dirname(__FILE__)
|
7
|
+
lib_dir = File.join(root,'lib')
|
8
|
+
files = `git ls-files`.split($/)
|
9
|
+
|
10
|
+
filter_files = lambda { |paths|
|
11
|
+
files & case paths
|
12
|
+
when Array
|
13
|
+
paths
|
14
|
+
when String
|
15
|
+
Dir[paths]
|
16
|
+
end
|
17
|
+
}
|
18
|
+
|
19
|
+
version = {
|
20
|
+
:file => 'yard/spellcheck/version',
|
21
|
+
:constant => 'YARD::Spellcheck::VERSION'
|
22
|
+
}
|
23
|
+
|
24
|
+
defaults = {
|
25
|
+
'name' => File.basename(root),
|
26
|
+
'files' => files,
|
27
|
+
'require_paths' => ['ext', 'lib'].select { |dir| File.directory?(dir) },
|
28
|
+
'executables' => filter_files['bin/*'].map { |path| File.basename(path) },
|
29
|
+
'test_files' => filter_files['{test/{**/}*_test.rb,spec/{**/}*_spec.rb}'],
|
30
|
+
'doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}'],
|
31
|
+
'extra_doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}']
|
32
|
+
}
|
33
|
+
|
34
|
+
metadata = defaults.merge(YAML.load_file('gemspec.yml'))
|
35
|
+
|
36
|
+
gemspec.name = metadata['name']
|
37
|
+
gemspec.version = if metadata['version']
|
38
|
+
metadata['version']
|
39
|
+
else
|
40
|
+
$LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
|
41
|
+
|
42
|
+
require version[:file]
|
43
|
+
eval(version[:constant])
|
44
|
+
end
|
45
|
+
|
46
|
+
gemspec.summary = metadata.fetch('summary',metadata['description'])
|
47
|
+
gemspec.description = metadata.fetch('description',metadata['summary'])
|
48
|
+
|
49
|
+
gemspec.licenses = Array(metadata['license'])
|
50
|
+
gemspec.authors = Array(metadata['authors'])
|
51
|
+
|
52
|
+
gemspec.email = metadata['email']
|
53
|
+
gemspec.homepage = metadata['homepage']
|
54
|
+
|
55
|
+
gemspec.require_paths = Array(metadata['require_paths'])
|
56
|
+
gemspec.files = filter_files[metadata['files']]
|
57
|
+
gemspec.files += Array(metadata['generated_files'])
|
58
|
+
gemspec.executables = metadata['executables']
|
59
|
+
gemspec.extensions = metadata['extensions']
|
60
|
+
|
61
|
+
if Gem::VERSION < '1.7.'
|
62
|
+
gemspec.default_executable = gemspec.executables.first
|
63
|
+
end
|
64
|
+
|
65
|
+
gemspec.test_files = filter_files[metadata['test_files']]
|
66
|
+
gemspec.extra_rdoc_files = Array(metadata['extra_doc_files'])
|
67
|
+
|
68
|
+
gemspec.post_install_message = metadata['post_install_message']
|
69
|
+
gemspec.requirements = metadata['requirements']
|
70
|
+
|
71
|
+
if gemspec.respond_to?(:required_ruby_version=)
|
72
|
+
gemspec.required_ruby_version = metadata['required_ruby_version']
|
73
|
+
end
|
74
|
+
|
75
|
+
if gemspec.respond_to?(:required_rubygems_version=)
|
76
|
+
gemspec.required_rubygems_version = metadata['required_ruby_version']
|
77
|
+
end
|
78
|
+
|
79
|
+
parse_versions = lambda { |versions|
|
80
|
+
case versions
|
81
|
+
when Array
|
82
|
+
versions.map { |v| v.to_s }
|
83
|
+
when String
|
84
|
+
versions.split(/,\s*/)
|
85
|
+
end
|
86
|
+
}
|
87
|
+
|
88
|
+
if metadata['dependencies']
|
89
|
+
metadata['dependencies'].each do |name,versions|
|
90
|
+
gemspec.add_dependency(name,parse_versions[versions])
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
if metadata['runtime_dependencies']
|
95
|
+
metadata['runtime_dependencies'].each do |name,versions|
|
96
|
+
gemspec.add_runtime_dependency(name,parse_versions[versions])
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
if metadata['development_dependencies']
|
101
|
+
metadata['development_dependencies'].each do |name,versions|
|
102
|
+
gemspec.add_development_dependency(name,parse_versions[versions])
|
103
|
+
end
|
14
104
|
end
|
15
105
|
end
|
metadata
CHANGED
@@ -1,74 +1,93 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-spellcheck
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.5
|
4
5
|
prerelease:
|
5
|
-
version: 0.1.4
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Postmodern
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-05-28 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: yard
|
17
|
-
|
18
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
18
|
+
requirements:
|
21
19
|
- - ~>
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version:
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0.6'
|
24
22
|
type: :runtime
|
25
|
-
version_requirements: *id001
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: ffi-hunspell
|
28
23
|
prerelease: false
|
29
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.6'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: ffi-hunspell
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
30
33
|
none: false
|
31
|
-
requirements:
|
34
|
+
requirements:
|
32
35
|
- - ~>
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: 0.2
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0.2'
|
35
38
|
type: :runtime
|
36
|
-
version_requirements: *id002
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: ore-tasks
|
39
39
|
prerelease: false
|
40
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0.2'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rubygems-tasks
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
41
49
|
none: false
|
42
|
-
requirements:
|
50
|
+
requirements:
|
43
51
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version:
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.1'
|
46
54
|
type: :development
|
47
|
-
version_requirements: *id003
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: rspec
|
50
55
|
prerelease: false
|
51
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
57
|
none: false
|
53
|
-
requirements:
|
58
|
+
requirements:
|
54
59
|
- - ~>
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version:
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.1'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '2.4'
|
57
70
|
type: :development
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '2.4'
|
78
|
+
description: Adds the 'spellcheck' command to YARD, which will spellcheck every docstring
|
79
|
+
within your documentation.
|
80
|
+
email: postmodern.mod3@gmail.com
|
81
|
+
executables:
|
63
82
|
- yard-spellcheck
|
64
83
|
extensions: []
|
65
|
-
|
66
|
-
extra_rdoc_files:
|
67
|
-
- README.md
|
84
|
+
extra_rdoc_files:
|
68
85
|
- ChangeLog.md
|
69
86
|
- LICENSE.txt
|
70
|
-
|
87
|
+
- README.md
|
88
|
+
files:
|
71
89
|
- .document
|
90
|
+
- .gitignore
|
72
91
|
- .rspec
|
73
92
|
- .yardopts
|
74
93
|
- ChangeLog.md
|
@@ -79,36 +98,35 @@ files:
|
|
79
98
|
- gemspec.yml
|
80
99
|
- lib/yard-spellcheck.rb
|
81
100
|
- lib/yard/cli/spellcheck.rb
|
101
|
+
- lib/yard/spellcheck.rb
|
82
102
|
- lib/yard/spellcheck/checker.rb
|
83
103
|
- lib/yard/spellcheck/printer.rb
|
104
|
+
- lib/yard/spellcheck/version.rb
|
84
105
|
- spec/spec_helper.rb
|
85
106
|
- yard-spellcheck.gemspec
|
86
|
-
homepage:
|
87
|
-
licenses:
|
107
|
+
homepage: https://github.com/postmodern/yard-spellcheck#readme
|
108
|
+
licenses:
|
88
109
|
- MIT
|
89
110
|
post_install_message:
|
90
111
|
rdoc_options: []
|
91
|
-
|
92
|
-
require_paths:
|
112
|
+
require_paths:
|
93
113
|
- lib
|
94
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
114
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
95
115
|
none: false
|
96
|
-
requirements:
|
97
|
-
- -
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version:
|
100
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ! '>='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
121
|
none: false
|
102
|
-
requirements:
|
103
|
-
- -
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
version:
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
106
126
|
requirements: []
|
107
|
-
|
108
|
-
|
109
|
-
rubygems_version: 1.8.1
|
127
|
+
rubyforge_project:
|
128
|
+
rubygems_version: 1.8.24
|
110
129
|
signing_key:
|
111
130
|
specification_version: 3
|
112
131
|
summary: Spellcheck your YARD documentat
|
113
132
|
test_files: []
|
114
|
-
|