rswift-osx 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +75 -0
- data/Rakefile +6 -0
- data/lib/rswift/osx.rb +7 -0
- data/lib/rswift/osx/tasks/osx.rake +39 -0
- data/lib/rswift/osx/version.rb +5 -0
- data/rswift-osx.gemspec +26 -0
- metadata +152 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b1aa594d22f7fa05d9c8abba1638ff324378416f
|
4
|
+
data.tar.gz: a9ee07215db30fa55f73bf545f5f5cdf0548ec4f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f962f31fbc91fe0af904546d2fd4ffeab7bac549b5a7ba9f1c27ad673381bbd85cb784a95e92be98792e0bb6bbbaaa1b422636db7ea9c6cbd8b756168d6da5af
|
7
|
+
data.tar.gz: 869d2f73b33567d08b5eac9eab9b652b3cd873e3542f3fc713be3ad403aca9da53d24c18aec114b006644815fdff0147c33777d4edfd4b2f547c78f5d494db19
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Lukasz Wolanczyk
|
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,75 @@
|
|
1
|
+
# RSwift::OSX
|
2
|
+
|
3
|
+
RSwift::OSX lets you execute rake commands specific to OSX project.
|
4
|
+
|
5
|
+
RSwift::OSX uses rswift and rswift-shared gems.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'rswift-osx'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install rswift-osx
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
Add this line to `Rakefile` in project directory
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
require 'rswift/osx'
|
29
|
+
```
|
30
|
+
|
31
|
+
By default rswift will find project settings on it's own.
|
32
|
+
Group names and configurations have default initial values.
|
33
|
+
If you use custom configuration create `.rswift.yml` to specify different project settings.
|
34
|
+
|
35
|
+
```yml
|
36
|
+
app_scheme_name: MyApp
|
37
|
+
product_name: MyApp
|
38
|
+
app_group: MyApp #Default: app
|
39
|
+
spec_group: MyAppSpec #Default: spec
|
40
|
+
debug_build_configuration: Debug #Default: Debug
|
41
|
+
release_build_configuration: Release #Default: Release
|
42
|
+
debug_product_bundle_identifier: co.rswift.myapp
|
43
|
+
release_product_bundle_identifier: co.rswift.myapp
|
44
|
+
```
|
45
|
+
|
46
|
+
To display all tasks simply run `rake -T`
|
47
|
+
|
48
|
+
### Available tasks
|
49
|
+
|
50
|
+
```
|
51
|
+
rake build # Build workspace
|
52
|
+
rake clean # Clean build objects
|
53
|
+
rake pod:clean # Clean cocoapods
|
54
|
+
rake run # Run the application
|
55
|
+
rake spec # Run the test/spec suite
|
56
|
+
rake update:references # Update file references
|
57
|
+
```
|
58
|
+
|
59
|
+
Default task is `rake run`
|
60
|
+
|
61
|
+
Additionaly task `rake run` can be executed with flag `debug=1`, which enables LLDB.
|
62
|
+
|
63
|
+
## Development
|
64
|
+
|
65
|
+
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).
|
66
|
+
|
67
|
+
## Contributing
|
68
|
+
|
69
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/lukwol/rswift-osx.
|
70
|
+
|
71
|
+
|
72
|
+
## License
|
73
|
+
|
74
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
75
|
+
|
data/Rakefile
ADDED
data/lib/rswift/osx.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rswift'
|
3
|
+
|
4
|
+
DERIVED_DATA_PATH = 'build'
|
5
|
+
DEBUG_ENV_KEY = 'debug'
|
6
|
+
|
7
|
+
debug = ENV[DEBUG_ENV_KEY]
|
8
|
+
debug ||= '0'
|
9
|
+
|
10
|
+
workspace = RSwift::WorkspaceProvider.workspace
|
11
|
+
project = Xcodeproj::Project.open(Dir.glob('*.xcodeproj').first)
|
12
|
+
|
13
|
+
task :default => :run
|
14
|
+
|
15
|
+
desc 'Build workspace'
|
16
|
+
task :build do
|
17
|
+
output = ""
|
18
|
+
IO.popen("xcodebuild -workspace #{workspace} -scheme #{project.app_scheme_name} -destination 'platform=macosx' -derivedDataPath #{DERIVED_DATA_PATH} | xcpretty").each do |line|
|
19
|
+
puts line.chomp
|
20
|
+
output = line.chomp
|
21
|
+
end
|
22
|
+
success = output.include? "Build Succeeded"
|
23
|
+
abort unless success
|
24
|
+
end
|
25
|
+
|
26
|
+
desc 'Run the application'
|
27
|
+
task :run => [:build] do
|
28
|
+
if debug.to_i.nonzero?
|
29
|
+
exec "lldb #{DERIVED_DATA_PATH}/Build/Products/#{project.debug_build_configuration.name}/#{project.app_target.product_name}.app/"
|
30
|
+
else
|
31
|
+
system "open #{DERIVED_DATA_PATH}/Build/Products/#{project.debug_build_configuration.name}/#{project.app_target.product_name}.app/"
|
32
|
+
exec "tail -f /private/var/log/system.log"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
desc 'Run the test/spec suite'
|
37
|
+
task :spec do
|
38
|
+
exec "xcodebuild test -workspace #{workspace} -scheme #{project.app_scheme_name} -destination 'platform=macosx' -derivedDataPath #{DERIVED_DATA_PATH} | xcpretty -tc"
|
39
|
+
end
|
data/rswift-osx.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'rswift/osx/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'rswift-osx'
|
8
|
+
spec.version = RSwift::OSX::VERSION
|
9
|
+
spec.authors = ['Lukasz Wolanczyk']
|
10
|
+
spec.email = ['wolanczyk.lukasz@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = 'Rake tasks for OSX projects using rswift.'
|
13
|
+
spec.homepage = 'https://github.com/lukwol/rswift-osx'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.require_paths = ['lib']
|
18
|
+
|
19
|
+
spec.add_development_dependency 'bundler'
|
20
|
+
spec.add_development_dependency 'rspec'
|
21
|
+
spec.add_development_dependency 'byebug'
|
22
|
+
spec.add_runtime_dependency 'rswift'
|
23
|
+
spec.add_runtime_dependency 'rswift-shared'
|
24
|
+
spec.add_runtime_dependency 'rake'
|
25
|
+
spec.add_runtime_dependency 'xcpretty'
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rswift-osx
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.8
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Lukasz Wolanczyk
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-08 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: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: byebug
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rswift
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
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: rswift-shared
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
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: rake
|
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: xcpretty
|
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
|
+
description:
|
112
|
+
email:
|
113
|
+
- wolanczyk.lukasz@gmail.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".gitignore"
|
119
|
+
- ".rspec"
|
120
|
+
- Gemfile
|
121
|
+
- LICENSE.txt
|
122
|
+
- README.md
|
123
|
+
- Rakefile
|
124
|
+
- lib/rswift/osx.rb
|
125
|
+
- lib/rswift/osx/tasks/osx.rake
|
126
|
+
- lib/rswift/osx/version.rb
|
127
|
+
- rswift-osx.gemspec
|
128
|
+
homepage: https://github.com/lukwol/rswift-osx
|
129
|
+
licenses:
|
130
|
+
- MIT
|
131
|
+
metadata: {}
|
132
|
+
post_install_message:
|
133
|
+
rdoc_options: []
|
134
|
+
require_paths:
|
135
|
+
- lib
|
136
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
138
|
+
- - ">="
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: '0'
|
141
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
requirements: []
|
147
|
+
rubyforge_project:
|
148
|
+
rubygems_version: 2.4.6
|
149
|
+
signing_key:
|
150
|
+
specification_version: 4
|
151
|
+
summary: Rake tasks for OSX projects using rswift.
|
152
|
+
test_files: []
|