jackbox 0.9.6.3 → 0.9.6.6

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.
metadata CHANGED
@@ -1,78 +1,76 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jackbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6.3
4
+ version: 0.9.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Henry Alvarez (LHA)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-18 00:00:00.000000000 Z
11
+ date: 2016-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.6.1
20
- - - ~>
20
+ - - "~>"
21
21
  - !ruby/object:Gem::Version
22
- version: !binary |-
23
- MS42
22
+ version: '1.6'
24
23
  type: :runtime
25
24
  prerelease: false
26
25
  version_requirements: !ruby/object:Gem::Requirement
27
26
  requirements:
28
- - - ! '>='
27
+ - - ">="
29
28
  - !ruby/object:Gem::Version
30
29
  version: 1.6.1
31
- - - ~>
30
+ - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: !binary |-
34
- MS42
32
+ version: '1.6'
35
33
  - !ruby/object:Gem::Dependency
36
34
  name: thor
37
35
  requirement: !ruby/object:Gem::Requirement
38
36
  requirements:
39
- - - ! '>='
37
+ - - ">="
40
38
  - !ruby/object:Gem::Version
41
39
  version: 0.18.1
42
- - - ~>
40
+ - - "~>"
43
41
  - !ruby/object:Gem::Version
44
42
  version: '0.18'
45
43
  type: :runtime
46
44
  prerelease: false
47
45
  version_requirements: !ruby/object:Gem::Requirement
48
46
  requirements:
49
- - - ! '>='
47
+ - - ">="
50
48
  - !ruby/object:Gem::Version
51
49
  version: 0.18.1
52
- - - ~>
50
+ - - "~>"
53
51
  - !ruby/object:Gem::Version
54
52
  version: '0.18'
55
53
  - !ruby/object:Gem::Dependency
56
54
  name: rspec
57
55
  requirement: !ruby/object:Gem::Requirement
58
56
  requirements:
59
- - - <=
57
+ - - "<="
60
58
  - !ruby/object:Gem::Version
61
59
  version: '3.4'
62
- - - ~>
60
+ - - "~>"
63
61
  - !ruby/object:Gem::Version
64
62
  version: 3.3.0
65
63
  type: :development
66
64
  prerelease: false
67
65
  version_requirements: !ruby/object:Gem::Requirement
68
66
  requirements:
69
- - - <=
67
+ - - "<="
70
68
  - !ruby/object:Gem::Version
71
69
  version: '3.4'
72
- - - ~>
70
+ - - "~>"
73
71
  - !ruby/object:Gem::Version
74
72
  version: 3.3.0
75
- description: ! 'Main gem for Ruby Code Injectors: Closures as Modules'
73
+ description: 'Main gem for Ruby Code Injectors: Closures as Modules'
76
74
  email:
77
75
  - luisealvarezb@yahoo.com
78
76
  executables:
@@ -80,8 +78,8 @@ executables:
80
78
  extensions: []
81
79
  extra_rdoc_files: []
82
80
  files:
83
- - .gitignore
84
- - .yardopts
81
+ - ".gitignore"
82
+ - ".yardopts"
85
83
  - CHANGES.txt
86
84
  - LICENSE.lic
87
85
  - LICENSE.txt
@@ -97,6 +95,8 @@ files:
97
95
  - lib/jackbox/examples/dx.rb
98
96
  - lib/jackbox/examples/transformers.rb
99
97
  - lib/jackbox/injectors.rb
98
+ - lib/jackbox/injectors/coda.rb
99
+ - lib/jackbox/injectors/prelude.rb
100
100
  - lib/jackbox/rake.rb
101
101
  - lib/jackbox/tools/prefs.rb
102
102
  - lib/jackbox/version.rb
@@ -150,7 +150,6 @@ files:
150
150
  - spec/bin/jackup_cmd_spec.rb
151
151
  - spec/lib/abtract_spec.rb
152
152
  - spec/lib/jackbox/examples/dir_spec.rb
153
- - spec/lib/jackbox/examples/dx_spec.rb
154
153
  - spec/lib/jackbox/examples/result.xml
155
154
  - spec/lib/jackbox/examples/source1.xml
156
155
  - spec/lib/jackbox/examples/source2.xml
@@ -163,6 +162,7 @@ files:
163
162
  - spec/lib/jackbox/injector_namespacing_spec.rb
164
163
  - spec/lib/jackbox/injector_spec.rb
165
164
  - spec/lib/jackbox/injector_versioning_spec.rb
165
+ - spec/lib/jackbox/jiti_rules_spec.rb
166
166
  - spec/lib/jackbox/patterns_spec.rb
167
167
  - spec/lib/jackbox/prefs_spec.rb
168
168
  - spec/lib/jackbox/reclassing_spec.rb
@@ -179,17 +179,17 @@ require_paths:
179
179
  - lib
180
180
  required_ruby_version: !ruby/object:Gem::Requirement
181
181
  requirements:
182
- - - ! '>='
182
+ - - ">="
183
183
  - !ruby/object:Gem::Version
184
184
  version: '0'
185
185
  required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  requirements:
187
- - - ! '>='
187
+ - - ">="
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  requirements: []
191
191
  rubyforge_project:
192
- rubygems_version: 2.4.8
192
+ rubygems_version: 2.4.6
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: Jackbox is a set of programming tools which enhance the Ruby language and
@@ -200,7 +200,6 @@ test_files:
200
200
  - spec/bin/jackup_cmd_spec.rb
201
201
  - spec/lib/abtract_spec.rb
202
202
  - spec/lib/jackbox/examples/dir_spec.rb
203
- - spec/lib/jackbox/examples/dx_spec.rb
204
203
  - spec/lib/jackbox/examples/result.xml
205
204
  - spec/lib/jackbox/examples/source1.xml
206
205
  - spec/lib/jackbox/examples/source2.xml
@@ -213,6 +212,7 @@ test_files:
213
212
  - spec/lib/jackbox/injector_namespacing_spec.rb
214
213
  - spec/lib/jackbox/injector_spec.rb
215
214
  - spec/lib/jackbox/injector_versioning_spec.rb
215
+ - spec/lib/jackbox/jiti_rules_spec.rb
216
216
  - spec/lib/jackbox/patterns_spec.rb
217
217
  - spec/lib/jackbox/prefs_spec.rb
218
218
  - spec/lib/jackbox/reclassing_spec.rb
@@ -1,346 +0,0 @@
1
- # require "spec_helper"
2
- # =begin rdoc
3
- #
4
- # #####
5
- # # eXtra Dude: Debugger Helper specification
6
- #
7
- # Current Practice is:
8
- # .
9
- # .
10
- # log or puts (some_variable)
11
- # or
12
- # open(some_file) do |file| ... or Logger.new()
13
- # file.puts(some_variable) ... log.debug(some_variable)
14
- # end
15
- # ... later in the program life, these statements must be commented out
16
- #
17
- # We want a methodology to load some very basic debugging help over and beyond the trickery of puts statements
18
- # in current use or that somehow crystalizes those current practices and enhances them with some helpful
19
- # additions like loging program state info and line number. We also want the ability to call on the debugger at any
20
- # point without much a-do, or to even automatically break into the debugger on Exception or other condition, and it has
21
- # to be system independent, working with all versions of ruby.
22
- #
23
- # =end
24
- #
25
- #
26
- # describe DX, :dx do
27
- #
28
- # before do
29
- # tmpdir = rfolder()
30
- # FileUtils.mkpath tmpdir
31
- # Dir.chdir tmpdir
32
- # end
33
- #
34
- # describe 'ability to break into debugger' do
35
- #
36
- # it 'has a method to break into debugger mode' do
37
- # DX.should_receive :debug
38
- # DX.debug
39
- # end
40
- #
41
- # it 'can break into the debugger on exception' do
42
- # DX.seize TypeError
43
- # DX.should_receive :debug
44
- # expect{String.new 3}.to raise_error
45
- # end
46
- #
47
- # end
48
- #
49
- #
50
- # # #####
51
- # # # Enhanced Practice should be:
52
- # #
53
- # # it should automatically knows where to output with only minor options
54
- # # it should automatically output program state at point of call
55
- # # it should not need removal in production adding to the program function
56
- # describe 'enhancing current debugging practice' do
57
- #
58
- # describe 'automatically know where to output program state with only minor options' do
59
- #
60
- # let!(:program){
61
- # open 'tester', 'w+' do |file|
62
- # file.puts %{
63
- #
64
- # require 'jackbox'
65
- # require 'jackbox/examples/dx'
66
- # some_variable = 'crap'
67
- # def program tester
68
- # DX.log 'this is a test'
69
- # end
70
- # program 'play'
71
- #
72
- # }
73
- # end
74
- # }
75
- #
76
- # describe 'know where to ouput' do
77
- #
78
- # it 'outputs to file named after the program in $0' do
79
- # File.should exist('tester')
80
- # launch 'tester'
81
- # File.should exist('tester.log')
82
- # open 'tester.log', 'r' do |f|
83
- # f.readlines.grep(/this is a test/).should_not be_empty
84
- # end
85
- # end
86
- #
87
- # it 'creates output file in the location of the user' do
88
- # File.should exist('tester')
89
- # FileUtils.mkpath 'folder'
90
- # Dir.chdir 'folder'
91
- # launch '../tester'
92
- # File.should exist('tester.log')
93
- # open 'tester.log', 'r' do |f|
94
- # f.readlines.grep(/this is a test/).should_not be_empty
95
- # end
96
- # end
97
- #
98
- # end
99
- #
100
- # describe 'options' do
101
- #
102
- # it 'has an option to output to terminal standard out' do
103
- # DX.logger :active
104
- # $stdout.should_receive(:write).with(/This is a screen test/)
105
- # DX.log false, 'This is a screen test'
106
- # end
107
- #
108
- # it 'has an option to output to system logs' do
109
- # DX.syslog 'a test message for syslog'
110
- # sleep 0.2
111
- # if !OS.windows?
112
- # open "/var/log/system.log", 'r' do |file|
113
- # file.readlines.to_a[-5, 5].grep(%r{a test message for syslog}).should_not be_empty
114
- # end
115
- # end
116
- # end
117
- #
118
- # end
119
- #
120
- # end
121
- #
122
- #
123
- # describe 'automatically output program state at point of call. #log, #syslog, and #seize calls not only output
124
- # the given msg but also extra program information at the point of call. If complete class DX injection is
125
- # used then even more info is available. See below.' do
126
- #
127
- #
128
- # let!(:program){
129
- # open 'tester', 'w+' do |file|
130
- # file.puts %{
131
- #
132
- # require 'jackbox'
133
- # require 'jackbox/examples/dx'
134
- # some_variable = 'crap'
135
- # def program tester
136
- # DX.log 'some programmer non-sense'
137
- # end
138
- # program 'play'
139
- #
140
- # DX.syslog 'a load of crap'
141
- #
142
- # }
143
- # end
144
- # }
145
- #
146
- # describe 'DX.log and DX.syslog calls' do
147
- #
148
- # the 'DX.log call' do
149
- # File.should exist('tester')
150
- # launch 'tester'
151
- # File.should exist('tester.log')
152
- # open 'tester.log', 'r' do |f| # in this case rspec is in $0
153
- # lines = f.readlines
154
- # lines.grep(/programmer non-sense/).should_not be_empty # programmer's message
155
- # lines.grep(/tester:tester:\d+:in/).should_not be_empty # program name and file/caller info is part of the log from above
156
- # end
157
- # end
158
- #
159
- # the 'DX.syslog call' do
160
- # File.should exist('tester')
161
- # launch 'tester'
162
- # File.should exist('tester.log')
163
- # if !OS.windows?
164
- # open "/var/log/system.log", 'r' do |f|
165
- # lines = f.readlines
166
- # lines[-5, 5].grep(%r{a load of crap}).should_not be_empty # programmer's message
167
- # lines[-5, 5].grep(/tester:tester:\d+:in/).should_not be_empty # program name and file/caller info is part of the log from above
168
- # end
169
- # end
170
- # end
171
- #
172
- # end
173
- #
174
- #
175
- # describe 'DX.seize call: logging Exception information' do
176
- #
177
- # it 'allows system Exception info to be logged instead of stopping the program' do
178
- # DX.logger :active
179
- # DX.splatter :active
180
- # DX.seize true, TypeError
181
- # DX.should_receive :debug
182
- # expect{String.new 3}.to raise_error
183
- # sleep 0.2
184
- # if !OS.windows?
185
- # open('/var/log/system.log', 'r') do |file| # named 'rspec.log' because rspec is $0
186
- # lines = file.readlines[-10, 10]
187
- # lines.grep(/TypeError/).should_not be_empty
188
- # lines.grep(/rspec/).should_not be_empty
189
- # end
190
- # end
191
- # end
192
- #
193
- # end
194
- # end
195
- #
196
- #
197
- # describe 'no need for removal of each and every individual call in production having an
198
- # option to "turn-off" all calls on a per module/injector basis' do
199
- #
200
- # the 'logger goes silent if collapse is called' do
201
- # # call collapse on logger
202
- # DX.logger :collapse
203
- # DX.assert_loaded.should == nil
204
- # DX.syslog('baa').should == nil
205
- # end
206
- #
207
- # the 'debugger goes silent if collapse is called' do
208
- # # collapse debugger
209
- # DX.splatter :collapse
210
- # DX.debug # nothing happens even without expectacion
211
- # end
212
- #
213
- # end
214
- #
215
- # describe 'rebuilding the modules' do
216
- #
217
- # this 'is logger rebuilding' do
218
- # DX.logger :collapse
219
- # DX.assert_loaded('something').should == nil
220
- # DX.syslog('boo').should be_nil
221
- # # ...
222
- # DX.logger :rebuild
223
- # DX.assert_loaded('something').should_not == nil
224
- # $stdout.should_receive(:write).with(/The hot thing/)
225
- # DX.syslog false, 'The hot thing'
226
- # sleep 0.2
227
- # if !OS.windows?
228
- # open '/var/log/system.log', 'r' do |file|
229
- # lines = file.readlines
230
- # lines.grep(/The hot thing/).should_not be_empty
231
- # end
232
- # end
233
- # end
234
- #
235
- # this 'example shows splatter rebuilding' do
236
- # DX.splatter :collapse
237
- # DX.debug.should be_nil
238
- # # ...
239
- # DX.splatter :rebuild
240
- # DX.should_receive :debug
241
- # DX.debug
242
- #
243
- # # DX.seize NameError
244
- # # DX.should_receive :debug
245
- # # expect{eval('while crap do end')}.to raise_error
246
- # end
247
- #
248
- # end
249
- # end
250
- #
251
- #
252
- # describe 'the case with complete class DX module injection to automatically output
253
- # greater program state at point of call by creating a tracer. However and can
254
- # slow down your times depending on context' do
255
- #
256
- # subject {
257
- #
258
- # # DX.splatter :rebuild
259
- # # DX.logger :rebuild
260
- #
261
- # class Animal
262
- # inject DX
263
- #
264
- # def initialize(var)
265
- # @var = var
266
- # end
267
- # def crawl arg1, *args
268
- # val = arg1
269
- # h = args
270
- # something = 'nothing'
271
- # syslog 'We are in a crawl'
272
- # self
273
- # end
274
- # def annomaly
275
- # debug
276
- # end
277
- # self
278
- # end
279
- #
280
- # }
281
- #
282
- # it 'outputs caller info' do
283
- # subject.new("snail").crawl("in dirt", "slowly")
284
- # sleep 0.2
285
- # if !OS.windows?
286
- # open('/var/log/system.log', 'r') do |file| # naned 'rspec.log' because rspec is $0
287
- # lines = file.readlines[-10, 10]
288
- # lines.grep(/We are in a crawl/).should_not be_empty
289
- # lines.grep(/@var\W+snail/).should_not be_empty
290
- # lines.grep(/arg1\W+in dirt/).should_not be_empty
291
- # lines.grep(/args\W+slowly/).should_not be_empty
292
- # lines.grep(/something\W+nothing/).should_not be_empty
293
- # end
294
- # end
295
- # end
296
- #
297
- # the 'same goes from the #seize call' do
298
- # class Animal
299
- # inject DX
300
- #
301
- # def disease
302
- # seize false, TypeError
303
- # String.new 3
304
- # end
305
- # end
306
- # dog = subject.new('dog')
307
- # DX.should_receive :debug
308
- # expect{dog.disease}.to raise_error
309
- # end
310
- #
311
- # it 'is also possible to log from the seize call' do
312
- # class Animal
313
- # inject DX
314
- #
315
- # def secret
316
- # seize true, ZeroDivisionError # break false turns into a log entry
317
- # var = 1/0
318
- # end
319
- # end
320
- # emu = subject.new('emu')
321
- # DX.should_receive :debug
322
- # expect{emu.secret}.to raise_error
323
- # sleep 0.2
324
- # if !OS.windows?
325
- # open('/var/log/system.log', 'r') do |file| # naned 'rspec.log' because rspec is $0
326
- # lines = file.readlines[-10, 10]
327
- # lines.grep(/ZeroDivisionError/).should_not be_empty
328
- # lines.grep(/rspec.+?dx_spec.rb/).should_not be_empty
329
- # end
330
- # end
331
- # end
332
- #
333
- # it 'still allows program stops for debug' do
334
- # weirdo = subject.new('cat-dog')
335
- # weirdo.should_receive :debug
336
- # weirdo.annomaly
337
- # end
338
- #
339
- # # it 'is not posible to include DX at the top level' do
340
- # # expect{Object.inject DX}.to raise_error
341
- # # end
342
- #
343
- # end
344
- #
345
- # end
346
- #