stackprof-local 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 8f8fd54db60e2e426abf0db78d9608b3bdf585b6
4
- data.tar.gz: 459fabb83878576063767797e3eebf6b9fd57967
3
+ metadata.gz: f093672e4414b2740854eeffa3810ed9332a77f9
4
+ data.tar.gz: d9ae4c503f6d7fc5cb7c0891d00b79cc9f6e14d3
5
5
  SHA512:
6
- metadata.gz: 01f70ae8bc2a92e540e92250beca18b0d17f1d1b7b0f309bce2b542edd03dccb443826f1a275739e058edf70da61e0d3494c05d967b5f1bc8770113e4d8a7d6f
7
- data.tar.gz: 548cc93a366b28c1e9e76e306c6c7e468af3f67135d624a1635a434605f9ef9c27145e335a2ea779c1b2372e3df30fb058c7a821d2b913e6004eeb7436f5a7fc
6
+ metadata.gz: cb4f49eef88a83f1a8b39a6471b5035d11e436d3a50b885f2c84455aa8d67123014cab04711c00cb41e18e385d1b46e1eda60b9ef82ec8255ee871e1aa06d9fc
7
+ data.tar.gz: 0bb059af14dd04a1afa5063a2c01852bf12e64e67b4c0d5df8ffb443b35a066875b2544c9a0ca2c9ededfba80115834dd815a20f2b4743774494c2d25451498e
data/README.md CHANGED
@@ -77,6 +77,14 @@ All of configuration options are available as cli arguments and will override fi
77
77
  $ stackprof-local-cli --remote-gems '/path/to/gems' tmp/stackprof/stackprof-wall-14962-1412161559.dump
78
78
  ```
79
79
 
80
+ Options with `--remote-` prefix allowed to define as regular expressions
81
+
82
+ *Notice: escape the special chars with double backslash*
83
+
84
+ ```
85
+ $ stackprof-local-cli --remote-project '/path/to/project/\\d{10}' tmp/stackprof/stackprof-wall-14962-1412161559.dump
86
+ ```
87
+
80
88
  ## Installation
81
89
 
82
90
  Add this line to your application's Gemfile:
@@ -13,7 +13,7 @@ module StackProf
13
13
  end
14
14
 
15
15
  def localize(file)
16
- if file.include?(configuration.remote_gems)
16
+ if configuration.remote_gems.match(file)
17
17
  to_local_gems(file)
18
18
  else
19
19
  to_local_project(file)
@@ -1,6 +1,6 @@
1
- require 'erb'
2
- require 'optparse'
3
- require 'shellwords'
1
+ require "erb"
2
+ require "optparse"
3
+ require "shellwords"
4
4
 
5
5
  module StackProf
6
6
  module Local
@@ -20,10 +20,16 @@ module StackProf
20
20
 
21
21
  def parser
22
22
  OptionParser.new do |parser|
23
- parser.on('--remote-gems PATH', String) { |path| @remote_gems = path }
24
- parser.on('--remote-project PATH', String) { |path| @remote_project = path }
25
- parser.on('--local-gems PATH', String) { |path| @local_gems = path }
26
- parser.on('--local-project PATH', String) { |path| @local_project = path }
23
+ parser.on("--remote-gems PATH", String) do |path|
24
+ @remote_gems = regexpify(path)
25
+ end
26
+
27
+ parser.on("--remote-project PATH", String) do |path|
28
+ @remote_project = regexpify(path)
29
+ end
30
+
31
+ parser.on("--local-gems PATH", String) { |path| @local_gems = path }
32
+ parser.on("--local-project PATH", String) { |path| @local_project = path }
27
33
  end
28
34
  end
29
35
 
@@ -35,6 +41,10 @@ module StackProf
35
41
  def options_file_as_erb_string(path)
36
42
  ERB.new(File.read(path), nil, ERB_EOUTVAR).result(binding)
37
43
  end
44
+
45
+ def regexpify(expression)
46
+ Regexp === expression ? expression : /#{expression}/
47
+ end
38
48
  end
39
49
  end
40
50
  end
@@ -1,5 +1,5 @@
1
1
  module Stackprof
2
2
  module Local
3
- VERSION = "0.0.1".freeze
3
+ VERSION = "0.0.2".freeze
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "stackprof", "= 0.2.7"
22
- spec.add_dependency "stackprof-remote", "~> 0.0.5"
22
+ spec.add_dependency "stackprof-remote", "~> 0.0.6"
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.7"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stackprof-local
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Strech (Sergey Fedorov)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-02 00:00:00.000000000 Z
11
+ date: 2014-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stackprof
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.0.5
33
+ version: 0.0.6
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.0.5
40
+ version: 0.0.6
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement