difftastic 0.0.1-arm64-darwin → 0.1.0-arm64-darwin

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: c00868bec30dac5849a3f1bab00b6c36a4bc83269671774d17dd216dc47a5363
4
- data.tar.gz: f5e8b896f8998f5ec12e2692a00839cecf4d2963ec6f1e5fcb471444cd928e55
3
+ metadata.gz: aae231eb5fbf1b3b7ac2794e3e7f9ca12bc96e5a7087c340804dbf258312d8d1
4
+ data.tar.gz: b727926817ba25c1fae57d5445150587665fc878b00ed310f4a088b2c8c9f0b5
5
5
  SHA512:
6
- metadata.gz: '008a0790106890a8e6248a88e9b20f191a203062f7bd7f44a131e80cb17d9859a90025b8802d0e5aca3c04112787efbdd2d7ea4b1b08c81fe01d7185175a665b'
7
- data.tar.gz: 35a6439b5209e09c6385f7ab8021f2f114f18af393ff4b8b611f53bc767ccf8b16867bab8717b81e4e376397ec93db8ab5db30f1276baf8980480770ba63fdc9
6
+ metadata.gz: 61e625e624f576a5e102802aa252ce0ad979fee604e5b6e41b4ed08616d0cd0fcdf28e7153a13a195fa86f5dc7982fd7009c951624eb50cd732f507ada42281a
7
+ data.tar.gz: 83cc015eeac832013ec6655d9560634d7768244bb4a6d9b9e149b2e515541bbe3767184e7b6c8d21a0b476b268b2a562e22cac25ef0bae88217a9b6ff14aa4cc
@@ -1824,9 +1824,131 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1824
1824
  SOFTWARE.
1825
1825
  ```
1826
1826
 
1827
- ### [`tree-sitter-janet-simple`](https://github.com/sogaiu/tree-sitter-janet-simple)
1827
+ ### [`tree-sitter-janet-simple`](https://github.com/sogaiu/tree-sitter-janet-simple/blob/master/COPYING.txt)
1828
1828
 
1829
- License unknown.
1829
+ ```
1830
+ Creative Commons Legal Code
1831
+
1832
+ CC0 1.0 Universal
1833
+
1834
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
1835
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
1836
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
1837
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
1838
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
1839
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
1840
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
1841
+ HEREUNDER.
1842
+
1843
+ Statement of Purpose
1844
+
1845
+ The laws of most jurisdictions throughout the world automatically confer
1846
+ exclusive Copyright and Related Rights (defined below) upon the creator
1847
+ and subsequent owner(s) (each and all, an "owner") of an original work of
1848
+ authorship and/or a database (each, a "Work").
1849
+
1850
+ Certain owners wish to permanently relinquish those rights to a Work for
1851
+ the purpose of contributing to a commons of creative, cultural and
1852
+ scientific works ("Commons") that the public can reliably and without fear
1853
+ of later claims of infringement build upon, modify, incorporate in other
1854
+ works, reuse and redistribute as freely as possible in any form whatsoever
1855
+ and for any purposes, including without limitation commercial purposes.
1856
+ These owners may contribute to the Commons to promote the ideal of a free
1857
+ culture and the further production of creative, cultural and scientific
1858
+ works, or to gain reputation or greater distribution for their Work in
1859
+ part through the use and efforts of others.
1860
+
1861
+ For these and/or other purposes and motivations, and without any
1862
+ expectation of additional consideration or compensation, the person
1863
+ associating CC0 with a Work (the "Affirmer"), to the extent that he or she
1864
+ is an owner of Copyright and Related Rights in the Work, voluntarily
1865
+ elects to apply CC0 to the Work and publicly distribute the Work under its
1866
+ terms, with knowledge of his or her Copyright and Related Rights in the
1867
+ Work and the meaning and intended legal effect of CC0 on those rights.
1868
+
1869
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
1870
+ protected by copyright and related or neighboring rights ("Copyright and
1871
+ Related Rights"). Copyright and Related Rights include, but are not
1872
+ limited to, the following:
1873
+
1874
+ i. the right to reproduce, adapt, distribute, perform, display,
1875
+ communicate, and translate a Work;
1876
+ ii. moral rights retained by the original author(s) and/or performer(s);
1877
+ iii. publicity and privacy rights pertaining to a person's image or
1878
+ likeness depicted in a Work;
1879
+ iv. rights protecting against unfair competition in regards to a Work,
1880
+ subject to the limitations in paragraph 4(a), below;
1881
+ v. rights protecting the extraction, dissemination, use and reuse of data
1882
+ in a Work;
1883
+ vi. database rights (such as those arising under Directive 96/9/EC of the
1884
+ European Parliament and of the Council of 11 March 1996 on the legal
1885
+ protection of databases, and under any national implementation
1886
+ thereof, including any amended or successor version of such
1887
+ directive); and
1888
+ vii. other similar, equivalent or corresponding rights throughout the
1889
+ world based on applicable law or treaty, and any national
1890
+ implementations thereof.
1891
+
1892
+ 2. Waiver. To the greatest extent permitted by, but not in contravention
1893
+ of, applicable law, Affirmer hereby overtly, fully, permanently,
1894
+ irrevocably and unconditionally waives, abandons, and surrenders all of
1895
+ Affirmer's Copyright and Related Rights and associated claims and causes
1896
+ of action, whether now known or unknown (including existing as well as
1897
+ future claims and causes of action), in the Work (i) in all territories
1898
+ worldwide, (ii) for the maximum duration provided by applicable law or
1899
+ treaty (including future time extensions), (iii) in any current or future
1900
+ medium and for any number of copies, and (iv) for any purpose whatsoever,
1901
+ including without limitation commercial, advertising or promotional
1902
+ purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
1903
+ member of the public at large and to the detriment of Affirmer's heirs and
1904
+ successors, fully intending that such Waiver shall not be subject to
1905
+ revocation, rescission, cancellation, termination, or any other legal or
1906
+ equitable action to disrupt the quiet enjoyment of the Work by the public
1907
+ as contemplated by Affirmer's express Statement of Purpose.
1908
+
1909
+ 3. Public License Fallback. Should any part of the Waiver for any reason
1910
+ be judged legally invalid or ineffective under applicable law, then the
1911
+ Waiver shall be preserved to the maximum extent permitted taking into
1912
+ account Affirmer's express Statement of Purpose. In addition, to the
1913
+ extent the Waiver is so judged Affirmer hereby grants to each affected
1914
+ person a royalty-free, non transferable, non sublicensable, non exclusive,
1915
+ irrevocable and unconditional license to exercise Affirmer's Copyright and
1916
+ Related Rights in the Work (i) in all territories worldwide, (ii) for the
1917
+ maximum duration provided by applicable law or treaty (including future
1918
+ time extensions), (iii) in any current or future medium and for any number
1919
+ of copies, and (iv) for any purpose whatsoever, including without
1920
+ limitation commercial, advertising or promotional purposes (the
1921
+ "License"). The License shall be deemed effective as of the date CC0 was
1922
+ applied by Affirmer to the Work. Should any part of the License for any
1923
+ reason be judged legally invalid or ineffective under applicable law, such
1924
+ partial invalidity or ineffectiveness shall not invalidate the remainder
1925
+ of the License, and in such case Affirmer hereby affirms that he or she
1926
+ will not (i) exercise any of his or her remaining Copyright and Related
1927
+ Rights in the Work or (ii) assert any associated claims and causes of
1928
+ action with respect to the Work, in either case contrary to Affirmer's
1929
+ express Statement of Purpose.
1930
+
1931
+ 4. Limitations and Disclaimers.
1932
+
1933
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
1934
+ surrendered, licensed or otherwise affected by this document.
1935
+ b. Affirmer offers the Work as-is and makes no representations or
1936
+ warranties of any kind concerning the Work, express, implied,
1937
+ statutory or otherwise, including without limitation warranties of
1938
+ title, merchantability, fitness for a particular purpose, non
1939
+ infringement, or the absence of latent or other defects, accuracy, or
1940
+ the present or absence of errors, whether or not discoverable, all to
1941
+ the greatest extent permissible under applicable law.
1942
+ c. Affirmer disclaims responsibility for clearing rights of other persons
1943
+ that may apply to the Work or any use thereof, including without
1944
+ limitation any person's Copyright and Related Rights in the Work.
1945
+ Further, Affirmer disclaims responsibility for obtaining any necessary
1946
+ consents, permissions or other rights required for any use of the
1947
+ Work.
1948
+ d. Affirmer understands and acknowledges that Creative Commons is not a
1949
+ party to this document and has no duty or obligation with respect to
1950
+ this CC0 or use of the Work.
1951
+ ```
1830
1952
 
1831
1953
  ### [`tree-sitter-java`](https://github.com/tree-sitter/tree-sitter-java/blob/master/LICENSE)
1832
1954
 
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Joel Drapper
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1 +1 @@
1
- # Difftastic
1
+ # Difftastic Ruby
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Difftastic::Differ
4
- def initialize(background: nil, color: nil, syntax_highlight: nil, context: nil, tab_width: nil, parse_error_limit: nil)
4
+ def initialize(background: nil, color: nil, syntax_highlight: nil, context: nil, tab_width: nil, parse_error_limit: nil, underline_highlights: true)
5
5
  @show_paths = false
6
6
  @background = background => :dark | :light | nil
7
7
  @color = color => :always | :never | :auto | nil
@@ -9,6 +9,7 @@ class Difftastic::Differ
9
9
  @context = context => Integer | nil
10
10
  @tab_width = tab_width => Integer | nil
11
11
  @parse_error_limit = parse_error_limit => Integer | nil
12
+ @underline_highlights = underline_highlights => true | false
12
13
  end
13
14
 
14
15
  def diff_objects(old, new)
@@ -291,11 +292,22 @@ class Difftastic::Differ
291
292
 
292
293
  result = Difftastic.execute(options.join(" "))
293
294
 
294
- if @show_paths
295
- result
296
- else
295
+ unless @show_paths
297
296
  new_line_index = result.index("\n") + 1
298
- result.byteslice(new_line_index, result.bytesize - new_line_index)
297
+ result = result.byteslice(new_line_index, result.bytesize - new_line_index)
299
298
  end
299
+
300
+ if @underline_highlights
301
+ result.gsub!(/\e\[([0-9;]*)m/) {
302
+ codes = $1
303
+ if codes =~ /9[12]/ # Matches 91 or 92
304
+ "\e[#{codes};4m"
305
+ else
306
+ "\e[#{codes}m"
307
+ end
308
+ }
309
+ end
310
+
311
+ result
300
312
  end
301
313
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Difftastic
4
- VERSION = "0.0.1"
4
+ VERSION = "0.1.0"
5
5
  end
data/lib/difftastic.rb CHANGED
@@ -99,7 +99,7 @@ module Difftastic
99
99
  when Set
100
100
  buffer << "Set[\n"
101
101
  indent += 1
102
- object.each do |value|
102
+ object.to_a.sort!.each do |value|
103
103
  buffer << (" " * indent)
104
104
  pretty(value, buffer:, indent:)
105
105
  buffer << ",\n"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: difftastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Joel Drapper
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-01-21 00:00:00.000000000 Z
10
+ date: 2025-01-22 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  email:
13
13
  - joel@drapper.me
@@ -17,6 +17,7 @@ extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
19
  - LICENSE-DEPENDENCIES.md
20
+ - LICENSE.txt
20
21
  - README.md
21
22
  - exe/arm64-darwin/difft
22
23
  - exe/difft