xclisten 0.0.7 → 0.0.8

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: ad518da0c85f022fec159b25544b4134f3f093d0
4
- data.tar.gz: b0b440fedbe79ee01fa7ead2dc08dc0dec3b13bf
3
+ metadata.gz: 3b15c010ee67007a72947c7bdc61df4714ec261d
4
+ data.tar.gz: 56efee434a997c22624ef72efe31e9a5848bee58
5
5
  SHA512:
6
- metadata.gz: 4e3cfb41ee35de433a81eb8b69822350a696b8047b44f903cf6dfc89f0fe27892a1f640055f0c802dcadcfeec945c4d30c85f5a965657230d6d33e277efd0a36
7
- data.tar.gz: 6aa682346544a5a5b2bccd26f130dbe10e4a286af9934d1440573db84e8059ce7441bb0dea2feb0ddb2fd2424c3bc52b195f75beb423e3a170f26524bc15291e
6
+ metadata.gz: 68e1450aa46430c11d8e2cc97a2fc1b6e159804caa3a77c3dd646c7cc4bcb3b14c49ac6ec775106ac92e087c17c395e4ffd63365645d1bbf66d21a5b0f3816f1
7
+ data.tar.gz: 8c7d16888085ec03915f7c50de7ad8cfa5a9e3324de8f2468309bf668db217b26ac3a3135f161b03e0d9870d1b5a700b3cd07612bf0808077c63f83adb7b6463
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # XCListen
2
2
  [![Build Status](https://travis-ci.org/mneorr/xclisten.png?branch=master)](https://travis-ci.org/mneorr/xclisten)
3
+ [![Code Climate](https://codeclimate.com/github/mneorr/xclisten.png)](https://codeclimate.com/github/mneorr/xclisten)
3
4
 
4
5
  A zero-configuration filesystem watcher for ObjectiveC. It determines your workspace and scheme automatically, and:
5
6
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ require 'shellwords'
2
3
 
3
4
  if $0 == __FILE__
4
5
  $:.unshift File.expand_path('../../lib', __FILE__)
@@ -18,7 +19,7 @@ OptionParser.new do |opts|
18
19
  opts.on('--ios', '[DEFAULT] Run with iOS sdk') do
19
20
  @options[:sdk] = 'iphonesimulator'
20
21
  end
21
- opts.on('-d', '--device', 'Simulated device [iphone5s, iphone5, iphone4, ipad2, ipad4, ipad_air]. Default is iphone5s') do |device|
22
+ opts.on('-d', '--device DEVICE', 'Simulated device [iphone5s, iphone5, iphone4, ipad2, ipad4, ipad_air]. Default is iphone5s') do |device|
22
23
  @options[:device] = device
23
24
  end
24
25
  opts.on('-s', '--scheme SCHEME', 'BYOS (Bring your own scheme)') do |scheme|
@@ -10,10 +10,10 @@ class XCListen
10
10
  attr_reader :workspace
11
11
 
12
12
  def initialize(opts = {})
13
- @device = IOS_DEVICES[opts[:device]] || IOS_DEVICES['iphone5s']
14
13
  @scheme = opts[:scheme] || project_name
15
14
  @sdk = opts[:sdk] || 'iphonesimulator'
16
15
  @workspace = opts[:workspace] || workspace_path
16
+ @device = IOS_DEVICES[opts[:device]] || IOS_DEVICES['iphone5s']
17
17
  end
18
18
 
19
19
  IOS_DEVICES = {
@@ -34,7 +34,9 @@ class XCListen
34
34
  end
35
35
 
36
36
  def xcodebuild
37
- "xcodebuild -workspace #{workspace} -scheme #{scheme} -sdk #{sdk} -destination 'name=#{device}'"
37
+ cmd = "xcodebuild -workspace #{workspace} -scheme #{scheme} -sdk #{sdk}"
38
+ cmd += " -destination 'name=#{device}'" unless @sdk == 'macosx'
39
+ cmd
38
40
  end
39
41
 
40
42
  def install_pods
@@ -1,4 +1,4 @@
1
1
  class XCListen
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
4
4
 
@@ -85,13 +85,18 @@ class XCListen
85
85
  flags = {
86
86
  :workspace => 'Example/Sample.xcworkspace',
87
87
  :scheme => 'kif',
88
- :sdk => 'macosx',
88
+ :sdk => 'iphoneos',
89
89
  :device => 'name=iPhone Retina (4-inch 64-bit)'
90
90
  }
91
91
  xclisten = XCListen.new(flags)
92
92
  xclisten.xcodebuild.should == "xcodebuild -workspace #{flags[:workspace]} -scheme #{flags[:scheme]} -sdk #{flags[:sdk]} -destination '#{flags[:device]}'"
93
93
  end
94
94
 
95
+ it "doesn't specify destination for OSX" do
96
+ xclisten = XCListen.new(:sdk => 'macosx')
97
+ xclisten.xcodebuild.should_not include('-destination')
98
+ end
99
+
95
100
  it "knows if it can run" do
96
101
  Dir.stub(:glob).and_return([""])
97
102
  xclisten = XCListen.new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xclisten
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marin Usalj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-18 00:00:00.000000000 Z
11
+ date: 2014-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: listen