fruit_to_lime 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fruit_to_lime/model/deal.rb +3 -2
- data/lib/fruit_to_lime/model/deal_status.rb +11 -0
- data/spec/templating_spec.rb +40 -40
- metadata +3 -2
@@ -4,7 +4,7 @@ module FruitToLime
|
|
4
4
|
include SerializeHelper, ModelHasCustomFields, ModelHasTags
|
5
5
|
|
6
6
|
attr_accessor :id, :integration_id, :name, :description, :probability, :value, :order_date, :offer_date, :customer,
|
7
|
-
:responsible_coworker, :customer_contact
|
7
|
+
:responsible_coworker, :customer_contact, :status
|
8
8
|
|
9
9
|
attr_reader :custom_fields
|
10
10
|
|
@@ -20,7 +20,8 @@ module FruitToLime
|
|
20
20
|
{ :id => :responsible_coworker, :type => :coworker_reference },
|
21
21
|
{ :id => :customer_contact, :type => :person_reference },
|
22
22
|
{ :id => :custom_fields, :type => :custom_fields },
|
23
|
-
{ :id => :tags, :type => :tags }
|
23
|
+
{ :id => :tags, :type => :tags },
|
24
|
+
{ :id => :status, :type => :deal_status }
|
24
25
|
]
|
25
26
|
end
|
26
27
|
|
data/spec/templating_spec.rb
CHANGED
@@ -1,41 +1,41 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
require 'tmpdir'
|
3
|
-
|
4
|
-
def execute_command_with_success(cmd)
|
5
|
-
system(cmd)
|
6
|
-
if ! $?.success?
|
7
|
-
puts "Failed with #{$?}"
|
8
|
-
raise "failed! #{cmd}"
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe 'Templating' do
|
13
|
-
let(:templating) { FruitToLime::Templating.new(File.expand_path("../templates", File.dirname(__FILE__))) }
|
14
|
-
|
15
|
-
describe 'list' do
|
16
|
-
it 'can find some templates' do
|
17
|
-
templating.list().length.should > 0
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
describe 'unpack' do
|
22
|
-
unpack_path = File.expand_path("unpacked", Dir.tmpdir)
|
23
|
-
before {
|
24
|
-
FileUtils.remove_dir(unpack_path, true)
|
25
|
-
FileUtils.mkdir(unpack_path)
|
26
|
-
}
|
27
|
-
|
28
|
-
it 'can unpack all templates and run the template tests' do
|
29
|
-
templating.list().each {|t|
|
30
|
-
templating.unpack t, unpack_path
|
31
|
-
Dir.chdir(File.expand_path(t, unpack_path)) do
|
32
|
-
execute_command_with_success('rake spec')
|
33
|
-
end
|
34
|
-
}
|
35
|
-
end
|
36
|
-
|
37
|
-
after {
|
38
|
-
FileUtils.remove_dir(unpack_path, true)
|
39
|
-
}
|
40
|
-
end
|
1
|
+
require 'fileutils'
|
2
|
+
require 'tmpdir'
|
3
|
+
|
4
|
+
def execute_command_with_success(cmd)
|
5
|
+
system(cmd)
|
6
|
+
if ! $?.success?
|
7
|
+
puts "Failed with #{$?}"
|
8
|
+
raise "failed! #{cmd}"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe 'Templating' do
|
13
|
+
let(:templating) { FruitToLime::Templating.new(File.expand_path("../templates", File.dirname(__FILE__))) }
|
14
|
+
|
15
|
+
describe 'list' do
|
16
|
+
it 'can find some templates' do
|
17
|
+
templating.list().length.should > 0
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe 'unpack' do
|
22
|
+
unpack_path = File.expand_path("unpacked", Dir.tmpdir)
|
23
|
+
before {
|
24
|
+
FileUtils.remove_dir(unpack_path, true)
|
25
|
+
FileUtils.mkdir(unpack_path)
|
26
|
+
}
|
27
|
+
|
28
|
+
it 'can unpack all templates and run the template tests' do
|
29
|
+
templating.list().each {|t|
|
30
|
+
templating.unpack t, unpack_path
|
31
|
+
Dir.chdir(File.expand_path(t, unpack_path)) do
|
32
|
+
execute_command_with_success('rake spec')
|
33
|
+
end
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
after {
|
38
|
+
FileUtils.remove_dir(unpack_path, true)
|
39
|
+
}
|
40
|
+
end
|
41
41
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fruit_to_lime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-03-
|
14
|
+
date: 2014-03-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: iso_country_codes
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- lib/fruit_to_lime/model/coworker_reference.rb
|
143
143
|
- lib/fruit_to_lime/model/customfield.rb
|
144
144
|
- lib/fruit_to_lime/model/deal.rb
|
145
|
+
- lib/fruit_to_lime/model/deal_status.rb
|
145
146
|
- lib/fruit_to_lime/model/note.rb
|
146
147
|
- lib/fruit_to_lime/model/organization.rb
|
147
148
|
- lib/fruit_to_lime/model/person.rb
|