pod-synchronize 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.rspec +3 -0
- data/.simplecov +4 -0
- data/.travis.yml +3 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +67 -0
- data/LICENSE +22 -0
- data/README.md +73 -0
- data/Rakefile +5 -0
- data/bin/pod-synchronize +11 -0
- data/lib/updater/command.rb +23 -0
- data/lib/updater/configuration.rb +39 -0
- data/lib/updater/git.rb +40 -0
- data/lib/updater/pod.rb +27 -0
- data/lib/updater/specs.rb +30 -0
- data/lib/updater/synchronize.rb +87 -0
- data/lib/updater/version.rb +38 -0
- data/lib/updater.rb +7 -0
- data/pod-synchronize.gemspec +22 -0
- data/spec/configuration_spec.rb +60 -0
- data/spec/fixtures/config.yml +14 -0
- data/spec/fixtures/specs/NBNRealmBrowser/0.1.0/NBNRealmBrowser.podspec.json +26 -0
- data/spec/fixtures/specs/NBNRealmBrowser/0.2.0/NBNRealmBrowser.podspec.json +26 -0
- data/spec/fixtures/specs/NBNRealmBrowser/0.3.0/NBNRealmBrowser.podspec.json +26 -0
- data/spec/fixtures/specs/XNGAPIClient/0.1.0/XNGAPIClient.podspec.json +35 -0
- data/spec/fixtures/specs/XNGAPIClient/0.2.0/XNGAPIClient.podspec.json +36 -0
- data/spec/fixtures/specs/XNGAPIClient/0.2.1/XNGAPIClient.podspec.json +45 -0
- data/spec/fixtures/specs/XNGAPIClient/0.2.2/XNGAPIClient.podspec.json +45 -0
- data/spec/fixtures/specs/XNGAPIClient/0.3.0/XNGAPIClient.podspec.json +45 -0
- data/spec/fixtures/specs/XNGAPIClient/0.3.1/XNGAPIClient.podspec.json +45 -0
- data/spec/fixtures/specs/XNGAPIClient/0.4.0/XNGAPIClient.podspec.json +45 -0
- data/spec/fixtures/specs/XNGAPIClient/1.0.0/XNGAPIClient.podspec.json +42 -0
- data/spec/fixtures/specs/XNGAPIClient/1.1.0/XNGAPIClient.podspec.json +42 -0
- data/spec/fixtures/specs/XNGAPIClient/1.1.1/XNGAPIClient.podspec.json +42 -0
- data/spec/fixtures/specs/XNGAPIClient/1.2.0/XNGAPIClient.podspec.json +42 -0
- data/spec/fixtures/specs/XNGOAuth1Client/0.0.1/XNGOAuth1Client.podspec.json +26 -0
- data/spec/fixtures/specs/XNGOAuth1Client/0.0.2/XNGOAuth1Client.podspec.json +26 -0
- data/spec/fixtures/specs/XNGOAuth1Client/1.0.0/XNGOAuth1Client.podspec.json +26 -0
- data/spec/fixtures/specs/XNGOAuth1Client/2.0.0/XNGOAuth1Client.podspec.json +26 -0
- data/spec/fixtures/specs/XNGOAuth1Client/2.0.1/XNGOAuth1Client.podspec.json +26 -0
- data/spec/fixtures/specs_other/NBNPhotoChooser/0.0.1/NBNPhotoChooser.podspec.json +25 -0
- data/spec/fixtures/specs_other/NBNPhotoChooser/0.0.2/NBNPhotoChooser.podspec.json +25 -0
- data/spec/fixtures/specs_other/NBNPhotoChooser/0.0.6/NBNPhotoChooser.podspec.json +25 -0
- data/spec/fixtures/specs_other/NBNPhotoChooser/0.1.0/NBNPhotoChooser.podspec.json +25 -0
- data/spec/fixtures/specs_other/NBNPhotoChooser/0.2.0/NBNPhotoChooser.podspec.json +25 -0
- data/spec/fixtures/specs_other/NBNPhotoChooser/0.2.1/NBNPhotoChooser.podspec.json +25 -0
- data/spec/git_spec.rb +60 -0
- data/spec/pod_spec.rb +54 -0
- data/spec/spec_helper.rb +102 -0
- data/spec/specs_spec.rb +51 -0
- data/spec/version_spec.rb +45 -0
- metadata +186 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
{
|
2
|
+
"name": "NBNPhotoChooser",
|
3
|
+
"version": "0.0.2",
|
4
|
+
"platforms": {
|
5
|
+
"ios": null
|
6
|
+
},
|
7
|
+
"summary": "NBNPhotoChooser is an example implementation of the Tumblr Photo Chooser.",
|
8
|
+
"homepage": "https://github.com/nerdishbynature/NBNPhotoChooser",
|
9
|
+
"license": {
|
10
|
+
"type": "MIT",
|
11
|
+
"file": "LICENSE"
|
12
|
+
},
|
13
|
+
"authors": {
|
14
|
+
"Piet Brauer": "piet@nerdishbynature.com"
|
15
|
+
},
|
16
|
+
"source": {
|
17
|
+
"git": "git://source.xing.com/ios-pods-external/NBNPhotoChooser.git",
|
18
|
+
"tag": "0.0.2"
|
19
|
+
},
|
20
|
+
"source_files": [
|
21
|
+
"Classes",
|
22
|
+
"Classes/**/*.{h,m}"
|
23
|
+
],
|
24
|
+
"requires_arc": true
|
25
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{
|
2
|
+
"name": "NBNPhotoChooser",
|
3
|
+
"version": "0.0.6",
|
4
|
+
"platforms": {
|
5
|
+
"ios": 6.0
|
6
|
+
},
|
7
|
+
"summary": "NBNPhotoChooser is an example implementation of the Tumblr Photo Chooser.",
|
8
|
+
"homepage": "https://github.com/nerdishbynature/NBNPhotoChooser",
|
9
|
+
"license": {
|
10
|
+
"type": "MIT",
|
11
|
+
"file": "LICENSE"
|
12
|
+
},
|
13
|
+
"authors": {
|
14
|
+
"Piet Brauer": "piet@nerdishbynature.com"
|
15
|
+
},
|
16
|
+
"source": {
|
17
|
+
"git": "git://source.xing.com/ios-pods-external/NBNPhotoChooser.git",
|
18
|
+
"tag": "0.0.6"
|
19
|
+
},
|
20
|
+
"source_files": "Classes/**/*.{h,m}",
|
21
|
+
"resource_bundles": {
|
22
|
+
"NBNPhotoChooser": "Assets/*"
|
23
|
+
},
|
24
|
+
"requires_arc": true
|
25
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{
|
2
|
+
"name": "NBNPhotoChooser",
|
3
|
+
"version": "0.1.0",
|
4
|
+
"platforms": {
|
5
|
+
"ios": 6.0
|
6
|
+
},
|
7
|
+
"summary": "NBNPhotoChooser is an example implementation of the Tumblr Photo Chooser.",
|
8
|
+
"homepage": "https://github.com/nerdishbynature/NBNPhotoChooser",
|
9
|
+
"license": {
|
10
|
+
"type": "MIT",
|
11
|
+
"file": "LICENSE"
|
12
|
+
},
|
13
|
+
"authors": {
|
14
|
+
"Piet Brauer": "piet@nerdishbynature.com"
|
15
|
+
},
|
16
|
+
"source": {
|
17
|
+
"git": "git://source.xing.com/ios-pods-external/NBNPhotoChooser.git",
|
18
|
+
"tag": "0.1.0"
|
19
|
+
},
|
20
|
+
"source_files": "Classes/**/*.{h,m}",
|
21
|
+
"resource_bundles": {
|
22
|
+
"NBNPhotoChooser": "Assets/*"
|
23
|
+
},
|
24
|
+
"requires_arc": true
|
25
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{
|
2
|
+
"name": "NBNPhotoChooser",
|
3
|
+
"version": "0.2.0",
|
4
|
+
"platforms": {
|
5
|
+
"ios": 7.0
|
6
|
+
},
|
7
|
+
"summary": "NBNPhotoChooser is an example implementation of the Tumblr Photo Chooser.",
|
8
|
+
"homepage": "https://github.com/nerdishbynature/NBNPhotoChooser",
|
9
|
+
"license": {
|
10
|
+
"type": "MIT",
|
11
|
+
"file": "LICENSE"
|
12
|
+
},
|
13
|
+
"authors": {
|
14
|
+
"Piet Brauer": "piet@nerdishbynature.com"
|
15
|
+
},
|
16
|
+
"source": {
|
17
|
+
"git": "git://source.xing.com/ios-pods-external/NBNPhotoChooser.git",
|
18
|
+
"tag": "0.2.0"
|
19
|
+
},
|
20
|
+
"source_files": "Classes/**/*.{h,m}",
|
21
|
+
"resource_bundles": {
|
22
|
+
"NBNPhotoChooser": "Assets/*"
|
23
|
+
},
|
24
|
+
"requires_arc": true
|
25
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{
|
2
|
+
"name": "NBNPhotoChooser",
|
3
|
+
"version": "0.2.1",
|
4
|
+
"platforms": {
|
5
|
+
"ios": 7.0
|
6
|
+
},
|
7
|
+
"summary": "NBNPhotoChooser is an example implementation of the Tumblr Photo Chooser.",
|
8
|
+
"homepage": "https://github.com/nerdishbynature/NBNPhotoChooser",
|
9
|
+
"license": {
|
10
|
+
"type": "MIT",
|
11
|
+
"file": "LICENSE"
|
12
|
+
},
|
13
|
+
"authors": {
|
14
|
+
"Piet Brauer": "piet@nerdishbynature.com"
|
15
|
+
},
|
16
|
+
"source": {
|
17
|
+
"git": "git://source.xing.com/ios-pods-external/NBNPhotoChooser.git",
|
18
|
+
"tag": "0.2.1"
|
19
|
+
},
|
20
|
+
"source_files": "Classes/**/*.{h,m}",
|
21
|
+
"resource_bundles": {
|
22
|
+
"NBNPhotoChooser": "Assets/*"
|
23
|
+
},
|
24
|
+
"requires_arc": true
|
25
|
+
}
|
data/spec/git_spec.rb
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
describe Git do
|
2
|
+
describe Specs do
|
3
|
+
|
4
|
+
before :all do
|
5
|
+
@specs_path = File.join('spec', 'fixtures', 'specs')
|
6
|
+
@specs = Specs.new(path: @specs_path)
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "::commit" do
|
10
|
+
it 'commits with a message' do
|
11
|
+
class_under_test = @specs.git
|
12
|
+
|
13
|
+
message = "Become a programmer, they said. It'll be fun, they said."
|
14
|
+
expect(class_under_test).to receive(:system).with("git add --all")
|
15
|
+
expect(class_under_test).to receive(:system).with("git commit -m '#{message}'")
|
16
|
+
class_under_test.commit(message: message)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe "::create_github_repo" do
|
21
|
+
it 'creates a github repo' do
|
22
|
+
class_under_test = @specs.git
|
23
|
+
expect(class_under_test).to receive(:system).with("curl https://github.com/api/v3/orgs/ios-pods-external/repos?access_token=123 -d '{\"name\":\"mega-pod\"}'")
|
24
|
+
class_under_test.create_github_repo(
|
25
|
+
access_token: '123',
|
26
|
+
org: 'ios-pods-external',
|
27
|
+
name: 'mega-pod',
|
28
|
+
endpoint: 'https://github.com/api/v3'
|
29
|
+
)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe "::push" do
|
34
|
+
it 'push on default remote "origin master"' do
|
35
|
+
class_under_test = @specs.git
|
36
|
+
expect(class_under_test).to receive(:system).with("git push origin master")
|
37
|
+
class_under_test.push
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'push on custom remote "production"' do
|
41
|
+
class_under_test = @specs.git
|
42
|
+
expect(class_under_test).to receive(:system).with("git push production")
|
43
|
+
class_under_test.push(remote: 'production')
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'push on custom remote with options' do
|
47
|
+
class_under_test = @specs.git
|
48
|
+
expect(class_under_test).to receive(:system).with("git push develop --force")
|
49
|
+
class_under_test.push(remote: 'develop', options: '--force')
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'push on default remote with options' do
|
53
|
+
class_under_test = @specs.git
|
54
|
+
expect(class_under_test).to receive(:system).with("git push origin master --force")
|
55
|
+
class_under_test.push(options: '--force')
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
data/spec/pod_spec.rb
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
describe Pod do
|
2
|
+
before :all do
|
3
|
+
@path_to_podspecs_dir = File.join('spec', 'fixtures', 'specs', 'XNGAPIClient')
|
4
|
+
end
|
5
|
+
|
6
|
+
describe '::new' do
|
7
|
+
it 'init with podspec dir' do
|
8
|
+
class_under_test = Pod.new(path: @path_to_podspecs_dir)
|
9
|
+
expect(class_under_test.path).to eql(@path_to_podspecs_dir)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '#name' do
|
14
|
+
it 'gets the correct pod name' do
|
15
|
+
class_under_test = Pod.new(path: @path_to_podspecs_dir)
|
16
|
+
expect(class_under_test.name).to eql("XNGAPIClient")
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '#source' do
|
21
|
+
it 'gets the correct source url' do
|
22
|
+
class_under_test = Pod.new(path: @path_to_podspecs_dir)
|
23
|
+
expect(class_under_test.git_source).to eql("https://github.com/xing/XNGAPIClient.git")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '#versions' do
|
28
|
+
it 'should return all versions for that pod' do
|
29
|
+
class_under_test = Pod.new(path: @path_to_podspecs_dir)
|
30
|
+
versions = class_under_test.versions
|
31
|
+
expected_versions = [
|
32
|
+
'0.1.0', '0.2.0', '0.2.1', '0.2.2', '0.3.0', '0.3.1',
|
33
|
+
'0.4.0', '1.0.0', '1.1.0', '1.1.1', '1.2.0'
|
34
|
+
]
|
35
|
+
|
36
|
+
actual_versions = versions.map(&:version)
|
37
|
+
expect(actual_versions.sort).to eql(expected_versions.sort)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe '#git' do
|
42
|
+
it 'should add the pod path as the default git path' do
|
43
|
+
class_under_test = Pod.new(path: @path_to_podspecs_dir)
|
44
|
+
expect(class_under_test.git.path).to eql(@path_to_podspecs_dir)
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'should be able to set a custom path' do
|
48
|
+
class_under_test = Pod.new(path: @path_to_podspecs_dir)
|
49
|
+
expected_path = "./some/other/path"
|
50
|
+
class_under_test.git.path = expected_path
|
51
|
+
expect(class_under_test.git.path).to eql(expected_path)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
require 'coveralls'
|
2
|
+
Coveralls.wear!
|
3
|
+
|
4
|
+
require 'pathname'
|
5
|
+
ROOT = Pathname.new(File.expand_path('../../', __FILE__))
|
6
|
+
$:.unshift((ROOT + 'lib').to_s)
|
7
|
+
$:.unshift((ROOT + 'spec').to_s)
|
8
|
+
|
9
|
+
require 'bundler/setup'
|
10
|
+
require 'updater'
|
11
|
+
|
12
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
13
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
14
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
15
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
16
|
+
# files.
|
17
|
+
#
|
18
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
19
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
20
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
21
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
22
|
+
# a separate helper file that requires the additional dependencies and performs
|
23
|
+
# the additional setup, and require it from the spec files that actually need
|
24
|
+
# it.
|
25
|
+
#
|
26
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
27
|
+
# users commonly want.
|
28
|
+
#
|
29
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
30
|
+
RSpec.configure do |config|
|
31
|
+
# rspec-expectations config goes here. You can use an alternate
|
32
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
33
|
+
# assertions if you prefer.
|
34
|
+
config.expect_with :rspec do |expectations|
|
35
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
36
|
+
# and `failure_message` of custom matchers include text for helper methods
|
37
|
+
# defined using `chain`, e.g.:
|
38
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
39
|
+
# # => "be bigger than 2 and smaller than 4"
|
40
|
+
# ...rather than:
|
41
|
+
# # => "be bigger than 2"
|
42
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
43
|
+
end
|
44
|
+
|
45
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
46
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
47
|
+
config.mock_with :rspec do |mocks|
|
48
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
49
|
+
# a real object. This is generally recommended, and will default to
|
50
|
+
# `true` in RSpec 4.
|
51
|
+
mocks.verify_partial_doubles = true
|
52
|
+
end
|
53
|
+
|
54
|
+
# The settings below are suggested to provide a good initial experience
|
55
|
+
# with RSpec, but feel free to customize to your heart's content.
|
56
|
+
=begin
|
57
|
+
# These two settings work together to allow you to limit a spec run
|
58
|
+
# to individual examples or groups you care about by tagging them with
|
59
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
60
|
+
# get run.
|
61
|
+
config.filter_run :focus
|
62
|
+
config.run_all_when_everything_filtered = true
|
63
|
+
|
64
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
65
|
+
# recommended. For more details, see:
|
66
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
67
|
+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
68
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
69
|
+
config.disable_monkey_patching!
|
70
|
+
|
71
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
72
|
+
# be too noisy due to issues in dependencies.
|
73
|
+
config.warnings = true
|
74
|
+
|
75
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
76
|
+
# file, and it's useful to allow more verbose output when running an
|
77
|
+
# individual spec file.
|
78
|
+
if config.files_to_run.one?
|
79
|
+
# Use the documentation formatter for detailed output,
|
80
|
+
# unless a formatter has already been configured
|
81
|
+
# (e.g. via a command-line flag).
|
82
|
+
config.default_formatter = 'doc'
|
83
|
+
end
|
84
|
+
|
85
|
+
# Print the 10 slowest examples and example groups at the
|
86
|
+
# end of the spec run, to help surface which specs are running
|
87
|
+
# particularly slow.
|
88
|
+
config.profile_examples = 10
|
89
|
+
|
90
|
+
# Run specs in random order to surface order dependencies. If you find an
|
91
|
+
# order dependency and want to debug it, you can fix the order by providing
|
92
|
+
# the seed, which is printed after each run.
|
93
|
+
# --seed 1234
|
94
|
+
config.order = :random
|
95
|
+
|
96
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
97
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
98
|
+
# test failures related to randomization by passing the same `--seed` value
|
99
|
+
# as the one that triggered the failure.
|
100
|
+
Kernel.srand config.seed
|
101
|
+
=end
|
102
|
+
end
|
data/spec/specs_spec.rb
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
describe Specs do
|
2
|
+
|
3
|
+
before :all do
|
4
|
+
@specs_path = File.join('spec', 'fixtures', 'specs')
|
5
|
+
@other_specs_path = File.join('spec', 'fixtures', 'specs_other')
|
6
|
+
end
|
7
|
+
|
8
|
+
describe '::new' do
|
9
|
+
it 'should init with a path' do
|
10
|
+
class_under_test = Specs.new(path: @specs_path)
|
11
|
+
expect(class_under_test.path).to eql(@specs_path)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '#pods' do
|
16
|
+
it 'should fetch all pods' do
|
17
|
+
class_under_test = Specs.new(path: @specs_path)
|
18
|
+
expect(class_under_test.pods.count).to eql(3)
|
19
|
+
expect(class_under_test.pods.map(&:name)).to eql(['NBNRealmBrowser', 'XNGAPIClient', 'XNGOAuth1Client'])
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'should fetch 1 pod from whitelist' do
|
23
|
+
class_under_test = Specs.new(path: @specs_path, whitelist: ['XNGAPIClient'])
|
24
|
+
expect(class_under_test.pods.count).to eql(1)
|
25
|
+
expect(class_under_test.pods.map(&:name)).to eql(['XNGAPIClient'])
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'should fetch 2 pods from whitelist' do
|
29
|
+
class_under_test = Specs.new(path: @specs_path, whitelist: ['XNGAPIClient', 'XNGOAuth1Client'])
|
30
|
+
expect(class_under_test.pods.count).to eql(2)
|
31
|
+
expect(class_under_test.pods.map(&:name)).to eql(['XNGAPIClient', 'XNGOAuth1Client'])
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'should fetch no pods that are not on the whitelist' do
|
35
|
+
class_under_test = Specs.new(path: @specs_path, whitelist: ['PodThatDoesntExist'])
|
36
|
+
expect(class_under_test.pods.count).to eql(0)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe '#merge_pods' do
|
41
|
+
it 'should add all pods from one spec to another' do
|
42
|
+
specs = Specs.new(path: @specs_path)
|
43
|
+
other_specs = Specs.new(path: @other_specs_path, whitelist: ['NBNPhotoChooser'])
|
44
|
+
expected_path = File.join(@other_specs_path, 'NBNPhotoChooser')
|
45
|
+
|
46
|
+
expect(FileUtils).to receive(:cp_r).with(expected_path, specs.path)
|
47
|
+
specs.merge_pods(other_specs.pods)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
describe Version do
|
2
|
+
before :all do
|
3
|
+
@path_to_version_dir = File.join('spec', 'fixtures', 'specs', 'XNGAPIClient', '1.2.0')
|
4
|
+
end
|
5
|
+
|
6
|
+
describe '::new' do
|
7
|
+
it 'initializes with a versions dir' do
|
8
|
+
version = Version.new(path: @path_to_version_dir)
|
9
|
+
|
10
|
+
expect(version.path).to eql(@path_to_version_dir)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe '#podspec_path' do
|
15
|
+
it 'gets the corred podspec filepath' do
|
16
|
+
version = Version.new(path: @path_to_version_dir)
|
17
|
+
expected_path = File.join(@path_to_version_dir, 'XNGAPIClient.podspec.json')
|
18
|
+
actual_path = version.send(:podspec_path)
|
19
|
+
expect(actual_path).to eql(expected_path)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe '#contents' do
|
24
|
+
it 'gets the fetches the podspec correctly' do
|
25
|
+
version = Version.new(path: @path_to_version_dir)
|
26
|
+
expected_contents = {
|
27
|
+
"name"=>"XNGAPIClient",
|
28
|
+
"version"=>"1.2.0",
|
29
|
+
"license"=>"MIT",
|
30
|
+
"platforms"=>{"ios"=>"6.0",
|
31
|
+
"osx"=>"10.8"}, "summary"=>"The official Objective-C client for the XING API",
|
32
|
+
"authors"=>{"XING iOS Team"=>"iphonedev@xing.com"}, "source"=>{"git"=>"https://github.com/xing/XNGAPIClient.git",
|
33
|
+
"tag"=>"1.2.0"}, "requires_arc"=>true, "homepage"=>"https://www.xing.com",
|
34
|
+
"default_subspecs"=>"Core",
|
35
|
+
"subspecs"=>[{"name"=>"Core",
|
36
|
+
"source_files"=>"XNGAPIClient/*.{h,m}",
|
37
|
+
"dependencies"=>{"SSKeychain"=>["~> 1.2.0"], "XNGOAuth1Client"=>["~> 2.0.0"]}, "frameworks"=>["Security",
|
38
|
+
"SystemConfiguration"]}, {"name"=>"NSDictionary-Typecheck",
|
39
|
+
"source_files"=>"XNGAPIClient/NSDictionary+Typecheck.{h,m}"}]
|
40
|
+
}
|
41
|
+
|
42
|
+
expect(version.contents).to eql(expected_contents)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
metadata
ADDED
@@ -0,0 +1,186 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pod-synchronize
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Matthias Männich
|
8
|
+
- Piet Brauer
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-05-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: claide
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 0.8.1
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 0.8.1
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: colored
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '1.2'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '1.2'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: bundler
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.7'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.7'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rake
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '10.0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '10.0'
|
70
|
+
description: Synchronizes the public CocoaPods Specs repo with your internal mirror.
|
71
|
+
email:
|
72
|
+
- matthias.maennich@xing.com
|
73
|
+
- piet.brauer@xing.com
|
74
|
+
executables:
|
75
|
+
- pod-synchronize
|
76
|
+
extensions: []
|
77
|
+
extra_rdoc_files: []
|
78
|
+
files:
|
79
|
+
- ".gitignore"
|
80
|
+
- ".rspec"
|
81
|
+
- ".simplecov"
|
82
|
+
- ".travis.yml"
|
83
|
+
- Gemfile
|
84
|
+
- Gemfile.lock
|
85
|
+
- LICENSE
|
86
|
+
- README.md
|
87
|
+
- Rakefile
|
88
|
+
- bin/pod-synchronize
|
89
|
+
- lib/updater.rb
|
90
|
+
- lib/updater/command.rb
|
91
|
+
- lib/updater/configuration.rb
|
92
|
+
- lib/updater/git.rb
|
93
|
+
- lib/updater/pod.rb
|
94
|
+
- lib/updater/specs.rb
|
95
|
+
- lib/updater/synchronize.rb
|
96
|
+
- lib/updater/version.rb
|
97
|
+
- pod-synchronize.gemspec
|
98
|
+
- spec/configuration_spec.rb
|
99
|
+
- spec/fixtures/config.yml
|
100
|
+
- spec/fixtures/specs/NBNRealmBrowser/0.1.0/NBNRealmBrowser.podspec.json
|
101
|
+
- spec/fixtures/specs/NBNRealmBrowser/0.2.0/NBNRealmBrowser.podspec.json
|
102
|
+
- spec/fixtures/specs/NBNRealmBrowser/0.3.0/NBNRealmBrowser.podspec.json
|
103
|
+
- spec/fixtures/specs/XNGAPIClient/0.1.0/XNGAPIClient.podspec.json
|
104
|
+
- spec/fixtures/specs/XNGAPIClient/0.2.0/XNGAPIClient.podspec.json
|
105
|
+
- spec/fixtures/specs/XNGAPIClient/0.2.1/XNGAPIClient.podspec.json
|
106
|
+
- spec/fixtures/specs/XNGAPIClient/0.2.2/XNGAPIClient.podspec.json
|
107
|
+
- spec/fixtures/specs/XNGAPIClient/0.3.0/XNGAPIClient.podspec.json
|
108
|
+
- spec/fixtures/specs/XNGAPIClient/0.3.1/XNGAPIClient.podspec.json
|
109
|
+
- spec/fixtures/specs/XNGAPIClient/0.4.0/XNGAPIClient.podspec.json
|
110
|
+
- spec/fixtures/specs/XNGAPIClient/1.0.0/XNGAPIClient.podspec.json
|
111
|
+
- spec/fixtures/specs/XNGAPIClient/1.1.0/XNGAPIClient.podspec.json
|
112
|
+
- spec/fixtures/specs/XNGAPIClient/1.1.1/XNGAPIClient.podspec.json
|
113
|
+
- spec/fixtures/specs/XNGAPIClient/1.2.0/XNGAPIClient.podspec.json
|
114
|
+
- spec/fixtures/specs/XNGOAuth1Client/0.0.1/XNGOAuth1Client.podspec.json
|
115
|
+
- spec/fixtures/specs/XNGOAuth1Client/0.0.2/XNGOAuth1Client.podspec.json
|
116
|
+
- spec/fixtures/specs/XNGOAuth1Client/1.0.0/XNGOAuth1Client.podspec.json
|
117
|
+
- spec/fixtures/specs/XNGOAuth1Client/2.0.0/XNGOAuth1Client.podspec.json
|
118
|
+
- spec/fixtures/specs/XNGOAuth1Client/2.0.1/XNGOAuth1Client.podspec.json
|
119
|
+
- spec/fixtures/specs_other/NBNPhotoChooser/0.0.1/NBNPhotoChooser.podspec.json
|
120
|
+
- spec/fixtures/specs_other/NBNPhotoChooser/0.0.2/NBNPhotoChooser.podspec.json
|
121
|
+
- spec/fixtures/specs_other/NBNPhotoChooser/0.0.6/NBNPhotoChooser.podspec.json
|
122
|
+
- spec/fixtures/specs_other/NBNPhotoChooser/0.1.0/NBNPhotoChooser.podspec.json
|
123
|
+
- spec/fixtures/specs_other/NBNPhotoChooser/0.2.0/NBNPhotoChooser.podspec.json
|
124
|
+
- spec/fixtures/specs_other/NBNPhotoChooser/0.2.1/NBNPhotoChooser.podspec.json
|
125
|
+
- spec/git_spec.rb
|
126
|
+
- spec/pod_spec.rb
|
127
|
+
- spec/spec_helper.rb
|
128
|
+
- spec/specs_spec.rb
|
129
|
+
- spec/version_spec.rb
|
130
|
+
homepage: https://github.com/xing/XNGPodsSynchronizer
|
131
|
+
licenses:
|
132
|
+
- MIT
|
133
|
+
metadata: {}
|
134
|
+
post_install_message:
|
135
|
+
rdoc_options: []
|
136
|
+
require_paths:
|
137
|
+
- lib
|
138
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
|
+
requirements:
|
145
|
+
- - ">="
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '0'
|
148
|
+
requirements: []
|
149
|
+
rubyforge_project:
|
150
|
+
rubygems_version: 2.4.5
|
151
|
+
signing_key:
|
152
|
+
specification_version: 4
|
153
|
+
summary: Mirrors CocoaPods specs
|
154
|
+
test_files:
|
155
|
+
- spec/configuration_spec.rb
|
156
|
+
- spec/fixtures/config.yml
|
157
|
+
- spec/fixtures/specs/NBNRealmBrowser/0.1.0/NBNRealmBrowser.podspec.json
|
158
|
+
- spec/fixtures/specs/NBNRealmBrowser/0.2.0/NBNRealmBrowser.podspec.json
|
159
|
+
- spec/fixtures/specs/NBNRealmBrowser/0.3.0/NBNRealmBrowser.podspec.json
|
160
|
+
- spec/fixtures/specs/XNGAPIClient/0.1.0/XNGAPIClient.podspec.json
|
161
|
+
- spec/fixtures/specs/XNGAPIClient/0.2.0/XNGAPIClient.podspec.json
|
162
|
+
- spec/fixtures/specs/XNGAPIClient/0.2.1/XNGAPIClient.podspec.json
|
163
|
+
- spec/fixtures/specs/XNGAPIClient/0.2.2/XNGAPIClient.podspec.json
|
164
|
+
- spec/fixtures/specs/XNGAPIClient/0.3.0/XNGAPIClient.podspec.json
|
165
|
+
- spec/fixtures/specs/XNGAPIClient/0.3.1/XNGAPIClient.podspec.json
|
166
|
+
- spec/fixtures/specs/XNGAPIClient/0.4.0/XNGAPIClient.podspec.json
|
167
|
+
- spec/fixtures/specs/XNGAPIClient/1.0.0/XNGAPIClient.podspec.json
|
168
|
+
- spec/fixtures/specs/XNGAPIClient/1.1.0/XNGAPIClient.podspec.json
|
169
|
+
- spec/fixtures/specs/XNGAPIClient/1.1.1/XNGAPIClient.podspec.json
|
170
|
+
- spec/fixtures/specs/XNGAPIClient/1.2.0/XNGAPIClient.podspec.json
|
171
|
+
- spec/fixtures/specs/XNGOAuth1Client/0.0.1/XNGOAuth1Client.podspec.json
|
172
|
+
- spec/fixtures/specs/XNGOAuth1Client/0.0.2/XNGOAuth1Client.podspec.json
|
173
|
+
- spec/fixtures/specs/XNGOAuth1Client/1.0.0/XNGOAuth1Client.podspec.json
|
174
|
+
- spec/fixtures/specs/XNGOAuth1Client/2.0.0/XNGOAuth1Client.podspec.json
|
175
|
+
- spec/fixtures/specs/XNGOAuth1Client/2.0.1/XNGOAuth1Client.podspec.json
|
176
|
+
- spec/fixtures/specs_other/NBNPhotoChooser/0.0.1/NBNPhotoChooser.podspec.json
|
177
|
+
- spec/fixtures/specs_other/NBNPhotoChooser/0.0.2/NBNPhotoChooser.podspec.json
|
178
|
+
- spec/fixtures/specs_other/NBNPhotoChooser/0.0.6/NBNPhotoChooser.podspec.json
|
179
|
+
- spec/fixtures/specs_other/NBNPhotoChooser/0.1.0/NBNPhotoChooser.podspec.json
|
180
|
+
- spec/fixtures/specs_other/NBNPhotoChooser/0.2.0/NBNPhotoChooser.podspec.json
|
181
|
+
- spec/fixtures/specs_other/NBNPhotoChooser/0.2.1/NBNPhotoChooser.podspec.json
|
182
|
+
- spec/git_spec.rb
|
183
|
+
- spec/pod_spec.rb
|
184
|
+
- spec/spec_helper.rb
|
185
|
+
- spec/specs_spec.rb
|
186
|
+
- spec/version_spec.rb
|