sugarcrm_emp 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +29 -0
- data/Gemfile +14 -0
- data/LICENSE +20 -0
- data/README.rdoc +275 -0
- data/Rakefile +44 -0
- data/VERSION +1 -0
- data/WATCHLIST.rdoc +7 -0
- data/bin/sugarcrm +26 -0
- data/lib/rails/generators/sugarcrm/config/config_generator.rb +22 -0
- data/lib/rails/generators/sugarcrm/config/templates/initializer.rb +4 -0
- data/lib/rails/generators/sugarcrm/config/templates/sugarcrm.yml +19 -0
- data/lib/sugarcrm/associations/association.rb +170 -0
- data/lib/sugarcrm/associations/association_cache.rb +36 -0
- data/lib/sugarcrm/associations/association_collection.rb +141 -0
- data/lib/sugarcrm/associations/association_methods.rb +91 -0
- data/lib/sugarcrm/associations/associations.rb +61 -0
- data/lib/sugarcrm/associations.rb +5 -0
- data/lib/sugarcrm/attributes/attribute_methods.rb +203 -0
- data/lib/sugarcrm/attributes/attribute_serializers.rb +55 -0
- data/lib/sugarcrm/attributes/attribute_typecast.rb +44 -0
- data/lib/sugarcrm/attributes/attribute_validations.rb +62 -0
- data/lib/sugarcrm/attributes.rb +4 -0
- data/lib/sugarcrm/base.rb +355 -0
- data/lib/sugarcrm/config/sugarcrm.yaml +10 -0
- data/lib/sugarcrm/connection/api/get_available_modules.rb +22 -0
- data/lib/sugarcrm/connection/api/get_document_revision.rb +14 -0
- data/lib/sugarcrm/connection/api/get_entries.rb +23 -0
- data/lib/sugarcrm/connection/api/get_entries_count.rb +20 -0
- data/lib/sugarcrm/connection/api/get_entry.rb +23 -0
- data/lib/sugarcrm/connection/api/get_entry_list.rb +31 -0
- data/lib/sugarcrm/connection/api/get_module_fields.rb +15 -0
- data/lib/sugarcrm/connection/api/get_note_attachment.rb +14 -0
- data/lib/sugarcrm/connection/api/get_relationships.rb +30 -0
- data/lib/sugarcrm/connection/api/get_report_entries.rb +17 -0
- data/lib/sugarcrm/connection/api/get_server_info.rb +7 -0
- data/lib/sugarcrm/connection/api/get_user_id.rb +13 -0
- data/lib/sugarcrm/connection/api/get_user_team_id.rb +14 -0
- data/lib/sugarcrm/connection/api/login.rb +18 -0
- data/lib/sugarcrm/connection/api/logout.rb +15 -0
- data/lib/sugarcrm/connection/api/seamless_login.rb +13 -0
- data/lib/sugarcrm/connection/api/search_by_module.rb +25 -0
- data/lib/sugarcrm/connection/api/set_campaign_merge.rb +15 -0
- data/lib/sugarcrm/connection/api/set_document_revision.rb +35 -0
- data/lib/sugarcrm/connection/api/set_entries.rb +15 -0
- data/lib/sugarcrm/connection/api/set_entry.rb +15 -0
- data/lib/sugarcrm/connection/api/set_note_attachment.rb +25 -0
- data/lib/sugarcrm/connection/api/set_relationship.rb +27 -0
- data/lib/sugarcrm/connection/api/set_relationships.rb +22 -0
- data/lib/sugarcrm/connection/connection.rb +201 -0
- data/lib/sugarcrm/connection/helper.rb +50 -0
- data/lib/sugarcrm/connection/request.rb +61 -0
- data/lib/sugarcrm/connection/response.rb +91 -0
- data/lib/sugarcrm/connection.rb +5 -0
- data/lib/sugarcrm/connection_pool.rb +163 -0
- data/lib/sugarcrm/exceptions.rb +23 -0
- data/lib/sugarcrm/extensions/README.txt +23 -0
- data/lib/sugarcrm/finders/dynamic_finder_match.rb +41 -0
- data/lib/sugarcrm/finders/finder_methods.rb +243 -0
- data/lib/sugarcrm/finders.rb +2 -0
- data/lib/sugarcrm/module.rb +174 -0
- data/lib/sugarcrm/module_methods.rb +91 -0
- data/lib/sugarcrm/session.rb +218 -0
- data/lib/sugarcrm.rb +22 -0
- data/sugarcrm.gemspec +178 -0
- data/test/config_test.yaml +15 -0
- data/test/connection/test_get_available_modules.rb +9 -0
- data/test/connection/test_get_entries.rb +15 -0
- data/test/connection/test_get_entry.rb +22 -0
- data/test/connection/test_get_entry_list.rb +23 -0
- data/test/connection/test_get_module_fields.rb +11 -0
- data/test/connection/test_get_relationships.rb +12 -0
- data/test/connection/test_get_server_info.rb +9 -0
- data/test/connection/test_get_user_id.rb +9 -0
- data/test/connection/test_get_user_team_id.rb +9 -0
- data/test/connection/test_login.rb +9 -0
- data/test/connection/test_logout.rb +9 -0
- data/test/connection/test_set_document_revision.rb +28 -0
- data/test/connection/test_set_entry.rb +15 -0
- data/test/connection/test_set_note_attachment.rb +16 -0
- data/test/connection/test_set_relationship.rb +18 -0
- data/test/extensions_test/patch.rb +9 -0
- data/test/helper.rb +17 -0
- data/test/test_association_collection.rb +11 -0
- data/test/test_associations.rb +156 -0
- data/test/test_connection.rb +13 -0
- data/test/test_connection_pool.rb +40 -0
- data/test/test_finders.rb +201 -0
- data/test/test_module.rb +51 -0
- data/test/test_request.rb +35 -0
- data/test/test_response.rb +26 -0
- data/test/test_session.rb +136 -0
- data/test/test_sugarcrm.rb +213 -0
- metadata +266 -0
@@ -0,0 +1,136 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
CONFIG_TEST_PATH = File.join(File.dirname(__FILE__), 'config_test.yaml')
|
4
|
+
|
5
|
+
# contents of config_test.yaml
|
6
|
+
CONFIG_CONTENTS = {
|
7
|
+
:config => {
|
8
|
+
:base_url => 'http://127.0.0.1/sugarcrm',
|
9
|
+
:username => 'admin',
|
10
|
+
:password => 'letmein'
|
11
|
+
}
|
12
|
+
}
|
13
|
+
CONFIG_CONTENTS.freeze
|
14
|
+
|
15
|
+
class TestSession < ActiveSupport::TestCase
|
16
|
+
context "The SugarCRM::Session class" do
|
17
|
+
should "raise SugarCRM::MissingCredentials if at least one of url/username/password is missing" do
|
18
|
+
assert_raise(SugarCRM::MissingCredentials){ SugarCRM.connect('http://127.0.0.1/sugarcrm', nil, nil) }
|
19
|
+
end
|
20
|
+
|
21
|
+
should "assign namespaces in a way that prevents collisions" do
|
22
|
+
begin
|
23
|
+
# Namespae0 already assigned (linked to the current connection)
|
24
|
+
One = SugarCRM::Session.from_file(CONFIG_PATH)
|
25
|
+
Two = SugarCRM::Session.from_file(CONFIG_PATH)
|
26
|
+
One.disconnect!
|
27
|
+
Three = SugarCRM::Session.from_file(CONFIG_PATH)
|
28
|
+
assert_not_equal Two, Three # namespaces must be different
|
29
|
+
ensure
|
30
|
+
Two.disconnect!
|
31
|
+
Three.disconnect!
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
should "parse config parameters from a file" do
|
36
|
+
assert_equal CONFIG_CONTENTS, SugarCRM::Session.parse_config_file(CONFIG_TEST_PATH)
|
37
|
+
end
|
38
|
+
|
39
|
+
should "create a session from a config file" do
|
40
|
+
assert_difference('SugarCRM.namespaces.size') do
|
41
|
+
SugarCRM::Session.from_file(CONFIG_PATH)
|
42
|
+
end
|
43
|
+
|
44
|
+
SugarCRM.const_get(SugarCRM.namespaces.last).disconnect
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
context "A SugarCRM::Session instance" do
|
49
|
+
should "load monkey patch extensions" do
|
50
|
+
SugarCRM.extensions_folder = File.join(File.dirname(__FILE__), 'extensions_test')
|
51
|
+
assert SugarCRM::Contact.is_extended?
|
52
|
+
assert SugarCRM::Contact.is_extended?
|
53
|
+
end
|
54
|
+
|
55
|
+
should "implement reload!" do
|
56
|
+
assert_nothing_raised do
|
57
|
+
SugarCRM.reload!
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
should "load config file" do
|
62
|
+
SugarCRM.load_config CONFIG_TEST_PATH, :reconnect => false
|
63
|
+
CONFIG_CONTENTS[:config].each{|k,v| assert_equal v, SugarCRM.config[k]}
|
64
|
+
SugarCRM.load_config CONFIG_PATH
|
65
|
+
end
|
66
|
+
|
67
|
+
should "be able to disconnect, and log in to Sugar automatically if credentials are present in config file" do
|
68
|
+
assert_nothing_raised{ SugarCRM.current_user }
|
69
|
+
assert SugarCRM.sessions.size == 1
|
70
|
+
|
71
|
+
SugarCRM.disconnect!
|
72
|
+
assert SugarCRM.sessions.size == 0
|
73
|
+
|
74
|
+
assert_raise(SugarCRM::NoActiveSession){ SugarCRM.current_user }
|
75
|
+
|
76
|
+
SugarCRM::Session.from_file(CONFIG_PATH)
|
77
|
+
|
78
|
+
assert_nothing_raised{ SugarCRM.current_user }
|
79
|
+
assert SugarCRM.sessions.size == 1
|
80
|
+
end
|
81
|
+
|
82
|
+
should "update the login credentials on connection" do
|
83
|
+
config = YAML.load_file(CONFIG_PATH) # was loaded in helper.rb
|
84
|
+
["base_url", "username", "password"].each{|k|
|
85
|
+
assert_equal config["config"][k], SugarCRM.config[k.to_sym]
|
86
|
+
}
|
87
|
+
end
|
88
|
+
|
89
|
+
should "return the server version" do
|
90
|
+
assert_equal String, SugarCRM.sugar_version.class
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
context "The SugarCRM module" do
|
95
|
+
should "show the only the namespaces currently in use with SugarCRM.namespaces" do
|
96
|
+
assert_equal 1, SugarCRM.namespaces.size
|
97
|
+
|
98
|
+
begin
|
99
|
+
assert_difference('SugarCRM.namespaces.size') do
|
100
|
+
OneA = SugarCRM::Session.from_file(CONFIG_PATH)
|
101
|
+
end
|
102
|
+
ensure
|
103
|
+
assert_difference('SugarCRM.namespaces.size', -1) do
|
104
|
+
OneA.disconnect!
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
should "add a used namespace on each new connection" do
|
110
|
+
begin
|
111
|
+
assert_difference('SugarCRM.used_namespaces.size') do
|
112
|
+
OneB = SugarCRM::Session.from_file(CONFIG_PATH)
|
113
|
+
end
|
114
|
+
ensure
|
115
|
+
# connection (and namespace) is reused => no used namespace should be added
|
116
|
+
assert_no_difference('SugarCRM.used_namespaces.size') do
|
117
|
+
OneB.reconnect!
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
assert_no_difference('SugarCRM.used_namespaces.size') do
|
122
|
+
OneB.disconnect!
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
should "not allow access to methods on SugarCRM if there are multiple active connections" do
|
127
|
+
begin
|
128
|
+
OneC = SugarCRM::Session.from_file(CONFIG_PATH)
|
129
|
+
|
130
|
+
assert_raise(SugarCRM::MultipleSessions){ SugarCRM.current_user }
|
131
|
+
ensure
|
132
|
+
OneC.disconnect!
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
@@ -0,0 +1,213 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestSugarCRM < ActiveSupport::TestCase
|
4
|
+
context "A class inheriting SugarCRM::Base" do
|
5
|
+
should "ignore 'id' attibute when creating an instance" do
|
6
|
+
first_account = SugarCRM::Account.first
|
7
|
+
new_account = nil
|
8
|
+
assert_difference('SugarCRM::Account.count') do
|
9
|
+
new_account = SugarCRM::Account.create(first_account.attributes)
|
10
|
+
end
|
11
|
+
assert first_account.id != new_account.id
|
12
|
+
end
|
13
|
+
|
14
|
+
should "implement self.count" do
|
15
|
+
nb_accounts = SugarCRM::Account.count
|
16
|
+
assert nb_accounts > 0, "There should be some Accounts"
|
17
|
+
nb_inc_accounts = nil
|
18
|
+
assert_nothing_raised do
|
19
|
+
nb_inc_accounts = SugarCRM::Account.count(:conditions => {:name => "LIKE '%Inc'"})
|
20
|
+
end
|
21
|
+
nb_inc_accounts_size = SugarCRM::Account.all(:conditions => {:name => "LIKE '%Inc'"}).size
|
22
|
+
assert nb_inc_accounts > 0
|
23
|
+
assert nb_inc_accounts < nb_accounts
|
24
|
+
assert_equal nb_inc_accounts_size, nb_inc_accounts
|
25
|
+
end
|
26
|
+
|
27
|
+
should "raise InvalidAttribute if self.count is called with a custom attribute" do
|
28
|
+
assert_raise SugarCRM::InvalidAttribute do
|
29
|
+
SugarCRM::Account.count(:conditions => {:custom_attribute_c => "value"})
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context "A SugarCRM::Base instance" do
|
35
|
+
|
36
|
+
should "return the module name" do
|
37
|
+
assert_equal "Users", SugarCRM::User._module.name
|
38
|
+
end
|
39
|
+
|
40
|
+
should "return the module fields" do
|
41
|
+
assert_kind_of Hash, SugarCRM::Account._module.fields
|
42
|
+
end
|
43
|
+
|
44
|
+
should "respond to self#methods" do
|
45
|
+
assert_instance_of Array, SugarCRM::User.new.methods
|
46
|
+
end
|
47
|
+
|
48
|
+
should "respond to self.connection" do
|
49
|
+
assert_respond_to SugarCRM::User, :connection
|
50
|
+
assert_instance_of SugarCRM::Connection, SugarCRM::User.connection
|
51
|
+
end
|
52
|
+
|
53
|
+
should "respond to self.connection.logged_in?" do
|
54
|
+
assert_respond_to SugarCRM::User.connection, :logged_in?
|
55
|
+
end
|
56
|
+
|
57
|
+
should "respond to self.current_user" do
|
58
|
+
assert_instance_of SugarCRM::User, SugarCRM.current_user
|
59
|
+
end
|
60
|
+
|
61
|
+
should "respond to self.attributes_from_modules_fields" do
|
62
|
+
assert_kind_of Hash, SugarCRM::User.attributes_from_module
|
63
|
+
end
|
64
|
+
|
65
|
+
should "return an instance of itself when #new" do
|
66
|
+
assert_instance_of SugarCRM::User, SugarCRM::User.new
|
67
|
+
end
|
68
|
+
|
69
|
+
should "define instance level attributes when #new" do
|
70
|
+
u = SugarCRM::User.new
|
71
|
+
assert SugarCRM::User.attribute_methods_generated
|
72
|
+
end
|
73
|
+
|
74
|
+
should "not save a record that is missing required attributes" do
|
75
|
+
u = SugarCRM::User.new
|
76
|
+
u.last_name = "Test"
|
77
|
+
assert !u.save
|
78
|
+
assert_raise SugarCRM::InvalidRecord do
|
79
|
+
u.save!
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
should "create, modify, and delete a record" do
|
84
|
+
u = SugarCRM::User.new
|
85
|
+
assert u.email1?
|
86
|
+
u.email1 = "abc@abc.com"
|
87
|
+
u.first_name = "Test"
|
88
|
+
u.last_name = "User"
|
89
|
+
u.system_generated_password = false
|
90
|
+
u.user_name = "test_user"
|
91
|
+
u.status = "Active"
|
92
|
+
assert_equal "Test", u.modified_attributes[:first_name][:new]
|
93
|
+
assert u.save!
|
94
|
+
assert !u.new?
|
95
|
+
m = SugarCRM::User.find_by_first_name_and_last_name("Test", "User")
|
96
|
+
assert m.user_name != "admin"
|
97
|
+
m.title = "Test User"
|
98
|
+
assert m.save!
|
99
|
+
assert m.delete
|
100
|
+
assert m.destroyed?
|
101
|
+
end
|
102
|
+
|
103
|
+
should "respond to destroy" do
|
104
|
+
a = SugarCRM::Account.first
|
105
|
+
assert a.respond_to? :destroy
|
106
|
+
end
|
107
|
+
|
108
|
+
should "support saving of records with special characters in them" do
|
109
|
+
a = SugarCRM::Account.new
|
110
|
+
a.name = "COHEN, WEISS & SIMON LLP"
|
111
|
+
assert a.save!
|
112
|
+
assert a.delete
|
113
|
+
end
|
114
|
+
|
115
|
+
should "implement Base#reload!" do
|
116
|
+
a = SugarCRM::User.find("seed_will_id")
|
117
|
+
b = SugarCRM::User.find("seed_will_id")
|
118
|
+
assert_not_equal 'admin', a.user_name # make sure we don't mess up admin user
|
119
|
+
# Save the original value, so we can set it back.
|
120
|
+
orig_last_name = a.last_name.dup
|
121
|
+
diff_last_name = a.last_name + 'crm'
|
122
|
+
b.last_name = diff_last_name
|
123
|
+
b.save!
|
124
|
+
# Compare the two user objects
|
125
|
+
assert_not_equal b.last_name, a.last_name
|
126
|
+
a.reload!
|
127
|
+
assert_equal a.last_name, b.last_name
|
128
|
+
# Set the name back to what it was before
|
129
|
+
b.last_name = orig_last_name
|
130
|
+
b.save!
|
131
|
+
end
|
132
|
+
|
133
|
+
should "implement Base#update_attribute" do
|
134
|
+
a = SugarCRM::Account.first
|
135
|
+
orig_name = a.name
|
136
|
+
assert a.update_attribute('name', orig_name + 'test')
|
137
|
+
assert_not_equal orig_name, a.name
|
138
|
+
assert a.update_attribute('name', orig_name) # revert changes
|
139
|
+
end
|
140
|
+
|
141
|
+
should "implement Base#update_attribute!" do
|
142
|
+
a = SugarCRM::Account.first
|
143
|
+
orig_name = a.name
|
144
|
+
assert_nothing_raised do
|
145
|
+
a.update_attribute!('name', orig_name + 'test')
|
146
|
+
end
|
147
|
+
assert_not_equal orig_name, a.name
|
148
|
+
assert a.update_attribute('name', orig_name) # revert changes
|
149
|
+
end
|
150
|
+
|
151
|
+
should "implement Base#update_attributes" do
|
152
|
+
a = SugarCRM::Account.first
|
153
|
+
orig_name = a.name
|
154
|
+
orig_street = a.billing_address_street
|
155
|
+
assert a.update_attributes(:name => orig_name + 'test', :billing_address_street => orig_street + 'test')
|
156
|
+
assert_not_equal orig_name, a.name
|
157
|
+
assert_not_equal orig_street, a.billing_address_street
|
158
|
+
assert a.update_attributes(:name => orig_name, :billing_address_street => orig_street) # revert changes
|
159
|
+
end
|
160
|
+
|
161
|
+
should "implement Base#update_attributes!" do
|
162
|
+
a = SugarCRM::Account.first
|
163
|
+
orig_name = a.name
|
164
|
+
orig_street = a.billing_address_street
|
165
|
+
assert_nothing_raised do
|
166
|
+
a.update_attributes!(:name => orig_name + 'test', :billing_address_street => orig_street + 'test')
|
167
|
+
end
|
168
|
+
assert_not_equal orig_name, a.name
|
169
|
+
assert_not_equal orig_street, a.billing_address_street
|
170
|
+
assert a.update_attributes(:name => orig_name, :billing_address_street => orig_street) # revert changes
|
171
|
+
end
|
172
|
+
|
173
|
+
should "implement Base#persisted?" do
|
174
|
+
a = SugarCRM::Account.new(:name => 'temp')
|
175
|
+
assert ! a.persisted?
|
176
|
+
a.save!
|
177
|
+
assert a.persisted?
|
178
|
+
a.delete
|
179
|
+
assert ! a.persisted?
|
180
|
+
end
|
181
|
+
|
182
|
+
should "respond to #pretty_print" do
|
183
|
+
assert_respond_to SugarCRM::User.new, :pretty_print
|
184
|
+
end
|
185
|
+
|
186
|
+
should "return an instance's URL" do
|
187
|
+
user = SugarCRM::User.first
|
188
|
+
assert_equal "#{SugarCRM.session.config[:base_url]}/index.php?module=Users&action=DetailView&record=#{user.id}", user.url
|
189
|
+
end
|
190
|
+
|
191
|
+
should "respond to #blank?" do
|
192
|
+
assert !SugarCRM::User.first.blank?
|
193
|
+
end
|
194
|
+
|
195
|
+
should "bypass validation when #save(:validate => false)" do
|
196
|
+
u = SugarCRM::User.new
|
197
|
+
u.last_name = "doe"
|
198
|
+
assert u.save(:validate => false)
|
199
|
+
assert u.delete
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
# TODO: Fix this test so it creates the Note properly before asserting.
|
204
|
+
context "A SugarCRM::Note instance" do
|
205
|
+
should "return the correct parent record with the `parent` method" do
|
206
|
+
note = SugarCRM::Note.first
|
207
|
+
parent = note.parent
|
208
|
+
assert_equal note.parent_id, parent.id
|
209
|
+
assert_equal note.parent_type.singularize, parent.class.to_s.split('::').last
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
end
|
metadata
ADDED
@@ -0,0 +1,266 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sugarcrm_emp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.10.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Carl Hicks
|
9
|
+
- David Sulc
|
10
|
+
- Dimitar Kostov
|
11
|
+
autorequire:
|
12
|
+
bindir: bin
|
13
|
+
cert_chain: []
|
14
|
+
date: 2011-12-13 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: activesupport
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.3.10
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ! '>='
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 2.3.10
|
32
|
+
- !ruby/object:Gem::Dependency
|
33
|
+
name: i18n
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: json
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
type: :runtime
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ! '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: shoulda
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ! '>='
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
type: :development
|
73
|
+
prerelease: false
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: bundler
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ~>
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: 1.0.0
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ~>
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 1.0.0
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: jeweler
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
100
|
+
requirements:
|
101
|
+
- - ~>
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.5.2
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ~>
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 1.5.2
|
112
|
+
description:
|
113
|
+
email: dimitar@emerchantpay.com
|
114
|
+
executables:
|
115
|
+
- sugarcrm
|
116
|
+
extensions: []
|
117
|
+
extra_rdoc_files:
|
118
|
+
- LICENSE
|
119
|
+
- README.rdoc
|
120
|
+
files:
|
121
|
+
- .document
|
122
|
+
- .gitignore
|
123
|
+
- Gemfile
|
124
|
+
- LICENSE
|
125
|
+
- README.rdoc
|
126
|
+
- Rakefile
|
127
|
+
- VERSION
|
128
|
+
- WATCHLIST.rdoc
|
129
|
+
- bin/sugarcrm
|
130
|
+
- lib/rails/generators/sugarcrm/config/config_generator.rb
|
131
|
+
- lib/rails/generators/sugarcrm/config/templates/initializer.rb
|
132
|
+
- lib/rails/generators/sugarcrm/config/templates/sugarcrm.yml
|
133
|
+
- lib/sugarcrm.rb
|
134
|
+
- lib/sugarcrm/associations.rb
|
135
|
+
- lib/sugarcrm/associations/association.rb
|
136
|
+
- lib/sugarcrm/associations/association_cache.rb
|
137
|
+
- lib/sugarcrm/associations/association_collection.rb
|
138
|
+
- lib/sugarcrm/associations/association_methods.rb
|
139
|
+
- lib/sugarcrm/associations/associations.rb
|
140
|
+
- lib/sugarcrm/attributes.rb
|
141
|
+
- lib/sugarcrm/attributes/attribute_methods.rb
|
142
|
+
- lib/sugarcrm/attributes/attribute_serializers.rb
|
143
|
+
- lib/sugarcrm/attributes/attribute_typecast.rb
|
144
|
+
- lib/sugarcrm/attributes/attribute_validations.rb
|
145
|
+
- lib/sugarcrm/base.rb
|
146
|
+
- lib/sugarcrm/config/sugarcrm.yaml
|
147
|
+
- lib/sugarcrm/connection.rb
|
148
|
+
- lib/sugarcrm/connection/api/get_available_modules.rb
|
149
|
+
- lib/sugarcrm/connection/api/get_document_revision.rb
|
150
|
+
- lib/sugarcrm/connection/api/get_entries.rb
|
151
|
+
- lib/sugarcrm/connection/api/get_entries_count.rb
|
152
|
+
- lib/sugarcrm/connection/api/get_entry.rb
|
153
|
+
- lib/sugarcrm/connection/api/get_entry_list.rb
|
154
|
+
- lib/sugarcrm/connection/api/get_module_fields.rb
|
155
|
+
- lib/sugarcrm/connection/api/get_note_attachment.rb
|
156
|
+
- lib/sugarcrm/connection/api/get_relationships.rb
|
157
|
+
- lib/sugarcrm/connection/api/get_report_entries.rb
|
158
|
+
- lib/sugarcrm/connection/api/get_server_info.rb
|
159
|
+
- lib/sugarcrm/connection/api/get_user_id.rb
|
160
|
+
- lib/sugarcrm/connection/api/get_user_team_id.rb
|
161
|
+
- lib/sugarcrm/connection/api/login.rb
|
162
|
+
- lib/sugarcrm/connection/api/logout.rb
|
163
|
+
- lib/sugarcrm/connection/api/seamless_login.rb
|
164
|
+
- lib/sugarcrm/connection/api/search_by_module.rb
|
165
|
+
- lib/sugarcrm/connection/api/set_campaign_merge.rb
|
166
|
+
- lib/sugarcrm/connection/api/set_document_revision.rb
|
167
|
+
- lib/sugarcrm/connection/api/set_entries.rb
|
168
|
+
- lib/sugarcrm/connection/api/set_entry.rb
|
169
|
+
- lib/sugarcrm/connection/api/set_note_attachment.rb
|
170
|
+
- lib/sugarcrm/connection/api/set_relationship.rb
|
171
|
+
- lib/sugarcrm/connection/api/set_relationships.rb
|
172
|
+
- lib/sugarcrm/connection/connection.rb
|
173
|
+
- lib/sugarcrm/connection/helper.rb
|
174
|
+
- lib/sugarcrm/connection/request.rb
|
175
|
+
- lib/sugarcrm/connection/response.rb
|
176
|
+
- lib/sugarcrm/connection_pool.rb
|
177
|
+
- lib/sugarcrm/exceptions.rb
|
178
|
+
- lib/sugarcrm/extensions/README.txt
|
179
|
+
- lib/sugarcrm/finders.rb
|
180
|
+
- lib/sugarcrm/finders/dynamic_finder_match.rb
|
181
|
+
- lib/sugarcrm/finders/finder_methods.rb
|
182
|
+
- lib/sugarcrm/module.rb
|
183
|
+
- lib/sugarcrm/module_methods.rb
|
184
|
+
- lib/sugarcrm/session.rb
|
185
|
+
- sugarcrm.gemspec
|
186
|
+
- test/config_test.yaml
|
187
|
+
- test/connection/test_get_available_modules.rb
|
188
|
+
- test/connection/test_get_entries.rb
|
189
|
+
- test/connection/test_get_entry.rb
|
190
|
+
- test/connection/test_get_entry_list.rb
|
191
|
+
- test/connection/test_get_module_fields.rb
|
192
|
+
- test/connection/test_get_relationships.rb
|
193
|
+
- test/connection/test_get_server_info.rb
|
194
|
+
- test/connection/test_get_user_id.rb
|
195
|
+
- test/connection/test_get_user_team_id.rb
|
196
|
+
- test/connection/test_login.rb
|
197
|
+
- test/connection/test_logout.rb
|
198
|
+
- test/connection/test_set_document_revision.rb
|
199
|
+
- test/connection/test_set_entry.rb
|
200
|
+
- test/connection/test_set_note_attachment.rb
|
201
|
+
- test/connection/test_set_relationship.rb
|
202
|
+
- test/extensions_test/patch.rb
|
203
|
+
- test/helper.rb
|
204
|
+
- test/test_association_collection.rb
|
205
|
+
- test/test_associations.rb
|
206
|
+
- test/test_connection.rb
|
207
|
+
- test/test_connection_pool.rb
|
208
|
+
- test/test_finders.rb
|
209
|
+
- test/test_module.rb
|
210
|
+
- test/test_request.rb
|
211
|
+
- test/test_response.rb
|
212
|
+
- test/test_session.rb
|
213
|
+
- test/test_sugarcrm.rb
|
214
|
+
homepage: http://github.com/eMerchantPay/sugarcrm
|
215
|
+
licenses: []
|
216
|
+
post_install_message:
|
217
|
+
rdoc_options: []
|
218
|
+
require_paths:
|
219
|
+
- lib
|
220
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
221
|
+
none: false
|
222
|
+
requirements:
|
223
|
+
- - ! '>='
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
version: '0'
|
226
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
227
|
+
none: false
|
228
|
+
requirements:
|
229
|
+
- - ! '>='
|
230
|
+
- !ruby/object:Gem::Version
|
231
|
+
version: '0'
|
232
|
+
requirements: []
|
233
|
+
rubyforge_project:
|
234
|
+
rubygems_version: 1.8.23
|
235
|
+
signing_key:
|
236
|
+
specification_version: 3
|
237
|
+
summary: A less clunky way to interact with SugarCRM via REST.
|
238
|
+
test_files:
|
239
|
+
- test/config_test.yaml
|
240
|
+
- test/connection/test_get_available_modules.rb
|
241
|
+
- test/connection/test_get_entries.rb
|
242
|
+
- test/connection/test_get_entry.rb
|
243
|
+
- test/connection/test_get_entry_list.rb
|
244
|
+
- test/connection/test_get_module_fields.rb
|
245
|
+
- test/connection/test_get_relationships.rb
|
246
|
+
- test/connection/test_get_server_info.rb
|
247
|
+
- test/connection/test_get_user_id.rb
|
248
|
+
- test/connection/test_get_user_team_id.rb
|
249
|
+
- test/connection/test_login.rb
|
250
|
+
- test/connection/test_logout.rb
|
251
|
+
- test/connection/test_set_document_revision.rb
|
252
|
+
- test/connection/test_set_entry.rb
|
253
|
+
- test/connection/test_set_note_attachment.rb
|
254
|
+
- test/connection/test_set_relationship.rb
|
255
|
+
- test/extensions_test/patch.rb
|
256
|
+
- test/helper.rb
|
257
|
+
- test/test_association_collection.rb
|
258
|
+
- test/test_associations.rb
|
259
|
+
- test/test_connection.rb
|
260
|
+
- test/test_connection_pool.rb
|
261
|
+
- test/test_finders.rb
|
262
|
+
- test/test_module.rb
|
263
|
+
- test/test_request.rb
|
264
|
+
- test/test_response.rb
|
265
|
+
- test/test_session.rb
|
266
|
+
- test/test_sugarcrm.rb
|