forked from LestatAlmasy/plaintext
-
Notifications
You must be signed in to change notification settings - Fork 0
Chore/sincronizar fork con version relajada de rubyzip #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
domingo2000
merged 19 commits into
master
from
chore/sincronizar-fork-con-version-relajada-de-rubyzip
Aug 3, 2026
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
110422e
removes --quiet option as that suppresses the unrtf header
jkraemer 3acc918
relax rubyzip version requirement
jkraemer d7baea8
changelog
jkraemer 1fe17c3
v0.3.4
jkraemer 5571401
github test workflow, removes travis CI config
jkraemer 6d884d1
require active_support before core_exts
jkraemer e6b18b3
Fix Object#present? not being available in tests
cbliard b39cd09
Suppress tesseract extra output
cbliard 22a703c
Avoid FrozenError when handler returns a frozen string
cbliard 935be6e
Merge pull request #11 from cbliard/fix/avoid-frozen-error
jkraemer e6f7780
changelog, rel. 0.3.5
jkraemer 9ddf2b3
Resolver returns nil if the handler returns nil
cbliard 5c85fee
Merge pull request #12 from cbliard/fix/avoid-nil-error
jkraemer 0a1ce41
changelog, rel. 0.3.6
jkraemer 5d78cd3
adds text/markdown to the list of supported plain text content types
jkraemer 3703e68
changelog, rel. 0.3.7
jkraemer c698649
chore: sincronizar fork
domingo2000 e981cae
chore: relajar version de bundler
domingo2000 b1703ce
test: cambiar suite de test para que pase con modificaciones
domingo2000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4'] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install system dependencies | ||
| run: | | ||
| sudo apt-get update -qq | ||
| sudo apt-get install -y catdoc unrtf poppler-utils tesseract-ocr | ||
|
|
||
| - name: Set up Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: ${{ matrix.ruby-version }} | ||
| bundler-cache: true | ||
|
|
||
| - name: Run tests | ||
| run: bundle exec rake spec |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| module Plaintext | ||
| VERSION = "0.3.4" | ||
| VERSION = "0.3.7" | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| require 'spec_helper' | ||
|
|
||
| describe Plaintext::Resolver do | ||
| subject(:resolver) do | ||
| file = File.new('spec/fixtures/files/text.txt', 'r') | ||
| described_class.new(file, 'text/plain') | ||
| end | ||
| let(:handler) { resolver.send(:find_handler) } | ||
|
|
||
|
|
||
| # NOTA: Este test viene del upstream pero nosotros modificamos el resolver | ||
| # por lo que no tiene sentido que lo pasemos. Modificamos su contenido con una | ||
| # versión compatible al código actual. | ||
| it 'squishes and strips the text returned by the handler' do | ||
| allow(handler).to receive(:text).and_return(" hello \n \n world! ") | ||
|
|
||
| expect(resolver.text).to eq(" hello \n \n world! ") | ||
| end | ||
|
|
||
| it 'returns nil if the handler returns nil' do | ||
| allow(handler).to receive(:text).and_return(nil) | ||
|
|
||
| expect(resolver.text).to be_nil | ||
| end | ||
|
|
||
| it 'can deal with frozen string returned by the handler' do | ||
| # make the handler return a frozen string | ||
| allow(handler).to receive(:text).and_wrap_original { |m, *args| m.call(*args).freeze } | ||
|
|
||
| expect(resolver.text).to include(/lorem ipsum/) | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.