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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78466ff49fa3a8838f72ad1db1b3d645b3a045e5
4
- data.tar.gz: a7f32aef4c9a844a5698228f5d28edfefe669a87
3
+ metadata.gz: 7c7e6876724cad80c78914e1bf236959dc4f88d0
4
+ data.tar.gz: b1f7c19e8780f39b7dc9cbe964be1de50bd9c642
5
5
  SHA512:
6
- metadata.gz: 2305ec7e69493f5219a51b57a40fb5afb07a953fb799b4bbefbe56cccb04cdf5b33bb8aea1556a9ff58f0bc3fe1308f78d338afcffebd674d6db018a77778658
7
- data.tar.gz: 0b14d0b76d1488d11b9234af68bcc71d03593cd7db88e9e07757ad746cf49a1fb097986b055f8e6ab783ddea84d544fbc031c0892f65b683c85d4f575c883562
6
+ metadata.gz: a8e0ebebdaf7eff458c982ff6b53485dea20289fb8497b6ab62ecb6c1d22522e7a074b872338e8dbfb4f2f03c21b45186d64727698ec54b4157e0176cc7ada80
7
+ data.tar.gz: 57b9c5725a9f365fdab65f3c1039634c58f6f156331d2b9b12262008063de93eb92646167c02467183c99ac08fd6f9cdb7f29d64e882f4e9b3c858c8e4c00537
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -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.1"
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
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "storyboardlint"
8
- s.version = "0.2.1"
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-11"
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.1
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 00:00:00.000000000 Z
11
+ date: 2014-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri