cocoapods-keys 2.0.0 → 2.0.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: b01fd13b64082cf9a456e3375e5265921e5d146a
4
- data.tar.gz: e46f5ad08f13973adf790f97683c3e1907018298
3
+ metadata.gz: 8ac337ab98b12595508bac423ffda68ece2123fd
4
+ data.tar.gz: de8a32d1e0cd7e17ce9e17d94c71c47d023908ec
5
5
  SHA512:
6
- metadata.gz: 0814c7e535af3237cc3d3aa7419056554c2e79029af71615c87d3b617aaa923c5ff0b04c9dac651169f692d68794323a45b059f009fbf1f0b9fee1026adab851
7
- data.tar.gz: 60820ab391f39b05d571ffee200735bdc31fa6a97bcc4617322385122cb10af7524dc12618231b6196d4a752f5e0bfd07e1af33b2ebda8f3b35815088773f2bf
6
+ metadata.gz: 40b176b7705d9099c50e341e4501c8b40705e3b147bfc6c49c34df4796c17e07178f9a6bde10f6d69753dd7a1bb99023af1d33573009531f06aaf382e5dc9de2
7
+ data.tar.gz: 80ad890268300ad76f1d5cf4e4e516ed707b50939a5770b2084ada4e7b99b5700e0f65cc65ca5bf3f35c3f06e260a4829fec8f606e89d135a52393ce2b803af0
@@ -8,3 +8,12 @@ Style/FileName:
8
8
  Exclude:
9
9
  - bin/*
10
10
  - Rakefile
11
+
12
+ Metrics/BlockLength:
13
+ Exclude:
14
+ - 'spec/**/*'
15
+
16
+ #- cocoapods-keys support for Ruby 2.0.0 -------------------------------------#
17
+
18
+ Security/YAMLLoad:
19
+ Enabled: false
@@ -37,7 +37,7 @@ SingleLineBlockParams:
37
37
  Encoding:
38
38
  Enabled: false
39
39
 
40
- Style/MultilineOperationIndentation:
40
+ Layout/MultilineOperationIndentation:
41
41
  EnforcedStyle: indented
42
42
 
43
43
  # Clashes with CLAide Command#validate!
@@ -1,5 +1,9 @@
1
1
  ## Master
2
2
 
3
+ ## 2.0.1
4
+
5
+ * Handles more CI types [m-ruhl]
6
+
3
7
  ## 2.0.0
4
8
 
5
9
  * Handles casing correctly in generated key names [breaking] [marcelofabri]
data/Gemfile CHANGED
@@ -3,4 +3,5 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in cocoapods-keys.gemspec
4
4
  gemspec
5
5
 
6
- gem 'cocoapods', '1.0.0.beta.6'
6
+ gem 'cocoapods', '1.0.0.beta.6'
7
+ gem 'activesupport', '< 5'
@@ -1,24 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-keys (1.7.0)
4
+ cocoapods-keys (2.0.1)
5
5
  dotenv
6
6
  osx_keychain
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
+ CFPropertyList (2.3.5)
11
12
  RubyInline (3.12.4)
12
13
  ZenTest (~> 4.3)
13
- ZenTest (4.11.0)
14
- activesupport (4.2.6)
14
+ ZenTest (4.11.1)
15
+ activesupport (4.2.9)
15
16
  i18n (~> 0.7)
16
- json (~> 1.7, >= 1.7.7)
17
17
  minitest (~> 5.1)
18
18
  thread_safe (~> 0.3, >= 0.3.4)
19
19
  tzinfo (~> 1.1)
20
- ast (2.2.0)
21
- claide (1.0.0.beta.3)
20
+ ast (2.3.0)
21
+ claide (1.0.2)
22
22
  cocoapods (1.0.0.beta.6)
23
23
  activesupport (>= 4.0.2)
24
24
  claide (>= 1.0.0.beta.3, < 2.0)
@@ -40,68 +40,74 @@ GEM
40
40
  activesupport (>= 4.0.2)
41
41
  fuzzy_match (~> 2.0.4)
42
42
  nap (~> 1.0)
43
- cocoapods-deintegrate (1.0.0.beta.1)
44
- cocoapods-downloader (1.0.0.beta.2)
45
- cocoapods-plugins (1.0.0.beta.1)
43
+ cocoapods-deintegrate (1.0.1)
44
+ cocoapods-downloader (1.1.3)
45
+ cocoapods-plugins (1.0.0)
46
46
  nap
47
- cocoapods-search (1.0.0.beta.1)
48
- cocoapods-stats (1.0.0.beta.3)
49
- cocoapods-trunk (1.0.0.beta.2)
47
+ cocoapods-search (1.0.0)
48
+ cocoapods-stats (1.0.0)
49
+ cocoapods-trunk (1.2.0)
50
50
  nap (>= 0.8, < 2.0)
51
51
  netrc (= 0.7.8)
52
- cocoapods-try (1.0.0.beta.3)
52
+ cocoapods-try (1.1.0)
53
53
  colored (1.2)
54
- diff-lcs (1.2.5)
55
- dotenv (2.1.1)
54
+ colored2 (3.1.2)
55
+ diff-lcs (1.3)
56
+ dotenv (2.2.1)
56
57
  escape (0.0.4)
57
- fourflusher (0.3.0)
58
+ fourflusher (0.3.2)
58
59
  fuzzy_match (2.0.4)
59
- i18n (0.7.0)
60
- json (1.8.3)
61
- minitest (5.8.4)
62
- molinillo (0.4.4)
60
+ i18n (0.8.4)
61
+ minitest (5.10.2)
62
+ molinillo (0.4.5)
63
+ nanaimo (0.2.3)
63
64
  nap (1.1.0)
64
65
  netrc (0.7.8)
65
66
  osx_keychain (1.0.1)
66
67
  RubyInline (~> 3)
67
- parser (2.3.0.7)
68
+ parallel (1.11.2)
69
+ parser (2.4.0.0)
68
70
  ast (~> 2.2)
69
71
  powerpack (0.1.1)
70
- rainbow (2.1.0)
71
- rake (11.1.2)
72
- rspec (3.4.0)
73
- rspec-core (~> 3.4.0)
74
- rspec-expectations (~> 3.4.0)
75
- rspec-mocks (~> 3.4.0)
76
- rspec-core (3.4.4)
77
- rspec-support (~> 3.4.0)
78
- rspec-expectations (3.4.0)
72
+ rainbow (2.2.2)
73
+ rake
74
+ rake (12.0.0)
75
+ rspec (3.6.0)
76
+ rspec-core (~> 3.6.0)
77
+ rspec-expectations (~> 3.6.0)
78
+ rspec-mocks (~> 3.6.0)
79
+ rspec-core (3.6.0)
80
+ rspec-support (~> 3.6.0)
81
+ rspec-expectations (3.6.0)
79
82
  diff-lcs (>= 1.2.0, < 2.0)
80
- rspec-support (~> 3.4.0)
81
- rspec-mocks (3.4.1)
83
+ rspec-support (~> 3.6.0)
84
+ rspec-mocks (3.6.0)
82
85
  diff-lcs (>= 1.2.0, < 2.0)
83
- rspec-support (~> 3.4.0)
84
- rspec-support (3.4.1)
85
- rubocop (0.39.0)
86
- parser (>= 2.3.0.7, < 3.0)
86
+ rspec-support (~> 3.6.0)
87
+ rspec-support (3.6.0)
88
+ rubocop (0.49.1)
89
+ parallel (~> 1.10)
90
+ parser (>= 2.3.3.1, < 3.0)
87
91
  powerpack (~> 0.1)
88
92
  rainbow (>= 1.99.1, < 3.0)
89
93
  ruby-progressbar (~> 1.7)
90
94
  unicode-display_width (~> 1.0, >= 1.0.1)
91
- ruby-progressbar (1.7.5)
92
- thread_safe (0.3.5)
93
- tzinfo (1.2.2)
95
+ ruby-progressbar (1.8.1)
96
+ thread_safe (0.3.6)
97
+ tzinfo (1.2.3)
94
98
  thread_safe (~> 0.1)
95
- unicode-display_width (1.0.3)
96
- xcodeproj (1.0.0.beta.3)
97
- activesupport (>= 3)
98
- claide (>= 1.0.0.beta.1, < 2.0)
99
- colored (~> 1.2)
99
+ unicode-display_width (1.3.0)
100
+ xcodeproj (1.5.0)
101
+ CFPropertyList (~> 2.3.3)
102
+ claide (>= 1.0.2, < 2.0)
103
+ colored2 (~> 3.1)
104
+ nanaimo (~> 0.2.3)
100
105
 
101
106
  PLATFORMS
102
107
  ruby
103
108
 
104
109
  DEPENDENCIES
110
+ activesupport (< 5)
105
111
  bundler (~> 1.3)
106
112
  cocoapods (= 1.0.0.beta.6)
107
113
  cocoapods-keys!
@@ -110,4 +116,4 @@ DEPENDENCIES
110
116
  rubocop
111
117
 
112
118
  BUNDLED WITH
113
- 1.12.5
119
+ 1.15.4
@@ -1,3 +1,3 @@
1
1
  module CocoaPodsKeys
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.0.1'.freeze
3
3
  end
@@ -25,7 +25,7 @@ module CocoaPodsKeys
25
25
  if xcodeprojects.length == 1
26
26
  Pathname(xcodeprojects.first).basename('.xcodeproj')
27
27
  else
28
- error_message = (xcodeprojects.length > 1) ? 'found too many' : "couldn't find any"
28
+ error_message = xcodeprojects.length > 1 ? 'found too many' : "couldn't find any"
29
29
  projects = xcodeprojects.map(&:basename).join(' ')
30
30
  ui.puts 'CocoaPods-Keys ' + error_message + ' Xcode projects (' + projects + '). Please give a name for this project.'
31
31
 
@@ -10,8 +10,17 @@ module Pod
10
10
 
11
11
  self.description = <<-DESC
12
12
  Generates the obfuscated Objective-C h/m files using the current key values.
13
+
14
+ An optional operator can be done to force a project name.
13
15
  DESC
14
16
 
17
+ self.arguments = [CLAide::Argument.new('project_name', false)]
18
+
19
+ def initialize(argv)
20
+ @project_name = argv.shift_argument
21
+ super
22
+ end
23
+
15
24
  def run
16
25
  Dotenv.load
17
26
  keyring = get_current_keyring
@@ -30,7 +30,7 @@ module Pod
30
30
  UI.puts "Keys for #{keyring.name}"
31
31
  data = keyring.keychain_data
32
32
  data.each_with_index do |(key, value), index|
33
- prefix = (index == data.length - 1) ? ' └ ' : ' ├ '
33
+ prefix = index == data.length - 1 ? ' └ ' : ' ├ '
34
34
  UI.puts prefix + " #{key} - #{value}"
35
35
  end
36
36
  UI.puts
@@ -38,7 +38,9 @@ module Pod
38
38
 
39
39
  def display_keyring(keyring)
40
40
  UI.puts "#{keyring.name} - #{keyring.path}"
41
- if keyring.keys.length == 1
41
+ if keyring.keys.empty?
42
+ # Skip
43
+ elsif keyring.keys.length == 1
42
44
  UI.puts ' └ ' + keyring.keys[0]
43
45
  else
44
46
  UI.puts ' └ ' + keyring.keys[0...-1].join(' ') + ' & ' + keyring.keys[-1]
@@ -81,9 +81,9 @@ module Pod
81
81
 
82
82
  def matches(keys)
83
83
  if @key_name.include? '*'
84
- return keys.select { |e| e =~ create_regex(@key_name) }
84
+ keys.select { |e| e =~ create_regex(@key_name) }
85
85
  else
86
- return keys.select { |e| e == @key_name }
86
+ keys.select { |e| e == @key_name }
87
87
  end
88
88
  end
89
89
 
@@ -42,8 +42,8 @@ module CocoaPodsKeys
42
42
  # and prompt for their value if needed.
43
43
  keys.each do |key|
44
44
  unless keyring.keychain_has_key?(key)
45
- if ENV['CI']
46
- raise Informative, "CocoaPods-Keys could not find a key named: #{key}"
45
+ if ci?
46
+ raise Pod::Informative, "CocoaPods-Keys could not find a key named: #{key}"
47
47
  end
48
48
 
49
49
  unless has_shown_intro
@@ -71,7 +71,7 @@ module CocoaPodsKeys
71
71
  end
72
72
 
73
73
  def check_for_multiple_keyrings(project, current_dir)
74
- if !ENV['TRAVIS'] && !ENV['TEAMCITY_VERSION'] && !ENV['CIRCLECI']
74
+ unless ci?
75
75
  ui = Pod::UserInterface
76
76
  keyrings = KeyringLiberator.get_all_keyrings_named(project)
77
77
  if keyrings.count > 1
@@ -85,5 +85,12 @@ module CocoaPodsKeys
85
85
  end
86
86
  end
87
87
  end
88
+
89
+ def ci?
90
+ %w([JENKINS_HOME TRAVIS CIRCLECI CI TEAMCITY_VERSION GO_PIPELINE_NAME bamboo_buildKey GITLAB_CI XCS]).each do |current|
91
+ return true if ENV.key?(current)
92
+ end
93
+ false
94
+ end
88
95
  end
89
96
  end
@@ -53,10 +53,10 @@ describe 'CocoaPodsKeys functional tests' do
53
53
 
54
54
  it 'is able to export the correct keys from the command-line' do
55
55
  Dir.chdir(@tmpdir) do
56
- exported_keys = <<-EOS
57
- pod keys set KeyWithData "such-data" TestProject
58
- pod keys set AnotherKeyWithData "other-data" TestProject
59
- pod keys set UnusedKey "-" TestProject
56
+ exported_keys = <<-EOS.strip_heredoc
57
+ pod keys set KeyWithData "such-data" TestProject
58
+ pod keys set AnotherKeyWithData "other-data" TestProject
59
+ pod keys set UnusedKey "-" TestProject
60
60
  EOS
61
61
  expect(`pod keys export`.strip).to eq(exported_keys.strip)
62
62
  end
@@ -44,7 +44,7 @@ describe CocoaPodsKeys, '#plugin' do
44
44
  CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), {})
45
45
  end
46
46
 
47
- %w(target targets).each do |target_tag|
47
+ %w[target targets].each do |target_tag|
48
48
  context "with a non-existant target specified as a string in '#{target_tag}'" do
49
49
  it 'fails to assign the key to the tag' do
50
50
  expect(@podfile).not_to receive(:pod).with('Keys', anything)
@@ -84,7 +84,7 @@ describe CocoaPodsKeys, '#plugin' do
84
84
  end
85
85
  end
86
86
 
87
- %w(target targets).each do |target_tag|
87
+ %w[target targets].each do |target_tag|
88
88
  context "with a string specified in '#{target_tag}'" do
89
89
  it 'adds Keys to the target' do
90
90
  expect(@podfile).not_to receive(:pod).with('Keys', anything)
@@ -143,7 +143,7 @@ describe CocoaPodsKeys, '#plugin' do
143
143
  end
144
144
  end
145
145
 
146
- %w(target targets).each do |target_tag|
146
+ %w[target targets].each do |target_tag|
147
147
  context "with 'TargetA' specified as a string in '#{target_tag}'" do
148
148
  it 'adds Keys to Target A' do
149
149
  expect(@podfile).not_to receive(:pod).with('Keys', anything)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-keys
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-01-03 00:00:00.000000000 Z
12
+ date: 2018-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: osx_keychain
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  version: '0'
165
165
  requirements: []
166
166
  rubyforge_project:
167
- rubygems_version: 2.2.2
167
+ rubygems_version: 2.6.14
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: CocoaPods Keys will store sensitive data in your Mac's keychain. Then on