pebblex 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pebble_x/cli.rb +4 -0
- data/lib/pebble_x/pebble.rb +1 -1
- data/lib/pebble_x/version.rb +1 -1
- data/spec/cli_spec.rb +9 -0
- metadata +8 -3
data/lib/pebble_x/cli.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'thor'
|
2
|
+
require 'pathname'
|
2
3
|
|
3
4
|
module PebbleX
|
4
5
|
|
@@ -60,6 +61,9 @@ module PebbleX
|
|
60
61
|
unless sdk_dir
|
61
62
|
pebble_cmd = sys_call('which pebble').strip
|
62
63
|
if pebble_cmd != ''
|
64
|
+
real_path = sys_call("readlink #{pebble_cmd}")
|
65
|
+
pebble_cmd = real_path if real_path != ''
|
66
|
+
|
63
67
|
sdk_dir = File.expand_path('../..', pebble_cmd)
|
64
68
|
end
|
65
69
|
end
|
data/lib/pebble_x/pebble.rb
CHANGED
data/lib/pebble_x/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
@@ -88,9 +88,18 @@ describe 'CLI' do
|
|
88
88
|
it 'uses `which pebble` to determine sdk path' do
|
89
89
|
c = PebbleX::CLI.new
|
90
90
|
expect(c).to receive(:sys_call).with('which pebble').and_return '/path/to/sdk/bin/pebble'
|
91
|
+
expect(c).to receive(:sys_call).with('readlink /path/to/sdk/bin/pebble').and_return ''
|
91
92
|
expect(c.pebble_sdk_dir).to eq '/path/to/sdk'
|
92
93
|
end
|
93
94
|
|
95
|
+
it 'follows symlinks to determine sdk path' do
|
96
|
+
c = PebbleX::CLI.new
|
97
|
+
expect(c).to receive(:sys_call).with('which pebble').and_return '/some/symlink'
|
98
|
+
expect(c).to receive(:sys_call).with('readlink /some/symlink').and_return '/path/to/sdk/bin/pebble'
|
99
|
+
expect(c.pebble_sdk_dir).to eq '/path/to/sdk'
|
100
|
+
end
|
101
|
+
|
102
|
+
|
94
103
|
it 'uses option pebble_sdk if provided' do
|
95
104
|
c = PebbleX::CLI.new
|
96
105
|
expect(c).to_not receive(:sys_call)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pebblex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-12-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -156,12 +156,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
156
156
|
- - ! '>='
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '0'
|
159
|
+
segments:
|
160
|
+
- 0
|
161
|
+
hash: 3664111484027848110
|
159
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
163
|
none: false
|
161
164
|
requirements:
|
162
165
|
- - ! '>='
|
163
166
|
- !ruby/object:Gem::Version
|
164
167
|
version: '0'
|
168
|
+
segments:
|
169
|
+
- 0
|
170
|
+
hash: 3664111484027848110
|
165
171
|
requirements: []
|
166
172
|
rubyforge_project:
|
167
173
|
rubygems_version: 1.8.23
|
@@ -177,4 +183,3 @@ test_files:
|
|
177
183
|
- spec/fixtures/project_with_js/wscript
|
178
184
|
- spec/pebble_spec.rb
|
179
185
|
- spec/xcode_spec.rb
|
180
|
-
has_rdoc:
|