sugarcrm 0.9.15 → 0.9.16
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/Gemfile.lock +24 -0
 - data/VERSION +1 -1
 - data/lib/sugarcrm/connection/connection.rb +87 -43
 - data/lib/sugarcrm/connection_pool.rb +2 -1
 - data/lib/sugarcrm/exceptions.rb +2 -0
 - data/lib/sugarcrm/session.rb +1 -3
 - data/sugarcrm.gemspec +5 -3
 - data/sugarcrm.tmproj +1148 -0
 - data/test/test_connection_pool.rb +8 -1
 - data/test/test_session.rb +1 -2
 - metadata +55 -21
 
| 
         @@ -17,7 +17,7 @@ class TestConnectionPool < ActiveSupport::TestCase 
     | 
|
| 
       17 
17 
     | 
    
         
             
                  end
         
     | 
| 
       18 
18 
     | 
    
         
             
                end
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
     | 
    
         
            -
                should "be able to specify its timeout" do
         
     | 
| 
      
 20 
     | 
    
         
            +
                should "be able to specify its timeout on creation" do
         
     | 
| 
       21 
21 
     | 
    
         
             
                  default_timeout = SugarCRM.session.connection_pool.timeout
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
                  config = SugarCRM.session.config
         
     | 
| 
         @@ -29,5 +29,12 @@ class TestConnectionPool < ActiveSupport::TestCase 
     | 
|
| 
       29 
29 
     | 
    
         
             
                    sess.disconnect!
         
     | 
| 
       30 
30 
     | 
    
         
             
                  end
         
     | 
| 
       31 
31 
     | 
    
         
             
                end
         
     | 
| 
      
 32 
     | 
    
         
            +
                
         
     | 
| 
      
 33 
     | 
    
         
            +
                should "be able to specify its timeout after creation" do
         
     | 
| 
      
 34 
     | 
    
         
            +
                  timeout = SugarCRM.session.connection_pool.timeout
         
     | 
| 
      
 35 
     | 
    
         
            +
                  SugarCRM.session.connection_pool.timeout += 1
         
     | 
| 
      
 36 
     | 
    
         
            +
                  
         
     | 
| 
      
 37 
     | 
    
         
            +
                  assert_equal timeout + 1, SugarCRM.session.connection_pool.timeout
         
     | 
| 
      
 38 
     | 
    
         
            +
                end
         
     | 
| 
       32 
39 
     | 
    
         
             
              end
         
     | 
| 
       33 
40 
     | 
    
         
             
            end
         
     | 
    
        data/test/test_session.rb
    CHANGED
    
    | 
         @@ -15,7 +15,6 @@ CONFIG_CONTENTS.freeze 
     | 
|
| 
       15 
15 
     | 
    
         
             
            class TestSession < ActiveSupport::TestCase
         
     | 
| 
       16 
16 
     | 
    
         
             
              context "The SugarCRM::Session class" do
         
     | 
| 
       17 
17 
     | 
    
         
             
                should "raise SugarCRM::MissingCredentials if at least one of url/username/password is missing" do
         
     | 
| 
       18 
     | 
    
         
            -
                  
         
     | 
| 
       19 
18 
     | 
    
         
             
                  assert_raise(SugarCRM::MissingCredentials){ SugarCRM.connect('http://127.0.0.1/sugarcrm', nil, nil) }
         
     | 
| 
       20 
19 
     | 
    
         
             
                end
         
     | 
| 
       21 
20 
     | 
    
         | 
| 
         @@ -32,7 +31,7 @@ class TestSession < ActiveSupport::TestCase 
     | 
|
| 
       32 
31 
     | 
    
         
             
                    Three.disconnect!
         
     | 
| 
       33 
32 
     | 
    
         
             
                  end
         
     | 
| 
       34 
33 
     | 
    
         
             
                end
         
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
      
 34 
     | 
    
         
            +
                    
         
     | 
| 
       36 
35 
     | 
    
         
             
                should "parse config parameters from a file" do
         
     | 
| 
       37 
36 
     | 
    
         
             
                  assert_equal CONFIG_CONTENTS, SugarCRM::Session.parse_config_file(CONFIG_TEST_PATH)
         
     | 
| 
       38 
37 
     | 
    
         
             
                end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,8 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: sugarcrm
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 27
         
     | 
| 
       4 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       5 
     | 
    
         
            -
               
     | 
| 
      
 6 
     | 
    
         
            +
              segments: 
         
     | 
| 
      
 7 
     | 
    
         
            +
              - 0
         
     | 
| 
      
 8 
     | 
    
         
            +
              - 9
         
     | 
| 
      
 9 
     | 
    
         
            +
              - 16
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 0.9.16
         
     | 
| 
       6 
11 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
12 
     | 
    
         
             
            authors: 
         
     | 
| 
       8 
13 
     | 
    
         
             
            - Carl Hicks
         
     | 
| 
         @@ -11,74 +16,98 @@ autorequire: 
     | 
|
| 
       11 
16 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       12 
17 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       13 
18 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
            date: 2011- 
     | 
| 
      
 19 
     | 
    
         
            +
            date: 2011-08-26 00:00:00 -07:00
         
     | 
| 
       15 
20 
     | 
    
         
             
            default_executable: sugarcrm
         
     | 
| 
       16 
21 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       17 
22 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       18 
     | 
    
         
            -
               
     | 
| 
      
 23 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 24 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
       19 
25 
     | 
    
         
             
              requirement: &id001 !ruby/object:Gem::Requirement 
         
     | 
| 
       20 
26 
     | 
    
         
             
                none: false
         
     | 
| 
       21 
27 
     | 
    
         
             
                requirements: 
         
     | 
| 
       22 
28 
     | 
    
         
             
                - - ">="
         
     | 
| 
       23 
29 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 30 
     | 
    
         
            +
                    hash: 23
         
     | 
| 
      
 31 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 32 
     | 
    
         
            +
                    - 2
         
     | 
| 
      
 33 
     | 
    
         
            +
                    - 3
         
     | 
| 
      
 34 
     | 
    
         
            +
                    - 10
         
     | 
| 
       24 
35 
     | 
    
         
             
                    version: 2.3.10
         
     | 
| 
       25 
     | 
    
         
            -
               
     | 
| 
       26 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
      
 36 
     | 
    
         
            +
              name: activesupport
         
     | 
| 
       27 
37 
     | 
    
         
             
              version_requirements: *id001
         
     | 
| 
       28 
38 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       29 
     | 
    
         
            -
               
     | 
| 
      
 39 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 40 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
       30 
41 
     | 
    
         
             
              requirement: &id002 !ruby/object:Gem::Requirement 
         
     | 
| 
       31 
42 
     | 
    
         
             
                none: false
         
     | 
| 
       32 
43 
     | 
    
         
             
                requirements: 
         
     | 
| 
       33 
44 
     | 
    
         
             
                - - ">="
         
     | 
| 
       34 
45 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 46 
     | 
    
         
            +
                    hash: 3
         
     | 
| 
      
 47 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 48 
     | 
    
         
            +
                    - 0
         
     | 
| 
       35 
49 
     | 
    
         
             
                    version: "0"
         
     | 
| 
       36 
     | 
    
         
            -
               
     | 
| 
       37 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
      
 50 
     | 
    
         
            +
              name: i18n
         
     | 
| 
       38 
51 
     | 
    
         
             
              version_requirements: *id002
         
     | 
| 
       39 
52 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       40 
     | 
    
         
            -
               
     | 
| 
      
 53 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 54 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
       41 
55 
     | 
    
         
             
              requirement: &id003 !ruby/object:Gem::Requirement 
         
     | 
| 
       42 
56 
     | 
    
         
             
                none: false
         
     | 
| 
       43 
57 
     | 
    
         
             
                requirements: 
         
     | 
| 
       44 
58 
     | 
    
         
             
                - - ">="
         
     | 
| 
       45 
59 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 60 
     | 
    
         
            +
                    hash: 3
         
     | 
| 
      
 61 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 62 
     | 
    
         
            +
                    - 0
         
     | 
| 
       46 
63 
     | 
    
         
             
                    version: "0"
         
     | 
| 
       47 
     | 
    
         
            -
               
     | 
| 
       48 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
      
 64 
     | 
    
         
            +
              name: json
         
     | 
| 
       49 
65 
     | 
    
         
             
              version_requirements: *id003
         
     | 
| 
       50 
66 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       51 
     | 
    
         
            -
               
     | 
| 
      
 67 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 68 
     | 
    
         
            +
              type: :development
         
     | 
| 
       52 
69 
     | 
    
         
             
              requirement: &id004 !ruby/object:Gem::Requirement 
         
     | 
| 
       53 
70 
     | 
    
         
             
                none: false
         
     | 
| 
       54 
71 
     | 
    
         
             
                requirements: 
         
     | 
| 
       55 
72 
     | 
    
         
             
                - - ">="
         
     | 
| 
       56 
73 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 74 
     | 
    
         
            +
                    hash: 3
         
     | 
| 
      
 75 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 76 
     | 
    
         
            +
                    - 0
         
     | 
| 
       57 
77 
     | 
    
         
             
                    version: "0"
         
     | 
| 
       58 
     | 
    
         
            -
               
     | 
| 
       59 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
      
 78 
     | 
    
         
            +
              name: shoulda
         
     | 
| 
       60 
79 
     | 
    
         
             
              version_requirements: *id004
         
     | 
| 
       61 
80 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       62 
     | 
    
         
            -
               
     | 
| 
      
 81 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 82 
     | 
    
         
            +
              type: :development
         
     | 
| 
       63 
83 
     | 
    
         
             
              requirement: &id005 !ruby/object:Gem::Requirement 
         
     | 
| 
       64 
84 
     | 
    
         
             
                none: false
         
     | 
| 
       65 
85 
     | 
    
         
             
                requirements: 
         
     | 
| 
       66 
86 
     | 
    
         
             
                - - ~>
         
     | 
| 
       67 
87 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 88 
     | 
    
         
            +
                    hash: 23
         
     | 
| 
      
 89 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 90 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 91 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 92 
     | 
    
         
            +
                    - 0
         
     | 
| 
       68 
93 
     | 
    
         
             
                    version: 1.0.0
         
     | 
| 
       69 
     | 
    
         
            -
               
     | 
| 
       70 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
      
 94 
     | 
    
         
            +
              name: bundler
         
     | 
| 
       71 
95 
     | 
    
         
             
              version_requirements: *id005
         
     | 
| 
       72 
96 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       73 
     | 
    
         
            -
               
     | 
| 
      
 97 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 98 
     | 
    
         
            +
              type: :development
         
     | 
| 
       74 
99 
     | 
    
         
             
              requirement: &id006 !ruby/object:Gem::Requirement 
         
     | 
| 
       75 
100 
     | 
    
         
             
                none: false
         
     | 
| 
       76 
101 
     | 
    
         
             
                requirements: 
         
     | 
| 
       77 
102 
     | 
    
         
             
                - - ~>
         
     | 
| 
       78 
103 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 104 
     | 
    
         
            +
                    hash: 7
         
     | 
| 
      
 105 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 106 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 107 
     | 
    
         
            +
                    - 5
         
     | 
| 
      
 108 
     | 
    
         
            +
                    - 2
         
     | 
| 
       79 
109 
     | 
    
         
             
                    version: 1.5.2
         
     | 
| 
       80 
     | 
    
         
            -
               
     | 
| 
       81 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
      
 110 
     | 
    
         
            +
              name: jeweler
         
     | 
| 
       82 
111 
     | 
    
         
             
              version_requirements: *id006
         
     | 
| 
       83 
112 
     | 
    
         
             
            description: 
         
     | 
| 
       84 
113 
     | 
    
         
             
            email: carl.hicks@gmail.com
         
     | 
| 
         @@ -91,6 +120,7 @@ extra_rdoc_files: 
     | 
|
| 
       91 
120 
     | 
    
         
             
            - README.rdoc
         
     | 
| 
       92 
121 
     | 
    
         
             
            files: 
         
     | 
| 
       93 
122 
     | 
    
         
             
            - ./Gemfile
         
     | 
| 
      
 123 
     | 
    
         
            +
            - ./Gemfile.lock
         
     | 
| 
       94 
124 
     | 
    
         
             
            - ./LICENSE
         
     | 
| 
       95 
125 
     | 
    
         
             
            - ./README.rdoc
         
     | 
| 
       96 
126 
     | 
    
         
             
            - ./Rakefile
         
     | 
| 
         @@ -152,6 +182,7 @@ files: 
     | 
|
| 
       152 
182 
     | 
    
         
             
            - ./lib/sugarcrm/module_methods.rb
         
     | 
| 
       153 
183 
     | 
    
         
             
            - ./lib/sugarcrm/session.rb
         
     | 
| 
       154 
184 
     | 
    
         
             
            - ./sugarcrm.gemspec
         
     | 
| 
      
 185 
     | 
    
         
            +
            - ./sugarcrm.tmproj
         
     | 
| 
       155 
186 
     | 
    
         
             
            - LICENSE
         
     | 
| 
       156 
187 
     | 
    
         
             
            - README.rdoc
         
     | 
| 
       157 
188 
     | 
    
         
             
            - test/connection/test_get_available_modules.rb
         
     | 
| 
         @@ -194,7 +225,7 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       194 
225 
     | 
    
         
             
              requirements: 
         
     | 
| 
       195 
226 
     | 
    
         
             
              - - ">="
         
     | 
| 
       196 
227 
     | 
    
         
             
                - !ruby/object:Gem::Version 
         
     | 
| 
       197 
     | 
    
         
            -
                  hash:  
     | 
| 
      
 228 
     | 
    
         
            +
                  hash: 3
         
     | 
| 
       198 
229 
     | 
    
         
             
                  segments: 
         
     | 
| 
       199 
230 
     | 
    
         
             
                  - 0
         
     | 
| 
       200 
231 
     | 
    
         
             
                  version: "0"
         
     | 
| 
         @@ -203,6 +234,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       203 
234 
     | 
    
         
             
              requirements: 
         
     | 
| 
       204 
235 
     | 
    
         
             
              - - ">="
         
     | 
| 
       205 
236 
     | 
    
         
             
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 237 
     | 
    
         
            +
                  hash: 3
         
     | 
| 
      
 238 
     | 
    
         
            +
                  segments: 
         
     | 
| 
      
 239 
     | 
    
         
            +
                  - 0
         
     | 
| 
       206 
240 
     | 
    
         
             
                  version: "0"
         
     | 
| 
       207 
241 
     | 
    
         
             
            requirements: []
         
     | 
| 
       208 
242 
     | 
    
         |