xcody 0.1.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 513ef68b72eb3faf7db723da85e8134ba570fff1
4
+ data.tar.gz: 249ead6156a1ef3f7f629ac893139b343699f859
5
+ SHA512:
6
+ metadata.gz: d8723599caf54c0df4da609c3732b1b0c3282793856f5b39198e8e53ef29b81d97accd2cce5ac71b727cbbff00c12648b32150d0af889c0d5bea3075b198edce
7
+ data.tar.gz: bf6bbda352611dd3574c51186a1e44f2fe6feb7e324eed79a9defdd7ac5349797d29739b6d79cafdf5869190ff63718440318019b5570a02cc65f213a15e7670
@@ -0,0 +1,16 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
15
+
16
+ .idea
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in xcody.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Kazuaki MATSUO
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,31 @@
1
+ # Xcody
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'xcody'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install xcody
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( https://github.com/[my-github-username]/xcody/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create a new Pull Request
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,169 @@
1
+ require "xcody/version"
2
+ require "pathname"
3
+
4
+ class Xcody
5
+ def initialize
6
+ xcode = `xcode-select -v`
7
+ fail "Should install xcode commands from Apple Developer Center." if xcode.include?("command not found")
8
+ @xcode_build_cmd = ""
9
+ end
10
+
11
+ def xcode_build
12
+ @xcode_build_cmd.concat(Pathname.new(xcode_path).join("Contents", "Developer", "usr", "bin", "xcodebuild").to_s)
13
+ self
14
+ end
15
+
16
+ def project(project_path)
17
+ case File.extname(project_path)
18
+ when ".xcodeproj"
19
+ @xcode_build_cmd.concat(%( -project "#{project_path}"))
20
+ when ".xcworkspace"
21
+ @xcode_build_cmd.concat(%( -workspace "#{project_path}"))
22
+ else
23
+ fail "#{project_path} has no project."
24
+ end
25
+ self
26
+ end
27
+
28
+ def target(name)
29
+ @xcode_build_cmd.concat(%( -target "#{name}"))
30
+ self
31
+ end
32
+
33
+ def alltargets
34
+ @xcode_build_cmd.concat(%( -alltargets))
35
+ self
36
+ end
37
+
38
+ def arch(architecture)
39
+ @xcode_build_cmd.concat(%( -arch "#{architecture}"))
40
+ self
41
+ end
42
+
43
+ def scheme(scheme)
44
+ @xcode_build_cmd.concat(%( -scheme "#{scheme}"))
45
+ self
46
+ end
47
+
48
+ def sdk(sdk_name)
49
+ @xcode_build_cmd.concat(%( -sdk "#{sdk_name}"))
50
+ self
51
+ end
52
+
53
+ def destination(destination)
54
+ @xcode_build_cmd.concat(%( -destination "#{destination}"))
55
+ self
56
+ end
57
+
58
+ def configuration(config)
59
+ @xcode_build_cmd.concat(%( -configuration "#{config}"))
60
+ self
61
+ end
62
+
63
+ def derive_data_path(data_path)
64
+ @xcode_build_cmd.concat(%( -derivedDataPath "#{data_path}"))
65
+ self
66
+ end
67
+
68
+ def result_bundle_path(path)
69
+ @xcode_build_cmd.concat(%( -resultBundlePath "#{path}"))
70
+ self
71
+ end
72
+
73
+ def export_archive
74
+ @xcode_build_cmd.concat(%( -exportArchive))
75
+ self
76
+ end
77
+
78
+ def export_format(format)
79
+ @xcode_build_cmd.concat(%( -exportFormat "#{format}"))
80
+ self
81
+ end
82
+
83
+ def archive_path(xcarchivepath)
84
+ @xcode_build_cmd.concat(%( -archivePath "#{xcarchivepath}"))
85
+ self
86
+ end
87
+
88
+ def export_path(destinationpath)
89
+ @xcode_build_cmd.concat(%( -exportPath "#{destinationpath}"))
90
+ self
91
+ end
92
+
93
+ def export_provisioning_profile(profilename)
94
+ @xcode_build_cmd.concat(%( -exportProvisioningProfile "#{profilename}"))
95
+ self
96
+ end
97
+
98
+ def export_signing_identity(identityname)
99
+ @xcode_build_cmd.concat(%( -exportSigningIdentity "#{identityname}"))
100
+ self
101
+ end
102
+
103
+ def export_installer_identity(identityname)
104
+ @xcode_build_cmd.concat(%( -exportInstallerIdentity "#{identityname}"))
105
+ self
106
+ end
107
+
108
+ def exportWith_original_signing_identity
109
+ @xcode_build_cmd.concat(%( -exportWithOriginalSigningIdentity))
110
+ self
111
+ end
112
+
113
+ def skip_unavailable_actions
114
+ @xcode_build_cmd.concat(%( -skipUnavailableActions))
115
+ self
116
+ end
117
+
118
+ def xcconfig(filename)
119
+ @xcode_build_cmd.concat(%( -xcconfig #{filename}))
120
+ self
121
+ end
122
+
123
+ # Build actions
124
+
125
+ def clean
126
+ @xcode_build_cmd.concat(%( clean))
127
+ self
128
+ end
129
+
130
+ def analyze
131
+ @xcode_build_cmd.concat(%( analyze))
132
+ self
133
+ end
134
+
135
+ def archive
136
+ @xcode_build_cmd.concat(%( archive))
137
+ self
138
+ end
139
+
140
+ def test
141
+ @xcode_build_cmd.concat(%( test))
142
+ self
143
+ end
144
+
145
+ def installsrc
146
+ @xcode_build_cmd.concat(%( installsrc))
147
+ self
148
+ end
149
+
150
+ def install
151
+ @xcode_build_cmd.concat(%( install))
152
+ self
153
+ end
154
+
155
+ # @return [String] xcode build command
156
+ def build
157
+ @xcode_build_cmd.concat(%( build))
158
+ end
159
+
160
+ def clear_cmd
161
+ @xcode_build_cmd = ""
162
+ end
163
+
164
+ private
165
+
166
+ def xcode_path
167
+ `xcode-select -p 2> /dev/null`.strip.sub(%r{/Contents/Developer\z}, "")
168
+ end
169
+ end
@@ -0,0 +1,3 @@
1
+ class Xcody
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,20 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'xcody/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "xcody"
8
+ spec.version = Xcody::VERSION
9
+ spec.authors = ["Kazuaki MATSUO"]
10
+ spec.email = ["fly.49.89.over@gmail.com"]
11
+ spec.summary = %q{Simple Xcode command wrapper}
12
+ spec.description = %q{Simple Xcode command wrapper}
13
+ spec.homepage = "https://github.com/KazuCocoa/xcody"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+ end
metadata ADDED
@@ -0,0 +1,52 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: xcody
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Kazuaki MATSUO
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-07-08 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Simple Xcode command wrapper
14
+ email:
15
+ - fly.49.89.over@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".gitignore"
21
+ - Gemfile
22
+ - LICENSE.txt
23
+ - README.md
24
+ - Rakefile
25
+ - lib/xcody.rb
26
+ - lib/xcody/version.rb
27
+ - xcody.gemspec
28
+ homepage: https://github.com/KazuCocoa/xcody
29
+ licenses:
30
+ - MIT
31
+ metadata: {}
32
+ post_install_message:
33
+ rdoc_options: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ requirements: []
47
+ rubyforge_project:
48
+ rubygems_version: 2.2.2
49
+ signing_key:
50
+ specification_version: 4
51
+ summary: Simple Xcode command wrapper
52
+ test_files: []