ovaltine 1.0.4 → 1.0.5
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 +7 -7
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/README.md +6 -2
- data/features/fixtures/Sample/Sample/Base.lproj/Main.storyboard +1 -1
- data/lib/ovaltine/storyboard.rb +4 -4
- data/lib/ovaltine/version.rb +1 -1
- data/specs/storyboard_spec.rb +4 -0
- metadata +55 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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
data/Gemfile.lock
CHANGED
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
|
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
|
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"/>
|
data/lib/ovaltine/storyboard.rb
CHANGED
@@ -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
|
data/lib/ovaltine/version.rb
CHANGED
data/specs/storyboard_spec.rb
CHANGED
@@ -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.
|
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
|
-
|
13
|
-
|
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
|
-
|
17
|
-
|
18
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
19
17
|
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version:
|
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
|
-
|
28
|
-
requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
29
24
|
- - ~>
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
version:
|
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
|
-
|
38
|
-
requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
39
38
|
- - ~>
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version:
|
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
|
-
|
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:
|
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.
|
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
|