tinify 1.5.0 → 1.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3dda25f35bfba265bb06d41f8f2502c6cb2ffbc6
4
- data.tar.gz: 36781fb4d3332d3b0a5e2de5ef645ee5a1168f29
2
+ SHA256:
3
+ metadata.gz: 9aadffa84ff9efe65549cdd2ffc0e3aa15290bf9c761c9bb6a2cf230b673371b
4
+ data.tar.gz: f0eb080d6e890d1e06a96524046991768b30eccf52e436bf7ae030ae3fe0d31e
5
5
  SHA512:
6
- metadata.gz: 8bf02a7aaa067f175b8c7e229305236d456ce6f98cb232923182b2e78392392448ae757ba3cc18f1a9b0812f6ea6170816a007195379f092adcbd7ff634ccc7c
7
- data.tar.gz: aa8b53e31d3909bb0692bb08e9f345b3ef117c02184ac133e24b62ad7563116e4275a9b5e7e690804ddc35e7712137931a1b04fab6d004d7c2b144966d12b816
6
+ metadata.gz: bffe92ca1ff9e0cbf9de95590fbf2c2e73e764e2a8cab6fc107d30a0cea6554409146db037bfd1c52a3640d17151557414d24de366e554830d65570bb538582e
7
+ data.tar.gz: bb6135ba1eedacd4bbed3dbc29e8d456f9486f9845c6c8e584f3e39da01e9f44ef742105e8191b2126e6cd755d1083ca5eb552f1eb62e439b139574ba6b1c7de
@@ -0,0 +1,113 @@
1
+ name: Ruby CI/CD
2
+
3
+ on: [push, pull_request]
4
+
5
+ permissions: {}
6
+ jobs:
7
+ Unit_tests:
8
+ runs-on: ${{ matrix.os }}
9
+ timeout-minutes: 10
10
+ # continue-on-error: ${{ matrix.experimental }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ ruby-version: [
15
+ '2.6', '2.7', '3.0', '3.1',
16
+ jruby,
17
+ ]
18
+ os: [ubuntu-latest, macOS-latest, windows-latest]
19
+ # experimental: [false]
20
+ include:
21
+ # TruffleRuby on Windows may fail
22
+ # commented out, because it marks the build as failed with a red cross (X)
23
+ # - ruby-version: truffleruby
24
+ # os: windows-latest
25
+ # experimental: true
26
+ - ruby-version: truffleruby
27
+ os: macOS-latest
28
+ experimental: false
29
+ - ruby-version: truffleruby
30
+ os: ubuntu-latest
31
+ experimental: false
32
+ steps:
33
+ - uses: actions/checkout@v3
34
+
35
+ - name: Set up ruby ${{ matrix.ruby-version }}
36
+ uses: ruby/setup-ruby@v1
37
+ with:
38
+ ruby-version: ${{ matrix.ruby-version }}
39
+ bundler-cache: true
40
+
41
+ - name: Install dependencies
42
+ run: bundle install
43
+
44
+ - name: Run specs
45
+ run: bundle exec rake
46
+
47
+ Integration_tests:
48
+ if: github.event_name == 'push'
49
+ runs-on: ${{ matrix.os }}
50
+ timeout-minutes: 10
51
+ needs: Unit_tests
52
+ strategy:
53
+ fail-fast: false
54
+ matrix:
55
+ ruby-version: [
56
+ "2.7", "3.1"
57
+ ]
58
+ os: [
59
+ ubuntu-latest,
60
+ macOS-latest,
61
+ # Disable windows due to an issue with binary encoding in the tests
62
+ # windows-latest
63
+ ]
64
+ steps:
65
+ - uses: actions/checkout@v3
66
+ - name: Set up ruby ${{ matrix.ruby-version }}
67
+ uses: actions/setup-ruby@v1
68
+ with:
69
+ ruby-version: ${{ matrix.ruby-version }}
70
+ bundler-cache: true
71
+ - name: Install dependencies
72
+ run: |
73
+ bundle install
74
+ - name: Run tests
75
+ env:
76
+ TINIFY_KEY: ${{ secrets.TINIFY_KEY }}
77
+ run: |
78
+ bundle exec rake integration
79
+ Publish:
80
+ if: |
81
+ github.repository == 'tinify/tinify-ruby' &&
82
+ startsWith(github.ref, 'refs/tags') &&
83
+ github.event_name == 'push'
84
+ timeout-minutes: 10
85
+ needs: [Unit_tests, Integration_tests]
86
+ runs-on: ubuntu-latest
87
+ steps:
88
+ - uses: actions/checkout@v3
89
+ - name: Set up Ruby 2.7
90
+ uses: ruby/setup-ruby@v1
91
+ with:
92
+ ruby-version: 2.7
93
+ - name: Check if properly tagged
94
+ run: |
95
+ PACKAGE_VERSION="$(ruby -e 'puts Gem::Specification::load("tinify.gemspec").version')";
96
+ CURRENT_TAG="${GITHUB_REF#refs/*/}";
97
+ if [[ "${PACKAGE_VERSION}" != "${CURRENT_TAG}" ]]; then
98
+ >&2 echo "Tag mismatch"
99
+ >&2 echo "Version in lib/tinify/version.rb (${PACKAGE_VERSION}) does not match the current tag=${CURRENT_TAG}"
100
+ >&2 echo "Skipping deploy"
101
+ exit 1;
102
+ fi
103
+ - run: bundle install
104
+ - name: Publish to RubyGems
105
+ run: |
106
+ mkdir -p $HOME/.gem
107
+ touch $HOME/.gem/credentials
108
+ chmod 0600 $HOME/.gem/credentials
109
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
110
+ gem build *.gemspec
111
+ gem push *.gem
112
+ env:
113
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ vendor/bundle
2
+ .bundle
data/CHANGES.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 1.6.0
2
+
3
+ Added transform & convert methods for the Tinify API.
4
+ Added helper property for getting the file extension (Result.extension)
5
+
6
+ Extend runtime support for the following runtimes:
7
+
8
+ * Ruby 2.6
9
+ * Ruby 2.7
10
+ * Ruby 3.0
11
+ * Ruby 3.1
12
+
13
+ Experimental support
14
+
15
+ * JRuby
16
+ * Truffle Ruby
17
+
18
+
1
19
  ## 1.5.0
2
20
  * Retry failed requests by default.
3
21
 
data/Gemfile CHANGED
@@ -2,3 +2,10 @@ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in tinify.gemspec
4
4
  gemspec
5
+
6
+ gem "rake", ">= 12.3.3"
7
+ gem 'minitest', '~> 5.5'
8
+
9
+ # TODO: Pinned because `Webmock ~> 1.24` breaks specs. Unpin in future
10
+ # refactor.
11
+ gem 'webmock', '~> 1.23.0'
data/Gemfile.lock CHANGED
@@ -1,32 +1,35 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tinify (1.5.0)
4
+ tinify (1.6.0)
5
5
  httpclient (~> 2.6)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- addressable (2.3.6)
11
- crack (0.4.2)
12
- safe_yaml (~> 1.0.0)
10
+ addressable (2.8.1)
11
+ public_suffix (>= 2.0.2, < 6.0)
12
+ crack (0.4.5)
13
+ rexml
14
+ hashdiff (0.3.9)
13
15
  httpclient (2.8.3)
14
- minitest (5.5.1)
15
- rake (10.4.2)
16
- safe_yaml (1.0.4)
17
- webmock (1.20.4)
16
+ minitest (5.16.3)
17
+ public_suffix (5.0.0)
18
+ rake (13.0.6)
19
+ rexml (3.2.5)
20
+ webmock (1.23.0)
18
21
  addressable (>= 2.3.6)
19
22
  crack (>= 0.3.2)
23
+ hashdiff
20
24
 
21
25
  PLATFORMS
22
26
  ruby
23
27
 
24
28
  DEPENDENCIES
25
- bundler (~> 1.7)
26
29
  minitest (~> 5.5)
27
- rake (~> 10.0)
30
+ rake (>= 12.3.3)
28
31
  tinify!
29
- webmock (~> 1.20)
32
+ webmock (~> 1.23.0)
30
33
 
31
34
  BUNDLED WITH
32
- 1.13.6
35
+ 2.3.19
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2013-2016 Voormedia
3
+ Copyright (c) 2013-2018 Tinify
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- [<img src="https://travis-ci.org/tinify/tinify-ruby.svg?branch=master" alt="Build Status">](https://travis-ci.org/tinify/tinify-ruby)
1
+ [![Gem](https://img.shields.io/gem/v/tinify)](https://rubygems.org/gems/tinify)
2
+ [![MIT License](http://img.shields.io/badge/license-MIT-green.svg) ](https://github.com/tinify/tinify-java/blob/main/LICENSE)
3
+ [![Ruby CI](https://github.com/tinify/tinify-ruby/actions/workflows/ci-cd.yaml/badge.svg)](https://github.com/tinify/tinify-ruby/actions/workflows/ci-cd.yaml)
2
4
 
3
5
  # Tinify API client for Ruby
4
6