property_synthesize_dealloc 0.1.1 → 0.1.2

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.
data/.rvmrc CHANGED
@@ -1 +1,2 @@
1
1
  rvm ree@property_synthesize_dealloc
2
+ echo "Switched to ree@property_synthesize_dealloc"
data/README.markdown CHANGED
@@ -8,6 +8,7 @@ Install the gem.
8
8
  _I have only been able to get this working in Xcode by installing the gem in system ruby._
9
9
 
10
10
  sudo gem install property_synthesize_dealloc
11
+ sudo gem install rb-appscript
11
12
 
12
13
  Make a user script in Xcode with the following:
13
14
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/lib/config.yml CHANGED
@@ -11,4 +11,4 @@ types:
11
11
  'double', 'uint8_t', 'uint16_t', 'uint32_t', 'int8_t', 'int16_t',
12
12
  'int32_t', 'int64_t', 'uint64_t', 'GLuint', 'GLushort', 'GLubyte',
13
13
  'GLfloat', 'size_t', 'GLenum']
14
- retain: []
14
+ retain: []
data/lib/converter.rb CHANGED
@@ -50,6 +50,6 @@ class Converter
50
50
 
51
51
  def cap_first_letter_of(word)
52
52
  word[0] = word[0,1].upcase
53
- word
53
+ word.gsub(';', '')
54
54
  end
55
55
  end
@@ -1,10 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
- # property = PropertySynthesizeDealloc.new
4
- # property.file_path = '%%%{PBXFilePath}%%%'
5
- # property.selection = STDIN.read
6
- # property.psd!
7
-
8
3
  describe "PropertySynthesizeDealloc" do
9
4
 
10
5
  context "initialization" do
@@ -55,6 +50,28 @@ describe "PropertySynthesizeDealloc" do
55
50
  end
56
51
  end
57
52
 
53
+ context "using a custom config.yml file" do
54
+
55
+ before do
56
+ test_config_path = File.join(File.dirname(__FILE__), 'test_config.yml')
57
+ PropertySynthesizeDealloc.new(test_config_path)
58
+ @config = YAML.load_file test_config_path
59
+ end
60
+
61
+ it "should have Configuration settings when initialized" do
62
+ Configuration.settings['sleep_time'].should == @config['settings']['sleep_time']
63
+ Configuration.settings['xcode_app_path'].should == @config['settings']['xcode_app_path']
64
+ Configuration.settings['use_nonatomic'].should == @config['settings']['use_nonatomic']
65
+ Configuration.settings['position_prop_after_closing_bracket'].should == @config['settings']['position_prop_after_closing_bracket']
66
+ Configuration.settings['outlet'].should == @config['settings']['outlet']
67
+ end
68
+
69
+ it "should have Configuration types when initialized" do
70
+ Configuration.types['copy'].should == @config['types']['copy']
71
+ Configuration.types['assign'].should == @config['types']['assign']
72
+ Configuration.types['retain'].should == @config['types']['retain']
73
+ end
74
+ end
58
75
 
59
76
  context "converting selected text" do
60
77
 
@@ -88,5 +105,4 @@ describe "PropertySynthesizeDealloc" do
88
105
 
89
106
  end
90
107
 
91
-
92
108
  end
@@ -0,0 +1,14 @@
1
+ settings:
2
+ sleep_time: 0.8
3
+ xcode_app_path: '/Developer/Applications/Xcode.app'
4
+ use_nonatomic: false
5
+ position_prop_after_closing_bracket: true
6
+ outlet: false
7
+
8
+ types:
9
+ copy: ['NSMutableString', 'NSArray', 'NSNumber']
10
+ assign: ['BOOL', 'float', 'NSUInteger', 'NSInteger',
11
+ 'double', 'uint8_t', 'uint16_t', 'uint32_t', 'int8_t', 'int16_t',
12
+ 'int32_t', 'int64_t', 'uint64_t', 'GLuint', 'GLushort', 'GLubyte',
13
+ 'GLfloat', 'size_t', 'GLenum']
14
+ retain: ['SomeValue']
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: property_synthesize_dealloc
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Craig Williams
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-27 00:00:00 -07:00
18
+ date: 2011-03-06 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -144,8 +144,10 @@ files:
144
144
  - lib/file_checker.rb
145
145
  - lib/property_synthesize_dealloc.rb
146
146
  - pkg/property_synthesize_dealloc-0.1.0.gem
147
+ - pkg/property_synthesize_dealloc-0.1.1.gem
147
148
  - spec/property_synthesize_dealloc_spec.rb
148
149
  - spec/spec_helper.rb
150
+ - spec/test_config.yml
149
151
  has_rdoc: true
150
152
  homepage: http://github.com/CraigWilliams/property_synthesize_dealloc
151
153
  licenses: