ambient-xcode 0.3.0 → 0.4.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: 74297d6847b0d837aeb70f2f86eecf4ff2644f6e
4
- data.tar.gz: 8b4450eab0effc1c41ddcebc70c350d0aa9b05c7
3
+ metadata.gz: 4aa28492d2fc79beba415905f23fa9c2722ad2b4
4
+ data.tar.gz: 7248bebe4500754766259c4b62aeab11c557523b
5
5
  SHA512:
6
- metadata.gz: 079fe3f096c467c9f7a35423cec8b13b14e601e88d14ee418987deac1fcadf9443ce3dd559fa257c831d90edaea443431344b20611e5f62b480ca49376dd74cc
7
- data.tar.gz: 329c5495cf88b45dc37fb8c7078669ffc08c2da508c9cbf84552daa326835c222c94cb1acb61a63b213a701ca103d8c4cabefd21cf7c907e05cfc1b28b01208e
6
+ metadata.gz: 85f740558e295eef751f7f6733e22e25cf3c11940af934d181f45b91098eb84f0d8ee55da851d296c42fa6cf0b3ada174256fd4ca5ee91f260dbfea56b48ba68
7
+ data.tar.gz: 82c0d6752fb83e4575b387af0dc56fb8c46427966e7b391dcd2f71bc58567d9f5db3d75b3805d8266515a19bed96521592e6f878fb96e8cf4c1e7d9be961a8a1
data/README.md CHANGED
@@ -53,6 +53,7 @@ If for any reason you want multiple Ambientfile, you can:
53
53
  use_settings_from 'Ambientfile'
54
54
 
55
55
  target "Babylon" do
56
+ development_team "341LABUM21"
56
57
  capability :apple_pay
57
58
  end
58
59
  ```
@@ -70,10 +71,9 @@ Notes
70
71
  Possible future features
71
72
  ========================
72
73
 
73
- - Defining capabilities (per target if possible... using `.entitlements` maybe)
74
+ - Automatic editing of `.entitlements`
74
75
  - Helper method to change build phases to default
75
76
  - Version number + build number
76
- - Team ID
77
77
  - Provisioning profiles from searching by name rather than storing a uuid (so it actually works across teams)
78
78
  - `Info.plist` definitions
79
79
  - ?
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = 'ambient-xcode'
6
- gem.version = '0.3.0'
6
+ gem.version = '0.4.0'
7
7
  gem.authors = ['Daniel Green']
8
8
  gem.email = ['dan2552@gmail.com']
9
9
  gem.description = %q{CLI for configuring Xcode projects from a Ruby file.}
@@ -0,0 +1,64 @@
1
+ PROJECT = "EmptySwiftProject"
2
+ PREFIX = "uk.danielgreen."
3
+
4
+ use_defaults_for_everything_not_specified_in_this_file!
5
+ enable_default_warnings!
6
+
7
+ option "ALWAYS_SEARCH_USER_PATHS", false
8
+ option "CLANG_CXX_LANGUAGE_STANDARD", "gnu++0x"
9
+ option "CLANG_CXX_LIBRARY", "libc++"
10
+ option "CLANG_ENABLE_MODULES", true
11
+ option "CLANG_ENABLE_OBJC_ARC", true
12
+
13
+ option "CODE_SIGN_IDENTITY[sdk=iphoneos*]", "iPhone Developer"
14
+ option "COPY_PHASE_STRIP", false
15
+
16
+ option "ENABLE_STRICT_OBJC_MSGSEND", true
17
+ option "GCC_C_LANGUAGE_STANDARD", "gnu99"
18
+ option "GCC_NO_COMMON_BLOCKS", true
19
+ option "SDKROOT", "iphoneos"
20
+ option "IPHONEOS_DEPLOYMENT_TARGET", "9.0"
21
+
22
+ scheme "Debug" do
23
+ option "DEBUG_INFORMATION_FORMAT", "dwarf"
24
+ option "ENABLE_TESTABILITY", true
25
+ option "MTL_ENABLE_DEBUG_INFO", true
26
+ option "ONLY_ACTIVE_ARCH", true
27
+ option "GCC_DYNAMIC_NO_PIC", false
28
+ option "GCC_OPTIMIZATION_LEVEL", "0"
29
+ option "GCC_PREPROCESSOR_DEFINITIONS", ["DEBUG=1", "$(inherited)"]
30
+ option "SWIFT_OPTIMIZATION_LEVEL", "-Onone"
31
+ end
32
+
33
+ scheme "Release" do
34
+ option "DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym"
35
+ option "ENABLE_NS_ASSERTIONS", false
36
+ option "MTL_ENABLE_DEBUG_INFO", false
37
+ option "VALIDATE_PRODUCT", true
38
+ end
39
+
40
+ target "#{PROJECT}" do
41
+ option "INFOPLIST_FILE", "#{PROJECT}/Info.plist"
42
+ option "PRODUCT_BUNDLE_IDENTIFIER", "#{PREFIX}#{PROJECT}"
43
+ option "ASSETCATALOG_COMPILER_APPICON_NAME", "AppIcon"
44
+ option "LD_RUNPATH_SEARCH_PATHS", "$(inherited) @executable_path/Frameworks"
45
+ option "PRODUCT_NAME", "$(TARGET_NAME)"
46
+ end
47
+
48
+ target "#{PROJECT}Tests" do
49
+ option "INFOPLIST_FILE", "#{PROJECT}Tests/Info.plist"
50
+ option "BUNDLE_LOADER", "$(TEST_HOST)"
51
+ option "TEST_HOST", "$(BUILT_PRODUCTS_DIR)/#{PROJECT}.app/#{PROJECT}"
52
+ option "PRODUCT_BUNDLE_IDENTIFIER", "#{PREFIX}#{PROJECT}Tests"
53
+ option "LD_RUNPATH_SEARCH_PATHS", "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
54
+ option "PRODUCT_NAME", "$(TARGET_NAME)"
55
+ end
56
+
57
+ target "#{PROJECT}UITests" do
58
+ option "INFOPLIST_FILE", "#{PROJECT}UITests/Info.plist"
59
+ option "TEST_TARGET_NAME", "#{PROJECT}"
60
+ option "PRODUCT_BUNDLE_IDENTIFIER", "#{PREFIX}#{PROJECT}UITests"
61
+ option "LD_RUNPATH_SEARCH_PATHS", "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
62
+ option "USES_XCTRUNNER", "YES"
63
+ option "PRODUCT_NAME", "$(TARGET_NAME)"
64
+ end
@@ -21,6 +21,7 @@ module Ambient
21
21
  @scheme_options = {}
22
22
  @parents = {}
23
23
  @capabilities = {}
24
+ @development_teams = {}
24
25
 
25
26
  def configure(&block)
26
27
  instance_eval &block
@@ -64,6 +65,10 @@ module Ambient
64
65
  capabilities << capability_name
65
66
  end
66
67
 
68
+ def set_development_team(target_name, team_name)
69
+ @development_teams[target_name] = team_name
70
+ end
71
+
67
72
  def setup_project(ambientfile)
68
73
  run_ambientfile(ambientfile)
69
74
  project_helper.print_info
@@ -75,6 +80,7 @@ module Ambient
75
80
  process_shared_target_options
76
81
  process_target_options
77
82
  process_capabilities
83
+ process_development_teams
78
84
  project_helper.save_changes
79
85
  end
80
86
 
@@ -119,6 +125,11 @@ module Ambient
119
125
  project_helper.process_capabilities(@capabilities)
120
126
  end
121
127
 
128
+ def process_development_teams
129
+ puts "applying ambient development teams"
130
+ project_helper.process_development_teams(@development_teams)
131
+ end
132
+
122
133
  def load_in_parent_target_values
123
134
  @parents.each do |target, parents|
124
135
  parents.each do |child, parent|
@@ -39,6 +39,10 @@ class CapabilitiesHelper
39
39
  capabilities.delete(capability_key(capability))
40
40
  end
41
41
 
42
+ def set_development_team(team)
43
+ target_attributes["DevelopmentTeam"] = team
44
+ end
45
+
42
46
  private
43
47
 
44
48
  def capabilities
data/lib/dsl.rb CHANGED
@@ -93,6 +93,11 @@ class TargetScope
93
93
  target_name = @name
94
94
  Ambient.configure { set_capability(target_name, capability_name) }
95
95
  end
96
+
97
+ def development_team(team_name)
98
+ target_name = @name
99
+ Ambient.configure { set_development_team(target_name, team_name) }
100
+ end
96
101
  end
97
102
 
98
103
  class SchemeScope
@@ -84,6 +84,17 @@ class ProjectHelper
84
84
  end
85
85
  end
86
86
 
87
+ def process_development_teams(development_teams)
88
+ development_teams.each do |target_name, development_team|
89
+ @project.targets.each do |target|
90
+ if target_name == target.to_s
91
+ helper = CapabilitiesHelper.new(@project, target)
92
+ helper.set_development_team(development_team)
93
+ end
94
+ end
95
+ end
96
+ end
97
+
87
98
  def print_info
88
99
  puts "Targets:"
89
100
  @project.targets.each { |t| puts "- #{t.to_s}" }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ambient-xcode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Green
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-15 00:00:00.000000000 Z
11
+ date: 2015-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj
@@ -36,6 +36,7 @@ files:
36
36
  - ambient-xcode.gemspec
37
37
  - bin/ambient
38
38
  - example/Ambientfile
39
+ - example/Ambientfile-swift
39
40
  - lib/ambient.rb
40
41
  - lib/capabilities_helper.rb
41
42
  - lib/dsl.rb
@@ -60,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
61
  version: '0'
61
62
  requirements: []
62
63
  rubyforge_project:
63
- rubygems_version: 2.2.2
64
+ rubygems_version: 2.4.7
64
65
  signing_key:
65
66
  specification_version: 4
66
67
  summary: Define your envrionment settings all in one easy to read Ruby file, and re-apply