typocheck 0.9 → 2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be4f13ece69030625fe9d5dce56681ec9a1da969
4
- data.tar.gz: 8656abeff7944ff60386eb00069c2d3c22016590
3
+ metadata.gz: 945b75cd093eab7611e0bdd07052c6a3062b49d2
4
+ data.tar.gz: c1b355c78a67d1a81e351da6285fb3e89667fc90
5
5
  SHA512:
6
- metadata.gz: b161ad2fc066b00c6f71e22b095ec5a619bf51692493608ff918404f127b5dc8f59a147003582fdc9a4a101cc6159929562c235e7c45c6a9cacbd938f7fa83dc
7
- data.tar.gz: 2d5a15f486f61c7e0b1a16eb482f89aac0ed255851880fa48039ffd296e78e1bbbfccbe45d937f65ceb1baaacf3eaa83e71386cfae11f987f52dd8f385dcb9e0
6
+ metadata.gz: 5b540a7f1ea32553947884a8de24a737e92f0f27e55d6d1aca0ee990fc94db1366e1aade04faf4a57f83b542fae3d4b7786d43fd4a43ba7a8b29ba1605d92acb
7
+ data.tar.gz: ebaa2c34db3ba5176ad57cf1a0e2d414736eb1e5a97087f8147bdc5294e34cad9c208b1fe34b7c961bd3ab647557f232002bbd0443cf09cbbc558115f1bb0936
data/README.md CHANGED
@@ -6,11 +6,29 @@ comments typo checking tool
6
6
 
7
7
  ### Usage
8
8
 
9
+ Check typo for words
10
+
11
+ ```
12
+ $ ./typocheck.rb -w gdd,blessm,me
9
13
  ```
10
- Check typo for a source code
11
- $ bin/typocheck -f helloword.rb
14
+
15
+ Check typo for files
16
+
17
+ ```
18
+ $ ./typocheck.rb -f file1,file2,...
19
+ ```
20
+
12
21
  Get more help with
13
- $ bin/typocheck -h
22
+
23
+ ```
24
+ $ ./typocheck.rb -h
25
+ ```
26
+
27
+ Or install with RubyGems
28
+
29
+ ```
30
+ $ gem install typocheck
31
+ $ typocheck -h # to get help before start
14
32
  ```
15
33
 
16
34
  ### License
@@ -61,23 +61,23 @@ class CommentGetter
61
61
  File.readlines(source_file).each do |line|
62
62
  if line =~ /^#\!/
63
63
  next
64
- elsif multi_comment == false && line =~ /'''/
64
+ elsif multi_comment == false && line =~ /"""/
65
65
  # ++
66
66
  # multi comment start
67
67
  # ++
68
68
  comments << line
69
69
  multi_comment = true
70
- elsif multi_comment == false && line !~ /'''/
70
+ elsif multi_comment == false && line !~ /"""/
71
71
  if line =~ /\s*(#.*)$/
72
72
  comments << line
73
73
  end
74
- elsif multi_comment == true && line =~ /'''/
74
+ elsif multi_comment == true && line =~ /"""/
75
75
  # ++
76
76
  # multi comment end
77
77
  # ++
78
78
  comments << line
79
79
  multi_comment = false
80
- elsif multi_comment == true && line !~ /'''/
80
+ elsif multi_comment == true && line !~ /"""/
81
81
  comments << line
82
82
  end
83
83
  end
@@ -4,8 +4,8 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  Gem::Specification.new do |s|
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.name = "typocheck"
7
- s.version = "0.9"
8
- s.date = %q{2015-02-14}
7
+ s.version = "2.0"
8
+ s.date = %q{2015-02-17}
9
9
  s.summary = "typo checking of comments in source code"
10
10
  s.description = "typocheck, a comments typo checking tool for Ruby, Python, Javascript, Perl, Shell, C/C++"
11
11
  s.author = "Minghe Huang"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typocheck
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.9'
4
+ version: '2.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minghe Huang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-14 00:00:00.000000000 Z
11
+ date: 2015-02-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: typocheck, a comments typo checking tool for Ruby, Python, Javascript,
14
14
  Perl, Shell, C/C++