airservice_build_tools 0.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ce82b0e155e892e5ee8e935b39ed0afa7a2d6b4d
4
+ data.tar.gz: 31088b6a57fff2bf255d784aad18e2ed31f63d97
5
+ SHA512:
6
+ metadata.gz: 5c1f55182974c8b971d2ac94a039858e6f523498f36f23d072b02e73a078c0cdc55d8668eeb6077fb4d2a741cdf773a4f37f4fedc714e6eb951ce60619acc024
7
+ data.tar.gz: e1ca297b0a616645445c0f38c6289741fc7005e4beef93e2675dfd0bb212db14c3894f3d4abeed76860a7efe1add9e08fff4b6b4f3146303349b7bab82cd25c6
data/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ InstalledFiles
7
+ lib/bundler/man
8
+ pkg
9
+ rdoc
10
+ spec/reports
11
+ test/tmp
12
+ test/version_tmp
13
+ tmp
14
+
15
+ # YARD artifacts
16
+ .yardoc
17
+ _yardoc
18
+ doc/
19
+
20
+ # Rubymine
21
+ .idea
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ airservice_build_tools
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.0.0
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,55 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ airservice_build_tools (0.0.1)
5
+ plist
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ coveralls (0.7.0)
11
+ multi_json (~> 1.3)
12
+ rest-client
13
+ simplecov (>= 0.7)
14
+ term-ansicolor
15
+ thor
16
+ diff-lcs (1.2.5)
17
+ docile (1.1.3)
18
+ emoji-rspec (1.0.1)
19
+ rspec-core (>= 2.10)
20
+ fakefs (0.5.0)
21
+ mime-types (2.1)
22
+ multi_json (1.8.4)
23
+ plist (3.1.0)
24
+ rake (10.1.1)
25
+ rest-client (1.6.7)
26
+ mime-types (>= 1.16)
27
+ rspec (2.14.1)
28
+ rspec-core (~> 2.14.0)
29
+ rspec-expectations (~> 2.14.0)
30
+ rspec-mocks (~> 2.14.0)
31
+ rspec-core (2.14.8)
32
+ rspec-expectations (2.14.5)
33
+ diff-lcs (>= 1.1.3, < 2.0)
34
+ rspec-mocks (2.14.6)
35
+ simplecov (0.8.2)
36
+ docile (~> 1.1.0)
37
+ multi_json
38
+ simplecov-html (~> 0.8.0)
39
+ simplecov-html (0.8.0)
40
+ term-ansicolor (1.3.0)
41
+ tins (~> 1.0)
42
+ thor (0.18.1)
43
+ tins (1.0.0)
44
+
45
+ PLATFORMS
46
+ ruby
47
+
48
+ DEPENDENCIES
49
+ airservice_build_tools!
50
+ bundler (~> 1.3)
51
+ coveralls
52
+ emoji-rspec
53
+ fakefs
54
+ rake
55
+ rspec
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 AirService
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ build_tools
2
+ ===========
3
+
4
+ A bunch of build helpers we use in our CI process
@@ -0,0 +1,28 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'airservice/build_tools/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "airservice_build_tools"
7
+ spec.version = AirService::BuildTools::VERSION
8
+ spec.authors = ["AirService"]
9
+ spec.email = ["devs@airservice.com"]
10
+ spec.description = %q{Build tools}
11
+ spec.summary = %q{Build toolls}
12
+ spec.homepage = "http://github.com/airservice/build_tools"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_dependency 'plist'
21
+
22
+ spec.add_development_dependency 'rspec'
23
+ spec.add_development_dependency "bundler", "~> 1.3"
24
+ spec.add_development_dependency "rake"
25
+ spec.add_development_dependency 'emoji-rspec'
26
+ spec.add_development_dependency 'coveralls'
27
+ spec.add_development_dependency 'fakefs'
28
+ end
@@ -0,0 +1,24 @@
1
+ require 'plist'
2
+ require 'airservice/build_tools'
3
+ module AirService
4
+ module BuildTools
5
+ module ObjC
6
+ include Logger
7
+ def update_plist_version(options={})
8
+ plist_file_path = options[:file_path]
9
+ raise 'Plist file path as file_path' unless plist_file_path
10
+ log "Opening plist #{plist_file_path}"
11
+ plist = Plist::parse_xml(plist_file_path)
12
+
13
+ build_version = options[:build_version]
14
+ plist['CFBundleVersion'] = build_version
15
+ version = options[:version]
16
+ plist['CFBundleShortVersionString'] = version
17
+
18
+ log "Updating plist to #{plist.inspect}"
19
+ new_plist_content = plist.to_plist
20
+ File.open(plist_file_path, 'w+') { |f| f.write(new_plist_content) }
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,5 @@
1
+ module AirService
2
+ module BuildTools
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,9 @@
1
+ module AirService
2
+ module BuildTools
3
+ module Logger
4
+ def log(value)
5
+ puts value
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,32 @@
1
+ require 'spec_helper'
2
+ require 'airservice/build_tools/obj_c'
3
+
4
+ describe AirService::BuildTools::ObjC do
5
+ include described_class
6
+ describe '#update_plist_version' do
7
+ include FakeFS::SpecHelpers
8
+ it 'raises error when file_path is not specified' do
9
+ expect{update_plist_version}.to raise_error(RuntimeError) { |error| expect(error.message).to include('file path')}
10
+ end
11
+ it 'adds version and build number in plist' do
12
+ plist_file = <<-plist
13
+ <?xml version="1.0" encoding="UTF-8"?>
14
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
15
+ <plist version="1.0">
16
+ <dict>
17
+ <key>CFBundleDevelopmentRegion</key>
18
+ <string>en</string>
19
+ </dict>
20
+ </plist>
21
+ plist
22
+ file_path = 'test_plist.plist'
23
+ File.open(file_path, 'w+') {|f| f.write( plist_file) }
24
+
25
+ update_plist_version(file_path: file_path, build_version: '345', version: '1.1.345')
26
+
27
+ actual = Plist::parse_xml(file_path)
28
+ actual['CFBundleVersion'].should eq('345')
29
+ actual['CFBundleShortVersionString'].should eq('1.1.345')
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,18 @@
1
+ require 'fakefs/spec_helpers'
2
+ RSpec.configure do |config|
3
+ config.treat_symbols_as_metadata_keys_with_true_values = true
4
+ config.run_all_when_everything_filtered = true
5
+ config.filter_run :focus
6
+
7
+ config.order = 'random'
8
+
9
+ config.filter_run_excluding :integration
10
+ if ENV['CI']
11
+ config.filter_run_excluding :local
12
+ require 'coveralls'
13
+ Coveralls.wear!('test_frameworks')
14
+ elsif ENV['COVERAGE']
15
+ require 'simplecov'
16
+ SimpleCov.start('test_frameworks')
17
+ end
18
+ end
metadata ADDED
@@ -0,0 +1,157 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: airservice_build_tools
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - AirService
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-03-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: plist
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '1.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: emoji-rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: coveralls
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: fakefs
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: Build tools
112
+ email:
113
+ - devs@airservice.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - .gitignore
119
+ - .ruby-gemset
120
+ - .ruby-version
121
+ - Gemfile
122
+ - Gemfile.lock
123
+ - LICENSE
124
+ - README.md
125
+ - airservice_build_tools.gemspec
126
+ - lib/airservice/build_tools.rb
127
+ - lib/airservice/build_tools/obj_c.rb
128
+ - lib/airservice/build_tools/version.rb
129
+ - spec/airservice/build_tools/obj_c_spec.rb
130
+ - spec/spec_helper.rb
131
+ homepage: http://github.com/airservice/build_tools
132
+ licenses:
133
+ - MIT
134
+ metadata: {}
135
+ post_install_message:
136
+ rdoc_options: []
137
+ require_paths:
138
+ - lib
139
+ required_ruby_version: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - '>='
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
144
+ required_rubygems_version: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - '>='
147
+ - !ruby/object:Gem::Version
148
+ version: '0'
149
+ requirements: []
150
+ rubyforge_project:
151
+ rubygems_version: 2.1.11
152
+ signing_key:
153
+ specification_version: 4
154
+ summary: Build toolls
155
+ test_files:
156
+ - spec/airservice/build_tools/obj_c_spec.rb
157
+ - spec/spec_helper.rb