pbxproject 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ require 'jeweler'
13
13
  Jeweler::Tasks.new do |gem|
14
14
  # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
15
  gem.name = "pbxproject"
16
- gem.homepage = "http://github.com/mikian/pbxproject"
16
+ gem.homepage = "http://github.com/owl-forestry/pbxproject"
17
17
  gem.license = "MIT"
18
18
  gem.summary = %Q{XCode 4 project management}
19
19
  gem.description = %Q{makes managing XCode 4 project files as easy as modifying ruby classes.}
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.2.0
@@ -1,2 +1,9 @@
1
+ # **pbxproject** is a Ruby library for managing XCode 4 project files.
2
+ #
3
+ # pbxproject parses those .pbxproj -files and makes them Ruby objects
4
+ # which means simple and easy management for projects.
5
+ # Adding additional build phases is as simple as creating new object
6
+ # and calling proper methods.
7
+ #
1
8
  require 'pbxproject/pbxtypes'
2
9
  require 'pbxproject/pbxproject'
@@ -1,6 +1,13 @@
1
1
  module PBXProject
2
+ # PBXProject class is main class for whole project file.
3
+ # Initializer takes one named argument, `file` which defines pbxproject
4
+ # file to be parsed.
2
5
  class PBXProject
3
- attr_reader :filename, :state
6
+ # Filename of pbxproj file
7
+ attr_reader :filename
8
+ # Current state of parser, either nil, :ready, :parsed
9
+ attr_reader :state
10
+
4
11
  attr_accessor :archiveVersion, :objectVersion, :sections
5
12
 
6
13
  def initialize(args = {})
@@ -219,6 +226,9 @@ module PBXProject
219
226
  @sections.each do |t, arr|
220
227
  next unless t == type_name
221
228
 
229
+ # Return all if we searched only for item type
230
+ return arr if args.count == 0
231
+
222
232
  arr.each do |item|
223
233
  args.each do |k,v|
224
234
  val = item.instance_variable_get("@#{k}")
@@ -51,6 +51,10 @@ module PBXProject
51
51
  define_method(f) do
52
52
  instance_variable_get("@#{f}")
53
53
  end
54
+
55
+ define_method("#{f}=") do |val|
56
+ instance_variable_set("@#{f}", val)
57
+ end
54
58
  end
55
59
 
56
60
  define_method("pbxfields") do
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pbxproject}
8
- s.version = "0.1.4"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mikko Kokkonen"]
12
- s.date = %q{2011-04-25}
12
+ s.date = %q{2011-05-14}
13
13
  s.default_executable = %q{pbxproject}
14
14
  s.description = %q{makes managing XCode 4 project files as easy as modifying ruby classes.}
15
15
  s.email = %q{mikko.kokkonen@me.com}
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
38
38
  "spec/pbxproject_spec.rb",
39
39
  "spec/spec_helper.rb"
40
40
  ]
41
- s.homepage = %q{http://github.com/mikian/pbxproject}
41
+ s.homepage = %q{http://github.com/owl-forestry/pbxproject}
42
42
  s.licenses = ["MIT"]
43
43
  s.require_paths = ["lib"]
44
44
  s.requirements = ["thor, if CLI wanted"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: pbxproject
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.4
5
+ version: 0.2.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mikko Kokkonen
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-25 00:00:00 +09:00
13
+ date: 2011-05-14 00:00:00 +09:00
14
14
  default_executable: pbxproject
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -86,7 +86,7 @@ files:
86
86
  - spec/pbxproject_spec.rb
87
87
  - spec/spec_helper.rb
88
88
  has_rdoc: true
89
- homepage: http://github.com/mikian/pbxproject
89
+ homepage: http://github.com/owl-forestry/pbxproject
90
90
  licenses:
91
91
  - MIT
92
92
  post_install_message:
@@ -99,7 +99,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
- hash: -948625442068784968
102
+ hash: 3285393543055858202
103
103
  segments:
104
104
  - 0
105
105
  version: "0"