squasher 0.7.1 → 0.7.3
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/ci.yml +29 -0
- data/lib/squasher/config.rb +3 -2
- data/lib/squasher/render.rb +5 -1
- data/lib/squasher/version.rb +1 -1
- metadata +3 -3
- data/.travis.yml +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c119d1c7581f2a095e9417f79ad66ffa78bfd0c60c90b7c60ee0ac5b9907258
|
4
|
+
data.tar.gz: bcce5a1fd4281e75a83a784e27282c0e3419469be567a5ee768037940a2eec4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 724ccdd003b9ae060e79cd081de7b75b4cd3195181946bc3f26056c0f5a0e6225d3630a5e8053f128b5781f5d1f1ebff16f79d380b3964fa2c006ea9736ee545
|
7
|
+
data.tar.gz: e0d2fadd2d22296ae6107bbb9057a6a1dc8b30092f4a0d9b1cec3a2112dcf1531d60eaafbe8c8d9e3fa74d8729a482af397b564a39c95e2e8039f3db4adeaa10
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
specs:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
matrix:
|
12
|
+
ruby-version:
|
13
|
+
- head
|
14
|
+
- '3.2'
|
15
|
+
- '3.1'
|
16
|
+
- '3.0'
|
17
|
+
- '2.7'
|
18
|
+
- '2.6'
|
19
|
+
- '2.5'
|
20
|
+
- jruby
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v3
|
23
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
24
|
+
uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
ruby-version: ${{ matrix.ruby-version }}
|
27
|
+
bundler-cache: true # 'bundle install' and cache
|
28
|
+
- name: Run tests
|
29
|
+
run: bundle exec rake
|
data/lib/squasher/config.rb
CHANGED
@@ -9,8 +9,9 @@ module Squasher
|
|
9
9
|
|
10
10
|
def process(path)
|
11
11
|
@error = false
|
12
|
-
|
13
|
-
|
12
|
+
# Support for Psych 4 (the default yaml parser for Ruby 3.1)
|
13
|
+
opts = Gem::Version.new(Psych::VERSION).segments.first < 4 ? {} : { aliases: true }
|
14
|
+
str = YAML.load(ERB.new(File.read(path)).result(binding), **opts)
|
14
15
|
[str, @error]
|
15
16
|
end
|
16
17
|
|
data/lib/squasher/render.rb
CHANGED
@@ -14,7 +14,11 @@ module Squasher
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def render
|
17
|
-
|
17
|
+
if RUBY_VERSION < '2.6'
|
18
|
+
ERB.new(template("#{ name }.rb"), nil, '-').result(binding)
|
19
|
+
else
|
20
|
+
ERB.new(template("#{ name }.rb"), trim_mode: '-').result(binding)
|
21
|
+
end
|
18
22
|
end
|
19
23
|
|
20
24
|
def each_schema_line(&block)
|
data/lib/squasher/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: squasher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Pchelintsev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -60,8 +60,8 @@ executables:
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
+
- ".github/workflows/ci.yml"
|
63
64
|
- ".gitignore"
|
64
|
-
- ".travis.yml"
|
65
65
|
- CHANGELOG.md
|
66
66
|
- Gemfile
|
67
67
|
- LICENSE.txt
|