yolo 1.1.18 → 1.2.0
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.
- data/bin/yolo +27 -0
- data/lib/yolo/config.rb +1 -0
- data/lib/yolo/config/install.rb +50 -0
- data/lib/yolo/config/yolo-Rakefile +45 -0
- data/lib/yolo/formatters/progress_formatter.rb +9 -0
- data/lib/yolo/tasks/base_task.rb +0 -8
- data/lib/yolo/tasks/ios/build.rb +1 -8
- data/lib/yolo/tasks/ios/calabash.rb +2 -13
- data/lib/yolo/tasks/ios/ocunit.rb +1 -8
- data/lib/yolo/tasks/ios/release.rb +3 -7
- data/lib/yolo/tools/ios/ipa.rb +1 -1
- data/spec/config/install_spec.rb +25 -0
- data/spec/config/settings_spec.rb +0 -2
- data/spec/deployment/base_deployer_spec.rb +0 -3
- data/spec/deployment/ota_spec.rb +0 -4
- data/spec/deployment/test_flight_spec.rb +0 -4
- data/spec/notify/email_spec.rb +0 -3
- data/spec/notify/ios/ota_email_spec.rb +0 -5
- data/spec/spec_helper.rb +4 -0
- data/spec/tasks/base_task_spec.rb +1 -1
- data/spec/tasks/ios/build_spec.rb +1 -1
- data/spec/tasks/ios/calabash_spec.rb +1 -1
- data/spec/tasks/ios/coverage_spec.rb +1 -3
- data/spec/tasks/ios/ocunit_spec.rb +1 -1
- data/spec/tasks/ios/release_spec.rb +1 -7
- data/spec/tools/git_spec.rb +0 -2
- data/spec/tools/ios/calabash_spec.rb +0 -1
- data/spec/tools/ios/coverage_spec.rb +0 -2
- data/spec/tools/ios/ipa_spec.rb +0 -2
- data/spec/tools/ios/release_notes_spec.rb +0 -3
- data/spec/tools/ios/xcode_spec.rb +0 -2
- metadata +8 -4
- data/Rakefile +0 -10
data/bin/yolo
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'yolo'
|
3
|
+
require 'optparse'
|
4
|
+
|
5
|
+
#if ARGV[0] == "install"
|
6
|
+
# Yolo::Config::Install.run
|
7
|
+
#end
|
8
|
+
|
9
|
+
@opt_parser = OptionParser.new do |opts|
|
10
|
+
opts.banner = "Usage: yolo COMMAND"
|
11
|
+
opts.separator ""
|
12
|
+
opts.separator "Commands"
|
13
|
+
opts.separator " install: creates a default yolo Rakefile in the current directory"
|
14
|
+
|
15
|
+
opts.on("-h","--help","help") do
|
16
|
+
puts @opt_parser
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
@opt_parser.parse ARGV
|
21
|
+
|
22
|
+
case ARGV[0]
|
23
|
+
when "install"
|
24
|
+
Yolo::Config::Install.run
|
25
|
+
else
|
26
|
+
puts @opt_parser
|
27
|
+
end
|
data/lib/yolo/config.rb
CHANGED
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
require 'yolo/formatters'
|
3
|
+
|
4
|
+
module Yolo
|
5
|
+
module Config
|
6
|
+
#
|
7
|
+
# The Install class provides a number of methods to install yolo into projects
|
8
|
+
#
|
9
|
+
# @author [Alex Fish]
|
10
|
+
#
|
11
|
+
class Install
|
12
|
+
|
13
|
+
#
|
14
|
+
# Runs the yolo project install
|
15
|
+
#
|
16
|
+
def self.run
|
17
|
+
self.move_rakefile
|
18
|
+
self.rename_rakefile
|
19
|
+
`open Rakefile`
|
20
|
+
Yolo::Formatters::ProgressFormatter.new.rakefile_created(Dir.pwd + "/Rakefile")
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
#
|
26
|
+
# Moves the default rakefile into the current directory
|
27
|
+
#
|
28
|
+
def self.move_rakefile
|
29
|
+
FileUtils.cp_r(self.rakefile, Dir.pwd)
|
30
|
+
end
|
31
|
+
|
32
|
+
#
|
33
|
+
# The path to the default rake file
|
34
|
+
#
|
35
|
+
# @return [String] The full path to the default rakefile
|
36
|
+
def self.rakefile
|
37
|
+
File.dirname(__FILE__) + "/yolo-Rakefile"
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Renames the default rakefile removing the yolo- prefix
|
42
|
+
#
|
43
|
+
def self.rename_rakefile
|
44
|
+
FileUtils.mv(Dir.pwd + '/yolo-Rakefile',Dir.pwd + '/Rakefile')
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'yolo'
|
3
|
+
|
4
|
+
#
|
5
|
+
# Build Task
|
6
|
+
#
|
7
|
+
Yolo::Tasks::Ios::Build.new do |t|
|
8
|
+
t.workspace = "MyProject.xcworkspace"
|
9
|
+
t.scheme = "MyProject"
|
10
|
+
end
|
11
|
+
|
12
|
+
#
|
13
|
+
# Release Task
|
14
|
+
#
|
15
|
+
# Yolo::Tasks::Ios::Release.new do |t|
|
16
|
+
# t.workspace = "MyProject.xcworkspace"
|
17
|
+
# t.scheme = "MyProject"
|
18
|
+
# t.configuration = "Release"
|
19
|
+
# end
|
20
|
+
|
21
|
+
#
|
22
|
+
# OCUnit task
|
23
|
+
#
|
24
|
+
# Yolo::Tasks::Ios::OCUnit.new do |t|
|
25
|
+
# t.workspace = "MyProject.xcworkspace"
|
26
|
+
# t.scheme = "MyProjectTests"
|
27
|
+
# t.test_output = :junit
|
28
|
+
# end
|
29
|
+
|
30
|
+
#
|
31
|
+
# Calabash task
|
32
|
+
#
|
33
|
+
# Yolo::Tasks::Ios::Calabash.new do |t|
|
34
|
+
# t.workspace = "MyProject.xcworkspace"
|
35
|
+
# t.scheme = "MyProject-cal"
|
36
|
+
# t.format = :junit
|
37
|
+
# t.output_dir = "example-tests"
|
38
|
+
# end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Coverage task
|
42
|
+
#
|
43
|
+
# Yolo::Tasks::Ios::Coverage.new do |t|
|
44
|
+
# t.scheme = "MyProject"
|
45
|
+
# end
|
@@ -17,6 +17,15 @@ module Yolo
|
|
17
17
|
puts green("Config file created in: #{config}")
|
18
18
|
end
|
19
19
|
|
20
|
+
#
|
21
|
+
# Outputs a green string stating that the rakefile was created
|
22
|
+
# @param file [String] The path to the rakefile
|
23
|
+
#
|
24
|
+
# @return [type] [description]
|
25
|
+
def rakefile_created(file)
|
26
|
+
puts green("Rakefile created: #{file}")
|
27
|
+
end
|
28
|
+
|
20
29
|
#
|
21
30
|
# Outputs a green string stating that setup is complete
|
22
31
|
#
|
data/lib/yolo/tasks/base_task.rb
CHANGED
@@ -22,14 +22,6 @@ module Yolo
|
|
22
22
|
# Defines available rake tasks
|
23
23
|
#
|
24
24
|
def define
|
25
|
-
namespace :yolo do
|
26
|
-
desc "Sets up yolo and moves config into place"
|
27
|
-
task :setup do
|
28
|
-
formatter = Yolo::Formatters::ProgressFormatter.new
|
29
|
-
Yolo::Config::Settings.instance.load_config
|
30
|
-
formatter.setup_complete
|
31
|
-
end
|
32
|
-
end
|
33
25
|
end
|
34
26
|
end
|
35
27
|
end
|
data/lib/yolo/tasks/ios/build.rb
CHANGED
@@ -32,16 +32,9 @@ module Yolo
|
|
32
32
|
namespace :yolo do
|
33
33
|
desc "Builds the specified scheme(s)."
|
34
34
|
task :build do
|
35
|
-
xcodebuild :build
|
36
|
-
end
|
37
|
-
|
38
|
-
desc "Cleans the specified scheme(s)."
|
39
|
-
task :clean do
|
40
35
|
xcodebuild :clean
|
36
|
+
xcodebuild :build
|
41
37
|
end
|
42
|
-
|
43
|
-
desc "Builds the specified scheme(s) from a clean slate."
|
44
|
-
task :cleanbuild => [:clean, :build]
|
45
38
|
end
|
46
39
|
end
|
47
40
|
end
|
@@ -31,22 +31,11 @@ module Yolo
|
|
31
31
|
namespace :yolo do
|
32
32
|
namespace :calabash do
|
33
33
|
desc "Runs the specified scheme(s) calabash tests."
|
34
|
-
task :test
|
35
|
-
Yolo::Tools::Ios::Calabash.run(format, output_dir)
|
36
|
-
end
|
37
|
-
|
38
|
-
desc "Cleans the specified scheme(s)."
|
39
|
-
task :clean do
|
34
|
+
task :test do
|
40
35
|
xcodebuild :clean
|
41
|
-
end
|
42
|
-
|
43
|
-
desc "Builds the specified scheme(s)."
|
44
|
-
task :build do
|
45
36
|
xcodebuild :build
|
37
|
+
Yolo::Tools::Ios::Calabash.run(format, output_dir)
|
46
38
|
end
|
47
|
-
|
48
|
-
desc "Runs the specified scheme(s) calabash tests from a clean slate."
|
49
|
-
task :cleantest => [:clean, :test]
|
50
39
|
end
|
51
40
|
end
|
52
41
|
end
|
@@ -44,16 +44,9 @@ module Yolo
|
|
44
44
|
namespace :ocunit do
|
45
45
|
desc "Runs the specified scheme(s) OCUnit tests."
|
46
46
|
task :test do
|
47
|
-
xcodebuild :build
|
48
|
-
end
|
49
|
-
|
50
|
-
desc "Cleans the specified scheme(s)."
|
51
|
-
task :clean do
|
52
47
|
xcodebuild :clean
|
48
|
+
xcodebuild :build
|
53
49
|
end
|
54
|
-
|
55
|
-
desc "Runs the specified scheme(s) OCUnit tests from a clean slate."
|
56
|
-
task :cleantest => [:clean, :test]
|
57
50
|
end
|
58
51
|
end
|
59
52
|
end
|
@@ -145,8 +145,9 @@ module Yolo
|
|
145
145
|
super
|
146
146
|
namespace :yolo do
|
147
147
|
namespace :release do
|
148
|
-
desc "Builds and
|
149
|
-
task :ipa
|
148
|
+
desc "Builds and deploys a release ipa of specified scheme."
|
149
|
+
task :ipa do
|
150
|
+
xcodebuild :build
|
150
151
|
Yolo::Tools::Ios::IPA.generate(app_path,dsym_path,bundle_path) do |ipa|
|
151
152
|
deploy(ipa) if ipa and self.deployment
|
152
153
|
end
|
@@ -172,11 +173,6 @@ module Yolo
|
|
172
173
|
task :notes do
|
173
174
|
Yolo::Tools::Ios::ReleaseNotes.generate(info_plist_path)
|
174
175
|
end
|
175
|
-
|
176
|
-
desc "Builds the specified release scheme."
|
177
|
-
task :build do
|
178
|
-
xcodebuild :build
|
179
|
-
end
|
180
176
|
end
|
181
177
|
end
|
182
178
|
end
|
data/lib/yolo/tools/ios/ipa.rb
CHANGED
@@ -64,7 +64,7 @@ module Yolo
|
|
64
64
|
|
65
65
|
#
|
66
66
|
# Moves the projects releas notes file to a location
|
67
|
-
# @param
|
67
|
+
# @param directory [String] The directory to move the release notes to
|
68
68
|
#
|
69
69
|
# @return [type] [description]
|
70
70
|
def self.move_release_notes(directory)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Yolo::Config::Install do
|
4
|
+
describe "when installing" do
|
5
|
+
before do
|
6
|
+
Yolo::Formatters::ProgressFormatter.any_instance.stub(:puts)
|
7
|
+
FileUtils.stub(:cp_r)
|
8
|
+
FileUtils.stub(:mv)
|
9
|
+
File.stub(:dirname){"current"}
|
10
|
+
Dir.stub(:pwd){"current"}
|
11
|
+
@default_rakefile = "current/yolo-Rakefile"
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should copy the default rakefile into place" do
|
15
|
+
Yolo::Config::Install.stub(:`)
|
16
|
+
FileUtils.should_receive(:cp_r).with(@default_rakefile, "current")
|
17
|
+
Yolo::Config::Install.run
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should remove the yolo prefix from the default rake file" do
|
21
|
+
FileUtils.should_receive(:mv).with("current/yolo-Rakefile","current/Rakefile")
|
22
|
+
Yolo::Config::Install.rename_rakefile
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/spec/deployment/ota_spec.rb
CHANGED
data/spec/notify/email_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
require 'coveralls'
|
2
|
+
require 'yolo'
|
3
|
+
require 'active_support/all'
|
4
|
+
|
2
5
|
Coveralls.wear!
|
3
6
|
|
4
7
|
RSpec.configure do |config|
|
@@ -11,3 +14,4 @@ RSpec.configure do |config|
|
|
11
14
|
# Use the specified formatter
|
12
15
|
config.formatter = :documentation # :progress, :html, :textmate
|
13
16
|
end
|
17
|
+
|
data/spec/tools/git_spec.rb
CHANGED
data/spec/tools/ios/ipa_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yolo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
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: 2013-05-
|
12
|
+
date: 2013-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: xcodebuild-rb
|
@@ -78,13 +78,16 @@ dependencies:
|
|
78
78
|
description: yolo is a RubyGem which provides a Ruby interface to Continuous Integration
|
79
79
|
build tools. yolo is currently geared towards the Xcode toolchain and iOS development.
|
80
80
|
email: alex@alexefish.com
|
81
|
-
executables:
|
81
|
+
executables:
|
82
|
+
- yolo
|
82
83
|
extensions: []
|
83
84
|
extra_rdoc_files: []
|
84
85
|
files:
|
85
|
-
-
|
86
|
+
- bin/yolo
|
86
87
|
- lib/yolo/config/config.yml
|
88
|
+
- lib/yolo/config/install.rb
|
87
89
|
- lib/yolo/config/settings.rb
|
90
|
+
- lib/yolo/config/yolo-Rakefile
|
88
91
|
- lib/yolo/config.rb
|
89
92
|
- lib/yolo/deployment/base_deployer.rb
|
90
93
|
- lib/yolo/deployment/ota.rb
|
@@ -116,6 +119,7 @@ files:
|
|
116
119
|
- lib/yolo/tools/ios.rb
|
117
120
|
- lib/yolo/tools.rb
|
118
121
|
- lib/yolo.rb
|
122
|
+
- spec/config/install_spec.rb
|
119
123
|
- spec/config/settings_spec.rb
|
120
124
|
- spec/deployment/base_deployer_spec.rb
|
121
125
|
- spec/deployment/ota_spec.rb
|