rubysl-strscan 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/.travis.yml +3 -10
- data/lib/rubysl/strscan/strscan.rb +3 -3
- data/lib/rubysl/strscan/version.rb +1 -1
- data/rubysl-strscan.gemspec +0 -3
- data/spec/scan_spec.rb +2 -0
- metadata +53 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
|
4
|
-
|
5
|
-
SHA512:
|
6
|
-
|
7
|
-
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e5cd12b3bdf59dda0db170b69c29c2c7bcb3f12f
|
4
|
+
data.tar.gz: 85c318286b0a44f59f0a616fe79583d6e42e5c93
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 76da822b22a71a028bfbfda33958f93a4f5ebe3946cdbf7db4c3b1bc17dc10475e56f7cad9d23ea915c5717dafc494198106f94b2d20c8c10591d3873969aefb
|
7
|
+
data.tar.gz: da29ade64d32e19175815fc8e530ec1c87759089bd0c341b3afe5c19916a032a8b2b5fe14c395820669bf7b012beb457c7bcacdba6d6893e8a3629320a0163e3
|
data/.travis.yml
CHANGED
@@ -1,14 +1,7 @@
|
|
1
1
|
language: ruby
|
2
2
|
env:
|
3
3
|
- RUBYLIB=lib
|
4
|
-
|
5
|
-
script: mspec spec
|
4
|
+
script: bundle exec mspec
|
6
5
|
rvm:
|
7
|
-
- 1.
|
8
|
-
- rbx-
|
9
|
-
matrix:
|
10
|
-
exclude:
|
11
|
-
- rvm: 1.8.7
|
12
|
-
env: RUBYLIB=lib
|
13
|
-
- rvm: rbx-1
|
14
|
-
env: RUBYLIB=
|
6
|
+
- 1.9.3
|
7
|
+
- rbx-nightly-19mode
|
@@ -146,7 +146,7 @@ class StringScanner
|
|
146
146
|
end
|
147
147
|
|
148
148
|
def pre_match
|
149
|
-
@string.
|
149
|
+
@string.byteslice(0, match.full.at(0)) if @match
|
150
150
|
end
|
151
151
|
|
152
152
|
def reset_state
|
@@ -161,7 +161,7 @@ class StringScanner
|
|
161
161
|
end
|
162
162
|
|
163
163
|
def rest
|
164
|
-
@string.
|
164
|
+
@string.byteslice(@pos, @string.bytesize - @pos)
|
165
165
|
end
|
166
166
|
|
167
167
|
def rest?
|
@@ -280,7 +280,7 @@ class StringScanner
|
|
280
280
|
|
281
281
|
return width unless getstr
|
282
282
|
|
283
|
-
@string.
|
283
|
+
@string.byteslice(@prev_pos, width)
|
284
284
|
end
|
285
285
|
private :_scan
|
286
286
|
end
|
data/rubysl-strscan.gemspec
CHANGED
@@ -16,10 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
|
-
spec.required_ruby_version = "~> 1.8.7"
|
20
|
-
|
21
19
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
20
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
21
|
spec.add_development_dependency "mspec", "~> 1.5"
|
24
|
-
spec.add_development_dependency "rubysl-prettyprint", "~> 1.0"
|
25
22
|
end
|
data/spec/scan_spec.rb
CHANGED
metadata
CHANGED
@@ -1,66 +1,64 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubysl-strscan
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Brian Shirai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2013-08-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
|
-
|
17
|
-
|
18
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
19
17
|
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version:
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
22
20
|
type: :development
|
23
|
-
version_requirements: *id001
|
24
|
-
- !ruby/object:Gem::Dependency
|
25
|
-
name: rake
|
26
21
|
prerelease: false
|
27
|
-
|
28
|
-
requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
29
31
|
- - ~>
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
version:
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
32
34
|
type: :development
|
33
|
-
version_requirements: *id002
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: mspec
|
36
35
|
prerelease: false
|
37
|
-
|
38
|
-
requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
39
45
|
- - ~>
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version:
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.5'
|
42
48
|
type: :development
|
43
|
-
version_requirements: *id003
|
44
|
-
- !ruby/object:Gem::Dependency
|
45
|
-
name: rubysl-prettyprint
|
46
49
|
prerelease: false
|
47
|
-
|
48
|
-
requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
49
52
|
- - ~>
|
50
|
-
- !ruby/object:Gem::Version
|
51
|
-
version:
|
52
|
-
type: :development
|
53
|
-
version_requirements: *id004
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.5'
|
54
55
|
description: Ruby standard library strscan.
|
55
|
-
email:
|
56
|
+
email:
|
56
57
|
- brixen@gmail.com
|
57
58
|
executables: []
|
58
|
-
|
59
59
|
extensions: []
|
60
|
-
|
61
60
|
extra_rdoc_files: []
|
62
|
-
|
63
|
-
files:
|
61
|
+
files:
|
64
62
|
- .gitignore
|
65
63
|
- .travis.yml
|
66
64
|
- Gemfile
|
@@ -125,33 +123,30 @@ files:
|
|
125
123
|
- spec/terminate_spec.rb
|
126
124
|
- spec/unscan_spec.rb
|
127
125
|
homepage: https://github.com/rubysl/rubysl-strscan
|
128
|
-
licenses:
|
126
|
+
licenses:
|
129
127
|
- BSD
|
130
128
|
metadata: {}
|
131
|
-
|
132
129
|
post_install_message:
|
133
130
|
rdoc_options: []
|
134
|
-
|
135
|
-
require_paths:
|
131
|
+
require_paths:
|
136
132
|
- lib
|
137
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
138
|
-
requirements:
|
139
|
-
- -
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version:
|
142
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
-
requirements:
|
144
|
-
- -
|
145
|
-
- !ruby/object:Gem::Version
|
146
|
-
version:
|
133
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - '>='
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - '>='
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
147
143
|
requirements: []
|
148
|
-
|
149
144
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.
|
145
|
+
rubygems_version: 2.0.7
|
151
146
|
signing_key:
|
152
147
|
specification_version: 4
|
153
148
|
summary: Ruby standard library strscan.
|
154
|
-
test_files:
|
149
|
+
test_files:
|
155
150
|
- spec/append_spec.rb
|
156
151
|
- spec/beginning_of_line_spec.rb
|
157
152
|
- spec/bol_spec.rb
|