storyboardlint 0.2.1 → 0.2.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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/storyboardlint.rb +3 -3
- data/spec/matcher_spec.rb +11 -0
- data/storyboardlint.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c7e6876724cad80c78914e1bf236959dc4f88d0
|
|
4
|
+
data.tar.gz: b1f7c19e8780f39b7dc9cbe964be1de50bd9c642
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8e0ebebdaf7eff458c982ff6b53485dea20289fb8497b6ab62ecb6c1d22522e7a074b872338e8dbfb4f2f03c21b45186d64727698ec54b4157e0176cc7ada80
|
|
7
|
+
data.tar.gz: 57b9c5725a9f365fdab65f3c1039634c58f6f156331d2b9b12262008063de93eb92646167c02467183c99ac08fd6f9cdb7f29d64e882f4e9b3c858c8e4c00537
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.2
|
data/lib/storyboardlint.rb
CHANGED
|
@@ -224,7 +224,7 @@ module StoryboardLint
|
|
|
224
224
|
private
|
|
225
225
|
|
|
226
226
|
def create_source_regex(default_prefix, prefix, suffix)
|
|
227
|
-
inner_regex_part = %{(
|
|
227
|
+
inner_regex_part = %{(?:\\\\"|[^"])+}
|
|
228
228
|
if prefix.to_s.empty? and suffix.to_s.empty?
|
|
229
229
|
return /@"(#{default_prefix}#{inner_regex_part})"/
|
|
230
230
|
else
|
|
@@ -233,7 +233,7 @@ module StoryboardLint
|
|
|
233
233
|
end
|
|
234
234
|
|
|
235
235
|
def create_storyboard_regex(default_prefix, prefix, suffix)
|
|
236
|
-
inner_regex_part = %{(
|
|
236
|
+
inner_regex_part = %{(?:\\\\"|[^"])+}
|
|
237
237
|
if prefix.to_s.empty? and suffix.to_s.empty?
|
|
238
238
|
sb = /^#{default_prefix}/
|
|
239
239
|
else
|
|
@@ -354,7 +354,7 @@ module StoryboardLint
|
|
|
354
354
|
|
|
355
355
|
# Another typical switch to print the version.
|
|
356
356
|
opts.on_tail("--version", "Show version") do
|
|
357
|
-
puts "StoryboardLint v0.2.
|
|
357
|
+
puts "StoryboardLint v0.2.2"
|
|
358
358
|
exit
|
|
359
359
|
end
|
|
360
360
|
end
|
data/spec/matcher_spec.rb
CHANGED
|
@@ -151,6 +151,17 @@ describe StoryboardLint::Matcher do
|
|
|
151
151
|
"cellpretest".should_not match(r)
|
|
152
152
|
'@"cellpretest"'.should match(r)
|
|
153
153
|
end
|
|
154
|
+
|
|
155
|
+
it "should only capture the actual ID" do
|
|
156
|
+
options = OpenStruct.new
|
|
157
|
+
options.reuse_suffix = "Cell"
|
|
158
|
+
m = StoryboardLint::Matcher.new(options)
|
|
159
|
+
r = m.reuse_id_regex_source
|
|
160
|
+
test_string = '@"cellName" : @"bronzeTableCell"'
|
|
161
|
+
test_string.should match(r)
|
|
162
|
+
test_string =~ r
|
|
163
|
+
$1.should == 'bronzeTableCell'
|
|
164
|
+
end
|
|
154
165
|
end
|
|
155
166
|
|
|
156
167
|
end
|
data/storyboardlint.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "storyboardlint"
|
|
8
|
-
s.version = "0.2.
|
|
8
|
+
s.version = "0.2.2"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Johannes Fahrenkrug"]
|
|
12
|
-
s.date = "2014-03-
|
|
12
|
+
s.date = "2014-03-20"
|
|
13
13
|
s.description = "It's a pain to to keep identifier strings in your UIStoryboard and in your source code in sync. This tool helps you to do just that."
|
|
14
14
|
s.email = "johannes@springenwerk.com"
|
|
15
15
|
s.executables = ["storyboardlint"]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: storyboardlint
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Johannes Fahrenkrug
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-03-
|
|
11
|
+
date: 2014-03-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|