caren-api 0.4.6 → 0.4.7
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/VERSION +1 -1
- data/caren-api.gemspec +4 -4
- data/lib/caren/base.rb +1 -1
- data/lib/caren/care_provider.rb +2 -5
- data/lib/caren/{person.rb → client.rb} +5 -5
- data/lib/caren/event.rb +2 -1
- data/lib/caren/product.rb +1 -1
- data/lib/caren/product_category.rb +1 -1
- data/lib/caren-api.rb +1 -1
- data/spec/{person_spec.rb → client_spec.rb} +6 -6
- metadata +6 -6
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.4. | 
| 1 | 
            +
            0.4.7
         | 
    
        data/caren-api.gemspec
    CHANGED
    
    | @@ -5,11 +5,11 @@ | |
| 5 5 |  | 
| 6 6 | 
             
            Gem::Specification.new do |s|
         | 
| 7 7 | 
             
              s.name = %q{caren-api}
         | 
| 8 | 
            -
              s.version = "0.4. | 
| 8 | 
            +
              s.version = "0.4.7"
         | 
| 9 9 |  | 
| 10 10 | 
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         | 
| 11 11 | 
             
              s.authors = ["Andre Foeken"]
         | 
| 12 | 
            -
              s.date = %q{2011- | 
| 12 | 
            +
              s.date = %q{2011-11-08}
         | 
| 13 13 | 
             
              s.description = %q{You can use this gem as inspiration of the base of your connections with Caren.}
         | 
| 14 14 | 
             
              s.email = %q{andre.foeken@nedap.com}
         | 
| 15 15 | 
             
              s.extra_rdoc_files = [
         | 
| @@ -33,16 +33,17 @@ Gem::Specification.new do |s| | |
| 33 33 | 
             
                "lib/caren/base.rb",
         | 
| 34 34 | 
             
                "lib/caren/care_provider.rb",
         | 
| 35 35 | 
             
                "lib/caren/caren.rb",
         | 
| 36 | 
            +
                "lib/caren/client.rb",
         | 
| 36 37 | 
             
                "lib/caren/error.rb",
         | 
| 37 38 | 
             
                "lib/caren/event.rb",
         | 
| 38 39 | 
             
                "lib/caren/external_message.rb",
         | 
| 39 40 | 
             
                "lib/caren/link.rb",
         | 
| 40 | 
            -
                "lib/caren/person.rb",
         | 
| 41 41 | 
             
                "lib/caren/product.rb",
         | 
| 42 42 | 
             
                "lib/caren/product_category.rb",
         | 
| 43 43 | 
             
                "spec/.DS_Store",
         | 
| 44 44 | 
             
                "spec/care_provider_spec.rb",
         | 
| 45 45 | 
             
                "spec/caren_spec.rb",
         | 
| 46 | 
            +
                "spec/client_spec.rb",
         | 
| 46 47 | 
             
                "spec/event_spec.rb",
         | 
| 47 48 | 
             
                "spec/external_message_spec.rb",
         | 
| 48 49 | 
             
                "spec/fixtures/bacon.jpg",
         | 
| @@ -65,7 +66,6 @@ Gem::Specification.new do |s| | |
| 65 66 | 
             
                "spec/fixtures/incoming.xml",
         | 
| 66 67 | 
             
                "spec/fixtures/incoming_single_object.xml",
         | 
| 67 68 | 
             
                "spec/link_spec.rb",
         | 
| 68 | 
            -
                "spec/person_spec.rb",
         | 
| 69 69 | 
             
                "spec/product_category_spec.rb",
         | 
| 70 70 | 
             
                "spec/product_spec.rb",
         | 
| 71 71 | 
             
                "spec/spec.opts",
         | 
    
        data/lib/caren/base.rb
    CHANGED
    
    
    
        data/lib/caren/care_provider.rb
    CHANGED
    
    | @@ -21,8 +21,6 @@ class Caren::CareProvider < Caren::Base | |
| 21 21 | 
             
                  :min_start,                   # String (07:00)
         | 
| 22 22 | 
             
                  :show_employee_name_as_title, # Boolean
         | 
| 23 23 | 
             
                  :communication,               # Boolean
         | 
| 24 | 
            -
                  :api_push_support,            # Boolean
         | 
| 25 | 
            -
                  :api_url                      # String (Required url to api resources)
         | 
| 26 24 | 
             
                ] + super
         | 
| 27 25 | 
             
              end
         | 
| 28 26 |  | 
| @@ -60,9 +58,8 @@ class Caren::CareProvider < Caren::Base | |
| 60 58 | 
             
                  :max_start => self.max_start,
         | 
| 61 59 | 
             
                  :show_employee_name_as_title => self.show_employee_name_as_title,
         | 
| 62 60 | 
             
                  :show_employee_names => self.show_employee_names,
         | 
| 63 | 
            -
                  :communication => self.communication | 
| 64 | 
            -
             | 
| 65 | 
            -
                  :api_url => self.api_url }
         | 
| 61 | 
            +
                  :communication => self.communication 
         | 
| 62 | 
            +
                }
         | 
| 66 63 | 
             
              end
         | 
| 67 64 |  | 
| 68 65 | 
             
              def to_logo_xml logo_hash_or_path
         | 
| @@ -1,7 +1,7 @@ | |
| 1 | 
            -
            class Caren:: | 
| 1 | 
            +
            class Caren::Client < Caren::Base
         | 
| 2 2 |  | 
| 3 3 | 
             
              def self.keys
         | 
| 4 | 
            -
                [ :external_id,     # String (Your  | 
| 4 | 
            +
                [ :external_id,     # String (Your client id)
         | 
| 5 5 | 
             
                  :uid,             # String (Customer unique code)
         | 
| 6 6 | 
             
                  :first_name,      # String
         | 
| 7 7 | 
             
                  :last_name,       # String
         | 
| @@ -13,13 +13,13 @@ class Caren::Person < Caren::Base | |
| 13 13 | 
             
                  :address_country  # String
         | 
| 14 14 | 
             
                ] + super
         | 
| 15 15 | 
             
              end
         | 
| 16 | 
            -
             | 
| 16 | 
            +
                
         | 
| 17 17 | 
             
              def self.array_root
         | 
| 18 | 
            -
                : | 
| 18 | 
            +
                :clients
         | 
| 19 19 | 
             
              end
         | 
| 20 20 |  | 
| 21 21 | 
             
              def self.node_root
         | 
| 22 | 
            -
                : | 
| 22 | 
            +
                :client
         | 
| 23 23 | 
             
              end
         | 
| 24 24 |  | 
| 25 25 | 
             
            end
         | 
    
        data/lib/caren/event.rb
    CHANGED
    
    | @@ -13,7 +13,8 @@ class Caren::Event < Caren::Base | |
| 13 13 | 
             
                  :person_first_name, # String
         | 
| 14 14 | 
             
                  :person_last_name,  # String
         | 
| 15 15 | 
             
                  :person_male,       # Boolean
         | 
| 16 | 
            -
                  :external_person_id  | 
| 16 | 
            +
                  :external_person_id,# String (Your person id)
         | 
| 17 | 
            +
                  :source             # String (remote_schedule,remote_realisation)
         | 
| 17 18 | 
             
                ] + super
         | 
| 18 19 | 
             
              end
         | 
| 19 20 |  | 
    
        data/lib/caren/product.rb
    CHANGED
    
    
    
        data/lib/caren-api.rb
    CHANGED
    
    | @@ -15,7 +15,7 @@ require "#{File.dirname(__FILE__)}/caren/caren.rb" | |
| 15 15 | 
             
            require "#{File.dirname(__FILE__)}/caren/error.rb"
         | 
| 16 16 | 
             
            require "#{File.dirname(__FILE__)}/caren/base.rb"
         | 
| 17 17 | 
             
            require "#{File.dirname(__FILE__)}/caren/event.rb"
         | 
| 18 | 
            -
            require "#{File.dirname(__FILE__)}/caren/ | 
| 18 | 
            +
            require "#{File.dirname(__FILE__)}/caren/client.rb"
         | 
| 19 19 | 
             
            require "#{File.dirname(__FILE__)}/caren/care_provider.rb"
         | 
| 20 20 | 
             
            require "#{File.dirname(__FILE__)}/caren/external_message.rb"
         | 
| 21 21 | 
             
            require "#{File.dirname(__FILE__)}/caren/link.rb"
         | 
| @@ -1,9 +1,9 @@ | |
| 1 1 | 
             
            require 'spec_helper'
         | 
| 2 2 |  | 
| 3 | 
            -
            describe " | 
| 3 | 
            +
            describe "Client", "converting to xml" do
         | 
| 4 4 |  | 
| 5 5 | 
             
              before do
         | 
| 6 | 
            -
                @ | 
| 6 | 
            +
                @client_a = Caren::Client.new( :external_id => 1, 
         | 
| 7 7 | 
             
                                               :uid => "ABC123", 
         | 
| 8 8 | 
             
                                               :first_name => "Andre", 
         | 
| 9 9 | 
             
                                               :last_name => "Foeken", 
         | 
| @@ -14,7 +14,7 @@ describe "Person", "converting to xml" do | |
| 14 14 | 
             
                                               :address_city => "Groenlo", 
         | 
| 15 15 | 
             
                                               :address_country => "The Netherlands" )
         | 
| 16 16 |  | 
| 17 | 
            -
                @ | 
| 17 | 
            +
                @client_b = Caren::Client.new( :external_id => 2, 
         | 
| 18 18 | 
             
                                               :uid => "ABC456", 
         | 
| 19 19 | 
             
                                               :first_name => "Oscar", 
         | 
| 20 20 | 
             
                                               :last_name => "Foeken", 
         | 
| @@ -26,12 +26,12 @@ describe "Person", "converting to xml" do | |
| 26 26 | 
             
                                               :address_country => "The Netherlands" )
         | 
| 27 27 | 
             
              end
         | 
| 28 28 |  | 
| 29 | 
            -
              it "should be able to convert a  | 
| 30 | 
            -
                @ | 
| 29 | 
            +
              it "should be able to convert a client to valid xml" do
         | 
| 30 | 
            +
                @client_a.should convert_to_valid_caren_xml
         | 
| 31 31 | 
             
              end
         | 
| 32 32 |  | 
| 33 33 | 
             
              it "should be able to convert an array of people to valid xml" do
         | 
| 34 | 
            -
                [@ | 
| 34 | 
            +
                [@client_a,@client_b].should convert_to_valid_caren_array_xml
         | 
| 35 35 | 
             
              end
         | 
| 36 36 |  | 
| 37 37 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: caren-api
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 1
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 4
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.4. | 
| 9 | 
            +
              - 7
         | 
| 10 | 
            +
              version: 0.4.7
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Andre Foeken
         | 
| @@ -15,7 +15,7 @@ autorequire: | |
| 15 15 | 
             
            bindir: bin
         | 
| 16 16 | 
             
            cert_chain: []
         | 
| 17 17 |  | 
| 18 | 
            -
            date: 2011- | 
| 18 | 
            +
            date: 2011-11-08 00:00:00 +01:00
         | 
| 19 19 | 
             
            default_executable: 
         | 
| 20 20 | 
             
            dependencies: 
         | 
| 21 21 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -186,16 +186,17 @@ files: | |
| 186 186 | 
             
            - lib/caren/base.rb
         | 
| 187 187 | 
             
            - lib/caren/care_provider.rb
         | 
| 188 188 | 
             
            - lib/caren/caren.rb
         | 
| 189 | 
            +
            - lib/caren/client.rb
         | 
| 189 190 | 
             
            - lib/caren/error.rb
         | 
| 190 191 | 
             
            - lib/caren/event.rb
         | 
| 191 192 | 
             
            - lib/caren/external_message.rb
         | 
| 192 193 | 
             
            - lib/caren/link.rb
         | 
| 193 | 
            -
            - lib/caren/person.rb
         | 
| 194 194 | 
             
            - lib/caren/product.rb
         | 
| 195 195 | 
             
            - lib/caren/product_category.rb
         | 
| 196 196 | 
             
            - spec/.DS_Store
         | 
| 197 197 | 
             
            - spec/care_provider_spec.rb
         | 
| 198 198 | 
             
            - spec/caren_spec.rb
         | 
| 199 | 
            +
            - spec/client_spec.rb
         | 
| 199 200 | 
             
            - spec/event_spec.rb
         | 
| 200 201 | 
             
            - spec/external_message_spec.rb
         | 
| 201 202 | 
             
            - spec/fixtures/bacon.jpg
         | 
| @@ -218,7 +219,6 @@ files: | |
| 218 219 | 
             
            - spec/fixtures/incoming.xml
         | 
| 219 220 | 
             
            - spec/fixtures/incoming_single_object.xml
         | 
| 220 221 | 
             
            - spec/link_spec.rb
         | 
| 221 | 
            -
            - spec/person_spec.rb
         | 
| 222 222 | 
             
            - spec/product_category_spec.rb
         | 
| 223 223 | 
             
            - spec/product_spec.rb
         | 
| 224 224 | 
             
            - spec/spec.opts
         |