motion-cocoapods 1.1.4 → 1.2.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.
- data/README.rdoc +7 -2
- data/lib/motion/project/cocoapods.rb +24 -11
- metadata +4 -10
data/README.rdoc
CHANGED
@@ -40,16 +40,21 @@ dependencies, build them and link them to your application executable.
|
|
40
40
|
|
41
41
|
== Options
|
42
42
|
|
43
|
+
If a Podfile.lock file exists, this will be used to install specific versions.
|
44
|
+
To update the versions, you can set the +UPDATE+ env variable.
|
45
|
+
|
46
|
+
$ rake UPDATE=1
|
47
|
+
|
43
48
|
By default the output of CocoaPods doing its work is silenced. If, however, you
|
44
49
|
would like to see the output, you can set the +COCOAPODS_VERBOSE+ env variable.
|
45
50
|
|
46
|
-
$
|
51
|
+
$ rake COCOAPODS_VERBOSE=1
|
47
52
|
|
48
53
|
On every build, CocoaPods will try to update the specification repos in
|
49
54
|
+~/.cocoapods+, if you want to skip this then set the +COCOAPODS_NO_UPDATE+ env
|
50
55
|
variable.
|
51
56
|
|
52
|
-
$
|
57
|
+
$ rake COCOAPODS_NO_UPDATE=1
|
53
58
|
|
54
59
|
|
55
60
|
== Contribute
|
@@ -38,33 +38,35 @@ module Motion::Project
|
|
38
38
|
@pods ||= Motion::Project::CocoaPods.new(self)
|
39
39
|
if block
|
40
40
|
# We run the update/install commands only if necessary.
|
41
|
-
podfile_lock =
|
41
|
+
podfile_lock = Pod::Config.instance.project_lockfile
|
42
42
|
podfile_changed = (!File.exist?(podfile_lock) or File.mtime(self.project_file) > File.mtime(podfile_lock))
|
43
43
|
if podfile_changed and !ENV['COCOAPODS_NO_UPDATE']
|
44
44
|
Pod::Command::Repo.new(Pod::Command::ARGV.new(["update"])).run
|
45
45
|
end
|
46
46
|
@pods.instance_eval(&block)
|
47
|
-
@pods.install!
|
47
|
+
@pods.install!
|
48
48
|
end
|
49
49
|
@pods
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
53
|
class CocoaPods
|
54
|
-
VERSION = '1.
|
54
|
+
VERSION = '1.2.0'
|
55
55
|
PODS_ROOT = 'vendor/Pods'
|
56
56
|
|
57
57
|
def initialize(config)
|
58
58
|
@config = config
|
59
|
+
|
59
60
|
@podfile = Pod::Podfile.new {}
|
60
|
-
@podfile.platform :ios,
|
61
|
+
@podfile.platform :ios, config.deployment_target
|
62
|
+
cp_config.podfile = @podfile
|
61
63
|
|
62
|
-
cp_config = Pod::Config.instance
|
63
64
|
if ENV['COCOAPODS_VERBOSE']
|
64
65
|
cp_config.verbose = true
|
65
66
|
else
|
66
67
|
cp_config.silent = true
|
67
68
|
end
|
69
|
+
|
68
70
|
cp_config.integrate_targets = false
|
69
71
|
cp_config.project_root = Pathname.new(File.expand_path(config.project_dir)) + 'vendor'
|
70
72
|
end
|
@@ -83,21 +85,28 @@ module Motion::Project
|
|
83
85
|
end
|
84
86
|
|
85
87
|
def pods_installer
|
86
|
-
@installer ||=
|
88
|
+
@installer ||= begin
|
89
|
+
# This should move into a factory method in CocoaPods.
|
90
|
+
sandbox = Pod::Sandbox.new(cp_config.project_pods_root)
|
91
|
+
resolver = Pod::Resolver.new(@podfile, cp_config.lockfile, sandbox)
|
92
|
+
resolver.update_mode = !!ENV['UPDATE']
|
93
|
+
Pod::Installer.new(resolver)
|
94
|
+
end
|
87
95
|
end
|
88
96
|
|
89
97
|
# For now we only support one Pods target, this will have to be expanded
|
90
98
|
# once we work on more spec support.
|
91
|
-
def install!
|
92
|
-
if bridgesupport_file.exist? &&
|
99
|
+
def install!
|
100
|
+
if bridgesupport_file.exist? && cp_config.project_lockfile.exist?
|
93
101
|
installed_pods_before = installed_pods
|
94
102
|
end
|
95
103
|
|
96
|
-
pods_installer.install!
|
104
|
+
pods_installer.install!
|
97
105
|
|
98
106
|
# Let RubyMotion re-generate the BridgeSupport file whenever the list of
|
99
107
|
# installed pods changes.
|
100
|
-
if bridgesupport_file.exist? && installed_pods_before &&
|
108
|
+
if bridgesupport_file.exist? && installed_pods_before &&
|
109
|
+
installed_pods_before != installed_pods
|
101
110
|
bridgesupport_file.delete
|
102
111
|
end
|
103
112
|
|
@@ -124,8 +133,12 @@ module Motion::Project
|
|
124
133
|
end
|
125
134
|
end
|
126
135
|
|
136
|
+
def cp_config
|
137
|
+
Pod::Config.instance
|
138
|
+
end
|
139
|
+
|
127
140
|
def installed_pods
|
128
|
-
YAML.load(
|
141
|
+
YAML.load(cp_config.project_lockfile.read)['PODS']
|
129
142
|
end
|
130
143
|
|
131
144
|
def bridgesupport_file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-cocoapods
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cocoapods
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.14.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.14.0
|
30
30
|
description: motion-cocoapods allows RubyMotion projects to have access to the CocoaPods
|
31
31
|
dependency manager.
|
32
32
|
email: lrz@hipbyte.com
|
@@ -50,18 +50,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
50
50
|
- - ! '>='
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
|
-
segments:
|
54
|
-
- 0
|
55
|
-
hash: 4469866718672717141
|
56
53
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
54
|
none: false
|
58
55
|
requirements:
|
59
56
|
- - ! '>='
|
60
57
|
- !ruby/object:Gem::Version
|
61
58
|
version: '0'
|
62
|
-
segments:
|
63
|
-
- 0
|
64
|
-
hash: 4469866718672717141
|
65
59
|
requirements: []
|
66
60
|
rubyforge_project:
|
67
61
|
rubygems_version: 1.8.23
|