cuesmash 0.1.9.1 → 0.1.9.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 +4 -4
- data/Gemfile.lock +1 -1
- data/cuesmash.gemspec +1 -1
- data/lib/cuesmash/android_compiler.rb +15 -2
- data/lib/cuesmash/ios_compiler.rb +1 -1
- data/lib/cuesmash/start.rb +3 -3
- data/lib/cuesmash.rb +1 -1
- data/spec/android_compiler_spec.rb +2 -2
- data/spec/ios_compiler_spec.rb +21 -21
- metadata +2 -8
- data/lib/cuesmash/androidapp.rb +0 -36
- data/lib/cuesmash/iosapp.rb +0 -42
- data/spec/iosapp_spec.rb +0 -34
- data/spec/ioscompiler_spec.rb +0 -76
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4beee118c67c3a5438e105434b131a01fdcc3413
|
4
|
+
data.tar.gz: b09e2cae2af09f90d7a0184848e3264786ca889d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a952236b735fa22076e7aba87ee89c7b6bd7fc79bb785937d0d7372e0cf8a3c3f49804abf4255d1fda8086c9f0ad1429a5c4b52910e1fd55b04e56121af0c709
|
7
|
+
data.tar.gz: 0e372cade8eb19f21ee4ebe3172e6ab4e4941d01a66ec16794d75d7fa3201b89ade695ae3cc077e86ad96f38c31f01b763560cb0f52308f56e10c7a66a3bcd24
|
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.9.
|
7
|
+
spec.version = "0.1.9.2"
|
8
8
|
spec.authors = ["Alex Fish", "Jarod McBride", "Tiago Castro"]
|
9
9
|
spec.email = ["fish@ustwo.co.uk", "jarod@ustwo.com", "castro@ustwo.com"]
|
10
10
|
spec.description = "A gift for Juan"
|
@@ -9,7 +9,12 @@ module Cuesmash
|
|
9
9
|
|
10
10
|
OUTPUT_PATH = "app/build/outputs/apk"
|
11
11
|
|
12
|
-
|
12
|
+
attr_accessor :project_name
|
13
|
+
attr_accessor :build_configuration
|
14
|
+
|
15
|
+
def initialize(project_name:, build_configuration:)
|
16
|
+
@project_name = project_name
|
17
|
+
@build_configuration = build_configuration
|
13
18
|
end
|
14
19
|
|
15
20
|
#
|
@@ -18,7 +23,15 @@ module Cuesmash
|
|
18
23
|
#
|
19
24
|
# @return [String] The full gradle build command with args
|
20
25
|
def command
|
21
|
-
|
26
|
+
|
27
|
+
case
|
28
|
+
when @build_configuration == 'debug'
|
29
|
+
gradle_command = './gradlew assembleDebug'
|
30
|
+
when @build_configuration == 'release'
|
31
|
+
gradle_command = './gradlew assemble'
|
32
|
+
else
|
33
|
+
puts '/nBuild configuration not found or invalid build configuration'
|
34
|
+
end
|
22
35
|
|
23
36
|
Logger.info "gradle_command == #{gradle_command}"
|
24
37
|
gradle_command
|
@@ -11,7 +11,7 @@ module Cuesmash
|
|
11
11
|
attr_accessor :tmp_dir
|
12
12
|
attr_accessor :build_configuration
|
13
13
|
|
14
|
-
def initialize(scheme
|
14
|
+
def initialize(scheme:, tmp_dir:, build_configuration:)
|
15
15
|
@scheme = scheme
|
16
16
|
@tmp_dir = tmp_dir
|
17
17
|
@build_configuration = build_configuration
|
data/lib/cuesmash/start.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
require 'thor'
|
5
5
|
require 'cuesmash'
|
6
6
|
require 'cuesmash/ios_compiler'
|
7
|
-
require 'cuesmash/
|
7
|
+
require 'cuesmash/android_app'
|
8
8
|
require 'cuesmash/android_compiler'
|
9
9
|
require 'cuesmash/android_command'
|
10
10
|
require 'byebug'
|
@@ -155,7 +155,7 @@ module Cuesmash
|
|
155
155
|
@app = IosApp.new(file_name: options[:scheme], build_configuration: @config['build_configuration'])
|
156
156
|
|
157
157
|
# Compile the project
|
158
|
-
compiler = Cuesmash::IosCompiler.new(options[:scheme], @app.tmp_dir, @config['build_configuration'])
|
158
|
+
compiler = Cuesmash::IosCompiler.new(scheme: options[:scheme], tmp_dir: @app.tmp_dir, build_configuration: @config['build_configuration'])
|
159
159
|
compiler.compile
|
160
160
|
|
161
161
|
ios_appium_text
|
@@ -168,7 +168,7 @@ module Cuesmash
|
|
168
168
|
@app = Cuesmash::AndroidApp.new(project_name: options[:app_name], build_configuration: @config['build_configuration'])
|
169
169
|
|
170
170
|
# Compile the project
|
171
|
-
compiler = Cuesmash::AndroidCompiler.new
|
171
|
+
compiler = Cuesmash::AndroidCompiler.new(project_name: options[:app_name], build_configuration: @config['build_configuration'])
|
172
172
|
compiler.compile
|
173
173
|
|
174
174
|
android_appium_text
|
data/lib/cuesmash.rb
CHANGED
@@ -10,7 +10,7 @@ describe Cuesmash::AndroidCompiler do
|
|
10
10
|
describe "when generating the command" do
|
11
11
|
|
12
12
|
before(:each) do
|
13
|
-
@compiler = Cuesmash::AndroidCompiler.new
|
13
|
+
@compiler = Cuesmash::AndroidCompiler.new(project_name: nil, build_configuration: nil)
|
14
14
|
end
|
15
15
|
|
16
16
|
end # "when generating the command"
|
@@ -24,7 +24,7 @@ describe Cuesmash::AndroidCompiler do
|
|
24
24
|
wait.stub(:join)
|
25
25
|
Open3.stub(:popen3).and_yield(nil, nil, nil, wait)
|
26
26
|
|
27
|
-
@compiler = Cuesmash::AndroidCompiler.new
|
27
|
+
@compiler = Cuesmash::AndroidCompiler.new(project_name: nil, build_configuration: nil)
|
28
28
|
end # before
|
29
29
|
|
30
30
|
it "should complete if all is well" do
|
data/spec/ios_compiler_spec.rb
CHANGED
@@ -7,54 +7,54 @@ describe Cuesmash::IosCompiler do
|
|
7
7
|
Cuesmash::IosCompiler.any_instance.stub(:puts)
|
8
8
|
end
|
9
9
|
|
10
|
-
it
|
11
|
-
compiler = Cuesmash::IosCompiler.new(
|
12
|
-
expect(compiler.scheme).to match(
|
10
|
+
it 'should have a scheme instance' do
|
11
|
+
compiler = Cuesmash::IosCompiler.new(scheme: 'scheme', tmp_dir: '/tmp', build_configuration: 'Debug')
|
12
|
+
expect(compiler.scheme).to match('scheme')
|
13
13
|
end
|
14
14
|
|
15
|
-
it
|
16
|
-
compiler = Cuesmash::IosCompiler.new(
|
17
|
-
expect(compiler.tmp_dir).to match(
|
15
|
+
it 'should have a tmp_dir instance' do
|
16
|
+
compiler = Cuesmash::IosCompiler.new(scheme: 'scheme', tmp_dir: '/tmp', build_configuration: 'Debug')
|
17
|
+
expect(compiler.tmp_dir).to match('/tmp')
|
18
18
|
end
|
19
19
|
|
20
|
-
it
|
21
|
-
compiler = Cuesmash::IosCompiler.new(
|
22
|
-
expect(compiler.build_configuration).to match(
|
20
|
+
it 'should have a build config' do
|
21
|
+
compiler = Cuesmash::IosCompiler.new(scheme: 'scheme', tmp_dir: '/tmp', build_configuration: 'Debug')
|
22
|
+
expect(compiler.build_configuration).to match('Debug')
|
23
23
|
end
|
24
24
|
|
25
|
-
describe
|
25
|
+
describe 'when generating the command' do
|
26
26
|
|
27
27
|
before(:each) do
|
28
28
|
Cuesmash::IosCompiler.any_instance.stub(:workspace)
|
29
|
-
@compiler = Cuesmash::IosCompiler.new(
|
29
|
+
@compiler = Cuesmash::IosCompiler.new(scheme: 'test-scheme', tmp_dir: '/tmp', build_configuration: 'Debug')
|
30
30
|
end
|
31
31
|
|
32
|
-
it
|
32
|
+
it 'should contain the scheme' do
|
33
33
|
expect(@compiler.instance_eval{command}).to match(/test-scheme/)
|
34
34
|
end
|
35
35
|
|
36
|
-
it
|
36
|
+
it 'should contain the tmp path' do
|
37
37
|
expect(@compiler.instance_eval{command}).to match(/tmp/)
|
38
38
|
end
|
39
39
|
|
40
|
-
it
|
40
|
+
it 'should contain the build configuration' do
|
41
41
|
expect(@compiler.instance_eval{command}).to match(/Debug/)
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
describe
|
45
|
+
describe 'when getting the workspacae' do
|
46
46
|
|
47
47
|
before(:each) do
|
48
|
-
@compiler = Cuesmash::IosCompiler.new(nil,
|
49
|
-
Dir.stub(:[]){[
|
48
|
+
@compiler = Cuesmash::IosCompiler.new(scheme: nil, tmp_dir: '/tmp', build_configuration: 'Debug')
|
49
|
+
Dir.stub(:[]){['workspace-file']}
|
50
50
|
end
|
51
51
|
|
52
|
-
it
|
52
|
+
it 'should get the workspace from the current directory' do
|
53
53
|
expect(@compiler.instance_eval{workspace}).to match(/workspace-file/)
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
-
describe
|
57
|
+
describe 'when compiling' do
|
58
58
|
|
59
59
|
before(:each) do
|
60
60
|
wait = double
|
@@ -63,10 +63,10 @@ describe Cuesmash::IosCompiler do
|
|
63
63
|
wait.stub(:join)
|
64
64
|
Open3.stub(:popen3).and_yield(nil, nil, nil, wait)
|
65
65
|
|
66
|
-
@compiler = Cuesmash::IosCompiler.new(nil,
|
66
|
+
@compiler = Cuesmash::IosCompiler.new(scheme: nil, tmp_dir: '/tmp', build_configuration: 'Debug')
|
67
67
|
end
|
68
68
|
|
69
|
-
it
|
69
|
+
it 'should complete if all is well' do
|
70
70
|
@value.stub(:exitstatus){0}
|
71
71
|
@compiler.compile do |complete|
|
72
72
|
expect(complete).to equal(true)
|
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.9.
|
4
|
+
version: 0.1.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Fish
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-01-
|
13
|
+
date: 2015-01-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -193,7 +193,6 @@ files:
|
|
193
193
|
- lib/cuesmash/android_appium_text.rb
|
194
194
|
- lib/cuesmash/android_command.rb
|
195
195
|
- lib/cuesmash/android_compiler.rb
|
196
|
-
- lib/cuesmash/androidapp.rb
|
197
196
|
- lib/cuesmash/app.rb
|
198
197
|
- lib/cuesmash/appium_server.rb
|
199
198
|
- lib/cuesmash/appium_text.rb
|
@@ -202,7 +201,6 @@ files:
|
|
202
201
|
- lib/cuesmash/cucumber.rb
|
203
202
|
- lib/cuesmash/ios_app.rb
|
204
203
|
- lib/cuesmash/ios_compiler.rb
|
205
|
-
- lib/cuesmash/iosapp.rb
|
206
204
|
- lib/cuesmash/plist.rb
|
207
205
|
- lib/cuesmash/setup.rb
|
208
206
|
- lib/cuesmash/start.rb
|
@@ -212,8 +210,6 @@ files:
|
|
212
210
|
- spec/cucumber_spec.rb
|
213
211
|
- spec/ios_app_spec.rb
|
214
212
|
- spec/ios_compiler_spec.rb
|
215
|
-
- spec/iosapp_spec.rb
|
216
|
-
- spec/ioscompiler_spec.rb
|
217
213
|
- spec/plist_spec.rb
|
218
214
|
- spec/spec_helper.rb
|
219
215
|
homepage: https://github.com/ustwo/cuesmash
|
@@ -247,7 +243,5 @@ test_files:
|
|
247
243
|
- spec/cucumber_spec.rb
|
248
244
|
- spec/ios_app_spec.rb
|
249
245
|
- spec/ios_compiler_spec.rb
|
250
|
-
- spec/iosapp_spec.rb
|
251
|
-
- spec/ioscompiler_spec.rb
|
252
246
|
- spec/plist_spec.rb
|
253
247
|
- spec/spec_helper.rb
|
data/lib/cuesmash/androidapp.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# coding: utf-8
|
3
|
-
|
4
|
-
module Cuesmash
|
5
|
-
|
6
|
-
#
|
7
|
-
# Provides an object to get information about the ios app that is being built.
|
8
|
-
#
|
9
|
-
class AndroidApp < App
|
10
|
-
|
11
|
-
# app/build/outputs/apk/
|
12
|
-
attr_reader :app_dir
|
13
|
-
|
14
|
-
# Public: the full path including the built app i.e. ./app/build/outputs/apk/app-debug.apk"
|
15
|
-
attr_reader :app_path
|
16
|
-
|
17
|
-
# Public: the app name i.e. app-debug.apk
|
18
|
-
attr_reader :app_name
|
19
|
-
|
20
|
-
#
|
21
|
-
# Create a new App instance
|
22
|
-
#
|
23
|
-
# @param project_name [String] the project name to be built.
|
24
|
-
# @param build_configuration [String] which build configuration to run i.e. Release, Debug
|
25
|
-
#
|
26
|
-
# @return [App] A app instance
|
27
|
-
def initialize(project_name:, build_configuration:)
|
28
|
-
@app_name = "#{project_name}-#{build_configuration}" << ".apk"
|
29
|
-
|
30
|
-
@app_dir = File.expand_path("./app/build/outputs/apk/")
|
31
|
-
|
32
|
-
@app_path = "#{@app_dir}/" << "#{@app_name}"
|
33
|
-
end
|
34
|
-
|
35
|
-
end # class AndroidApp
|
36
|
-
end # module Cuesmash
|
data/lib/cuesmash/iosapp.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# coding: utf-8
|
3
|
-
|
4
|
-
require 'cuesmash/app'
|
5
|
-
|
6
|
-
module Cuesmash
|
7
|
-
|
8
|
-
#
|
9
|
-
# Provides an object to get information about the ios app that is being built.
|
10
|
-
#
|
11
|
-
class IosApp < App
|
12
|
-
|
13
|
-
# Public: the path to the dir containing the built app i.e. /tmp/MyAppQWERQW/Build/Products/Debug-iphonesimulator/
|
14
|
-
attr_reader :app_dir
|
15
|
-
|
16
|
-
# Public: the full path including the built app i.e. /tmp/MyAppQWERQW/Build/Products/Debug-iphonesimulator/MyApp.app"
|
17
|
-
attr_reader :app_path
|
18
|
-
|
19
|
-
# Public: the app name i.e. MyApp.app
|
20
|
-
attr_reader :app_name
|
21
|
-
|
22
|
-
# Public: the xcode Derived Data temp directory
|
23
|
-
attr_reader :tmp_dir
|
24
|
-
|
25
|
-
#
|
26
|
-
# Create a new App instance
|
27
|
-
#
|
28
|
-
# @param file_name [String] The usually is the scheme of the xcode project
|
29
|
-
# @param build_configuration [String] which iOS build configuration to run i.e. Release, Debug
|
30
|
-
#
|
31
|
-
# @return [App] A app instance
|
32
|
-
def initialize(file_name:, build_configuration:)
|
33
|
-
@app_name = "#{file_name}" << ".app"
|
34
|
-
@tmp_dir = Dir.mktmpdir(file_name)
|
35
|
-
@build_configuration = build_configuration
|
36
|
-
|
37
|
-
@app_dir = "#{@tmp_dir}" << "/#{@build_configuration}-iphonesimulator/"
|
38
|
-
|
39
|
-
@app_path = "#{@app_dir}" << "#{@app_name}"
|
40
|
-
end
|
41
|
-
end # class IosApp
|
42
|
-
end # module Cuesmash
|
data/spec/iosapp_spec.rb
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Cuesmash::IosApp do
|
4
|
-
describe "when creating a new instance" do
|
5
|
-
|
6
|
-
it "should have an app_dir instance" do
|
7
|
-
stub_dir
|
8
|
-
@iosapp = Cuesmash::IosApp.new(file_name: "MyApp", build_configuration: "Debug")
|
9
|
-
expect(@iosapp.app_dir).to match("/tmp/Debug-iphonesimulator/")
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should have an app_path instance" do
|
13
|
-
stub_dir
|
14
|
-
@iosapp = Cuesmash::IosApp.new(file_name: "MyApp", build_configuration: "Debug")
|
15
|
-
expect(@iosapp.app_path).to match("/tmp/Debug-iphonesimulator/MyApp.app")
|
16
|
-
end
|
17
|
-
|
18
|
-
it "should have a tmp_dir instance" do
|
19
|
-
stub_dir
|
20
|
-
@iosapp = Cuesmash::IosApp.new(file_name: "MyApp", build_configuration: "Debug")
|
21
|
-
expect(@iosapp.tmp_dir).to match("/tmp")
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should have an app_name instance" do
|
25
|
-
|
26
|
-
@iosapp = Cuesmash::IosApp.new(file_name: "MyApp", build_configuration: "Debug")
|
27
|
-
expect(@iosapp.app_name).to match("MyApp.app")
|
28
|
-
end
|
29
|
-
|
30
|
-
def stub_dir
|
31
|
-
Dir.stub(:mktmpdir) { "/tmp" }
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
data/spec/ioscompiler_spec.rb
DELETED
@@ -1,76 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'cuesmash/ios_compiler'
|
3
|
-
|
4
|
-
describe Cuesmash::IosCompiler do
|
5
|
-
|
6
|
-
before(:each) do
|
7
|
-
Cuesmash::IosCompiler.any_instance.stub(:puts)
|
8
|
-
end
|
9
|
-
|
10
|
-
it "should have a scheme instance" do
|
11
|
-
compiler = Cuesmash::IosCompiler.new("scheme", "/tmp", "Debug")
|
12
|
-
expect(compiler.scheme).to match("scheme")
|
13
|
-
end
|
14
|
-
|
15
|
-
it "should have a tmp_dir instance" do
|
16
|
-
compiler = Cuesmash::IosCompiler.new("scheme", "/tmp", "Debug")
|
17
|
-
expect(compiler.tmp_dir).to match("/tmp")
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should have a build config" do
|
21
|
-
compiler = Cuesmash::IosCompiler.new("scheme", "/tmp", "Debug")
|
22
|
-
expect(compiler.build_configuration).to match("Debug")
|
23
|
-
end
|
24
|
-
|
25
|
-
describe "when generating the command" do
|
26
|
-
|
27
|
-
before(:each) do
|
28
|
-
Cuesmash::IosCompiler.any_instance.stub(:workspace)
|
29
|
-
@compiler = Cuesmash::IosCompiler.new("test-scheme", "/tmp", "Debug")
|
30
|
-
end
|
31
|
-
|
32
|
-
it "should contain the scheme" do
|
33
|
-
expect(@compiler.instance_eval{command}).to match(/test-scheme/)
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should contain the tmp path" do
|
37
|
-
expect(@compiler.instance_eval{command}).to match(/tmp/)
|
38
|
-
end
|
39
|
-
|
40
|
-
it "should contain the build configuration" do
|
41
|
-
expect(@compiler.instance_eval{command}).to match(/Debug/)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
describe "when getting the workspacae" do
|
46
|
-
|
47
|
-
before(:each) do
|
48
|
-
@compiler = Cuesmash::IosCompiler.new(nil, "/tmp", "Debug")
|
49
|
-
Dir.stub(:[]){["workspace-file"]}
|
50
|
-
end
|
51
|
-
|
52
|
-
it "should get the workspace from the current directory" do
|
53
|
-
expect(@compiler.instance_eval{workspace}).to match(/workspace-file/)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
describe "when compiling" do
|
58
|
-
|
59
|
-
before(:each) do
|
60
|
-
wait = double
|
61
|
-
@value = double
|
62
|
-
wait.stub(:value){@value}
|
63
|
-
wait.stub(:join)
|
64
|
-
Open3.stub(:popen3).and_yield(nil, nil, nil, wait)
|
65
|
-
|
66
|
-
@compiler = Cuesmash::IosCompiler.new(nil, "/tmp", "Debug")
|
67
|
-
end
|
68
|
-
|
69
|
-
it "should complete if all is well" do
|
70
|
-
@value.stub(:exitstatus){0}
|
71
|
-
@compiler.compile do |complete|
|
72
|
-
expect(complete).to equal(true)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|