air18n 0.5.0 → 0.5.1

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.
@@ -140,7 +140,10 @@ module Air18n
140
140
  scope :still_used, lambda { where('phrases.id IN (?)', I18n.still_used_phrase_ids) }
141
141
  scope :no_longer_used, lambda { where('phrases.id NOT IN (?)', I18n.still_used_phrase_ids) }
142
142
 
143
- scope :rich_text, lambda { where("phrases.value LIKE '%<p>%'") }
143
+ # Janky! TODO(jason) don't be so simple and silly :(
144
+ RICH_TEXT_PATTERN = '<p'
145
+
146
+ scope :rich_text, lambda { where("phrases.value LIKE '%#{RICH_TEXT_PATTERN}%'") }
144
147
 
145
148
  # Fetches text of the most recent translation, if available.
146
149
  def latest_translation locale
@@ -152,7 +155,7 @@ module Air18n
152
155
  end
153
156
 
154
157
  def self.is_rich?(text)
155
- text.include?('<p')
158
+ text.include?(RICH_TEXT_PATTERN)
156
159
  end
157
160
 
158
161
  def is_rich_text?
@@ -1,3 +1,3 @@
1
1
  module Air18n
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: air18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-06-26 00:00:00.000000000 Z
16
+ date: 2013-06-28 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: i18n
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
224
  version: '0'
225
225
  requirements: []
226
226
  rubyforge_project:
227
- rubygems_version: 1.8.22
227
+ rubygems_version: 1.8.24
228
228
  signing_key:
229
229
  specification_version: 3
230
230
  summary: Dynamic I18n backend