xcake 0.1.6 → 0.1.7

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: 9b945c7078bf81c6b95c3886e01b6ab16c7191c3
4
- data.tar.gz: 198fd535fffe2e5d0390873f97900cf8e871a526
3
+ metadata.gz: 546ca9e60245b37c6d7d5c510047d91faee9bac8
4
+ data.tar.gz: 54e5ec86e2f95aa4ded68c09b1395fcfea7431da
5
5
  SHA512:
6
- metadata.gz: 8141f00c32e800da77194b0866f21e2438596874c280063b5baaadf25d3b2db3e84bef3e8c276bf43beec0ed245090107effe878c9a38ffc51b66e7eee6abe90
7
- data.tar.gz: 5f148d62c9c34f2510c301f31f64a32771f1528da1b405dd6888a814910e69adf5e65c4bbb91cc42ec1945176ad4c61f3d37db204145c8aa7045fedf9f8da300
6
+ metadata.gz: 375bf283c8d67ef3ff9e6bdbe37abdb4887da50f57d2e30705f5cce7d49e0faa1a86c12d9e1c622b57561105cc57a477527f7ac94d4ee7c1369ad9e03b3bc323
7
+ data.tar.gz: 5d167875d3a10e71ea0433342d84d1571dce3a4b60af8e6aff46a048512299a5fb83dab193cbcc4bf9f7faf426d0431ac553944a6380e3b62fe50ee942b812b2
@@ -0,0 +1,37 @@
1
+ v0.1.7
2
+ ======
3
+ - Adds ability to set Project Class Prefix and Organization
4
+
5
+ v0.1.6
6
+ ======
7
+ - Fixed crash with unit tests.
8
+ - Added documentation for Configuration syntax.
9
+
10
+ v0.1.5
11
+ ======
12
+ - Fixed crash with Unit Tests
13
+ - Added documentation for Target syntax.
14
+
15
+ v0.1.4
16
+ ======
17
+ - Removes references to "build_configurations" to just "configuration"
18
+ to make syntax shorter and to reflect the fact it's an abstraction and not directly
19
+ a Xcode build configuration.
20
+
21
+ v0.1.3
22
+ ======
23
+ - Reverts to an older GemSpec to fix installation issues.
24
+ - Adds initial Getting Started documentation
25
+
26
+ v0.1.2
27
+ ======
28
+ - Adds dependency information for Ruby and RubyGems versions
29
+
30
+ v0.1.1
31
+ ======
32
+ - Updated README instructions
33
+ - General Tidy up of code
34
+
35
+ v0.1.0
36
+ ======
37
+ - Initial Release
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xcake (0.1.6)
4
+ xcake (0.1.7)
5
5
  claide
6
6
  xcodeproj (~> 0.28)
7
7
 
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Xcake
2
-
2
+ [![Gem](https://img.shields.io/gem/v/xcake.svg)](https://rubygems.org/gems/xcake)
3
3
  [![Twitter: @jcampbell_05](https://img.shields.io/badge/contact-@jcampbell_05-blue.svg?style=flat)](https://twitter.com/jcampbell_05)
4
4
  [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/fastlane/fastlane/blob/master/LICENSE)
5
5
  [![Build Status](https://img.shields.io/travis/jcampbell05/xcake/master.svg?style=flat)](https://travis-ci.org/jcampbell05/xcake)
@@ -24,7 +24,7 @@ Get in contact with the developer on Twitter: [@jcampbell_05](https://twitter.co
24
24
  <a href="#installation">Installation</a> &bull;
25
25
  <a href="#need-help">Need help?</a> &bull;
26
26
  <a href="#roadmap">Roadmap</a> &bull;
27
- <a href="spec">Documentation</a>
27
+ <a href="http://www.rubydoc.info/gems/xcake/file/docs/Getting%20Started.md">Documentation</a>
28
28
  </p>
29
29
 
30
30
  -------
@@ -56,6 +56,24 @@ end
56
56
  ```
57
57
  There are two main ways you can customize a Project, Targets and Configurations.
58
58
 
59
+ ###Properties
60
+
61
+ #### Clas Prefix
62
+
63
+ Sets the class prefix for the project
64
+
65
+ ```ruby
66
+ project.class_prefix = "XC"
67
+ ```
68
+
69
+ #### Organization
70
+
71
+ Sets the organization for the project.
72
+
73
+ ```ruby
74
+ project.organization = "Xcake Productions"
75
+ ```
76
+
59
77
  ## Targets
60
78
 
61
79
  Targets are the way we make products such as Applications, Extensions, Libraries and Tests.
@@ -25,6 +25,9 @@ module Xcake
25
25
 
26
26
  @project = Xcode::Project.new(output_filepath, true)
27
27
  @project.setup_for_xcake
28
+
29
+ @project.class_prefix = project.class_prefix if project.class_prefix
30
+ @project.organization = project.organization if project.organization
28
31
  end
29
32
 
30
33
  def leave_project(project)
@@ -19,6 +19,15 @@ module Xcake
19
19
  #
20
20
  attr_accessor :project_name
21
21
 
22
+ # @return [String] the prefix used for Objective-C Classes. This is
23
+ # used by xcode when creating new files.
24
+ attr_accessor :class_prefix
25
+
26
+ # @return [String] the name of your organization. This is used by xcode when
27
+ # creating new files.
28
+ #
29
+ attr_accessor :organization
30
+
22
31
  # @return [Array<Target>] the list of targets for the project.
23
32
  #
24
33
  attr_accessor :targets
@@ -1,3 +1,3 @@
1
1
  module Xcake
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
@@ -4,6 +4,62 @@ module Xcake
4
4
  module Xcode
5
5
  class Project < Xcodeproj::Project
6
6
 
7
+ # @return [Hash] the attributes of
8
+ # the project
9
+ #
10
+ def attributes
11
+ root_object.attributes
12
+ end
13
+
14
+ # @return [String] the class name for the project
15
+ #
16
+ def class_prefix
17
+ attributes["CLASSPREFIX"]
18
+ end
19
+
20
+ # Sets the class prefix for the project
21
+ #
22
+ # @param [String] value to set
23
+ #
24
+ # @return [String] the class name for the project
25
+ #
26
+ def class_prefix=(class_prefix)
27
+ attributes["CLASSPREFIX"] = class_prefix
28
+ end
29
+
30
+ # @return [String] the organization for the project
31
+ #
32
+ def organization
33
+ attributes["ORGANIZATIONNAME"]
34
+ end
35
+
36
+ # Sets the organization for the project
37
+ #
38
+ # @param [String] value to set
39
+ #
40
+ # @return [SchemeList] the organization for the project
41
+ #
42
+ def organization=(organization)
43
+ attributes["ORGANIZATIONNAME"] = organization
44
+ end
45
+
46
+ # @return [SchemeList] the scheme list
47
+ #
48
+ def scheme_list
49
+ @scheme_list ||= SchemeList.new(self)
50
+ end
51
+
52
+ def object_version
53
+ Xcodeproj::Constants::DEFAULT_OBJECT_VERSION.to_s
54
+ end
55
+
56
+ def recreate_user_schemes(*)
57
+ puts "Creating Schemes..."
58
+
59
+ scheme_list.recreate_schemes
60
+ scheme_list.save(path)
61
+ end
62
+
7
63
  # Configures the Project for use with Xcake.
8
64
  # This makes sure we have sensible defaults and
9
65
  # it as clean as possible.
@@ -55,24 +111,6 @@ module Xcake
55
111
  t.name == "#{target.name}Tests"
56
112
  end
57
113
  end
58
-
59
- # @return [SchemeList] the scheme list
60
- #
61
- def scheme_list
62
- @scheme_list ||= SchemeList.new(self)
63
- end
64
-
65
- def object_version
66
- Xcodeproj::Constants::DEFAULT_OBJECT_VERSION.to_s
67
- end
68
-
69
- def recreate_user_schemes(visible = true)
70
-
71
- puts "Creating Schemes..."
72
-
73
- scheme_list.recreate_schemes
74
- scheme_list.save(path)
75
- end
76
114
  end
77
115
  end
78
116
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Campbell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-07 00:00:00.000000000 Z
11
+ date: 2015-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -123,6 +123,7 @@ files:
123
123
  - ".rspec"
124
124
  - ".travis.yml"
125
125
  - ".yardopts"
126
+ - CHANGELOG.md
126
127
  - CODE_OF_CONDUCT.md
127
128
  - Cakefile
128
129
  - Gemfile