cocoapods-try 0.5.1 → 1.0.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a92663028e7b28c2a9ed6b458c4fe1d359848f3b
4
- data.tar.gz: 46175a930b382956baace16fd0142562ed85c51f
3
+ metadata.gz: 57c6b5b53b39607c80d19f9d0da0034842ff3b9c
4
+ data.tar.gz: 01f73347266b2ba72d4eb0aa825930e8db018576
5
5
  SHA512:
6
- metadata.gz: 8005ccf9ffc8a7d3cde0c398a12afd33f7f9d65e35ab8cc96e4d63fa4a0b42e42fa7ebc74820383fbcba459fd6478291ba86d002a2410c01e6a171c79af12b6c
7
- data.tar.gz: 934c37c1aa9df3e4a12aa8f639fc2d13dad329dd1e1153fe2ba4645bd66b1c4d9251c3028e9be8cd5c394edb6941092bf198cadd485faf8e53fa0dd19cf75b1d
6
+ metadata.gz: ebfac998db0581b7fed0695675a59ef71e615d983733570ca8cc82e7164ef99a16daeb89c9fb73a178dcabcfbcbc0b6e881cd6aa22d903a0b677299b6a9c99d4
7
+ data.tar.gz: 80b9dc933c7a471a15314d100c3d866828497e72378a2face4095303633a107ab21680e516e451344e8939fcefae113f335e7f74e9c6ec94f129d6ff289a8f22
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Cocoapods::Try Changelog
2
2
 
3
+
4
+ ## 1.0.0.beta.1 (2015-12-30)
5
+
6
+ ##### Bug Fixes
7
+
8
+ * Ensure commands in the `.cocoapods` file are strings, and uses the pods folder when executing commands.
9
+ [Samuel Giddins](https://github.com/segiddins)
10
+ [CocoaPods-Try#40](https://github.com/CocoaPods/cocoapods-try/issues/40)
11
+
12
+
3
13
  ## 0.5.1 (2015-08-28)
4
14
 
5
15
  ##### Bug Fixes
data/Gemfile.lock CHANGED
@@ -18,7 +18,7 @@ GIT
18
18
  cocoapods-plugins (~> 0.4.2)
19
19
  cocoapods-stats (~> 0.5.3)
20
20
  cocoapods-trunk (~> 0.6.1)
21
- cocoapods-try (~> 0.5.0)
21
+ cocoapods-try (~> 1.0.0.beta.1)
22
22
  colored (~> 1.2)
23
23
  escape (~> 0.0.4)
24
24
  molinillo (~> 0.3.1)
@@ -38,7 +38,7 @@ GIT
38
38
  PATH
39
39
  remote: .
40
40
  specs:
41
- cocoapods-try (0.5.1)
41
+ cocoapods-try (1.0.0.beta.1)
42
42
 
43
43
  GEM
44
44
  remote: https://rubygems.org/
@@ -123,4 +123,4 @@ DEPENDENCIES
123
123
  rubocop
124
124
 
125
125
  BUNDLED WITH
126
- 1.10.6
126
+ 1.11.2
data/lib/cocoapods_try.rb CHANGED
@@ -1,6 +1,5 @@
1
-
2
1
  # The namespace of the Cocoapods try plugin.
3
2
  #
4
3
  module CocoapodsTry
5
- VERSION = '0.5.1'
4
+ VERSION = '1.0.0.beta.1'.freeze
6
5
  end
@@ -42,7 +42,7 @@ module Pod
42
42
  UI.title "Trying #{spec.name}" do
43
43
  pod_dir = install_pod(spec, sandbox)
44
44
  settings = TrySettings.settings_from_folder(pod_dir)
45
- settings.run_pre_install_commands(true)
45
+ Dir.chdir(pod_dir) { settings.run_pre_install_commands(true) }
46
46
  proj = settings.project_path || pick_demo_project(pod_dir)
47
47
  file = install_podfile(proj)
48
48
  if file
@@ -124,12 +124,11 @@ module Pod
124
124
  #
125
125
  def install_pod(spec, sandbox)
126
126
  specs = { :ios => spec, :osx => spec }
127
- clean = config.clean
128
- config.clean = false
129
- installer = Installer::PodSourceInstaller.new(sandbox, specs)
130
- installer.install!
131
- config.clean = clean
132
- sandbox.root + spec.name
127
+ config.with_changes(:clean => false) do
128
+ installer = Installer::PodSourceInstaller.new(sandbox, specs)
129
+ installer.install!
130
+ sandbox.root + spec.name
131
+ end
133
132
  end
134
133
 
135
134
  # Picks a project or workspace suitable for the demo purposes in the
@@ -46,7 +46,7 @@ module Pod
46
46
  def run_pre_install_commands(prompt)
47
47
  if pre_install_commands
48
48
  prompt_for_permission if prompt
49
- pre_install_commands.each { |command| Executable.execute_command('bash', ['-e', command], true) }
49
+ pre_install_commands.each { |command| Executable.execute_command('bash', ['-ec', command], true) }
50
50
  end
51
51
  end
52
52
  end
@@ -59,8 +59,8 @@ YAML
59
59
  YAML
60
60
  File.open(dir + '/.cocoapods.yml', 'w') { |f| f.write(yaml) }
61
61
 
62
- Executable.expects(:execute_command).with('bash', ['-e', 'pod install'], true)
63
- Executable.expects(:execute_command).with('bash', ['-e', 'git submodule init'], true)
62
+ Executable.expects(:execute_command).with('bash', ['-ec', 'pod install'], true)
63
+ Executable.expects(:execute_command).with('bash', ['-ec', 'git submodule init'], true)
64
64
 
65
65
  settings = TrySettings.settings_from_folder dir
66
66
  settings.run_pre_install_commands false
@@ -19,14 +19,28 @@ module Pod
19
19
  end.message.should.match(/A Pod name or URL is required/)
20
20
  end
21
21
 
22
+ before do
23
+ @original_install_method = method = Pod::Command::Try.instance_method(:install_pod)
24
+ Pod::Command::Try.send(:define_method, :install_pod) do |*args|
25
+ dir = method.bind(self).call(*args)
26
+ FileUtils.mkdir_p(dir)
27
+ dir
28
+ end
29
+ end
30
+
31
+ after do
32
+ Pod::Command::Try.send(:define_method, :install_pod, @original_install_method)
33
+ end
34
+
22
35
  it 'allows the user to try the Pod with the given name' do
23
- Config.instance.skip_repo_update = false
24
- command = Pod::Command.parse(%w(try ARAnalytics))
25
- Installer::PodSourceInstaller.any_instance.expects(:install!)
26
- command.expects(:update_specs_repos)
27
- command.expects(:pick_demo_project).returns(XCODE_PROJECT)
28
- command.expects(:open_project).with(XCODE_PROJECT)
29
- command.run
36
+ Config.instance.with_changes(:skip_repo_update => false) do
37
+ command = Pod::Command.parse(%w(try ARAnalytics))
38
+ Installer::PodSourceInstaller.any_instance.expects(:install!)
39
+ command.expects(:update_specs_repos)
40
+ command.expects(:pick_demo_project).returns(XCODE_PROJECT)
41
+ command.expects(:open_project).with(XCODE_PROJECT)
42
+ command.run
43
+ end
30
44
  end
31
45
 
32
46
  it 'allows the user to try the Pod with the given Git URL' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-try
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 1.0.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Pelosin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-28 00:00:00.000000000 Z
11
+ date: 2015-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -78,12 +78,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - '>'
82
82
  - !ruby/object:Gem::Version
83
- version: '0'
83
+ version: 1.3.1
84
84
  requirements: []
85
85
  rubyforge_project:
86
- rubygems_version: 2.4.8
86
+ rubygems_version: 2.5.1
87
87
  signing_key:
88
88
  specification_version: 4
89
89
  summary: CocoaPods plugin which allows to quickly try the demo project of a Pod.