cuesmash 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/cuesmash.gemspec +1 -1
- data/lib/cuesmash/compiler.rb +4 -2
- data/lib/cuesmash/setup.rb +3 -0
- data/lib/cuesmash/start.rb +1 -1
- data/spec/compiler_spec.rb +14 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33cad57b15822471d9d65794484f93b4f53f9a0b
|
4
|
+
data.tar.gz: e6ade54f465a4ebf3fdb308e68e265c4f300c929
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3035d66484e46195764894659540bb664c27b989ec7aa12745150e16e24fb06bad2198e3e97bda12258dd96e21119829da4bba3f38ca07ebc7d5fbe0ed5c39fe
|
7
|
+
data.tar.gz: e4b7bb8e1f4292a35174f7a3f6cded3a50922c2de628c58cae02c411b286e294d9a3d3260b0c47384f50dbf33bfacae80703de780c13bd8cdd16bfa3bcb408a0
|
data/Gemfile.lock
CHANGED
data/cuesmash.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "cuesmash"
|
7
|
-
spec.version = "0.1.
|
7
|
+
spec.version = "0.1.7"
|
8
8
|
spec.authors = ["Alex Fish", "Jarod McBride"]
|
9
9
|
spec.email = ["fish@ustwo.co.uk", "jarod@ustwo.com"]
|
10
10
|
spec.description = "A gift for Juan"
|
data/lib/cuesmash/compiler.rb
CHANGED
@@ -14,10 +14,12 @@ module Cuesmash
|
|
14
14
|
# Public: the Scheme the compiler is compiling
|
15
15
|
attr_accessor :scheme
|
16
16
|
attr_accessor :tmp_dir
|
17
|
+
attr_accessor :build_configuration
|
17
18
|
|
18
|
-
def initialize(scheme, tmp_dir)
|
19
|
+
def initialize(scheme, tmp_dir, build_configuration)
|
19
20
|
@scheme = scheme
|
20
21
|
@tmp_dir = tmp_dir
|
22
|
+
@build_configuration = build_configuration
|
21
23
|
end
|
22
24
|
|
23
25
|
#
|
@@ -73,7 +75,7 @@ module Cuesmash
|
|
73
75
|
# @return [String] The full xcode build command with args
|
74
76
|
def command
|
75
77
|
# xcode_command = "xcodebuild #{workspace} -scheme #{@scheme} -sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -derivedDataPath #{@tmp_dir}"
|
76
|
-
xcode_command = "set -o pipefail && xcodebuild #{workspace} -scheme #{@scheme} -derivedDataPath #{@tmp_dir} -configuration
|
78
|
+
xcode_command = "set -o pipefail && xcodebuild #{workspace} -scheme #{@scheme} -derivedDataPath #{@tmp_dir} -configuration #{@build_configuration} OBJROOT=#{@tmp_dir} SYMROOT=#{@tmp_dir} -sdk iphonesimulator build | bundle exec xcpretty -c"
|
77
79
|
|
78
80
|
Logger.info "xcode_command == #{xcode_command}"
|
79
81
|
xcode_command
|
data/lib/cuesmash/setup.rb
CHANGED
@@ -39,14 +39,17 @@ module Cuesmash
|
|
39
39
|
command_runner(command: "gem install --no-rdoc --no-ri cucumber")
|
40
40
|
end
|
41
41
|
|
42
|
+
# TODO: check if these exist already
|
42
43
|
def create_features_dir
|
43
44
|
command_runner(command: "mkdir -p features/{support,step_definitions}")
|
44
45
|
end
|
45
46
|
|
47
|
+
# TODO: check if this file exists already. If so ask if you want to overwrite it.
|
46
48
|
def create_env_rb
|
47
49
|
download_gist(gist_id:"9fa5e495758463ee5340", final_file:"features/support/env.rb")
|
48
50
|
end
|
49
51
|
|
52
|
+
# TODO: this is failing.
|
50
53
|
def install_appium_console
|
51
54
|
command_runner(command: "gem install --no-rdoc --no-ri appium_console")
|
52
55
|
end
|
data/lib/cuesmash/start.rb
CHANGED
@@ -84,7 +84,7 @@ module Cuesmash
|
|
84
84
|
app = IosApp.new(file_name: options[:scheme])
|
85
85
|
|
86
86
|
# Compile the project
|
87
|
-
compiler = Cuesmash::Compiler.new(options[:scheme], app.tmp_dir)
|
87
|
+
compiler = Cuesmash::Compiler.new(options[:scheme], app.tmp_dir, config['build_configuration'])
|
88
88
|
compiler.compile
|
89
89
|
|
90
90
|
# create the appium text file
|
data/spec/compiler_spec.rb
CHANGED
@@ -7,20 +7,25 @@ describe Cuesmash::Compiler do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
it "should have a scheme instance" do
|
10
|
-
compiler = Cuesmash::Compiler.new("scheme", "/tmp")
|
10
|
+
compiler = Cuesmash::Compiler.new("scheme", "/tmp", "Debug")
|
11
11
|
expect(compiler.scheme).to match("scheme")
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should have a tmp_dir instance" do
|
15
|
-
compiler = Cuesmash::Compiler.new("scheme", "/tmp")
|
15
|
+
compiler = Cuesmash::Compiler.new("scheme", "/tmp", "Debug")
|
16
16
|
expect(compiler.tmp_dir).to match("/tmp")
|
17
17
|
end
|
18
18
|
|
19
|
+
it "should have a build config" do
|
20
|
+
compiler = Cuesmash::Compiler.new("scheme", "/tmp", "Debug")
|
21
|
+
expect(compiler.build_configuration).to match("Debug")
|
22
|
+
end
|
23
|
+
|
19
24
|
describe "when generating the command" do
|
20
25
|
|
21
26
|
before(:each) do
|
22
27
|
Cuesmash::Compiler.any_instance.stub(:workspace)
|
23
|
-
@compiler = Cuesmash::Compiler.new("test-scheme", "/tmp")
|
28
|
+
@compiler = Cuesmash::Compiler.new("test-scheme", "/tmp", "Debug")
|
24
29
|
end
|
25
30
|
|
26
31
|
it "should contain the scheme" do
|
@@ -30,12 +35,16 @@ describe Cuesmash::Compiler do
|
|
30
35
|
it "should contain the tmp path" do
|
31
36
|
expect(@compiler.instance_eval{command}).to match(/tmp/)
|
32
37
|
end
|
38
|
+
|
39
|
+
it "should contain the build configuration" do
|
40
|
+
expect(@compiler.instance_eval{command}).to match(/Debug/)
|
41
|
+
end
|
33
42
|
end
|
34
43
|
|
35
44
|
describe "when getting the workspacae" do
|
36
45
|
|
37
46
|
before(:each) do
|
38
|
-
@compiler = Cuesmash::Compiler.new(nil, "/tmp")
|
47
|
+
@compiler = Cuesmash::Compiler.new(nil, "/tmp", "Debug")
|
39
48
|
Dir.stub(:[]){["workspace-file"]}
|
40
49
|
end
|
41
50
|
|
@@ -53,7 +62,7 @@ describe Cuesmash::Compiler do
|
|
53
62
|
wait.stub(:join)
|
54
63
|
Open3.stub(:popen3).and_yield(nil, nil, nil, wait)
|
55
64
|
|
56
|
-
@compiler = Cuesmash::Compiler.new(nil, "/tmp")
|
65
|
+
@compiler = Cuesmash::Compiler.new(nil, "/tmp", "Debug")
|
57
66
|
end
|
58
67
|
|
59
68
|
it "should complete if all is well" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuesmash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Fish
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-12-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|