motion-list 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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ca39d936a8c2de98afa9eeb8fe8bb7240f1b9903
4
+ data.tar.gz: c4b0c93eb282d7d61c939db52a8cb6390a45d2ec
5
+ SHA512:
6
+ metadata.gz: 91c487787472d92759be846ecb25d2f4185d03f82d35fa7756461b86012c3cdde65cbfac6ab793fc084927f90e31e66cfd8f60579c2364e6de6250fdcf797291
7
+ data.tar.gz: c7645da8c409b81a8088461bab451921996f1adea7246153d4fb3a54a1c8f3e34f8172780eb7b09c906e7a849527a196ad7534ea6d5ceef20df5ffb81e08b59e
data/README.md ADDED
@@ -0,0 +1,75 @@
1
+ # motion-list
2
+
3
+ This is RubyMotion plugin which provides various lists.
4
+
5
+ ## Install
6
+
7
+ ```
8
+ $ gem install motion-list
9
+ ```
10
+
11
+ If you like to install manually,
12
+
13
+ ```
14
+ $ git clone https://github.com/Watson1978/motion-list.git
15
+ $ cd motion-list
16
+ $ rake install
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ### codesigning
22
+
23
+ `list codesigning` command shows the list of your codesigning from Keychain.
24
+
25
+ ```
26
+ $ motion list codesigning
27
+ 1) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "iPhone Distribution: Shizuo Fujita (KQ572MNR73)"
28
+ 2) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "Developer ID Application: Shizuo Fujita (KQ572MNR73)"
29
+ 3) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "3rd Party Mac Developer Application: Shizuo Fujita (KQ572MNR73)"
30
+ 4) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "iPhone Developer: Shizuo Fujita (4A73CV3K9R)"
31
+ 4 valid identities found
32
+ ```
33
+
34
+ You can configure about codesigning in your RubyMotion project, like
35
+
36
+ ```ruby
37
+ Motion::Project::App.setup do |app|
38
+ ...
39
+ app.codesign_certificate = "iPhone Developer: Shizuo Fujita (4A73CV3K9R)"
40
+ end
41
+ ```
42
+
43
+ ### simulator
44
+
45
+ `list simulator` command shows the list of simulator device types which you can use.
46
+
47
+ ```
48
+ $ motion list simulator
49
+ == Device Types ==
50
+ iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
51
+ iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
52
+ iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
53
+ iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
54
+ iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
55
+ iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
56
+ iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
57
+ iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
58
+ Resizable iPhone (com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone)
59
+ Resizable iPad (com.apple.CoreSimulator.SimDeviceType.Resizable-iPad)
60
+ == Runtimes ==
61
+ iOS 7.1 (7.1 - 11D167) (com.apple.CoreSimulator.SimRuntime.iOS-7-1)
62
+ iOS 8.1 (8.1 - 12B411) (com.apple.CoreSimulator.SimRuntime.iOS-8-1)
63
+ iOS 8.2 (8.2 - 12D508) (com.apple.CoreSimulator.SimRuntime.iOS-8-2)
64
+ iOS 8.3 (8.3 - 12F69) (com.apple.CoreSimulator.SimRuntime.iOS-8-3)
65
+ == Devices ==
66
+
67
+ ...
68
+ ```
69
+
70
+ You can use specific simulator device with `device_name` environment variable when you run `rake`.
71
+
72
+ ```
73
+ $ rake device_name='iPhone 4s'
74
+ $ rake device_name='iPhone 5' target=7.1 # Launch iOS 7.1 simulator with iPhone 5 device
75
+ ```
@@ -0,0 +1,44 @@
1
+ module Motion; class Command
2
+ class List < Command
3
+
4
+ self.summary = 'Show various lists'
5
+ self.arguments = 'SUB-COMMAND'
6
+
7
+ HELP_MESSAGE =<<'END'
8
+ SUB-COMMAND
9
+ * codesigning - Show codesignings in Keychain
10
+ * simulator - Show simulators
11
+ END
12
+
13
+ def initialize(argv)
14
+ @sub_command = argv.shift_argument
15
+ super
16
+ end
17
+
18
+ def validate!
19
+ super
20
+ help! HELP_MESSAGE unless @sub_command
21
+ end
22
+
23
+ def run
24
+ case @sub_command
25
+ when "codesigning"
26
+ show_codesigning
27
+ when "simulator"
28
+ show_simulator
29
+ else
30
+ help! HELP_MESSAGE
31
+ end
32
+ end
33
+
34
+ def show_codesigning
35
+ system "security find-identity -p codesigning -v"
36
+ end
37
+
38
+ def show_simulator
39
+ xcode_dir = `xcode-select -p`.strip
40
+ simctl = File.join(xcode_dir, 'Platforms/iPhoneSimulator.platform/Developer/usr/bin/simctl')
41
+ system "#{simctl} list"
42
+ end
43
+ end
44
+ end; end
data/ext/extconf.rb ADDED
@@ -0,0 +1,8 @@
1
+ # Command-Line Plugin Installer
2
+ require './installer'
3
+
4
+ install_plugins()
5
+
6
+ ### dummy ###
7
+ require 'mkmf'
8
+ create_makefile('')
data/ext/installer.rb ADDED
@@ -0,0 +1,15 @@
1
+ # Command-Line Plugin Installer
2
+ require 'fileutils'
3
+
4
+ def install_plugins
5
+ dir = File.expand_path("~/Library/RubyMotion/command/")
6
+
7
+ Dir.glob(File.join(File.dirname(__FILE__), "../command/motion-*")).each do |path|
8
+ file = File.basename(path)
9
+ src = File.expand_path(path)
10
+ dst = File.join(dir, file)
11
+
12
+ FileUtils.mkdir_p(dir) unless File.exist?(dir)
13
+ FileUtils.ln_sf src, dst
14
+ end
15
+ end
metadata ADDED
@@ -0,0 +1,49 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: motion-list
3
+ version: !ruby/object:Gem::Version
4
+ version: '1.0'
5
+ platform: ruby
6
+ authors:
7
+ - Watson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-09 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: This is RubyMotion plugin which provides various lists.
14
+ email:
15
+ - watson1978@gmail.com
16
+ executables: []
17
+ extensions:
18
+ - ext/extconf.rb
19
+ extra_rdoc_files: []
20
+ files:
21
+ - README.md
22
+ - command/motion-list.rb
23
+ - ext/extconf.rb
24
+ - ext/installer.rb
25
+ homepage: https://github.com/HipByte/motion-appstore
26
+ licenses:
27
+ - MIT
28
+ metadata: {}
29
+ post_install_message:
30
+ rdoc_options: []
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ requirements: []
44
+ rubyforge_project:
45
+ rubygems_version: 2.4.5
46
+ signing_key:
47
+ specification_version: 4
48
+ summary: This is RubyMotion plugin which provides various lists.
49
+ test_files: []