semdiff 1.0.0 → 1.0.1

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: d2127c5f2b5f74b899872f4f1d18e2c1dbf6513e7a3a9f38309c733a74b6aa1c
4
- data.tar.gz: 9f00c1b0228942358d76d2f20bd113eb296e6341c37d0a490232d93ade981734
3
+ metadata.gz: 84d1d80286a7fda76b659e142b5a3cd90176561b52ec006bd286198d8fc38295
4
+ data.tar.gz: 18a66b97b5d2d5cf13261a27ec19aed7c1614121696c83012e7d37fe6daa607b
5
5
  SHA512:
6
- metadata.gz: 563ded3b61dad0ddbb09fe58e80b8f1e8e2c39891442c4ef5200fc6f139c10240bf95ee2ba070cc487bc76be132920a86e254181f85c5a10c2bbc4849e635bb8
7
- data.tar.gz: '02584b2dc448309be206b67d22d19cb760c25acd130253651f56495c813551a901fbf2990803ab5bd48663026fee3b77adc84c92bedfe2edcf90639827cda95e'
6
+ metadata.gz: b3fd9118ec6ccf39be359db89d639909c1b1c97c84710c39688d71d19cfdf9a30a0e48939d85dc51b006ee9e73c2166c71717f626967ffa715bcb483ca2b6204
7
+ data.tar.gz: 7079cac11bef228d6fb15a1852dea51e6894e2c3fb4c4404ca827836daed827e028c69181ebf9f44ff397783124790ebac4b1fb257eae63251f84d36a059f4ef
data/README.md CHANGED
@@ -8,18 +8,16 @@ Uses GumTree/difftastic to generate the diff on canonical ASTs.
8
8
 
9
9
  ## Installation
10
10
 
11
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
12
-
13
11
  Install the gem and add to the application's Gemfile by executing:
14
12
 
15
13
  ```bash
16
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
14
+ bundle add semdiff
17
15
  ```
18
16
 
19
17
  If bundler is not being used to manage dependencies, install the gem by executing:
20
18
 
21
19
  ```bash
22
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
20
+ gem install semdiff
23
21
  ```
24
22
 
25
23
  ## Usage
@@ -52,4 +50,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
52
50
 
53
51
  ## Contributing
54
52
 
55
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/semdiff.
53
+ Bug reports and pull requests are welcome on GitHub at https://github.com/tesorion/semdiff.
@@ -106,14 +106,14 @@ module Semdiff
106
106
 
107
107
  def sort_key(node)
108
108
  case node.type
109
+ when :integer_node, :float_node
110
+ "\x01#{node.value}"
109
111
  when :local_variable_read_node, :instance_variable_read_node,
110
112
  :class_variable_read_node, :global_variable_read_node,
111
113
  :constant_read_node, :call_node
112
- node.name.to_s
113
- when :integer_node, :float_node
114
- "_#{node.value}"
114
+ "\x02#{node.name}"
115
115
  else
116
- "~#{node.type}"
116
+ "\x03#{node.type}"
117
117
  end
118
118
  end
119
119
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Semdiff
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semdiff
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tesorion
@@ -148,5 +148,5 @@ requirements: []
148
148
  rubygems_version: 3.3.7
149
149
  signing_key:
150
150
  specification_version: 4
151
- summary: Diff two files with AST normalizations
151
+ summary: Semantic differences for Ruby code changes
152
152
  test_files: []