massaji 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -9,9 +9,10 @@ Massaji is pretty much the Japanese word for massage right? At least that's what
9
9
  $ gem install massaji
10
10
 
11
11
  ## Use
12
- So you currently have some text that looks like:
12
+ So you're using [Salesforce](http://www.salesforce.com) to enter some text
13
+ for things in your business. Currently you have some text that looks like:
13
14
 
14
- $ text="whatever.com is where dinosaur\342\200\231s authomobiles, books & toys
15
+ $ text="whatever.com is where dinosaur\\342\\200\\231s authomobiles, books & toys
15
16
  are exchanged for whatever online. Connect with thousands of dinos online
16
17
  to exchange full boxes of stuff you no longer uses for stuff they
17
18
  actually need."
@@ -20,11 +21,11 @@ This doesnt work very well, we don't want whacky extra characters. In the
20
21
  above example, we're simply looking for an apostrophe. We need to run this
21
22
  through a spa to get all of the bad "knots" out.
22
23
 
23
- $ text = Massaji::Spa.happy_ending(text)
24
- $ => "whatever.com is where dinosaur's authomobiles, books & toys
24
+ $ text = Massaji::Spa.new(text)
25
+ $ => "<p>whatever.com is where dinosaur's authomobiles, books & toys
25
26
  are exchanged for whatever online. Connect with thousands of dinos online
26
27
  to exchange full boxes of stuff you no longer uses for stuff they
27
- actually need."
28
+ actually need.</p>"
28
29
 
29
30
  Great success!
30
31
 
@@ -17,18 +17,18 @@ module Massaji
17
17
  #
18
18
  # Returns the text with appropriate substitutions made.
19
19
  def initialize(text, tag="p")
20
- text.gsub!(/\342\200(?:\234|\235)/,'"')
21
- text.gsub!(/\342\200(?:\230|\231)/,"'")
22
- text.gsub!(/\342\200\223/,"-")
23
- text.gsub!(/\342\200\224/,"--")
24
- text.gsub!(/\342\200\246/,"...")
20
+ text.gsub!(/\\342\\200(?:\\234|\\235)/,'"')
21
+ text.gsub!(/\\342\\200(?:\\230|\\231)/,"'")
22
+ text.gsub!(/\\342\\200\\223/,"-")
23
+ text.gsub!(/\\342\\200\\224/,"--")
24
+ text.gsub!(/\\342\\200\\246/,"...")
25
25
 
26
26
  # not sure what these are, make empty for now
27
- text.gsub!(/\342\200\242/,"")
28
- text.gsub!(/\342\200\250/,"")
29
- text.gsub!(/\342\204\242/,"")
30
- text.gsub!(/\303\251/,"") # e in cafe?
31
- text.gsub!(/\303\261/,"")
27
+ text.gsub!(/\\342\\200\\242/,"")
28
+ text.gsub!(/\\342\\200\\250/,"")
29
+ text.gsub!(/\\342\\204\\242/,"")
30
+ text.gsub!(/\\303\\251/,"") # e in cafe?
31
+ text.gsub!(/\\303\\261/,"")
32
32
 
33
33
  insert_html(text)
34
34
  text = wrap(text, tag)
@@ -65,10 +65,10 @@ module Massaji
65
65
  #
66
66
  # Returns text with appropriate html tags in place.
67
67
  def insert_html(text)
68
- text.gsub!("\r\n", "<br/><br/>")
69
- text.gsub!("\n\n", "<br/><br/>")
70
- text.gsub!("\n", "<br/><br/>")
71
- text.gsub!("\t", "-")
68
+ text.gsub!("\\r\\n", "<br/><br/>")
69
+ text.gsub!("\\n\\n", "<br/><br/>")
70
+ text.gsub!("\\n", "<br/><br/>")
71
+ text.gsub!("\\t", "-")
72
72
 
73
73
  text
74
74
  end
@@ -1,3 +1,3 @@
1
1
  module Massaji
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -8,11 +8,11 @@ Gem::Specification.new do |s|
8
8
  s.authors = ["brntbeer"]
9
9
  s.email = ["brent.beer@gmail.com"]
10
10
  s.homepage = ""
11
- s.summary = %q{Massaji! Massage your text with great success.}
12
- s.description = %q{Massaji is used for when you've copy/pasted text
13
- (Basically from Microsoft Word) and the text is
14
- suddenly bullshit garbage.
15
- Massage that bitch back to the original character.}
11
+ s.summary = %q{Massage your text from Salesforce with great success.}
12
+ s.description = %q{Massaji is used for when you've copy/pasted text into
13
+ Salesforce from Microsoft Word and the text is suddenly
14
+ bullshit garbage. Massage that bitch back to the
15
+ original character.}
16
16
 
17
17
  s.rubyforge_project = "massaji"
18
18
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: massaji
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - brntbeer
@@ -15,14 +15,14 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-01 00:00:00 Z
18
+ date: 2011-08-02 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: |-
22
- Massaji is used for when you've copy/pasted text
23
- (Basically from Microsoft Word) and the text is
24
- suddenly bullshit garbage.
25
- Massage that bitch back to the original character.
22
+ Massaji is used for when you've copy/pasted text into
23
+ Salesforce from Microsoft Word and the text is suddenly
24
+ bullshit garbage. Massage that bitch back to the
25
+ original character.
26
26
  email:
27
27
  - brent.beer@gmail.com
28
28
  executables: []
@@ -72,6 +72,6 @@ rubyforge_project: massaji
72
72
  rubygems_version: 1.8.5
73
73
  signing_key:
74
74
  specification_version: 3
75
- summary: Massaji! Massage your text with great success.
75
+ summary: Massage your text from Salesforce with great success.
76
76
  test_files: []
77
77