approvals 0.0.25 → 0.1.7

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
2
  SHA256:
3
- metadata.gz: d9fa305870fc2d21ab0b22f4809721dc16dd058da1af3fc2fc356511817c1594
4
- data.tar.gz: 7266db245dbbaf498cd3598a1f7bcbcab4dbfc34fe5cf35463dc55f99d1935b7
3
+ metadata.gz: 43936933022bdcc8965941a6ea97c91cb2f9a60064009ac07885e9dd8ef1c915
4
+ data.tar.gz: ce35cc1aad887eda3d8fc0ed107a5f9e49c5991c3f5f17ea87e4980815d9feea
5
5
  SHA512:
6
- metadata.gz: 417b63747eaed8183d716062279730221a149fe0ebb3970ec06c83dd9337d70e530ae4a70f1993b43d8a6ac0a233ee1f6958007b3f8329637480cee23516d96b
7
- data.tar.gz: 763de7b3a7ede22c7781440e77ac9cc0af01dd1e1174981a89e439e2525df9d5c5873b66477e71e717be45084603c8c43e37ec5d97f99df626d607140003ccc9
6
+ metadata.gz: f2bd0c1efa99d1968cc33ecf4163493afd06e14b96aa61a470e872aec556f24eeef536e62a544c235d37916d6d15382192455e230fac86ee1262a96cb8d0ab3e
7
+ data.tar.gz: 1d0c5c1711f7d6429d4add8e0ce521c39871da24c76793a227831bb1a2807aab6f0fe724b451024ec84983756c4e3922ab621a0ecf2a2c49ed12dc73129d2fcd
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: 'bundler'
4
+ directory: '/'
5
+ schedule:
6
+ interval: 'daily'
7
+ - package-ecosystem: "github-actions"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "daily"
@@ -0,0 +1,58 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+
7
+ jobs:
8
+ publish-rubygems:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Setup Ruby, JRuby and TruffleRuby
12
+ uses: ruby/setup-ruby@v1.215.0
13
+ with:
14
+ ruby-version : 2.7.6
15
+ - uses: actions/checkout@v4
16
+ - name: Install dependecies
17
+ run: bundle install
18
+ - name: Run Tests
19
+ run: ./run_tests.sh
20
+ - name: Determine version from git tag
21
+ id: version
22
+ run: |
23
+ echo ::set-output name=tag::${GITHUB_REF#refs/*/}
24
+
25
+
26
+ - name: set version
27
+ run: |
28
+ rm ./lib/approvals/version.rb
29
+ echo "module Approvals; VERSION = \"${{ steps.version.outputs.tag }}\"; end" > ./lib/approvals/version.rb
30
+
31
+ - name: Push changes
32
+ run: |
33
+ git config --local user.email "action@github.com"
34
+ git config --local user.name "GitHub Action"
35
+ git commit -m "v${{ steps.version.outputs.tag }}" -a || echo "nothing to commit"
36
+ git checkout -b temp
37
+ git fetch
38
+ git checkout main
39
+ git merge temp
40
+ remote="https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git"
41
+ branch="main"
42
+ git push "${remote}" ${branch} || echo "nothing to push"
43
+ shell: bash
44
+ - name: Generate gem credentials
45
+ run: |
46
+ mkdir -p ~/.gem
47
+ cat << EOF > ~/.gem/credentials
48
+ ---
49
+ :rubygems_api_key: ${{ secrets.RUBY_GEMS_KEY }}
50
+ EOF
51
+ - name: Chmod file
52
+ run: chmod 0600 ~/.gem/credentials
53
+ - name: Publish
54
+ run: |
55
+ git status
56
+ bundle exec rake release --trace
57
+
58
+
@@ -0,0 +1,41 @@
1
+ name: Build
2
+ on:
3
+ push:
4
+ branches: [ main ]
5
+ pull_request:
6
+ branches: [ main ]
7
+
8
+ jobs:
9
+ run-tests:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ ruby: [ '2.7.6', '3.0.4', '3.1.2' ] #, 'jruby-head' ]
15
+ steps:
16
+ - name: Setup Ruby, JRuby and TruffleRuby
17
+ uses: ruby/setup-ruby@v1.215.0
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ - uses: actions/checkout@v4
21
+ - name: Install dependecies
22
+ run: bundle install
23
+ - name: Run Tests
24
+ run: ./run_tests.sh
25
+
26
+ auto-merge:
27
+ needs: run-tests
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - name: Check out repo
31
+ uses: actions/checkout@v4
32
+ - name: auto-merge
33
+ if: |
34
+ github.actor == 'dependabot[bot]' &&
35
+ github.event_name == 'pull_request'
36
+ run: |
37
+ gh pr merge --auto --rebase "$PR_URL"
38
+ env:
39
+ PR_URL: ${{github.event.pull_request.html_url}}
40
+ # this secret needs to be in the settings.secrets.dependabot
41
+ GITHUB_TOKEN: ${{secrets.GH_ACTION_TOKEN}}
@@ -0,0 +1,22 @@
1
+ name: Update markdown snippets
2
+ on:
3
+ push:
4
+ jobs:
5
+ update-markdown-snippets:
6
+ runs-on: windows-latest
7
+ steps:
8
+ - uses: actions/checkout@v4
9
+ - name: Run MarkdownSnippets
10
+ run: |
11
+ dotnet tool install --global MarkdownSnippets.Tool
12
+ mdsnippets ${GITHUB_WORKSPACE}
13
+ shell: bash
14
+ - name: Push changes
15
+ run: |
16
+ git config --local user.email "action@github.com"
17
+ git config --local user.name "GitHub Action"
18
+ git commit -m "d updated markdown snippets" -a || echo "nothing to commit"
19
+ remote="https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git"
20
+ branch="${GITHUB_REF:11}"
21
+ git push "${remote}" ${branch} || echo "nothing to push"
22
+ shell: bash
data/.gitignore CHANGED
@@ -1,10 +1,12 @@
1
1
  *.gem
2
+ .gem/
2
3
  .bundle
3
- Gemfile.lock
4
4
  pkg/*
5
- *.received.txt
5
+ *.received.*
6
6
  .approvals
7
7
  tmp/
8
8
  vendor/
9
9
 
10
10
  ext/Rakefile
11
+ .ruby-version
12
+ .gitpod.yml
data/CHANGELOG.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  * Your contribution here
6
6
 
7
+ * Updated gemspec to make 'json' an explicit dependency
8
+
7
9
  ### v0.0.22 (2015-10-22)
8
10
 
9
11
  * Fix bug in non-binary comparisons.
data/Gemfile CHANGED
@@ -2,5 +2,3 @@ source "http://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in rspec-approvals.gemspec
4
4
  gemspec
5
-
6
- gem 'rubysl', '~> 2.0', :platform => :rbx
data/Gemfile.lock ADDED
@@ -0,0 +1,44 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ approvals (0.1.7)
5
+ json (~> 2.0)
6
+ nokogiri (~> 1.8)
7
+ thor (~> 1.0)
8
+
9
+ GEM
10
+ remote: http://rubygems.org/
11
+ specs:
12
+ diff-lcs (1.5.1)
13
+ json (2.9.1)
14
+ mini_portile2 (2.8.8)
15
+ nokogiri (1.18.2)
16
+ mini_portile2 (~> 2.8.2)
17
+ racc (~> 1.4)
18
+ racc (1.8.1)
19
+ rake (13.2.1)
20
+ rspec (3.13.0)
21
+ rspec-core (~> 3.13.0)
22
+ rspec-expectations (~> 3.13.0)
23
+ rspec-mocks (~> 3.13.0)
24
+ rspec-core (3.13.0)
25
+ rspec-support (~> 3.13.0)
26
+ rspec-expectations (3.13.0)
27
+ diff-lcs (>= 1.2.0, < 2.0)
28
+ rspec-support (~> 3.13.0)
29
+ rspec-mocks (3.13.0)
30
+ diff-lcs (>= 1.2.0, < 2.0)
31
+ rspec-support (~> 3.13.0)
32
+ rspec-support (3.13.0)
33
+ thor (1.3.2)
34
+
35
+ PLATFORMS
36
+ ruby
37
+
38
+ DEPENDENCIES
39
+ approvals!
40
+ rake (~> 13.0)
41
+ rspec (~> 3.1)
42
+
43
+ BUNDLED WITH
44
+ 2.3.23
data/README.md CHANGED
@@ -1,10 +1,28 @@
1
1
  # Approvals
2
2
 
3
- [![Build Status](https://secure.travis-ci.org/kytrinyx/approvals.svg?branch=master)](http://travis-ci.org/kytrinyx/approvals)
4
- [![Gem Version](https://badge.fury.io/rb/approvals.svg)](http://badge.fury.io/rb/approvals)
3
+ [![Build](https://github.com/approvals/ApprovalTests.Ruby/actions/workflows/test.yml/badge.svg)](https://github.com/approvals/ApprovalTests.Ruby/actions/workflows/test.yml)[![Gem Version](https://badge.fury.io/rb/approvals.svg)](http://badge.fury.io/rb/approvals)
5
4
  [![Code Climate](https://codeclimate.com/github/kytrinyx/approvals.svg)](https://codeclimate.com/github/kytrinyx/approvals)
6
5
  [![Gemnasium](https://gemnasium.com/kytrinyx/approvals.svg)](https://gemnasium.com/kytrinyx/approvals)
7
6
 
7
+ <!-- toc -->
8
+ ## Contents
9
+
10
+ * [Getting Started](#getting-started)
11
+ * [New Projects](#new-projects)
12
+ * [Configuration](#configuration)
13
+ * [Usage](#usage)
14
+ * [Customizing formatted output](#customizing-formatted-output)
15
+ * [CLI](#cli)
16
+ * [Workflow Using VimDiff](#workflow-using-vimdiff)
17
+ * [RSpec](#rspec)
18
+ * [Naming](#naming)
19
+ * [Formatting](#formatting)
20
+ * [Exclude dynamically changed values from json](#exclude-dynamically-changed-values-from-json)
21
+ * [Approving a spec](#approving-a-spec)
22
+ * [Expensive computations](#expensive-computations)
23
+ * [RSpec executable](#rspec-executable)
24
+ * [Example use cases](#example-use-cases)
25
+ * [Verifying complex SQL in Rails](#verifying-complex-sql-in-rails)<!-- endToc -->
8
26
 
9
27
  Approvals are based on the idea of the *_golden master_*.
10
28
 
@@ -19,14 +37,22 @@ See [ApprovalTests](http://www.approvaltests.com) for videos and additional docu
19
37
 
20
38
  Also, check out Herding Code's [podcast #117](http://t.co/GLn88R5) in
21
39
  which Llewellyn Falco is interviewed about approvals.
40
+ ## Getting Started
22
41
 
42
+ ### New Projects
43
+
44
+ The easiest way to get started with a new project is to clone the [Starter Project](https://github.com/approvals/ApprovalTests.Ruby.starterproject)
23
45
  ## Configuration
24
46
 
25
- ```ruby
47
+ <!-- snippet: config-example -->
48
+ <a id='snippet-config-example'></a>
49
+ ```rb
26
50
  Approvals.configure do |config|
27
- config.approvals_path = 'output/goes/here/'
51
+ config.approvals_path = 'output/dir/'
28
52
  end
29
53
  ```
54
+ <sup><a href='/spec/configuration_spec.rb#L12-L16' title='Snippet source file'>snippet source</a> | <a href='#snippet-config-example' title='Start of snippet'>anchor</a></sup>
55
+ <!-- endSnippet -->
30
56
 
31
57
  The default location for the output files is
32
58
 
@@ -260,4 +286,48 @@ verify do
260
286
  end
261
287
  ```
262
288
 
289
+ ## Example use cases
290
+
291
+ ### Verifying complex SQL in Rails
292
+
293
+ If you're using Rails and want to avoid accidentally introducing N+1 database queries, you can define a `verify_sql` helper like so:
294
+
295
+ ```ruby
296
+ # spec/spec_helper.rb
297
+
298
+ require "./spec/support/approvals_helper"
299
+
300
+ RSpec.configure do |config|
301
+ config.include ApprovalsHelper
302
+ end
303
+
304
+ # spec/support/approvals_helper.rb
305
+
306
+ module ApprovalsHelper
307
+ def verify_sql(&block)
308
+ sql = []
309
+
310
+ subscriber = ->(_name, _start, _finish, _id, payload) do
311
+ sql << payload[:sql].split("/*").first.gsub(/\d+/, "?")
312
+ end
313
+
314
+ ActiveSupport::Notifications.subscribed(subscriber, "sql.active_record", &block)
315
+
316
+ verify :format => :txt do
317
+ sql.join("\n") + "\n"
318
+ end
319
+ end
320
+ end
321
+
322
+ # spec/models/example_spec.rb
323
+
324
+ it "is an example spec" do
325
+ verify_sql do
326
+ expect(Thing.complex_query).to eq(expected_things)
327
+ end
328
+ end
329
+ ```
330
+
331
+ This `verify_sql` can be useful in model or integration tests; anywhere you're worried about the SQL being generated by complex queries, API endpoints, GraphQL fields, etc.
332
+
263
333
  Copyright (c) 2011 Katrina Owen, released under the MIT license
data/approvals.gemspec CHANGED
@@ -7,9 +7,9 @@ Gem::Specification.new do |s|
7
7
  s.name = "approvals"
8
8
  s.version = Approvals::VERSION
9
9
  s.licenses = ['MIT']
10
- s.authors = ["Katrina Owen"]
11
- s.email = ["katrina.owen@gmail.com"]
12
- s.homepage = "https://github.com/kytrinyx/approvals"
10
+ s.authors = ["Llewellyn Falco", "Sam Livingston-Gray"]
11
+ s.email = ["llewellyn.falco@gmail.com", "geeksam@gmail.com"]
12
+ s.homepage = "https://github.com/approvals/ApprovalTests.Ruby"
13
13
  s.summary = %q{Approval Tests for Ruby}
14
14
  s.description = %q{A library to make it easier to do golden-master style testing in Ruby}
15
15
 
@@ -19,15 +19,11 @@ Gem::Specification.new do |s|
19
19
  s.test_files = `git ls-files -- {spec}/*`.split("\n")
20
20
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
21
  s.require_paths = ["lib"]
22
- s.extensions << 'ext/mkrf_conf.rb'
23
22
 
24
23
  s.add_dependency 'thor', '~> 1.0'
24
+ s.add_dependency 'json', '~> 2.0'
25
25
 
26
- if RUBY_VERSION < "2.1"
27
- s.add_dependency 'nokogiri', '~> 1.6.8'
28
- else
29
- s.add_dependency 'nokogiri', '~> 1.8'
30
- end
26
+ s.add_dependency 'nokogiri', '~> 1.8'
31
27
  # We also depend on the json gem, but the version we need is
32
28
  # Ruby-version-specific. See `ext/mkrf_conf.rb`.
33
29
 
@@ -0,0 +1,29 @@
1
+ class CombinationApprovals
2
+ def self.verify_all_combinations(*arg_variations, namer:)
3
+ combo = new()
4
+ arg_variations.each do |list|
5
+ combo.arg(list)
6
+ end
7
+
8
+ output = ""
9
+ combo.all_combinations.each do |args|
10
+ begin
11
+ result = yield *args
12
+ rescue StandardError => exception
13
+ result = "#{exception.inspect}"
14
+ end
15
+ output << "#{args} => #{result}\n"
16
+ end
17
+ Approvals.verify(output, namer: namer)
18
+ end
19
+
20
+ def arg(values)
21
+ @args ||= []
22
+ @args << values
23
+ end
24
+
25
+ def all_combinations()
26
+ first, *rest = *@args
27
+ first.product(*rest)
28
+ end
29
+ end
@@ -1,3 +1 @@
1
- module Approvals
2
- VERSION = '0.0.25'
3
- end
1
+ module Approvals; VERSION = "0.1.7"; end
data/lib/approvals.rb CHANGED
@@ -2,6 +2,7 @@ require 'json'
2
2
  require 'fileutils'
3
3
  require 'nokogiri'
4
4
  require 'approvals/version'
5
+ require 'approvals/combination_approvals'
5
6
  require 'approvals/configuration'
6
7
  require 'approvals/approval'
7
8
  require 'approvals/dsl'
data/mdsnippets.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "ExcludeDirectories": [ "pkg", "vendor" ],
3
+ "Convention": "InPlaceOverwrite",
4
+ "TocLevel": 5
5
+ }
@@ -0,0 +1,13 @@
1
+ # Publish
2
+ ## Prereqs
3
+ - [ ] `brew install rbenv ruby-build`
4
+ This installs [rbenv](https://github.com/rbenv/rbenv)
5
+ - [ ] `brew install openssl`
6
+ - [ ] `eval "$(rbenv init - zsh)"`
7
+ **note:** this command will diff based on the shell. run `rbenv init` to find
8
+ - [ ] `RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl@3/3.0.3 rbenv install 3.1.2`
9
+ **note:** this path comes from
10
+ `brew info openssl`
11
+ ruby version comes from
12
+ `rbenv install -l`
13
+ ## Build
data/run_tests.sh ADDED
@@ -0,0 +1 @@
1
+ bundle exec rspec
@@ -85,6 +85,7 @@ describe Approvals do
85
85
  end
86
86
 
87
87
  it "verifies a malformed html fragment" do
88
+ pending
88
89
  html = <<-HTML
89
90
  <!DOCTYPE html>
90
91
  <html>
@@ -0,0 +1,32 @@
1
+ require 'spec_helper'
2
+ require 'approvals/namers/rspec_namer'
3
+
4
+ describe Approvals do
5
+
6
+ def some_function(a1,b1,c1)
7
+ "#{b1+c1} #{a1}s"
8
+ end
9
+
10
+ let(:namer) { |example| Approvals::Namers::RSpecNamer.new(example) }
11
+
12
+ specify "2 combos" do
13
+ a = ["foo", "bar"]
14
+ b = [1,3,5]
15
+ c = [2,4]
16
+ CombinationApprovals.verify_all_combinations(a,b, c, namer:namer) do |a1,b1, c1|
17
+ "#{b1+c1} #{a1}s"
18
+ end
19
+ CombinationApprovals.verify_all_combinations(a,b, c,namer:namer, &method(:some_function))
20
+ end
21
+
22
+ specify "errors" do
23
+ a = ["foo", "bar"]
24
+ b = [0,1,2]
25
+ CombinationApprovals.verify_all_combinations(a,b, namer:namer) do |a1,b1|
26
+ if b1 == 2
27
+ raise "There is no 2"
28
+ end
29
+ "#{b1} #{a1}s"
30
+ end
31
+ end
32
+ end
@@ -9,9 +9,11 @@ describe Approvals::Configuration do
9
9
 
10
10
  describe "when set" do
11
11
  before(:each) do
12
- Approvals.configure do |c|
13
- c.approvals_path = 'output/dir/'
12
+ # begin-snippet: config-example
13
+ Approvals.configure do |config|
14
+ config.approvals_path = 'output/dir/'
14
15
  end
16
+ # end-snippet
15
17
  end
16
18
 
17
19
  after(:each) do
@@ -0,0 +1,12 @@
1
+ ["foo", 1, 2] => 3 foos
2
+ ["foo", 1, 4] => 5 foos
3
+ ["foo", 3, 2] => 5 foos
4
+ ["foo", 3, 4] => 7 foos
5
+ ["foo", 5, 2] => 7 foos
6
+ ["foo", 5, 4] => 9 foos
7
+ ["bar", 1, 2] => 3 bars
8
+ ["bar", 1, 4] => 5 bars
9
+ ["bar", 3, 2] => 5 bars
10
+ ["bar", 3, 4] => 7 bars
11
+ ["bar", 5, 2] => 7 bars
12
+ ["bar", 5, 4] => 9 bars
@@ -0,0 +1,6 @@
1
+ ["foo", 0] => 0 foos
2
+ ["foo", 1] => 1 foos
3
+ ["foo", 2] => #<RuntimeError: There is no 2>
4
+ ["bar", 0] => 0 bars
5
+ ["bar", 1] => 1 bars
6
+ ["bar", 2] => #<RuntimeError: There is no 2>
data/todo.md ADDED
@@ -0,0 +1,10 @@
1
+ 1. handle namer
2
+ 1. use mdsnippets
3
+
4
+
5
+
6
+
7
+ 2. check pending tests
8
+ 3. check issues & pull requests
9
+ 4. Update dependencies
10
+ 5.
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: approvals
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.25
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
- - Katrina Owen
7
+ - Llewellyn Falco
8
+ - Sam Livingston-Gray
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2021-05-28 00:00:00.000000000 Z
12
+ date: 2025-02-05 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: thor
@@ -24,6 +25,20 @@ dependencies:
24
25
  - - "~>"
25
26
  - !ruby/object:Gem::Version
26
27
  version: '1.0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: json
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '2.0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '2.0'
27
42
  - !ruby/object:Gem::Dependency
28
43
  name: nokogiri
29
44
  requirement: !ruby/object:Gem::Requirement
@@ -68,26 +83,30 @@ dependencies:
68
83
  version: '3.1'
69
84
  description: A library to make it easier to do golden-master style testing in Ruby
70
85
  email:
71
- - katrina.owen@gmail.com
86
+ - llewellyn.falco@gmail.com
87
+ - geeksam@gmail.com
72
88
  executables:
73
89
  - approvals
74
- extensions:
75
- - ext/mkrf_conf.rb
90
+ extensions: []
76
91
  extra_rdoc_files: []
77
92
  files:
93
+ - ".github/dependabot.yml"
94
+ - ".github/workflows/publish.yml"
95
+ - ".github/workflows/test.yml"
96
+ - ".github/workflows/updateMarkdown.yml"
78
97
  - ".gitignore"
79
- - ".travis.yml"
80
98
  - CHANGELOG.md
81
99
  - Gemfile
100
+ - Gemfile.lock
82
101
  - License.txt
83
102
  - README.md
84
103
  - Rakefile
85
104
  - approvals.gemspec
86
105
  - bin/approvals
87
- - ext/mkrf_conf.rb
88
106
  - lib/approvals.rb
89
107
  - lib/approvals/approval.rb
90
108
  - lib/approvals/cli.rb
109
+ - lib/approvals/combination_approvals.rb
91
110
  - lib/approvals/configuration.rb
92
111
  - lib/approvals/dotfile.rb
93
112
  - lib/approvals/dsl.rb
@@ -125,13 +144,19 @@ files:
125
144
  - lib/approvals/writers/json_writer.rb
126
145
  - lib/approvals/writers/text_writer.rb
127
146
  - lib/approvals/writers/xml_writer.rb
147
+ - mdsnippets.json
148
+ - notes/how_to_publish.md
149
+ - run_tests.sh
128
150
  - spec/approvals_spec.rb
151
+ - spec/combination_approvals_spec.rb
129
152
  - spec/configuration_spec.rb
130
153
  - spec/dotfile_spec.rb
131
154
  - spec/executable_spec.rb
132
155
  - spec/extensions/rspec_approvals_spec.rb
133
156
  - spec/filter_spec.rb
157
+ - spec/fixtures/approvals/approvals_2_combos.approved.txt
134
158
  - spec/fixtures/approvals/approvals_custom_writer_verifies_a_complex_object.approved.txt
159
+ - spec/fixtures/approvals/approvals_errors.approved.txt
135
160
  - spec/fixtures/approvals/approvals_ignores_whitespace_differences_in_json.approved.json
136
161
  - spec/fixtures/approvals/approvals_passes_approved_files_through_erb.approved.txt
137
162
  - spec/fixtures/approvals/approvals_passes_the_received_files_through_erb.approved.txt
@@ -191,7 +216,8 @@ files:
191
216
  - spec/spec_helper.rb
192
217
  - spec/system_command_spec.rb
193
218
  - spec/verifiers/json_verifier_spec.rb
194
- homepage: https://github.com/kytrinyx/approvals
219
+ - todo.md
220
+ homepage: https://github.com/approvals/ApprovalTests.Ruby
195
221
  licenses:
196
222
  - MIT
197
223
  metadata: {}
@@ -210,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
236
  - !ruby/object:Gem::Version
211
237
  version: '0'
212
238
  requirements: []
213
- rubygems_version: 3.0.3
239
+ rubygems_version: 3.4.10
214
240
  signing_key:
215
241
  specification_version: 4
216
242
  summary: Approval Tests for Ruby
data/.travis.yml DELETED
@@ -1,27 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.0.0
4
- - 2.1.10
5
- - 2.2.10
6
- - 2.3.8
7
- - 2.4.8
8
- - 2.5.7
9
- - 2.6.5
10
- - 2.7.0
11
- - ruby-head
12
- - rbx-3
13
- matrix:
14
- allow_failures:
15
- - rvm: rbx-3
16
- before_install:
17
- - |
18
- r_eng="$(ruby -e 'STDOUT.write RUBY_ENGINE')";
19
- rv="$(ruby -e 'STDOUT.write RUBY_VERSION')";
20
- if [ "$r_eng" == "ruby" ]; then
21
- if [ "$rv" \< "2.3" ]; then gem update --system 2.7.10 --no-document
22
- elif [ "$rv" \< "2.6" ]; then gem update --system --no-document --conservative
23
- fi
24
- fi
25
- - gem update bundler
26
- script: bundle exec rspec spec
27
- cache: bundler
data/ext/mkrf_conf.rb DELETED
@@ -1,22 +0,0 @@
1
- require 'rubygems/dependency_installer'
2
-
3
- # This is how we can depend on a different version of the same gem for
4
- # different Ruby versions.
5
- # See https://en.wikibooks.org/wiki/Ruby_Programming/RubyGems
6
-
7
- installer = Gem::DependencyInstaller.new
8
-
9
- begin
10
- if RUBY_VERSION >= '2.0'
11
- installer.install 'json', '~> 2.0'
12
- else
13
- installer.install 'json', '~> 1.8'
14
- end
15
- rescue
16
- exit(1)
17
- end
18
-
19
- # Write fake Rakefile for rake since Makefile isn't used
20
- File.open(File.join(File.dirname(__FILE__), 'Rakefile'), 'w') do |f|
21
- f.write("task :default\n")
22
- end