fruit_to_lime 2.3.1 → 2.3.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.
- data/bin/fruit_to_lime +24 -24
- data/lib/fruit_to_lime/email_helper.rb +10 -0
- data/lib/fruit_to_lime/errors.rb +4 -1
- data/lib/fruit_to_lime/excel_helper.rb +10 -0
- data/lib/fruit_to_lime/global_phone.json +6571 -0
- data/lib/fruit_to_lime/model/class_settings.rb +7 -4
- data/lib/fruit_to_lime/model/coworker.rb +2 -2
- data/lib/fruit_to_lime/model/coworker_reference.rb +10 -0
- data/lib/fruit_to_lime/model/deal.rb +12 -3
- data/lib/fruit_to_lime/model/note.rb +42 -1
- data/lib/fruit_to_lime/model/organization.rb +29 -7
- data/lib/fruit_to_lime/model/person.rb +26 -9
- data/lib/fruit_to_lime/model/rootmodel.rb +145 -9
- data/lib/fruit_to_lime/phone_helper.rb +74 -0
- data/lib/fruit_to_lime.rb +4 -1
- data/spec/class_settings_spec.rb +23 -3
- data/spec/deal_spec.rb +22 -12
- data/spec/helpers/email_helper_spec.rb +32 -0
- data/spec/helpers/phone_helper_spec.rb +97 -0
- data/spec/helpers/roo_helper_spec.rb +10 -10
- data/spec/note_spec.rb +55 -0
- data/spec/organization_spec.rb +57 -0
- data/spec/person_spec.rb +15 -6
- data/spec/rootmodel_spec.rb +133 -7
- data/spec/spec_helper.rb +24 -24
- data/templates/csv/Gemfile +5 -5
- data/templates/csv/Rakefile.rb +7 -7
- data/templates/csv/convert.rb +2 -2
- data/templates/csv/spec/spec_helper.rb +24 -24
- data/templates/excel/Gemfile +6 -6
- data/templates/excel/Rakefile.rb +7 -7
- data/templates/excel/convert.rb +2 -2
- data/templates/excel/lib/tomodel.rb +167 -29
- data/templates/excel/spec/spec_helper.rb +20 -20
- data/templates/excel/spec/tomodel_spec.rb +18 -18
- data/templates/excel/template.xlsx +0 -0
- data/templates/sqlserver/Gemfile +6 -6
- data/templates/sqlserver/Rakefile.rb +7 -7
- data/templates/sqlserver/convert.rb +2 -2
- data/templates/sqlserver/spec/spec_helper.rb +20 -20
- data/templates/sqlserver/spec/tomodel_spec.rb +9 -9
- metadata +47 -2
data/bin/fruit_to_lime
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require "thor"
|
3
|
-
require "fruit_to_lime"
|
4
|
-
|
5
|
-
class Cli < Thor
|
6
|
-
desc "unpack_template NAME PATH", "Unpacks template with NAME in specified PATH or current directory if missing."
|
7
|
-
def unpack_template(name, path = nil)
|
8
|
-
path = '.' if path == nil
|
9
|
-
path = File.absolute_path(path)
|
10
|
-
templates_path = File.expand_path("../templates", File.dirname(__FILE__))
|
11
|
-
templating = FruitToLime::Templating.new templates_path
|
12
|
-
templating.unpack(name, path)
|
13
|
-
end
|
14
|
-
|
15
|
-
desc "list_templates", "Lists all templates"
|
16
|
-
def list_templates()
|
17
|
-
templates_path = File.expand_path("../templates", File.dirname(__FILE__))
|
18
|
-
templating = FruitToLime::Templating.new templates_path
|
19
|
-
list_of_templates = templating.list
|
20
|
-
puts list_of_templates
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
Cli.start(ARGV)
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "thor"
|
3
|
+
require "fruit_to_lime"
|
4
|
+
|
5
|
+
class Cli < Thor
|
6
|
+
desc "unpack_template NAME PATH", "Unpacks template with NAME in specified PATH or current directory if missing."
|
7
|
+
def unpack_template(name, path = nil)
|
8
|
+
path = '.' if path == nil
|
9
|
+
path = File.absolute_path(path)
|
10
|
+
templates_path = File.expand_path("../templates", File.dirname(__FILE__))
|
11
|
+
templating = FruitToLime::Templating.new templates_path
|
12
|
+
templating.unpack(name, path)
|
13
|
+
end
|
14
|
+
|
15
|
+
desc "list_templates", "Lists all templates"
|
16
|
+
def list_templates()
|
17
|
+
templates_path = File.expand_path("../templates", File.dirname(__FILE__))
|
18
|
+
templating = FruitToLime::Templating.new templates_path
|
19
|
+
list_of_templates = templating.list
|
20
|
+
puts list_of_templates
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
Cli.start(ARGV)
|
data/lib/fruit_to_lime/errors.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
module FruitToLime
|
2
|
+
# The ExcelHelper just makes it a little bit easier to open an
|
3
|
+
# excel file in the imports. With ExcelHelper you don't need to
|
4
|
+
# know anything about Roo and RooHelper.
|
5
|
+
class ExcelHelper
|
6
|
+
def self.Open(excel_filename)
|
7
|
+
return RooHelper.new(Roo::Excelx.new(excel_filename))
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|