code_breaker 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -1
- data/README.md +5 -2
- data/code_breaker.gemspec +4 -4
- data/lib/code_breaker/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4ac73ad102a55afe5e5a492a42ded9d2dfe095c
|
4
|
+
data.tar.gz: d064a7361c2a50f443349ed321cd5818fd330aff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 235820b55d87c7c830a08234c26a457e3a6f227c5f8dae64fed87008cdc79b62d273896b36ab40fcbb2abe16cc1ef86f4e27235cc637b39973690645a571e8bc
|
7
|
+
data.tar.gz: afea7c80e437651b71e945f30659f6ae90f32771527da6108483435737871936af9f80350642478e26b06642770b408f14ad71387267869519fe6341069dae1d
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -13,7 +13,7 @@ sum = Rational(2, 3) + 4
|
|
13
13
|
```
|
14
14
|
|
15
15
|
By breaking down this line into the receiver classes and called methods you can
|
16
|
-
check e.g. whether a code snippet assigns the sum of a Rational and
|
16
|
+
check e.g. whether a code snippet assigns the sum of a Rational and an Integer to
|
17
17
|
a variable with the name `sum`.
|
18
18
|
|
19
19
|
Testing global code snippets might be important for testing the code of simple
|
@@ -44,7 +44,11 @@ require 'code_breaker'
|
|
44
44
|
|
45
45
|
code_snippet = 'crazy_number = Rational(3, 5) + 42 - Complex(2.3, 6.4) * 1.2'
|
46
46
|
CodeBreaker.parse(code_snippet)
|
47
|
+
# for Ruby < v2.4.0:
|
47
48
|
# => {:lvasgn=>[:crazy_number, [Rational, :+, Fixnum, :-, Complex, :*, Float]]}
|
49
|
+
#
|
50
|
+
# for Ruby >= v2.4.0:
|
51
|
+
# => {:lvasgn=>[:crazy_number, [Rational, :+, Integer, :-, Complex, :*, Float]]}
|
48
52
|
|
49
53
|
code_snippet = '"hello" + "World"'
|
50
54
|
CodeBreaker.parse(code_snippet)
|
@@ -84,4 +88,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/daigak
|
|
84
88
|
## License
|
85
89
|
|
86
90
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
87
|
-
|
data/code_breaker.gemspec
CHANGED
@@ -27,9 +27,9 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ['lib']
|
29
29
|
|
30
|
-
spec.add_dependency 'parser', '~> 2.
|
30
|
+
spec.add_dependency 'parser', '~> 2.4'
|
31
31
|
|
32
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
33
|
-
spec.add_development_dependency 'rake', '~>
|
34
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
32
|
+
spec.add_development_dependency 'bundler', '~> 1.14'
|
33
|
+
spec.add_development_dependency 'rake', '~> 12.0'
|
34
|
+
spec.add_development_dependency 'rspec', '~> 3.6'
|
35
35
|
end
|
data/lib/code_breaker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_breaker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Götze
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.14'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.14'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '12.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '12.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
61
|
+
version: '3.6'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
68
|
+
version: '3.6'
|
69
69
|
description: Breaking a Ruby code snippet into a sequence of classes and their connecting
|
70
70
|
methods.
|
71
71
|
email:
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
120
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.
|
121
|
+
rubygems_version: 2.6.12
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: Breaking a Ruby code snippet into a sequence of classes and their connecting
|