speckle 0.1.24 → 0.1.25
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 +8 -8
- data/.editorconfig +8 -0
- data/Rakefile +43 -9
- data/lib/speckle/cli/environment.rb +5 -0
- data/lib/speckle/cli/rake_app.rb +6 -2
- data/lib/speckle/version.rb +1 -1
- data/portkey.json +6 -1
- data/spec/speckle/cli/environment_spec.rb +12 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NWRlOTc3OThlNDE0NzViYzlmNjE5NjkyYzMxMTFiN2M5OWVlNWE3NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGM5MmFkMGNhYTRmMzg0MWMxMTk4NjM5NDI3OWE1YjU0MjAwZGI2Zg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjUzMzQwMWI4ZmU5OThlMmM1ZTQ5MTA5YjRmMzlmMGE3MjEyYzY5Y2Y3ZGEy
|
10
|
+
YjlhMzk3OWRhYTJhYjBhYjhiYTY4YWYyYTc4OTIzNzU2ZWNhYWI5ODcyN2Vh
|
11
|
+
YmQ0NzhmOTJhODM0YjhhYjk4Y2ZhNGFjNjk2OTQ3MjIzOGM3NmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDJhZjIzZDJlNWY1NDVjZjg1ZDU4MTU4MmQ4NTY4NDQxYTY0ZjUwMjU3NGZl
|
14
|
+
MjE1ZWNmMDM2MDdiYmZiN2JkYTU2N2Q5ZDA0YWViMzUwNDc3NzI0NmVjYjAw
|
15
|
+
MWRjMTBhZDdhMTE5ZjEzZDNjNzAyNTFkYjNmMWE2MTU1YjUxMzA=
|
data/.editorconfig
ADDED
data/Rakefile
CHANGED
@@ -103,6 +103,9 @@ namespace :speckle do
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
+
PROFILE = ENV.has_key?('PROFILE')
|
107
|
+
PROFILE_PATH = "#{BUILD_DIR}/speckle.profile"
|
108
|
+
|
106
109
|
desc 'All tasks'
|
107
110
|
task :all => [:clean, :compile, :compile_tests, :test]
|
108
111
|
|
@@ -220,11 +223,20 @@ namespace :speckle do
|
|
220
223
|
launch_file = get_launch_cmd_file()
|
221
224
|
File.delete(TEST_LOG) if File.exist?(TEST_LOG)
|
222
225
|
File.delete(TEST_EXIT_FILE) if File.exist?(TEST_EXIT_FILE)
|
226
|
+
File.delete(PROFILE_PATH) if File.exist?(PROFILE_PATH)
|
223
227
|
|
224
228
|
sh "#{TEST_VIM} #{get_vim_options()} -S #{launch_file.path}"
|
225
229
|
launch_file.unlink
|
226
230
|
if File.exist?(TEST_EXIT_FILE)
|
227
231
|
sh "cat #{TEST_LOG}"
|
232
|
+
if PROFILE
|
233
|
+
puts ''
|
234
|
+
puts '------------------------------------------------------------------------------'
|
235
|
+
puts "PROFILE SUMMARY"
|
236
|
+
puts '------------------------------------------------------------------------------'
|
237
|
+
puts ''
|
238
|
+
print_profile
|
239
|
+
end
|
228
240
|
exit_code = File.read(TEST_EXIT_FILE)[0].to_i
|
229
241
|
exit!(exit_code)
|
230
242
|
else
|
@@ -241,14 +253,17 @@ namespace :speckle do
|
|
241
253
|
|
242
254
|
# utils
|
243
255
|
def get_launch_cmd_source
|
244
|
-
launch_cmd =
|
245
|
-
|
246
|
-
|
256
|
+
launch_cmd = "source #{SPECKLE_OUTPUT}\n"
|
257
|
+
|
258
|
+
if PROFILE
|
259
|
+
launch_cmd += "profile start #{PROFILE_PATH}\n"
|
260
|
+
end
|
247
261
|
|
248
262
|
TEST_COMPILED.each do |t|
|
249
|
-
|
250
|
-
|
251
|
-
|
263
|
+
if PROFILE
|
264
|
+
launch_cmd += "profile! file #{t}\n"
|
265
|
+
end
|
266
|
+
launch_cmd += "source #{t}\n"
|
252
267
|
end
|
253
268
|
|
254
269
|
launch_cmd += <<CMD
|
@@ -260,10 +275,13 @@ CMD
|
|
260
275
|
let g:speckle_colorize = #{COLORIZE}
|
261
276
|
let g:speckle_bail = #{BAIL}
|
262
277
|
CMD
|
278
|
+
|
263
279
|
if TAG
|
264
|
-
launch_cmd +=
|
265
|
-
|
266
|
-
|
280
|
+
launch_cmd += "let g:speckle_tag = '#{TAG}'\n"
|
281
|
+
end
|
282
|
+
|
283
|
+
if PROFILE
|
284
|
+
launch_cmd += "let g:speckle_profile = 1\n"
|
267
285
|
end
|
268
286
|
|
269
287
|
launch_cmd += <<CMD
|
@@ -287,5 +305,21 @@ CMD
|
|
287
305
|
file
|
288
306
|
end
|
289
307
|
|
308
|
+
def print_profile
|
309
|
+
can_print = false
|
310
|
+
|
311
|
+
f = File.open(PROFILE_PATH)
|
312
|
+
f.each do |line|
|
313
|
+
if !can_print && line =~ /FUNCTIONS SORTED ON TOTAL TIME/
|
314
|
+
can_print = true
|
315
|
+
end
|
316
|
+
if can_print
|
317
|
+
puts line
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
321
|
+
f.close
|
322
|
+
end
|
323
|
+
|
290
324
|
end
|
291
325
|
|
@@ -27,6 +27,7 @@ module Speckle
|
|
27
27
|
options.colorize = true
|
28
28
|
options.bail = false
|
29
29
|
options.tag = nil
|
30
|
+
options.profile = false
|
30
31
|
|
31
32
|
parser = OptionParser.new do |opts|
|
32
33
|
options.opts = opts
|
@@ -84,6 +85,10 @@ module Speckle
|
|
84
85
|
options.slow_threshold = ms
|
85
86
|
end
|
86
87
|
|
88
|
+
opts.on('-p', '--profile', 'Profiles the tests run') do
|
89
|
+
options.profile = true
|
90
|
+
end
|
91
|
+
|
87
92
|
opts.on('-k', '--skip-vimrc', 'Does not load ~/.vimrc file') do
|
88
93
|
options.skip_vimrc = true
|
89
94
|
end
|
data/lib/speckle/cli/rake_app.rb
CHANGED
@@ -24,7 +24,7 @@ module Speckle
|
|
24
24
|
|
25
25
|
def debug
|
26
26
|
@options.debug
|
27
|
-
end
|
27
|
+
end
|
28
28
|
|
29
29
|
def rake
|
30
30
|
if @rake_app
|
@@ -53,7 +53,7 @@ module Speckle
|
|
53
53
|
ENV[key] = if value.is_a?(Array) then value.join(';') else value end
|
54
54
|
puts "rake_env: #{key} = #{ENV[key]}" if debug
|
55
55
|
end
|
56
|
-
end
|
56
|
+
end
|
57
57
|
|
58
58
|
def configure_rake
|
59
59
|
rake_env('TEST_SOURCES', test_sources)
|
@@ -68,6 +68,10 @@ module Speckle
|
|
68
68
|
rake_env('BAIL', to_int(@options.bail))
|
69
69
|
rake_env('TAG', @options.tag)
|
70
70
|
|
71
|
+
if @options.profile
|
72
|
+
rake_env('PROFILE', 'yes')
|
73
|
+
end
|
74
|
+
|
71
75
|
if @options.verbose
|
72
76
|
rake_env('VERBOSE', 'yes')
|
73
77
|
end
|
data/lib/speckle/version.rb
CHANGED
data/portkey.json
CHANGED
@@ -17,7 +17,8 @@
|
|
17
17
|
"type": "utility"
|
18
18
|
},
|
19
19
|
"lib/speckle/cli/*.rb": {
|
20
|
-
"type": "cli"
|
20
|
+
"type": "cli",
|
21
|
+
"test": "spec/speckle/cli/%s_spec.rb"
|
21
22
|
},
|
22
23
|
"lib/speckle/list/*.rb": {
|
23
24
|
"type": "list"
|
@@ -29,5 +30,9 @@
|
|
29
30
|
},
|
30
31
|
"spec/*_spec.riml": {
|
31
32
|
"type": "spec"
|
33
|
+
},
|
34
|
+
"spec/speckle/cli/*_spec.rb": {
|
35
|
+
"type": "spec",
|
36
|
+
"alternate": "lib/speckle/cli/%s.rb"
|
32
37
|
}
|
33
38
|
}
|
@@ -282,6 +282,18 @@ module Speckle
|
|
282
282
|
expect(opts.inputs.length).to eq(1)
|
283
283
|
end
|
284
284
|
|
285
|
+
it 'does not have profile option by default' do
|
286
|
+
expect([]).to_not have_default_option('profile')
|
287
|
+
end
|
288
|
+
|
289
|
+
it 'has profile option when specified' do
|
290
|
+
expect(['-p']).to yield_option_value('profile', true)
|
291
|
+
end
|
292
|
+
|
293
|
+
it 'has profile option with long switch' do
|
294
|
+
expect(['--profile']).to yield_option_value('profile', true)
|
295
|
+
end
|
296
|
+
|
285
297
|
end
|
286
298
|
|
287
299
|
describe 'Complete CLI options' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: speckle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darshan Sawardekar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: riml
|
@@ -101,6 +101,7 @@ executables:
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- .editorconfig
|
104
105
|
- .gitignore
|
105
106
|
- .travis.yml
|
106
107
|
- Gemfile
|