insightly 0.1.1 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/{README.rdoc → README.md} +0 -0
- data/insightly.gemspec +6 -6
- data/lib/insightly/base.rb +0 -3
- data/lib/insightly/read_only.rb +0 -4
- data/lib/insightly/version.rb +1 -1
- data/spec/unit/opportunity_spec.rb +31 -0
- metadata +42 -46
data/{README.rdoc → README.md}
RENAMED
File without changes
|
data/insightly.gemspec
CHANGED
@@ -4,17 +4,17 @@ require 'insightly/version'
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "insightly"
|
6
6
|
s.summary = "Insight.ly Ruby Client Library"
|
7
|
-
s.description = "Ruby library for integrating with http://Insight.ly"
|
7
|
+
s.description = "Ruby library for integrating with http://Insight.ly . This gem makes it easy to talk to their recently released REST API."
|
8
8
|
s.version = Insightly::Version::String
|
9
9
|
s.authors = ["Dirk Elmendorf","r26D"]
|
10
10
|
s.email = "code@r26d.com"
|
11
11
|
s.homepage = "https://github.com/r26D/insightly"
|
12
12
|
s.has_rdoc = false
|
13
|
-
s.files = Dir.glob ["README.
|
13
|
+
s.files = Dir.glob ["README.md", "LICENSE", "{lib,spec}/**/*.rb", "lib/**/*.crt", "*.gemspec"]
|
14
14
|
s.add_dependency "builder", ">= 2.0.0"
|
15
15
|
s.add_dependency "json", ">= 1.7.5"
|
16
|
-
s.add_dependency "rest-client", ">=1.6.7"
|
17
|
-
s.add_dependency "logger", ">=1.2.8"
|
18
|
-
s.add_dependency "
|
19
|
-
s.add_dependency "i18n", "
|
16
|
+
s.add_dependency "rest-client", ">= 1.6.7"
|
17
|
+
s.add_dependency "logger", ">= 1.2.8"
|
18
|
+
s.add_dependency "activesupport", "> 3"
|
19
|
+
s.add_dependency "i18n", "> 0"
|
20
20
|
end
|
data/lib/insightly/base.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
#METODO only allow build to set fields that are part of the API fields
|
2
2
|
#METODO make a distinction between fields that you can set and save and ones you can only read - like DATE_UPDATED_UTC
|
3
|
-
|
4
|
-
|
5
|
-
#METODO Build and deploy a gem of this code
|
6
3
|
module Insightly
|
7
4
|
class Base
|
8
5
|
|
data/lib/insightly/read_only.rb
CHANGED
data/lib/insightly/version.rb
CHANGED
@@ -43,6 +43,37 @@ describe Insightly::Opportunity do
|
|
43
43
|
})
|
44
44
|
end
|
45
45
|
it "should be able to create a opportunity" do
|
46
|
+
Insightly::Configuration.custom_fields_for_opportunities(:dummy1,
|
47
|
+
:admin_url,
|
48
|
+
:phone_number,
|
49
|
+
:timezone,
|
50
|
+
:plan,
|
51
|
+
:organization,
|
52
|
+
:company_name,
|
53
|
+
:contact_name)
|
54
|
+
|
55
|
+
o = Insightly::Opportunity.new
|
56
|
+
o.opportunity_state = "Open"
|
57
|
+
o.visible_to = "EVERYONE"
|
58
|
+
o.stage_id = "71162"
|
59
|
+
o.forecast_close_date = "2012-10-05 00:00:00"
|
60
|
+
o.responsible_user_id = "226277"
|
61
|
+
o.bid_currency = "USD"
|
62
|
+
o.opportunity_details = "This is the description"
|
63
|
+
o.category_id = "628187" #First plan list
|
64
|
+
o.bid_amount = "75"
|
65
|
+
o.pipeline_id = "24377"
|
66
|
+
o.opportunity_name = "Sample Opportunity 3"
|
67
|
+
o.contact_name = "Dirk ELmendorf"
|
68
|
+
o.company_name = "r26D"
|
69
|
+
o.organization = "TruckingOffice"
|
70
|
+
o.plan = "Owner/Operator"
|
71
|
+
o.timezone = "Central"
|
72
|
+
o.phone_number = "210-555-1212"
|
73
|
+
o.admin_url = "https://admin/companies/122"
|
74
|
+
o.bid_type = "Fixed Bid"
|
75
|
+
o.owner_user_id = "226277"
|
76
|
+
o.save
|
46
77
|
end
|
47
78
|
it "should have a url base" do
|
48
79
|
@opportunity.url_base.should == "Opportunities"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: insightly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 8
|
10
|
+
version: 0.1.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dirk Elmendorf
|
@@ -16,10 +16,11 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-09-
|
19
|
+
date: 2012-09-11 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
22
|
+
name: builder
|
23
|
+
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
25
|
none: false
|
25
26
|
requirements:
|
@@ -31,11 +32,11 @@ dependencies:
|
|
31
32
|
- 0
|
32
33
|
- 0
|
33
34
|
version: 2.0.0
|
35
|
+
type: :runtime
|
34
36
|
version_requirements: *id001
|
35
|
-
prerelease: false
|
36
|
-
name: builder
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
-
|
38
|
+
name: json
|
39
|
+
prerelease: false
|
39
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
41
|
none: false
|
41
42
|
requirements:
|
@@ -47,11 +48,11 @@ dependencies:
|
|
47
48
|
- 7
|
48
49
|
- 5
|
49
50
|
version: 1.7.5
|
51
|
+
type: :runtime
|
50
52
|
version_requirements: *id002
|
51
|
-
prerelease: false
|
52
|
-
name: json
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
|
-
|
54
|
+
name: rest-client
|
55
|
+
prerelease: false
|
55
56
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
57
|
none: false
|
57
58
|
requirements:
|
@@ -63,11 +64,11 @@ dependencies:
|
|
63
64
|
- 6
|
64
65
|
- 7
|
65
66
|
version: 1.6.7
|
67
|
+
type: :runtime
|
66
68
|
version_requirements: *id003
|
67
|
-
prerelease: false
|
68
|
-
name: rest-client
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
|
70
|
+
name: logger
|
71
|
+
prerelease: false
|
71
72
|
requirement: &id004 !ruby/object:Gem::Requirement
|
72
73
|
none: false
|
73
74
|
requirements:
|
@@ -79,42 +80,37 @@ dependencies:
|
|
79
80
|
- 2
|
80
81
|
- 8
|
81
82
|
version: 1.2.8
|
83
|
+
type: :runtime
|
82
84
|
version_requirements: *id004
|
83
|
-
prerelease: false
|
84
|
-
name: logger
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
|
-
|
86
|
+
name: activesupport
|
87
|
+
prerelease: false
|
87
88
|
requirement: &id005 !ruby/object:Gem::Requirement
|
88
89
|
none: false
|
89
90
|
requirements:
|
90
|
-
- - "
|
91
|
+
- - ">"
|
91
92
|
- !ruby/object:Gem::Version
|
92
|
-
hash:
|
93
|
+
hash: 5
|
93
94
|
segments:
|
94
95
|
- 3
|
95
|
-
|
96
|
-
|
97
|
-
version: 3.0.0
|
96
|
+
version: "3"
|
97
|
+
type: :runtime
|
98
98
|
version_requirements: *id005
|
99
|
-
prerelease: false
|
100
|
-
name: active_support
|
101
99
|
- !ruby/object:Gem::Dependency
|
102
|
-
|
100
|
+
name: i18n
|
101
|
+
prerelease: false
|
103
102
|
requirement: &id006 !ruby/object:Gem::Requirement
|
104
103
|
none: false
|
105
104
|
requirements:
|
106
|
-
- - "
|
105
|
+
- - ">"
|
107
106
|
- !ruby/object:Gem::Version
|
108
|
-
hash:
|
107
|
+
hash: 3
|
109
108
|
segments:
|
110
109
|
- 0
|
111
|
-
|
112
|
-
|
113
|
-
version: 0.6.1
|
110
|
+
version: "0"
|
111
|
+
type: :runtime
|
114
112
|
version_requirements: *id006
|
115
|
-
|
116
|
-
name: i18n
|
117
|
-
description: Ruby library for integrating with http://Insight.ly
|
113
|
+
description: Ruby library for integrating with http://Insight.ly . This gem makes it easy to talk to their recently released REST API.
|
118
114
|
email: code@r26d.com
|
119
115
|
executables: []
|
120
116
|
|
@@ -123,26 +119,26 @@ extensions: []
|
|
123
119
|
extra_rdoc_files: []
|
124
120
|
|
125
121
|
files:
|
126
|
-
- README.
|
122
|
+
- README.md
|
127
123
|
- LICENSE
|
128
|
-
- lib/insightly.rb
|
129
|
-
- lib/insightly/base.rb
|
130
|
-
- lib/insightly/comment.rb
|
131
|
-
- lib/insightly/configuration.rb
|
132
|
-
- lib/insightly/task_link.rb
|
133
|
-
- lib/insightly/read_only.rb
|
134
124
|
- lib/insightly/read_write.rb
|
135
|
-
- lib/insightly/version.rb
|
136
|
-
- lib/insightly/opportunity.rb
|
137
125
|
- lib/insightly/task.rb
|
126
|
+
- lib/insightly/opportunity.rb
|
127
|
+
- lib/insightly/read_only.rb
|
128
|
+
- lib/insightly/configuration.rb
|
129
|
+
- lib/insightly/version.rb
|
130
|
+
- lib/insightly/task_link.rb
|
131
|
+
- lib/insightly/comment.rb
|
138
132
|
- lib/insightly/opportunity_state_reason.rb
|
133
|
+
- lib/insightly/base.rb
|
134
|
+
- lib/insightly.rb
|
139
135
|
- spec/unit/task_link_spec.rb
|
140
|
-
- spec/unit/configuration_spec.rb
|
141
|
-
- spec/unit/task_spec.rb
|
142
|
-
- spec/unit/comment_spec.rb
|
143
136
|
- spec/unit/base_spec.rb
|
137
|
+
- spec/unit/comment_spec.rb
|
144
138
|
- spec/unit/opportunity_spec.rb
|
145
139
|
- spec/unit/opportunity_state_reason_spec.rb
|
140
|
+
- spec/unit/configuration_spec.rb
|
141
|
+
- spec/unit/task_spec.rb
|
146
142
|
- spec/spec_helper.rb
|
147
143
|
- insightly.gemspec
|
148
144
|
homepage: https://github.com/r26D/insightly
|
@@ -174,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
170
|
requirements: []
|
175
171
|
|
176
172
|
rubyforge_project:
|
177
|
-
rubygems_version: 1.8.
|
173
|
+
rubygems_version: 1.8.17
|
178
174
|
signing_key:
|
179
175
|
specification_version: 3
|
180
176
|
summary: Insight.ly Ruby Client Library
|