rswift-ios 0.0.53

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ba10087717ed96798475a1587367061c7ae064dd
4
+ data.tar.gz: 4b137c9fd5f69d8b6f8d9b29e8635e85f9ef7460
5
+ SHA512:
6
+ metadata.gz: bc403874aa4cc9d87425fdd81c20275761e3a19bd20f1ea46025284a9d1418ba0f2204bc37678793783333fc8fae4813f8348e0de10734b9bd8c0ad724978561
7
+ data.tar.gz: a6bbea4846837640f38b2cdd7ba1597c65f20719d3d56f530d9af421488fe4f1c6a8c8050126311eea0ce0d0cc155b18d30bc3ae0e38e190bf064295e2163f29
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ .idea/
11
+ .byebug_history
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+ source 'https://5YyzJYEbx9Sxn2e_Eb12@gem.fury.io/lukwol/'
3
+
4
+ # Specify your gem's dependencies in rswift-ios.gemspec
5
+ gemspec
@@ -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.
@@ -0,0 +1,80 @@
1
+ # RSwift::IOS
2
+
3
+ RSwift::IOS lets you execute rake commands specific to iOS project.
4
+
5
+ RSwift::IOS 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-ios'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install rswift-ios
22
+
23
+ ## Usage
24
+
25
+ Add this line to `Rakefile` in project directory
26
+
27
+ ```ruby
28
+ require 'rswift/ios'
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 clean # Clean build objects
52
+ rake device # Deploy on the device
53
+ rake device:build # Build for device
54
+ rake pod:clean # Clean cocoapods
55
+ rake simulator # Run the simulator
56
+ rake simulator:build # Build for simulator
57
+ rake simulator:clean # Clean all simulators
58
+ rake spec # Run the test/spec suite on the simulator
59
+ rake update:references # Update file references
60
+ ```
61
+
62
+ Default task is `rake simulator`
63
+
64
+ To select simulator for tasks `rake simulator` and `rake spec` set device_name, for example `device_name='iPad Air 2'`.
65
+
66
+ Additionaly tasks `rake simulator` and `rake device` can be executed with flag `debug=1`, which enables LLDB.
67
+
68
+ ## Development
69
+
70
+ 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).
71
+
72
+ ## Contributing
73
+
74
+ Bug reports and pull requests are welcome on GitHub at https://github.com/lukwol/rswift-ios.
75
+
76
+
77
+ ## License
78
+
79
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
80
+
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,7 @@
1
+ require 'rswift/shared'
2
+ Dir.glob(File.expand_path('ios/tasks/*.rake', File.dirname(__FILE__))).each { |r| load r}
3
+
4
+ module RSwift
5
+ module IOS
6
+ end
7
+ end
@@ -0,0 +1,77 @@
1
+ require 'rake'
2
+ require 'rswift'
3
+
4
+ DERIVED_DATA_PATH = 'build'
5
+ DEFAULT_DEVICE_NAME = 'iPhone 6s'
6
+ DEVICE_NAME_ENV_KEY = 'device_name'
7
+ DEBUG_ENV_KEY = 'debug'
8
+
9
+ device_name = ENV[DEVICE_NAME_ENV_KEY]
10
+ device_name ||= DEFAULT_DEVICE_NAME
11
+ debug = ENV[DEBUG_ENV_KEY]
12
+ debug ||= '0'
13
+
14
+ workspace = RSwift::WorkspaceProvider.workspace
15
+ project = Xcodeproj::Project.open(Dir.glob('*.xcodeproj').first)
16
+ device_udid = RSwift::DeviceProvider.udid_for_device(device_name, :ios)
17
+
18
+ task :default => :simulator
19
+
20
+ desc 'Run the test/spec suite on the simulator'
21
+ task :spec do
22
+ exec "xcodebuild test -workspace #{workspace} -scheme #{project.app_scheme_name} -destination 'platform=iphonesimulator,id=#{device_udid}' -derivedDataPath #{DERIVED_DATA_PATH} | xcpretty -tc"
23
+ end
24
+
25
+ desc 'Run the simulator'
26
+ task :simulator => :'simulator:build' do
27
+ system "xcrun instruments -w #{device_udid}"
28
+ system "xcrun simctl install booted #{DERIVED_DATA_PATH}/Build/Products/#{project.debug_build_configuration.name}-iphonesimulator/#{project.app_target.product_name}.app"
29
+ system "xcrun simctl launch booted #{project.app_target.debug_product_bundle_identifier}"
30
+ if debug.to_i.nonzero?
31
+ exec "lldb -n #{project.app_target.product_name}"
32
+ else
33
+ exec "tail -f ~/Library/Logs/CoreSimulator/#{device_udid}/system.log"
34
+ end
35
+ end
36
+
37
+ namespace :simulator do
38
+
39
+ desc 'Build for simulator'
40
+ task :build do
41
+ output = ""
42
+ IO.popen("xcodebuild -workspace #{workspace} -scheme #{project.app_scheme_name} -destination 'platform=iphonesimulator,id=#{device_udid}' -derivedDataPath #{DERIVED_DATA_PATH} | xcpretty").each do |line|
43
+ puts line.chomp
44
+ output = line.chomp
45
+ end
46
+ success = output.include? "Build Succeeded"
47
+ abort unless success
48
+ end
49
+
50
+ desc 'Clean all simulators'
51
+ task :clean do
52
+ system 'killall Simulator'
53
+ system 'xcrun simctl erase all'
54
+ end
55
+ end
56
+
57
+ desc 'Deploy on the device'
58
+ task :device => :'device:build' do
59
+ if debug.to_i.nonzero?
60
+ exec "node_modules/.bin/ios-deploy --debug --bundle #{DERIVED_DATA_PATH}/Build/Products/#{project.debug_build_configuration.name}-iphoneos/#{project.app_scheme_name}.app"
61
+ else
62
+ exec "node_modules/.bin/ios-deploy --justlaunch --bundle #{DERIVED_DATA_PATH}/Build/Products/#{project.debug_build_configuration.name}-iphoneos/#{project.app_scheme_name}.app"
63
+ end
64
+ end
65
+
66
+ namespace :device do
67
+ desc 'Build for device'
68
+ task :build do
69
+ output = ""
70
+ IO.popen("xcodebuild -workspace #{workspace} -scheme #{project.app_scheme_name} -destination 'generic/platform=iphoneos' -derivedDataPath '#{DERIVED_DATA_PATH}' | xcpretty").each do |line|
71
+ puts line.chomp
72
+ output = line.chomp
73
+ end
74
+ success = output.include? "Build Succeeded"
75
+ abort unless success
76
+ end
77
+ end
@@ -0,0 +1,5 @@
1
+ module RSwift
2
+ module IOS
3
+ VERSION = '0.0.53'
4
+ end
5
+ end
@@ -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/ios/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'rswift-ios'
8
+ spec.version = RSwift::IOS::VERSION
9
+ spec.authors = ['Lukasz Wolanczyk']
10
+ spec.email = ['wolanczyk.lukasz@gmail.com']
11
+
12
+ spec.summary = 'Rake tasks for iOS projects using rswift.'
13
+ spec.homepage = 'https://github.com/lukwol/rswift-ios'
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-ios
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.53
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/ios.rb
125
+ - lib/rswift/ios/tasks/ios.rake
126
+ - lib/rswift/ios/version.rb
127
+ - rswift-ios.gemspec
128
+ homepage: https://github.com/lukwol/rswift-ios
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 iOS projects using rswift.
152
+ test_files: []