meta_commit_contracts 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/meta_commit_contracts/ast.rb +12 -2
- data/lib/meta_commit_contracts/change_context.rb +0 -1
- data/lib/meta_commit_contracts/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf9c501e16635118cbc19c3c81db165d854d69ec
|
4
|
+
data.tar.gz: 474eb212c02a4a87ea5ff4b664a9b09438799525
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ceaa7313e7dc9437b2b8bdb6938a1ded5b688bffa84acca8e6178782880342856812b3bb9a31f3a31be20c7b15562b780a0db5de56dd9df088ff115a5e0ca1d
|
7
|
+
data.tar.gz: 7ebf5e484f5ab55c18fa0790335ce6d8eb6b35089f17d2a000a32d92081e9444ff180ac0c881c0c4412f251e77548600c7687c867ace5a0073b68485c4463102
|
data/README.md
CHANGED
@@ -13,6 +13,7 @@ Contracts (and their responsibilities) :
|
|
13
13
|
- stores abstract syntax tree
|
14
14
|
- provides access to children nodes
|
15
15
|
- provides access to first line number and last line number
|
16
|
+
- provides access to first column number and last column number
|
16
17
|
- Parser
|
17
18
|
- builds ast node from code string
|
18
19
|
- knows about file extensions he supports
|
@@ -9,14 +9,24 @@ module MetaCommit::Contracts
|
|
9
9
|
|
10
10
|
end
|
11
11
|
|
12
|
-
# @return [Integer, nil] line number where ast starts
|
12
|
+
# @return [Integer, nil] line number where ast starts (starting from 1)
|
13
13
|
def first_line
|
14
14
|
|
15
15
|
end
|
16
16
|
|
17
|
-
# @return [Integer, nil] line number where ast ends
|
17
|
+
# @return [Integer, nil] line number where ast ends (starting from 1)
|
18
18
|
def last_line
|
19
19
|
|
20
20
|
end
|
21
|
+
|
22
|
+
# @return [Integer, nil] column where ast starts (starting from 0)
|
23
|
+
def first_column
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
# @return [Integer, nil] column where ast ends (starting from 0)
|
28
|
+
def last_column
|
29
|
+
|
30
|
+
end
|
21
31
|
end
|
22
32
|
end
|
@@ -4,7 +4,6 @@ module MetaCommit::Contracts
|
|
4
4
|
# @attr [String] old_lineno line number in the old file
|
5
5
|
# @attr [String] new_lineno line number in the new file
|
6
6
|
# @attr [Numeric, Nil] column position of the first character in the new line that is different from character at the same position in the old line (it has meaning only when type == :replace)
|
7
|
-
# @attr [Numeric, Nil] column the position (with value >= 1) from which the values differ (it has meaning only when type == :replace)
|
8
7
|
# @attr [String] commit_id_old hash of the old commit
|
9
8
|
# @attr [String] commit_id_new hash of the new commit
|
10
9
|
# @attr [MetaCommit::Contracts::ContextualAst] old_contextual_ast stores ast and context from the old file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta_commit_contracts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stanislav Dobrovolskiy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|