afinstaller 0.1.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 +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +2 -0
- data/afinstaller.gemspec +39 -0
- data/bin/afinstaller +3 -0
- data/bin/setup +8 -0
- data/config/environment.rb +3 -0
- data/features/android.feature +12 -0
- data/features/ios.feature +12 -0
- data/features/support/setup.rb +1 -0
- data/lib/afinstaller/cli.rb +70 -0
- data/lib/afinstaller/installers/Android/android.rb +43 -0
- data/lib/afinstaller/installers/Android/androidBuild.rb +38 -0
- data/lib/afinstaller/installers/Errors/error.rb +19 -0
- data/lib/afinstaller/installers/iOS/ios.rb +43 -0
- data/lib/afinstaller/installers/iOS/iosBuild.rb +44 -0
- data/lib/afinstaller/ios.rb +13 -0
- data/lib/afinstaller/version.rb +3 -0
- data/lib/afinstaller.rb +10 -0
- data/spec/afinstaller_spec.rb +6 -0
- data/spec/spec_helper.rb +14 -0
- metadata +217 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e79fca30766e60416d4235adf96f0a408159c1cd
|
4
|
+
data.tar.gz: 0ad973b3af9e25c172d4885f442052272553d838
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f11f95ad2ca56533e6c843eea80ecef48de37392703ab3ce59ac80b5782dd354468b0a236dbf12eb84f3ab2a30bfae4ec450eb0c42b5dc7c3bdfc019f55191b7
|
7
|
+
data.tar.gz: adf0f0879afbf17a1b1663f9c84058fecc21ad97f41833656e682a789d533435433b94539450813285cfc3fd3434890111bacb3741da4e61b5a47161c19af48c
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at gabomorales@me.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Gabe Morales
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Afinstaller
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/afinstaller`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'afinstaller'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install afinstaller
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/gabemdev/afinstaller. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the Afinstaller project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/gabemdev/afinstaller/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/afinstaller.gemspec
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# lib = File.expand_path("../lib", __FILE__)
|
3
|
+
# $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
# require "afinstaller/version"
|
5
|
+
require File.expand_path("../lib/afinstaller/version", __FILE__)
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = "afinstaller"
|
9
|
+
spec.version = Afinstaller::VERSION
|
10
|
+
spec.platform = Gem::Platform::RUBY
|
11
|
+
spec.authors = ["Gabe Morales"]
|
12
|
+
spec.email = ["gmorales@phunware.com"]
|
13
|
+
|
14
|
+
spec.summary = %q{PW's AF iOS and Android Command Line Tool.}
|
15
|
+
spec.description = %q{Simply Ruby gem to install and build Out of the Box iOS or Android AF projects.}
|
16
|
+
spec.homepage = "https://rubygems.org/gems/afinstaller"
|
17
|
+
spec.required_rubygems_version = ">= 2.0.0"
|
18
|
+
|
19
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
20
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
21
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
22
|
+
# spec.add_development_dependency "nokogiri", ">= 0"
|
23
|
+
# spec.add_development_dependency "pry", ">= 0"
|
24
|
+
spec.add_development_dependency "cucumber"
|
25
|
+
spec.add_development_dependency "aruba"
|
26
|
+
|
27
|
+
|
28
|
+
spec.add_dependency "thor"
|
29
|
+
spec.add_dependency "cocoapods"
|
30
|
+
spec.add_runtime_dependency "xcpretty"
|
31
|
+
spec.add_dependency "rainbow", ">= 0"
|
32
|
+
|
33
|
+
spec.add_runtime_dependency(%q<activerecord>, ['>= 3.2', '< 6.0'])
|
34
|
+
|
35
|
+
spec.files = `git ls-files`.split("\n")
|
36
|
+
spec.executables << 'afinstaller'
|
37
|
+
# spec.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
|
38
|
+
spec.require_path = 'lib'
|
39
|
+
end
|
data/bin/afinstaller
ADDED
data/bin/setup
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
Feature: Android
|
2
|
+
In order to perform a task on a particular platform
|
3
|
+
As a CLI
|
4
|
+
I want to be as objective as possible
|
5
|
+
|
6
|
+
Scenario: Android, or Android?
|
7
|
+
When I run `afinstaller Android 4.5.0`
|
8
|
+
Then the output should contain "Building without -b flag"
|
9
|
+
|
10
|
+
Scenario: IOS, or IOS?
|
11
|
+
When I run `afinstaller Android 4.5.0 -b`
|
12
|
+
Then the output should contain "Building with -b flag"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Feature: IOS
|
2
|
+
In order to perform a task on a particular platform
|
3
|
+
As a CLI
|
4
|
+
I want to be as objective as possible
|
5
|
+
|
6
|
+
Scenario: IOS, or IOS?
|
7
|
+
When I run `afinstaller iOS 4.5.0`
|
8
|
+
Then the output should contain "Building without -b flag"
|
9
|
+
|
10
|
+
Scenario: IOS, or IOS?
|
11
|
+
When I run `afinstaller iOS 4.5.0 -b`
|
12
|
+
Then the output should contain "Building with -b flag"
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'aruba/cucumber'
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'afinstaller'
|
3
|
+
require 'afinstaller/installers/Errors/error'
|
4
|
+
require 'afinstaller/installers/iOS/iOS'
|
5
|
+
require 'afinstaller/installers/iOS/iOSBuild'
|
6
|
+
require 'afinstaller/installers/Android/android'
|
7
|
+
require 'afinstaller/installers/Android/androidBuild'
|
8
|
+
|
9
|
+
def system!(*args)
|
10
|
+
system(*args) || abort(''+red('\n== Command #{args} failed =="')+'')
|
11
|
+
end
|
12
|
+
|
13
|
+
module Afinstaller
|
14
|
+
class CLI < Thor
|
15
|
+
check_unknown_options!
|
16
|
+
def self.exit_on_failure?
|
17
|
+
true
|
18
|
+
end
|
19
|
+
method_option :build, :aliases => "-b", :desc => "Build project after cloning repo."
|
20
|
+
|
21
|
+
desc "iOS [version]", "CLI Installer for AF iOS "
|
22
|
+
long_desc <<-LONGDESC
|
23
|
+
`afinstaller iOS [version]` will clone the AF iOS repo with the version you specify. It will then run `pod install`,
|
24
|
+
it will finally open the project folder.
|
25
|
+
|
26
|
+
You can optionally specify the build flag [-b], which will build your project after cocoapod installation
|
27
|
+
|
28
|
+
> $ afinstaller iOS 4.5.0 -b
|
29
|
+
LONGDESC
|
30
|
+
def iOS(version)
|
31
|
+
build_project = options[:build]
|
32
|
+
if version == "help"
|
33
|
+
error = "Incorrect comment. Please try afinstaller help iOS"
|
34
|
+
Afinstaller::Installers::Error.start([error])
|
35
|
+
end
|
36
|
+
|
37
|
+
if build_project
|
38
|
+
Afinstaller::Installers::IOSBuild.start([version])
|
39
|
+
else
|
40
|
+
Afinstaller::Installers::IOS.start([version])
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
method_option :build, :aliases => "-b", :desc => "Build project after cloning repo."
|
45
|
+
desc "Android [version]", "CLI Installer for AF Android "
|
46
|
+
long_desc <<-LONGDESC
|
47
|
+
`afinstaller Android [version]` will clone the AF Android repo with the version you specify. It will it will
|
48
|
+
finally open the project folder.
|
49
|
+
|
50
|
+
You can optionally specify the build flag [-b], which will attempt to run Gradle Clean.
|
51
|
+
This requires Java 8.0 and above.
|
52
|
+
|
53
|
+
> $ afinstaller Android 4.5.0 -b
|
54
|
+
LONGDESC
|
55
|
+
def Android(version)
|
56
|
+
build_project = options[:build]
|
57
|
+
if version == "help"
|
58
|
+
error = "Incorrect comment. Please try afinstaller help iOS"
|
59
|
+
Afinstaller::Installers::Error.start([error])
|
60
|
+
end
|
61
|
+
|
62
|
+
if build_project
|
63
|
+
Afinstaller::Installers::AndroidBuild.start([version])
|
64
|
+
else
|
65
|
+
Afinstaller::Installers::Android.start([version])
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'thor/group'
|
2
|
+
require 'pathname'
|
3
|
+
require 'fileutils'
|
4
|
+
include FileUtils
|
5
|
+
|
6
|
+
# def system!(*args)
|
7
|
+
# system(*args) || abort(''+red('\n== Command #{args} failed =="')+'')
|
8
|
+
# end
|
9
|
+
|
10
|
+
module Afinstaller
|
11
|
+
module Installers
|
12
|
+
class Android < Thor::Group
|
13
|
+
argument :version, :type => :string
|
14
|
+
include Thor::Actions
|
15
|
+
|
16
|
+
def self.source_root
|
17
|
+
File.dirname(__FILE__)
|
18
|
+
end
|
19
|
+
|
20
|
+
def clone_command
|
21
|
+
v = "#{version}"
|
22
|
+
FileUtils::mkdir "AF#{version}-Android" unless File.exists?("AF#{version}-Android")
|
23
|
+
FileUtils.cd("AF#{version}-Android", :verbose => false)
|
24
|
+
puts Rainbow("== Cloning Repo ==").cyan
|
25
|
+
system! 'git clone -b v'+v+' ssh://git@bitbucket.phunware.com:7999/af/af-template-android.git' unless File.exist?('af-template-android')
|
26
|
+
puts Rainbow("== Cloning Succeeded ==").magenta
|
27
|
+
end
|
28
|
+
|
29
|
+
def setup_command
|
30
|
+
puts Rainbow("== Moving to project folder ==").cyan
|
31
|
+
FileUtils.cd('af-template-android', :verbose => false)
|
32
|
+
puts Rainbow("== Folder is now af-template-android ==").magenta
|
33
|
+
end
|
34
|
+
|
35
|
+
def open_project_folder
|
36
|
+
puts Rainbow("== Open project folder ==").cyan
|
37
|
+
system! 'open .'
|
38
|
+
puts Rainbow("== AF Installer process completed. Thank you ==").magenta
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Afinstaller
|
2
|
+
module Installers
|
3
|
+
class AndroidBuild < Thor::Group
|
4
|
+
argument :version, :type => :string
|
5
|
+
include Thor::Actions
|
6
|
+
|
7
|
+
def self.source_root
|
8
|
+
File.dirname(__FILE__)
|
9
|
+
end
|
10
|
+
|
11
|
+
def clone_command
|
12
|
+
v = "#{version}"
|
13
|
+
FileUtils::mkdir "AF#{version}-Android" unless File.exists?("AF#{version}-Android")
|
14
|
+
FileUtils.cd("AF#{version}-Android", :verbose => false)
|
15
|
+
puts Rainbow("== Cloning Repo ==").cyan
|
16
|
+
system! 'git clone -b v'+v+' ssh://git@bitbucket.phunware.com:7999/af/af-template-android.git' unless File.exist?('af-template-android')
|
17
|
+
puts Rainbow("== Cloning Succeeded ==").magenta
|
18
|
+
end
|
19
|
+
|
20
|
+
def setup_command
|
21
|
+
puts Rainbow("== Moving to project folder ==").cyan
|
22
|
+
FileUtils.cd('af-template-android', :verbose => false)
|
23
|
+
puts Rainbow("== Folder is now af-template-android ==").magenta
|
24
|
+
|
25
|
+
puts Rainbow("== Attempting Gradle Clean ==").cyan
|
26
|
+
system! './gradlew clean :app:assemble$1Debug --parallel --daemon --configure-on-demand -PminSdk=21'
|
27
|
+
puts Rainbow("== Gradle successful ==").magenta
|
28
|
+
end
|
29
|
+
|
30
|
+
def open_project_folder
|
31
|
+
puts Rainbow("== Open project folder ==").cyan
|
32
|
+
system! 'open .'
|
33
|
+
puts Rainbow("== AF Installer process completed. Thank you ==").magenta
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'thor/group'
|
2
|
+
require 'pathname'
|
3
|
+
require 'fileutils'
|
4
|
+
include FileUtils
|
5
|
+
|
6
|
+
module Afinstaller
|
7
|
+
module Installers
|
8
|
+
class Error < Thor::Group
|
9
|
+
argument :error, :type => :string
|
10
|
+
include Thor::Actions
|
11
|
+
|
12
|
+
def print_error
|
13
|
+
puts Rainbow("== Error: #{error} ==").red
|
14
|
+
exit 1
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'thor/group'
|
2
|
+
require 'pathname'
|
3
|
+
require 'fileutils'
|
4
|
+
include FileUtils
|
5
|
+
|
6
|
+
module Afinstaller
|
7
|
+
module Installers
|
8
|
+
class IOS < Thor::Group
|
9
|
+
argument :version, :type => :string
|
10
|
+
include Thor::Actions
|
11
|
+
|
12
|
+
def self.source_root
|
13
|
+
File.dirname(__FILE__)
|
14
|
+
end
|
15
|
+
|
16
|
+
def clone_command
|
17
|
+
v = "#{version}"
|
18
|
+
FileUtils::mkdir "AF#{version}-iOS" unless File.exists?("AF#{version}-iOS")
|
19
|
+
FileUtils.cd("AF#{version}-iOS", :verbose => false)
|
20
|
+
puts Rainbow("== Cloning Repo ==").cyan
|
21
|
+
system! 'git clone -b release/v'+v+' ssh://git@bitbucket.phunware.com:7999/af/af-template-ios.git' unless File.exist?('af-template-ios')
|
22
|
+
puts Rainbow("== Cloning Succeeded ==").magenta
|
23
|
+
end
|
24
|
+
|
25
|
+
def pod_install_command
|
26
|
+
puts Rainbow("== Moving to project folder ==").cyan
|
27
|
+
FileUtils.cd('af-template-ios', :verbose => false)
|
28
|
+
puts Rainbow("== Folder is now af-template-ios ==").magenta
|
29
|
+
|
30
|
+
puts Rainbow("== Attempting to run pod install ==").cyan
|
31
|
+
system! 'pod install'
|
32
|
+
puts Rainbow("== Cocoapod installation completed ==").magenta
|
33
|
+
end
|
34
|
+
|
35
|
+
def open_project_folder
|
36
|
+
puts Rainbow("== Open project folder ==").cyan
|
37
|
+
system! 'open .'
|
38
|
+
puts Rainbow("== AF Installer process completed. Thank you ==").magenta
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Afinstaller
|
2
|
+
module Installers
|
3
|
+
class IOSBuild < Thor::Group
|
4
|
+
argument :version, :type => :string
|
5
|
+
include Thor::Actions
|
6
|
+
|
7
|
+
def self.source_root
|
8
|
+
File.dirname(__FILE__)
|
9
|
+
end
|
10
|
+
|
11
|
+
def clone_command
|
12
|
+
v = "#{version}"
|
13
|
+
FileUtils::mkdir "AF#{version}-iOS" unless File.exists?("AF#{version}-iOS")
|
14
|
+
FileUtils.cd("AF#{version}-iOS", :verbose => false)
|
15
|
+
puts Rainbow("== Cloning Repo ==").cyan
|
16
|
+
system! 'git clone -b release/v'+v+' ssh://git@bitbucket.phunware.com:7999/af/af-template-ios.git' unless File.exist?('af-template-ios')
|
17
|
+
puts Rainbow("== Cloning Succeeded ==").magenta
|
18
|
+
end
|
19
|
+
|
20
|
+
def pod_install_command
|
21
|
+
puts Rainbow("== Moving to project folder ==").cyan
|
22
|
+
FileUtils.cd('af-template-ios', :verbose => false)
|
23
|
+
puts Rainbow("== Folder is now af-template-ios ==").magenta
|
24
|
+
|
25
|
+
puts Rainbow("== Attempting to run pod install ==").cyan
|
26
|
+
system! 'pod install'
|
27
|
+
puts Rainbow("== Cocoapod installation completed ==").magenta
|
28
|
+
end
|
29
|
+
|
30
|
+
def build_attmept
|
31
|
+
puts Rainbow("== Attempting to build project ==").cyan
|
32
|
+
system! 'xcodebuild -scheme GenericAF4 -workspace GenericAF4.xcworkspace/ -sdk iphonesimulator build | xcpretty'
|
33
|
+
puts Rainbow("== Project built successfully ==").magenta
|
34
|
+
end
|
35
|
+
|
36
|
+
def open_project_folder
|
37
|
+
puts Rainbow("== Open project folder ==").cyan
|
38
|
+
system! 'open .'
|
39
|
+
puts Rainbow("== AF Installer process completed. Thank you ==").magenta
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
data/lib/afinstaller.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# require "afinstaller/version"
|
2
|
+
require 'afinstaller/installers/iOS/iOS'
|
3
|
+
require 'afinstaller/installers/Errors/error'
|
4
|
+
require 'afinstaller/installers/iOS/iOSBuild'
|
5
|
+
require 'afinstaller/installers/Android/android'
|
6
|
+
require 'afinstaller/installers/Android/androidBuild'
|
7
|
+
|
8
|
+
module Afinstaller
|
9
|
+
end
|
10
|
+
require_relative '../config/environment'
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require "bundler/setup"
|
2
|
+
require "afinstaller"
|
3
|
+
|
4
|
+
RSpec.configure do |config|
|
5
|
+
# Enable flags like --only-failures and --next-failure
|
6
|
+
config.example_status_persistence_file_path = ".rspec_status"
|
7
|
+
|
8
|
+
# Disable RSpec exposing methods globally on `Module` and `main`
|
9
|
+
config.disable_monkey_patching!
|
10
|
+
|
11
|
+
config.expect_with :rspec do |c|
|
12
|
+
c.syntax = :expect
|
13
|
+
end
|
14
|
+
end
|
metadata
ADDED
@@ -0,0 +1,217 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: afinstaller
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Gabe Morales
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-07-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: cucumber
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: aruba
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: thor
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: cocoapods
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: xcpretty
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rainbow
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: activerecord
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '3.2'
|
146
|
+
- - "<"
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '6.0'
|
149
|
+
type: :runtime
|
150
|
+
prerelease: false
|
151
|
+
version_requirements: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '3.2'
|
156
|
+
- - "<"
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '6.0'
|
159
|
+
description: Simply Ruby gem to install and build Out of the Box iOS or Android AF
|
160
|
+
projects.
|
161
|
+
email:
|
162
|
+
- gmorales@phunware.com
|
163
|
+
executables:
|
164
|
+
- afinstaller
|
165
|
+
extensions: []
|
166
|
+
extra_rdoc_files: []
|
167
|
+
files:
|
168
|
+
- ".gitignore"
|
169
|
+
- ".rspec"
|
170
|
+
- ".travis.yml"
|
171
|
+
- CODE_OF_CONDUCT.md
|
172
|
+
- Gemfile
|
173
|
+
- LICENSE.txt
|
174
|
+
- README.md
|
175
|
+
- Rakefile
|
176
|
+
- afinstaller.gemspec
|
177
|
+
- bin/afinstaller
|
178
|
+
- bin/setup
|
179
|
+
- config/environment.rb
|
180
|
+
- features/android.feature
|
181
|
+
- features/ios.feature
|
182
|
+
- features/support/setup.rb
|
183
|
+
- lib/afinstaller.rb
|
184
|
+
- lib/afinstaller/cli.rb
|
185
|
+
- lib/afinstaller/installers/Android/android.rb
|
186
|
+
- lib/afinstaller/installers/Android/androidBuild.rb
|
187
|
+
- lib/afinstaller/installers/Errors/error.rb
|
188
|
+
- lib/afinstaller/installers/iOS/ios.rb
|
189
|
+
- lib/afinstaller/installers/iOS/iosBuild.rb
|
190
|
+
- lib/afinstaller/ios.rb
|
191
|
+
- lib/afinstaller/version.rb
|
192
|
+
- spec/afinstaller_spec.rb
|
193
|
+
- spec/spec_helper.rb
|
194
|
+
homepage: https://rubygems.org/gems/afinstaller
|
195
|
+
licenses: []
|
196
|
+
metadata: {}
|
197
|
+
post_install_message:
|
198
|
+
rdoc_options: []
|
199
|
+
require_paths:
|
200
|
+
- lib
|
201
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
202
|
+
requirements:
|
203
|
+
- - ">="
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '0'
|
206
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
207
|
+
requirements:
|
208
|
+
- - ">="
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
version: 2.0.0
|
211
|
+
requirements: []
|
212
|
+
rubyforge_project:
|
213
|
+
rubygems_version: 2.4.8
|
214
|
+
signing_key:
|
215
|
+
specification_version: 4
|
216
|
+
summary: PW's AF iOS and Android Command Line Tool.
|
217
|
+
test_files: []
|