sexp_processor 4.11.0 → 4.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c844635d5c18684cda2ac7e4f9c4c16b89355e557318c94e46a478477c175cb7
4
- data.tar.gz: 2a47ed8eed3c8a04079e9e4d7b4e4a9aafae882e9fe229c5e96fc8fe5a10c48c
3
+ metadata.gz: a33c4da3c4f6c19506d4aee6f94e76dca65aa94a3af108f751bd916cfbd0cb8f
4
+ data.tar.gz: de4b25babc82dc51481153180ae65a5d9ab54079c3d2b77519666ff8b537f3fa
5
5
  SHA512:
6
- metadata.gz: 57442025aa03190ad3cabb7f4e39582aeebbda87e960199ba6da07a0857c2b6a832444aea97ae8d755aa37fd658ca4e03cf5b1cd2b59ab11aefa4cb5519bac63
7
- data.tar.gz: f64e357d7efb923c2f548b44fa8f42bb9136ec36e2f339731637cbecdd8ab9b306a9956ddc572f05b27a0dc74a907fc58d5ad16d71a8bc7c816e581ae300d9c6
6
+ metadata.gz: 34e1e1f066956df4c8b71e96a2183c62183c02628ef7e7193f0c7bd48897960e4c7a47a9e08e8e9dcd02b7d202f6f2a6072511cf8d231932bb3e12de9799feef
7
+ data.tar.gz: 28d1ef553de797ccdb2f00fdd3b81b1c05d26dd7ce7b8e4fbb397e175fcb7d45d2647a684c1b3b6778f01df38ef6544e151ec3484f3349257ab7de3eb5f4a586
checksums.yaml.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
-
2
- {��޶qw7��t,.�A\S{�՛}�!es#v��}�,8�m�a��>�A2̖T���Y#�������M
3
- �=�v#p�dl�K�4��]膖H%�Q��+a��(���cr�ѵ�:Nϔ�~’v4��|�^��y��ꌭ�:HKe�@��Oev!\cT�c:t��ܺ�pY'��WV,���.�E(9Vʐ)��MG�u��4�b���u��+���\���5(�u�%�`��:�}���A�Eӻy��L�8�����
1
+ (���ӱ }n5vs��(^6��
2
+ (*3g���ׁ��//���Зa�BPE?���i��!i� nځ��3�5Gf�g�I�l�^��)��jGPv�Yp��Ĺovv�1`�k�|�Y�f���U.��p|K+��q��=���
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- ���_Ч;Ի�:$O)Ť�8@eIA~��x
2
- H[=l����<�9ub!b�X��� ��y,!"2�^C�X�L,3~���fC{�ʆB�9f�L���/�׶��=x�%(��I�f�R5t��2��"����:���&yŀ��<j�w�ń����,`[���B&Vd3��D�����}vr*'�ǷMD��Z
1
+ _�!i~@-�-ѷ/��?;�x��$�Nb����K|R�Qv�k�7�R�A�߇R�l���+q��؁L|�+�)_�*�|���f�nc��l�7 ef�sFQ�zmSY�
2
+ �Ê�"�+Ǭ�xГ��ื;�>�sƯ 䪢��Ϥ=;�&�I/��*�n��{��tP/|�фE����\x�I ��b)����I^�<�Z��6I ��!5{~W&E
data/History.rdoc CHANGED
@@ -1,3 +1,11 @@
1
+ === 4.12.0 / 2019-03-12
2
+
3
+ * 3 bug fixes:
4
+
5
+ * Fixed sexp_body to return empty sexp instead of nil when using STRICT_SEXP.
6
+ * STRICT_SEXP=4+ fails w/ current use of concat. Removed concat from strictness for now.
7
+ * Use concat internally instead of splat. Some people have 20000 node sexps! (presidentbeef)
8
+
1
9
  === 4.11.0 / 2018-04-05
2
10
 
3
11
  * 1 minor enhancement:
data/lib/pt_testcase.rb CHANGED
@@ -77,7 +77,7 @@ class ParseTreeTestCase < Minitest::Test
77
77
  end
78
78
 
79
79
  def self.add_19tests name, hash
80
- add_tests "#{name}__19_20_21_22_23_24_25", hash # HACK?
80
+ add_tests "#{name}__19_20_21_22_23_24_25_26", hash # HACK?
81
81
  end
82
82
 
83
83
  def self.add_19edgecases ruby, sexp, cases
@@ -102,7 +102,7 @@ class ParseTreeTestCase < Minitest::Test
102
102
  testcases[verbose][klass] = testcases[nonverbose][klass]
103
103
  end
104
104
 
105
- VER_RE = "(1[89]|2[012345])"
105
+ VER_RE = "(1[89]|2[0123456])"
106
106
 
107
107
  def self.generate_test klass, node, data, input_name, output_name
108
108
  klass.send :define_method, "test_#{node}" do
data/lib/sexp.rb CHANGED
@@ -37,7 +37,7 @@ class Sexp < Array # ZenTest FULL
37
37
  def self.from_array a
38
38
  ary = Array === a ? a : [a]
39
39
 
40
- self.new(*ary.map { |x|
40
+ self.new.concat(ary.map { |x|
41
41
  case x
42
42
  when Sexp
43
43
  x
@@ -54,7 +54,7 @@ class Sexp < Array # ZenTest FULL
54
54
  # same +file+, +line+, and +comment+ as self.
55
55
 
56
56
  def new(*body)
57
- r = self.class.new(*body) # ensures a sexp from map
57
+ r = self.class.new.concat(body) # ensures a sexp from map
58
58
  r.file = self.file if self.file
59
59
  r.line = self.line if self.line
60
60
  r.comments = self.comments if self.comments
@@ -62,7 +62,7 @@ class Sexp < Array # ZenTest FULL
62
62
  end
63
63
 
64
64
  def map &blk # :nodoc:
65
- self.new(*super(&blk)) # ensures a sexp from map
65
+ self.new.concat(super(&blk)) # ensures a sexp from map
66
66
  end
67
67
 
68
68
  def == obj # :nodoc:
@@ -278,7 +278,7 @@ class Sexp < Array # ZenTest FULL
278
278
  # the values without the node type.
279
279
 
280
280
  def sexp_body from = 1
281
- self.new(*self[from..-1])
281
+ self.new.concat(self[from..-1] || [])
282
282
  end
283
283
 
284
284
  ##
@@ -34,7 +34,7 @@ require "sexp"
34
34
  class SexpProcessor
35
35
 
36
36
  # duh
37
- VERSION = "4.11.0"
37
+ VERSION = "4.12.0"
38
38
 
39
39
  ##
40
40
  # Automatically shifts off the Sexp type before handing the
data/lib/strict_sexp.rb CHANGED
@@ -44,7 +44,7 @@ class Sexp
44
44
 
45
45
  def self.nuke_method name, level
46
46
  define_method name do |*args|
47
- raise "no: %p.%s %p" % [self, name, args]
47
+ raise "no mutation allowed on sexps: %s.%s %s" % [self, name, args]
48
48
  end if __strict >= level
49
49
  end
50
50
 
@@ -87,7 +87,7 @@ class Sexp
87
87
 
88
88
  nuke_method :collect!, 4
89
89
  nuke_method :compact!, 4
90
- nuke_method :concat, 4
90
+ # nuke_method :concat, 4 # HACK: using self.class.new.concat(...) for speed
91
91
  nuke_method :flatten!, 4
92
92
  nuke_method :map!, 4
93
93
  nuke_method :pop, 4
@@ -111,7 +111,7 @@ class Sexp
111
111
  end
112
112
 
113
113
  def sexp_body from = 1
114
- safe_idx from..-1
114
+ self.new.concat(safe_idx(from..-1) || [])
115
115
  end
116
116
 
117
117
  def sexp_type= v
data/test/test_sexp.rb CHANGED
@@ -519,7 +519,11 @@ class TestSexp < SexpTestCase # ZenTest FULL
519
519
  end
520
520
 
521
521
  def test_sexp_body
522
- assert_equal [2, 3], @sexp.sexp_body
522
+ assert_equal s(2, 3), @sexp.sexp_body
523
+ assert_equal s(), s(:x).sexp_body
524
+ assert_equal s(), s().sexp_body
525
+
526
+ assert_instance_of Sexp, s().sexp_body
523
527
  end
524
528
 
525
529
  def test_shift
@@ -662,7 +666,7 @@ class TestSexp < SexpTestCase # ZenTest FULL
662
666
 
663
667
  def test_deep_each_without_block
664
668
  assert_kind_of Enumerator, @complex_sexp.deep_each
665
- assert_equal DEEP_EXP, @complex_sexp.deep_each.map(&:first)
669
+ assert_equal DEEP_EXP, @complex_sexp.deep_each.map(&:sexp_type)
666
670
  end
667
671
 
668
672
  def test_unary_not
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sexp_processor
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.11.0
4
+ version: 4.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -10,9 +10,9 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAwIBAgIBAjANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBAzANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTE3MTEyMTIxMTExMFoXDTE4MTEyMTIxMTExMFowRTETMBEGA1UE
15
+ GRYDY29tMB4XDTE4MTIwNDIxMzAxNFoXDTE5MTIwNDIxMzAxNFowRTETMBEGA1UE
16
16
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
17
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
18
  b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
@@ -21,44 +21,50 @@ cert_chain:
21
21
  GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt
22
22
  qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
23
23
  gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
24
- HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
25
- AQAfAXSQpsW7YSxd1csRtA/M4Zt0AMXFMd76GJ8Lgtg8G0+VFbdChRyDuDb0kPlW
26
- h9QQX/YABfCW8vxmssbMGrP+VGBAn7BbdTcfTlgCWrvMX1uL5aRL74nA4urKXqdW
27
- a0nP70K4958P3GffBdtE3KGkU5xstFnXGajxuBRnL66E15KU0BNehVxdG258bdPu
28
- EKN6MqBPftFiev3tuwqDV11r2GquDpniYcT+Mi8/PgeAgVT/afBeVgbB3KaZeTRR
29
- AhXhF6Wi2GTMezlj5jlI5XV7WsJUSwTp/YiVvcmT74ZaCRvexm6EnNhkrvJJ1Xeu
30
- V+HB+LYYhXWitInO/eXxDrFB
24
+ HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
25
+ AQCbJwLmpJR2PomLU+Zzw3KRzH/hbyUWc/ftru71AopZ1fy4iY9J/BW5QYKVYwbP
26
+ V0FSBWtvfI/RdwfKGtuGhPKECZgmLieGuZ3XCc09qPu1bdg7i/tu1p0t0c6163ku
27
+ nDMDIC/t/DAFK0TY9I3HswuyZGbLW7rgF0DmiuZdN/RPhHq2pOLMLXJmFclCb/im
28
+ 9yToml/06TJdUJ5p64mkBs0TzaK66DIB1Smd3PdtfZqoRV+EwaXMdx0Hb3zdR1JR
29
+ Em82dBUFsipwMLCYj39kcyHWAxyl6Ae1Cn9r/ItVBCxoeFdrHjfavnrIEoXUt4bU
30
+ UfBugfLD19bu3nvL+zTAGx/U
31
31
  -----END CERTIFICATE-----
32
- date: 2018-04-05 00:00:00.000000000 Z
32
+ date: 2019-03-13 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rdoc
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '4.0'
41
+ - - "<"
42
+ - !ruby/object:Gem::Version
43
+ version: '7'
41
44
  type: :development
42
45
  prerelease: false
43
46
  version_requirements: !ruby/object:Gem::Requirement
44
47
  requirements:
45
- - - "~>"
48
+ - - ">="
46
49
  - !ruby/object:Gem::Version
47
50
  version: '4.0'
51
+ - - "<"
52
+ - !ruby/object:Gem::Version
53
+ version: '7'
48
54
  - !ruby/object:Gem::Dependency
49
55
  name: hoe
50
56
  requirement: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '3.16'
60
+ version: '3.17'
55
61
  type: :development
56
62
  prerelease: false
57
63
  version_requirements: !ruby/object:Gem::Requirement
58
64
  requirements:
59
65
  - - "~>"
60
66
  - !ruby/object:Gem::Version
61
- version: '3.16'
67
+ version: '3.17'
62
68
  description: |-
63
69
  sexp_processor branches from ParseTree bringing all the generic sexp
64
70
  processing tools with it. Sexp, SexpProcessor, Environment, etc... all
@@ -107,8 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
113
  - !ruby/object:Gem::Version
108
114
  version: '0'
109
115
  requirements: []
110
- rubyforge_project:
111
- rubygems_version: 2.7.3
116
+ rubygems_version: 3.0.2
112
117
  signing_key:
113
118
  specification_version: 4
114
119
  summary: sexp_processor branches from ParseTree bringing all the generic sexp processing
metadata.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- ���/ 1��'�f��S���Yc�� ���E6EX1Mq{�m/� ��#2f�;1E�Ҵ�`�Ȗ�YI0 au]��'y��[M}a&*P����k�#�_O*Ӓ���L)©���(BI����S��!W�
2
- ��U I@�d��������'#��[�����t���
1
+ V�*��=��I�Y�7��O��@{%ō�����Ez��d'_���*u��w��!�󫫓��&e��W�BPp�WBr�����.�/�^H??�䶲X4��A�%1di`l%�Q�׻]"�L�
2
+ R��7���8�@��5E*�(q�*KRD��K^ no�X�*[M�g���)���p\�