synvert 0.18.0 → 0.18.1
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 +4 -4
- data/.github/workflows/main.yml +32 -0
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/synvert/cli.rb +4 -4
- data/lib/synvert/version.rb +1 -1
- metadata +3 -3
- data/.travis.yml +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6b88f72e6317a08babbaa9770e563ba1828efb17524c400dbfa3ea9cdbfdf5aa
|
|
4
|
+
data.tar.gz: f6cec7f9e9188698145bf3ff79b7eaaa4ef79ff4752248d51380cf0838504639
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 04b9d963283fa2617efd4d0efe0c793efa2fe392d5c1a797e7aa2919d309790052b600a6ffc7471d08a027fe6e7e30f63f54345d5eeca527a713de13c509bea7
|
|
7
|
+
data.tar.gz: cde9dab396fad919547a47a050bf22d714941b657f6260dd0125035f59f5d8ecb003ecaff260072d2cbf1f13d350c73e09723d34032b4a11cb4979178277db28
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
+
# They are provided by a third-party and are governed by
|
|
3
|
+
# separate terms of service, privacy policy, and support
|
|
4
|
+
# documentation.
|
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
7
|
+
|
|
8
|
+
name: CI
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
push:
|
|
12
|
+
branches: [ master ]
|
|
13
|
+
pull_request:
|
|
14
|
+
branches: [ master ]
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
test:
|
|
18
|
+
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
strategy:
|
|
21
|
+
matrix:
|
|
22
|
+
ruby-version: ['2.5', '2.6', '2.7', '3.0']
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v2
|
|
26
|
+
- name: Set up Ruby
|
|
27
|
+
uses: ruby/setup-ruby@v1
|
|
28
|
+
with:
|
|
29
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
30
|
+
bundler-cache: true
|
|
31
|
+
- name: Run tests
|
|
32
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Synvert
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
4
|
[](https://coveralls.io/r/xinminlabs/synvert)
|
|
5
5
|
[](http://badge.fury.io/rb/synvert)
|
|
6
6
|
|
data/lib/synvert/cli.rb
CHANGED
|
@@ -247,7 +247,7 @@ module Synvert
|
|
|
247
247
|
group, name = snippet_name.split('/')
|
|
248
248
|
rewriter = Core::Rewriter.call group, name
|
|
249
249
|
output = {
|
|
250
|
-
affected_files: rewriter.affected_files.union(rewriter.sub_snippets.sum(
|
|
250
|
+
affected_files: rewriter.affected_files.union(rewriter.sub_snippets.sum(Set.new, &:affected_files)).to_a,
|
|
251
251
|
warnings: rewriter.warnings.union(rewriter.sub_snippets.sum([], &:warnings)),
|
|
252
252
|
todo: rewriter.todo
|
|
253
253
|
}
|
|
@@ -259,17 +259,17 @@ module Synvert
|
|
|
259
259
|
def execute_snippet
|
|
260
260
|
input = STDIN.read
|
|
261
261
|
if plain_output?
|
|
262
|
-
puts
|
|
262
|
+
puts '===== execute started ====='
|
|
263
263
|
rewriter = eval(input)
|
|
264
264
|
rewriter.warnings.each do |warning|
|
|
265
265
|
puts '[Warn] ' + warning.message
|
|
266
266
|
end
|
|
267
267
|
puts rewriter.todo if rewriter.todo
|
|
268
|
-
puts
|
|
268
|
+
puts '===== execute done ====='
|
|
269
269
|
elsif json_output?
|
|
270
270
|
rewriter = eval(input)
|
|
271
271
|
output = {
|
|
272
|
-
affected_files: rewriter.affected_files.union(rewriter.sub_snippets.sum(
|
|
272
|
+
affected_files: rewriter.affected_files.union(rewriter.sub_snippets.sum(Set.new, &:affected_files)).to_a,
|
|
273
273
|
warnings: rewriter.warnings.union(rewriter.sub_snippets.sum([], &:warnings)),
|
|
274
274
|
todo: rewriter.todo
|
|
275
275
|
}
|
data/lib/synvert/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: synvert
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.18.
|
|
4
|
+
version: 0.18.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Richard Huang
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-07-
|
|
11
|
+
date: 2021-07-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: synvert-core
|
|
@@ -88,9 +88,9 @@ executables:
|
|
|
88
88
|
extensions: []
|
|
89
89
|
extra_rdoc_files: []
|
|
90
90
|
files:
|
|
91
|
+
- ".github/workflows/main.yml"
|
|
91
92
|
- ".gitignore"
|
|
92
93
|
- ".rspec"
|
|
93
|
-
- ".travis.yml"
|
|
94
94
|
- CHANGELOG.md
|
|
95
95
|
- Gemfile
|
|
96
96
|
- LICENSE.txt
|