cocoapods-check 1.0.2 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65464185b4b96b6ed6cff7e611af525cf4940cb3
4
- data.tar.gz: 62f7b4173ac497518a69b73abca28c37cfccdffe
3
+ metadata.gz: de71127ffd2abcc606b9d51b77660ad22279d414
4
+ data.tar.gz: e9d8fcad1ba7b16b85dcd23ced33e673c85cc28b
5
5
  SHA512:
6
- metadata.gz: cbb65304c8bd1877758e34ff09ae91574ce9dc2b0c7813bfeeac0a891c9213f0e5f64e34505cacc48445ea734c4a29fbfeafb7822a31e8915b3aee15185fc446
7
- data.tar.gz: ad5f1aa90c307db7a9b67a3f5190c99886cca458e9b99503d9b255f258fd03bb8c2c4df6c9ef384f58e694b1213cd60a9255bfa8977149f9c1a3563692424c51
6
+ metadata.gz: 82d722907eb8c26db6e1773fd0bb3b52af48f349a9a543834fa2a279a66b93746cbb6d70b475d330509ac78aba90e974eff65b74d9151ef91c38b6bd5aef9ced
7
+ data.tar.gz: 5a037e363220d88a569acd715cd76dfee6a15162222ec4459ed581513623617006774ad8e2f97a9dda0ae0a70e0e526dedf1867444d680c143729b850d288fa8
@@ -1,3 +1,3 @@
1
1
  module CocoapodsCheck
2
- VERSION = '1.0.2'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -19,12 +19,14 @@ module Pod
19
19
 
20
20
  def self.options
21
21
  [
22
- ['--verbose', 'Show change details.']
22
+ ['--verbose', 'Show change details.'],
23
+ ['--ignore-dev-pods', 'Ignores updates to development pods.']
23
24
  ].concat(super)
24
25
  end
25
26
 
26
27
  def initialize(argv)
27
28
  @check_command_verbose = argv.flag?('verbose')
29
+ @check_command_ignore_dev_pods = argv.flag?('ignore-dev-pods')
28
30
  super
29
31
  end
30
32
 
@@ -78,6 +80,7 @@ module Pod
78
80
  if manifest_version
79
81
  # If this is a development pod do a modified time check
80
82
  if development_pods[spec_name] != nil
83
+ next if @check_command_ignore_dev_pods
81
84
  newer_files = get_files_newer_than_lockfile_for_podspec(config, development_pods[spec_name])
82
85
  if newer_files.any?
83
86
  changed_development_result(spec_name, newer_files)
@@ -119,6 +119,36 @@ describe Pod::Command::Check do
119
119
  end
120
120
  end
121
121
 
122
+
123
+ it 'handles ignoring development pods with changes' do
124
+ check = Pod::Command::Check.new(CLAide::ARGV.new([ '--ignore-dev-pods' ]))
125
+
126
+ config = create_config({ :pod_one => '1.0', :pod_two => '1.0' }, { :pod_one => '1.0', :pod_two => '1.0' })
127
+
128
+ # Make an actual lockfile file because 'check' needs the modified time
129
+ lockfile_path = Tempfile.new('dev-pod-test-lockfile').path
130
+ allow(config.lockfile).to receive(:defined_in_file).and_return(lockfile_path)
131
+
132
+ # Ensure development pod modified time is after lockfile modified time
133
+ sleep(1)
134
+
135
+ # Create a temp dir with a temp file and run the check in that context
136
+ Dir.mktmpdir('dev-pod-test-dir') do |dir|
137
+
138
+ # Create a source file
139
+ source_file = Tempfile.new('some-pod-file', dir)
140
+
141
+ # Write a podspec file pointing at the source file
142
+ File.write("#{dir}/foo.podspec", "Pod::Spec.new do |s| s.source_files = '#{File.basename(source_file)}' end")
143
+
144
+ # Do the check
145
+ development_pods = { :pod_two => { :path => "#{dir}/foo.podspec" } }
146
+ results = check.find_differences(config, development_pods)
147
+
148
+ expect(results).to eq([])
149
+ end
150
+ end
151
+
122
152
  def create_config(lockfile_hash, manifest_hash)
123
153
  config = Pod::Config.new
124
154
  lockfile = double('lockfile')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Di Iorio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-29 00:00:00.000000000 Z
11
+ date: 2019-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  requirements: []
105
105
  rubyforge_project:
106
- rubygems_version: 2.5.2
106
+ rubygems_version: 2.5.2.3
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: "'check' plugin for CocoaPods"