ovaltine 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
- ---
2
- SHA512:
3
- data.tar.gz: f76c243272bd421a5635d495d6796d4820688d624d322d7c2a3994e920c65d3b3ddea40f08fe6fcec1fe66973c963c1ca830cf6a1f5c91a64192c56d461f6442
4
- metadata.gz: da7d8f1f5a64d059b5b62bc76847df9d3ff7c595c2df30147b9747aacaed3e4b60391f61c0b0b72bdf8f07688dc00ef8e9b761bcde085b898409eedb506daac1
5
- SHA1:
6
- data.tar.gz: 88b8b643bcc95048a2e41e9e970bbe10d68311be
7
- metadata.gz: 96b9c29b9c0754d1065ddc765524a428a409978a
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 08745928ba920c56d5d97b0f58b645f28e98f041
4
+ data.tar.gz: dfbaa37a469700422e0ef8f23940fb5c8b6b414c
5
+ SHA512:
6
+ metadata.gz: 6a345d0eaabb0e82a2a17e4a3ac003e9a080ade5ec410f6dacbc85b99868081b3b0c46a404bf30a2448cb01bb97508390b6d6fa69a4346af5164a265229046bc
7
+ data.tar.gz: b3665f740b6fa31b62b0aa14af824158d9d6c3234b975459bf05edd08f2d997540ac078fc453cc55dd82bbe00e6bff1cf64ef3d09cee75d33c53652edb30868c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 1.0.5
2
+
3
+ - Cache identifiers for navigation controllers
4
+ - Hotfix for writing duplicate identifiers
5
+
1
6
  # 1.0.4
2
7
 
3
8
  - Hotfix for failed error handling in Ruby 1.8.7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ovaltine (1.0.3)
4
+ ovaltine (1.0.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  The chocolatey treat which makes your code clean! Yum!
4
4
 
5
- `Ovaltine` scans your `storyboard` files and generates constant files for view controller, segue, and reuse identifiers. For instance, if you have a storyboard called `Main` and a view controller with the Storyboard ID `authenticationViewController`, then you can instantiate that controller with something like `[ABCMainStoryboard instantiateAuthenticationViewController]`. No mistyping, plenty of chocolately goodness.
5
+ `Ovaltine` scans your `storyboard` files and generates constant files for view controller, segue, and reuse identifiers. For instance, if you have a storyboard called `Main` and a view controller with the Storyboard ID `authenticationViewController`, then you can instantiate that controller with something like `[ABCMainStoryboard instantiateAuthenticationViewController]`. No mistyping, plenty of chocolatey goodness.
6
6
 
7
7
  ## Installation
8
8
 
@@ -13,7 +13,7 @@ gem install ovaltine
13
13
  ## Example Usage
14
14
 
15
15
  ```
16
- ovaltine --prefix ABC --auto-replace --auto-add --project path/to/project.xcodeproj path/to/project/files
16
+ ovaltine --prefix ABC --auto-replace --auto-add path/to/project/files
17
17
  ```
18
18
 
19
19
  Run from the command line or as a build step (if you are brave!) [Here](https://gist.github.com/kattrali/bbe9e2464d02a8ca4cb1) are some example files generated using `ovaltine`.
@@ -23,3 +23,7 @@ Run from the command line or as a build step (if you are brave!) [Here](https://
23
23
  ```
24
24
  ovaltine --help
25
25
  ```
26
+
27
+ ## Development
28
+
29
+ `Ovaltine` is tested using [bacon](https://github.com/chneukirchen/bacon). After running `bundle install`, the tests can be run using the command `rake spec`.
@@ -101,7 +101,7 @@
101
101
  <!--Navigation Controller-->
102
102
  <scene sceneID="i23-07-0sf">
103
103
  <objects>
104
- <navigationController automaticallyAdjustsScrollViewInsets="NO" id="Rge-Ae-WFm" sceneMemberID="viewController">
104
+ <navigationController storyboardIdentifier="navigationViewController" automaticallyAdjustsScrollViewInsets="NO" id="Rge-Ae-WFm" sceneMemberID="viewController">
105
105
  <toolbarItems/>
106
106
  <navigationBar key="navigationBar" contentMode="scaleToFill" id="gRu-BS-tP3">
107
107
  <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
@@ -35,15 +35,15 @@ module Ovaltine
35
35
  case node.name
36
36
  when 'segue'
37
37
  if identifier = node.attributes["identifier"]
38
- segue_identifiers << identifier
38
+ segue_identifiers << identifier unless segue_identifiers.include?(identifier)
39
39
  end
40
- when /viewcontroller/i
40
+ when /viewcontroller/i, 'navigationController'
41
41
  if identifier = node.attributes["storyboardIdentifier"]
42
- view_controller_identifiers << identifier
42
+ view_controller_identifiers << identifier unless view_controller_identifiers.include?(identifier)
43
43
  end
44
44
  when /cell/i
45
45
  if identifier = node.attributes["reuseIdentifier"]
46
- cell_reuse_identifiers << identifier
46
+ cell_reuse_identifiers << identifier unless cell_reuse_identifiers.include?(identifier)
47
47
  end
48
48
  end
49
49
  end
@@ -1,3 +1,3 @@
1
1
  module Ovaltine
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
@@ -22,6 +22,10 @@ describe 'Storyboard' do
22
22
  @storyboard.view_controller_identifiers.should.include "listViewController"
23
23
  end
24
24
 
25
+ it 'caches identifiers for navigation view controllers' do
26
+ @storyboard.view_controller_identifiers.should.include "navigationViewController"
27
+ end
28
+
25
29
  it 'caches identifiers for named segues' do
26
30
  @storyboard.segue_identifiers.should.include "starterSegueIdentifier"
27
31
  end
metadata CHANGED
@@ -1,56 +1,65 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ovaltine
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.4
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.5
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Delisa Mason
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
-
12
- date: 2014-08-03 00:00:00 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
11
+ date: 2014-09-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
- prerelease: false
17
- requirement: &id001 !ruby/object:Gem::Requirement
18
- requirements:
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
19
17
  - - ~>
20
- - !ruby/object:Gem::Version
21
- version: "1.3"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
22
20
  type: :development
23
- version_requirements: *id001
24
- - !ruby/object:Gem::Dependency
25
- name: rake
26
21
  prerelease: false
27
- requirement: &id002 !ruby/object:Gem::Requirement
28
- requirements:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
29
24
  - - ~>
30
- - !ruby/object:Gem::Version
31
- version: "10.0"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
32
34
  type: :development
33
- version_requirements: *id002
34
- - !ruby/object:Gem::Dependency
35
- name: bacon
36
35
  prerelease: false
37
- requirement: &id003 !ruby/object:Gem::Requirement
38
- requirements:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
39
38
  - - ~>
40
- - !ruby/object:Gem::Version
41
- version: "1.2"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bacon
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '1.2'
42
48
  type: :development
43
- version_requirements: *id003
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.2'
44
55
  description: "\n Constant generator for identifiers in Cocoa app storyboards\n "
45
- email:
56
+ email:
46
57
  - iskanamagus@gmail.com
47
- executables:
58
+ executables:
48
59
  - ovaltine
49
60
  extensions: []
50
-
51
61
  extra_rdoc_files: []
52
-
53
- files:
62
+ files:
54
63
  - .travis.yml
55
64
  - CHANGELOG.md
56
65
  - Gemfile
@@ -94,33 +103,30 @@ files:
94
103
  - vendor/json_pure/generator.rb
95
104
  - vendor/json_pure/parser.rb
96
105
  homepage: https://github.com/kattrali/ovaltine
97
- licenses:
106
+ licenses:
98
107
  - MIT
99
108
  metadata: {}
100
-
101
109
  post_install_message:
102
110
  rdoc_options: []
103
-
104
- require_paths:
111
+ require_paths:
105
112
  - lib
106
- required_ruby_version: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
110
117
  version: 1.8.7
111
- required_rubygems_version: !ruby/object:Gem::Requirement
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- version: "0"
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - '>='
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
116
123
  requirements: []
117
-
118
124
  rubyforge_project:
119
- rubygems_version: 2.0.14
125
+ rubygems_version: 2.2.2
120
126
  signing_key:
121
127
  specification_version: 4
122
128
  summary: Cocoa app constant generator
123
- test_files:
129
+ test_files:
124
130
  - features/fixtures/Sample/Sample.xcodeproj/project.pbxproj
125
131
  - features/fixtures/Sample/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
126
132
  - features/fixtures/Sample/Sample/Base.lproj/Main.storyboard