App42_Ruby_API 0.8.4
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.
- checksums.yaml +7 -0
 - data/.gitignore +21 -0
 - data/App42_Ruby_API.gemspec +33 -0
 - data/Gemfile +3 -0
 - data/LICENSE.txt +22 -0
 - data/README.md +29 -0
 - data/Rakefile +1 -0
 - data/TODO.rb +3 -0
 - data/lib/App42_Ruby_API.rb +232 -0
 - data/lib/App42_Ruby_API/App42BadParameterException.rb +31 -0
 - data/lib/App42_Ruby_API/App42Exception.rb +39 -0
 - data/lib/App42_Ruby_API/App42LimitException.rb +15 -0
 - data/lib/App42_Ruby_API/App42NotFoundException.rb +15 -0
 - data/lib/App42_Ruby_API/App42Response.rb +13 -0
 - data/lib/App42_Ruby_API/App42ResponseBuilder.rb +67 -0
 - data/lib/App42_Ruby_API/App42SecurityException.rb +15 -0
 - data/lib/App42_Ruby_API/version.rb +3 -0
 - data/lib/connection/RESTConnection.rb +713 -0
 - data/lib/email/Email.rb +51 -0
 - data/lib/email/EmailMIME.rb +51 -0
 - data/lib/email/EmailResponseBuilder.rb +76 -0
 - data/lib/email/EmailService.rb +244 -0
 - data/lib/gallery/Album.rb +56 -0
 - data/lib/gallery/AlbumResponseBuilder.rb +168 -0
 - data/lib/gallery/AlbumService.rb +337 -0
 - data/lib/gallery/PhotoService.rb +591 -0
 - data/lib/game/Game.rb +39 -0
 - data/lib/game/GameResponseBuilder.rb +106 -0
 - data/lib/game/GameService.rb +268 -0
 - data/lib/game/Reward.rb +24 -0
 - data/lib/game/RewardResponseBuilder.rb +85 -0
 - data/lib/game/RewardService.rb +440 -0
 - data/lib/game/ScoreBoardService.rb +433 -0
 - data/lib/game/ScoreService.rb +157 -0
 - data/lib/geo/Geo.rb +51 -0
 - data/lib/geo/GeoPoint.rb +43 -0
 - data/lib/geo/GeoResponseBuilder.rb +145 -0
 - data/lib/geo/GeoService.rb +505 -0
 - data/lib/imageProcessor/Image.rb +42 -0
 - data/lib/imageProcessor/ImageProcessorResponseBuilder.rb +40 -0
 - data/lib/imageProcessor/ImageProcessorService.rb +1054 -0
 - data/lib/log/Log.rb +49 -0
 - data/lib/log/LogResponseBuilder.rb +61 -0
 - data/lib/log/LogService.rb +920 -0
 - data/lib/message/Queue.rb +50 -0
 - data/lib/message/QueueResponseBuilder.rb +64 -0
 - data/lib/message/QueueService.rb +469 -0
 - data/lib/push/DeviceType.rb +56 -0
 - data/lib/push/PushNotification.rb +38 -0
 - data/lib/push/PushNotificationResposneBuilder.rb +74 -0
 - data/lib/push/PushNotificationService.rb +458 -0
 - data/lib/recommend/PreferenceData.rb +25 -0
 - data/lib/recommend/Recommender.rb +48 -0
 - data/lib/recommend/RecommenderResponseBuilder.rb +70 -0
 - data/lib/recommend/RecommenderService.rb +1092 -0
 - data/lib/recommend/RecommenderSimilarity.rb +52 -0
 - data/lib/review/Review.rb +38 -0
 - data/lib/review/ReviewResponseBuilder.rb +76 -0
 - data/lib/review/ReviewService.rb +590 -0
 - data/lib/session/Session.rb +43 -0
 - data/lib/session/SessionResponseBuilder.rb +70 -0
 - data/lib/session/SessionService.rb +427 -0
 - data/lib/shopping/Cart.rb +77 -0
 - data/lib/shopping/CartResponseBuilder.rb +118 -0
 - data/lib/shopping/CartService.rb +902 -0
 - data/lib/shopping/Catalogue.rb +79 -0
 - data/lib/shopping/CatalogueResponseBuilder.rb +170 -0
 - data/lib/shopping/CatalogueService.rb +649 -0
 - data/lib/shopping/ItemData.rb +29 -0
 - data/lib/shopping/PaymentStatus.rb +60 -0
 - data/lib/social/Social.rb +35 -0
 - data/lib/social/SocialResponseBuilder.rb +38 -0
 - data/lib/social/SocialService.rb +585 -0
 - data/lib/storage/OrderByType.rb +29 -0
 - data/lib/storage/Query.rb +39 -0
 - data/lib/storage/QueryBuilder.rb +118 -0
 - data/lib/storage/Storage.rb +45 -0
 - data/lib/storage/StorageResponseBuilder.rb +86 -0
 - data/lib/storage/StorageService.rb +775 -0
 - data/lib/upload/Upload.rb +40 -0
 - data/lib/upload/UploadFileType.rb +83 -0
 - data/lib/upload/UploadResponseBuilder.rb +58 -0
 - data/lib/upload/UploadService.rb +960 -0
 - data/lib/user/User.rb +102 -0
 - data/lib/user/UserResponseBuilder.rb +105 -0
 - data/lib/user/UserService.rb +1209 -0
 - data/lib/util/util.rb +244 -0
 - data/question.rb +79 -0
 - metadata +204 -0
 
    
        data/lib/util/util.rb
    ADDED
    
    | 
         @@ -0,0 +1,244 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # -----------------------------------------------------------------------
         
     | 
| 
      
 2 
     | 
    
         
            +
            #  Copyright © 2012 ShepHertz Technologies Pvt Ltd. All rights reserved.
         
     | 
| 
      
 3 
     | 
    
         
            +
            # -----------------------------------------------------------------------
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            require "rubygems"
         
     | 
| 
      
 6 
     | 
    
         
            +
            require 'time'
         
     | 
| 
      
 7 
     | 
    
         
            +
            require 'base64'
         
     | 
| 
      
 8 
     | 
    
         
            +
            require 'cgi'
         
     | 
| 
      
 9 
     | 
    
         
            +
            require 'hmac-sha1'
         
     | 
| 
      
 10 
     | 
    
         
            +
            require 'App42_Ruby_API/App42Exception'
         
     | 
| 
      
 11 
     | 
    
         
            +
            require 'App42_Ruby_API/App42BadParameterException'
         
     | 
| 
      
 12 
     | 
    
         
            +
            require 'App42_Ruby_API/App42LimitException'
         
     | 
| 
      
 13 
     | 
    
         
            +
            require 'App42_Ruby_API/App42NotFoundException'
         
     | 
| 
      
 14 
     | 
    
         
            +
            require 'App42_Ruby_API/App42SecurityException'
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            module App42
         
     | 
| 
      
 17 
     | 
    
         
            +
              class Util
         
     | 
| 
      
 18 
     | 
    
         
            +
                #
         
     | 
| 
      
 19 
     | 
    
         
            +
                # Finds the current time
         
     | 
| 
      
 20 
     | 
    
         
            +
                #
         
     | 
| 
      
 21 
     | 
    
         
            +
                # @return time format
         
     | 
| 
      
 22 
     | 
    
         
            +
                #
         
     | 
| 
      
 23 
     | 
    
         
            +
                #
         
     | 
| 
      
 24 
     | 
    
         
            +
                def get_timestamp_utc
         
     | 
| 
      
 25 
     | 
    
         
            +
                  #time_stamp = Time.now.utc.iso8601
         
     | 
| 
      
 26 
     | 
    
         
            +
                  #time_stamp = Time.now.utc.xmlschema
         
     | 
| 
      
 27 
     | 
    
         
            +
                  time_stamp = Time.now.utc
         
     | 
| 
      
 28 
     | 
    
         
            +
                  time_stamp = time_stamp.strftime("%Y-%m-%dT%H:%M:%S.%LZ")
         
     | 
| 
      
 29 
     | 
    
         
            +
                  puts "TimeStamp - #{time_stamp}"
         
     | 
| 
      
 30 
     | 
    
         
            +
                  time_stamp
         
     | 
| 
      
 31 
     | 
    
         
            +
                end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
                #
         
     | 
| 
      
 34 
     | 
    
         
            +
                # Finds the particular time for a particular date
         
     | 
| 
      
 35 
     | 
    
         
            +
                #
         
     | 
| 
      
 36 
     | 
    
         
            +
                # @param date
         
     | 
| 
      
 37 
     | 
    
         
            +
                #
         
     | 
| 
      
 38 
     | 
    
         
            +
                # @return time format
         
     | 
| 
      
 39 
     | 
    
         
            +
                #
         
     | 
| 
      
 40 
     | 
    
         
            +
                #
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
                def get_timestamp_utc_from_date(date)
         
     | 
| 
      
 43 
     | 
    
         
            +
                  time = Time.parse(date).utc
         
     | 
| 
      
 44 
     | 
    
         
            +
                  time_stamp = time.strftime("%Y-%m-%dT%H:%M:%S.%LZ")
         
     | 
| 
      
 45 
     | 
    
         
            +
                  puts "TimeStamp - #{time_stamp}"
         
     | 
| 
      
 46 
     | 
    
         
            +
                  time_stamp
         
     | 
| 
      
 47 
     | 
    
         
            +
                end
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
                def get_timestamp_utc_from_date_discount(date)
         
     | 
| 
      
 50 
     | 
    
         
            +
                  time = Time.parse(date).utc
         
     | 
| 
      
 51 
     | 
    
         
            +
                  time_stamp = time.strftime("%a %b %d %l:%M:%S %Z %Y")
         
     | 
| 
      
 52 
     | 
    
         
            +
                  puts "TimeStamp - #{time_stamp}"
         
     | 
| 
      
 53 
     | 
    
         
            +
                  time_stamp
         
     | 
| 
      
 54 
     | 
    
         
            +
                end
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
                #
         
     | 
| 
      
 57 
     | 
    
         
            +
                # This method sorts all the values that are stored in the table.
         
     | 
| 
      
 58 
     | 
    
         
            +
                #
         
     | 
| 
      
 59 
     | 
    
         
            +
                # @param table
         
     | 
| 
      
 60 
     | 
    
         
            +
                # @return sorted string
         
     | 
| 
      
 61 
     | 
    
         
            +
                #
         
     | 
| 
      
 62 
     | 
    
         
            +
                #
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                def sort_convert_table(table)
         
     | 
| 
      
 65 
     | 
    
         
            +
                  sorted_params = ""
         
     | 
| 
      
 66 
     | 
    
         
            +
                  table.sort {|a,b| a[0] <=> b[0]}.each{ |key, val|
         
     | 
| 
      
 67 
     | 
    
         
            +
                    sorted_params << key
         
     | 
| 
      
 68 
     | 
    
         
            +
                    sorted_params << val
         
     | 
| 
      
 69 
     | 
    
         
            +
                  }
         
     | 
| 
      
 70 
     | 
    
         
            +
                  puts "Sorted params #{sorted_params}"
         
     | 
| 
      
 71 
     | 
    
         
            +
                  sorted_params
         
     | 
| 
      
 72 
     | 
    
         
            +
                end
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
                #
         
     | 
| 
      
 75 
     | 
    
         
            +
                # It signs the request that has to be sent in the Hmac format.
         
     | 
| 
      
 76 
     | 
    
         
            +
                #
         
     | 
| 
      
 77 
     | 
    
         
            +
                # @param secretKey
         
     | 
| 
      
 78 
     | 
    
         
            +
                # @param params
         
     | 
| 
      
 79 
     | 
    
         
            +
                #
         
     | 
| 
      
 80 
     | 
    
         
            +
                # @throws InvalidKeyException
         
     | 
| 
      
 81 
     | 
    
         
            +
                # @throws NoSuchAlgorithmException
         
     | 
| 
      
 82 
     | 
    
         
            +
                # @throws IllegalStateException
         
     | 
| 
      
 83 
     | 
    
         
            +
                # @throws UnsupportedEncodingException
         
     | 
| 
      
 84 
     | 
    
         
            +
                #
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
                def sign(secret_key, params)
         
     | 
| 
      
 87 
     | 
    
         
            +
                  sorted_params =  sort_convert_table(params)
         
     | 
| 
      
 88 
     | 
    
         
            +
                  puts sorted_params
         
     | 
| 
      
 89 
     | 
    
         
            +
                  signature = compute_hmac(secret_key, sorted_params)
         
     | 
| 
      
 90 
     | 
    
         
            +
                  puts "Signature #{signature}"
         
     | 
| 
      
 91 
     | 
    
         
            +
                  signature
         
     | 
| 
      
 92 
     | 
    
         
            +
                end
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
                #
         
     | 
| 
      
 95 
     | 
    
         
            +
                # Encoding and decoding of the queries are done using the Hmac Algorithm.
         
     | 
| 
      
 96 
     | 
    
         
            +
                #
         
     | 
| 
      
 97 
     | 
    
         
            +
                # @param baseString
         
     | 
| 
      
 98 
     | 
    
         
            +
                # @param key
         
     | 
| 
      
 99 
     | 
    
         
            +
                #
         
     | 
| 
      
 100 
     | 
    
         
            +
                # @throws NoSuchAlgorithmException
         
     | 
| 
      
 101 
     | 
    
         
            +
                # @throws InvalidKeyException
         
     | 
| 
      
 102 
     | 
    
         
            +
                # @throws IllegalStateException
         
     | 
| 
      
 103 
     | 
    
         
            +
                # @throws UnsupportedEncodingException
         
     | 
| 
      
 104 
     | 
    
         
            +
                #
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
      
 106 
     | 
    
         
            +
                def compute_hmac(secret_key, sorted_params)
         
     | 
| 
      
 107 
     | 
    
         
            +
                  signature =  Base64.encode64(HMAC::SHA1::digest(secret_key, sorted_params)).strip
         
     | 
| 
      
 108 
     | 
    
         
            +
                  puts "Signature #{signature}"
         
     | 
| 
      
 109 
     | 
    
         
            +
                  computed_hmac = CGI.escape(signature)
         
     | 
| 
      
 110 
     | 
    
         
            +
                  puts "Computed Hmac #{computed_hmac}"
         
     | 
| 
      
 111 
     | 
    
         
            +
                  computed_hmac
         
     | 
| 
      
 112 
     | 
    
         
            +
                end
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
      
 114 
     | 
    
         
            +
                def my_strip(str)
         
     | 
| 
      
 115 
     | 
    
         
            +
                  s =  str.gsub(/ /,'')
         
     | 
| 
      
 116 
     | 
    
         
            +
                  return s
         
     | 
| 
      
 117 
     | 
    
         
            +
                end
         
     | 
| 
      
 118 
     | 
    
         
            +
             
     | 
| 
      
 119 
     | 
    
         
            +
                #
         
     | 
| 
      
 120 
     | 
    
         
            +
                # An exception to check whether the object is null or blank.
         
     | 
| 
      
 121 
     | 
    
         
            +
                #
         
     | 
| 
      
 122 
     | 
    
         
            +
                # @param obj
         
     | 
| 
      
 123 
     | 
    
         
            +
                # @param name
         
     | 
| 
      
 124 
     | 
    
         
            +
                #
         
     | 
| 
      
 125 
     | 
    
         
            +
             
     | 
| 
      
 126 
     | 
    
         
            +
                def throwExceptionIfNullOrBlank(obj,name)
         
     | 
| 
      
 127 
     | 
    
         
            +
                  obj.kind_of?(String) ? trm = my_strip(obj) : trm = obj
         
     | 
| 
      
 128 
     | 
    
         
            +
             
     | 
| 
      
 129 
     | 
    
         
            +
                  raise App42Exception.new(name +" parameter can not be null") if trm==nil
         
     | 
| 
      
 130 
     | 
    
         
            +
             
     | 
| 
      
 131 
     | 
    
         
            +
                  raise App42Exception.new(name +" parameter can not be blank") if trm == ""
         
     | 
| 
      
 132 
     | 
    
         
            +
             
     | 
| 
      
 133 
     | 
    
         
            +
                end
         
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
| 
      
 135 
     | 
    
         
            +
                #
         
     | 
| 
      
 136 
     | 
    
         
            +
                # To check whether the max value is greater than zero or not.
         
     | 
| 
      
 137 
     | 
    
         
            +
                #
         
     | 
| 
      
 138 
     | 
    
         
            +
                # @param max
         
     | 
| 
      
 139 
     | 
    
         
            +
                #
         
     | 
| 
      
 140 
     | 
    
         
            +
             
     | 
| 
      
 141 
     | 
    
         
            +
                def validateMax(max)
         
     | 
| 
      
 142 
     | 
    
         
            +
                  if(max.to_i < 1)
         
     | 
| 
      
 143 
     | 
    
         
            +
                    raise App42Exception.new("Max must be greater than Zero.");
         
     | 
| 
      
 144 
     | 
    
         
            +
                  end
         
     | 
| 
      
 145 
     | 
    
         
            +
                end
         
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
      
 147 
     | 
    
         
            +
                #
         
     | 
| 
      
 148 
     | 
    
         
            +
                # To check whether the value of how many is less than 1000 or not.
         
     | 
| 
      
 149 
     | 
    
         
            +
                #
         
     | 
| 
      
 150 
     | 
    
         
            +
                # @param howMany
         
     | 
| 
      
 151 
     | 
    
         
            +
                #
         
     | 
| 
      
 152 
     | 
    
         
            +
             
     | 
| 
      
 153 
     | 
    
         
            +
                def validateHowMany(howMany)
         
     | 
| 
      
 154 
     | 
    
         
            +
                  if(howMany.to_i > 1000)
         
     | 
| 
      
 155 
     | 
    
         
            +
                    raise App42Exception.new("How Many should be less than 1000");
         
     | 
| 
      
 156 
     | 
    
         
            +
                  end
         
     | 
| 
      
 157 
     | 
    
         
            +
                end
         
     | 
| 
      
 158 
     | 
    
         
            +
             
     | 
| 
      
 159 
     | 
    
         
            +
                #
         
     | 
| 
      
 160 
     | 
    
         
            +
                # An exception to check whether the email entered is valid or not.
         
     | 
| 
      
 161 
     | 
    
         
            +
                #
         
     | 
| 
      
 162 
     | 
    
         
            +
                # @param obj
         
     | 
| 
      
 163 
     | 
    
         
            +
                # @param name
         
     | 
| 
      
 164 
     | 
    
         
            +
                #
         
     | 
| 
      
 165 
     | 
    
         
            +
             
     | 
| 
      
 166 
     | 
    
         
            +
                def throwExceptionIfEmailNotValid(obj, name)
         
     | 
| 
      
 167 
     | 
    
         
            +
                  if(obj==nil)
         
     | 
| 
      
 168 
     | 
    
         
            +
                    raise App42Exception.new(name +" parameter can not be null")
         
     | 
| 
      
 169 
     | 
    
         
            +
                  end
         
     | 
| 
      
 170 
     | 
    
         
            +
                  email_regex = %r{
         
     | 
| 
      
 171 
     | 
    
         
            +
                           ^ # Start of string
         
     | 
| 
      
 172 
     | 
    
         
            +
             
     | 
| 
      
 173 
     | 
    
         
            +
                           [0-9a-z] # First character
         
     | 
| 
      
 174 
     | 
    
         
            +
                           [0-9a-z.+]+ # Middle characters
         
     | 
| 
      
 175 
     | 
    
         
            +
                           [0-9a-z] # Last character
         
     | 
| 
      
 176 
     | 
    
         
            +
             
     | 
| 
      
 177 
     | 
    
         
            +
                           @ # Separating @ character
         
     | 
| 
      
 178 
     | 
    
         
            +
             
     | 
| 
      
 179 
     | 
    
         
            +
                           [0-9a-z] # Domain name begin
         
     | 
| 
      
 180 
     | 
    
         
            +
                           [0-9a-z.-]+ # Domain name middle
         
     | 
| 
      
 181 
     | 
    
         
            +
                           [0-9a-z] # Domain name end
         
     | 
| 
      
 182 
     | 
    
         
            +
             
     | 
| 
      
 183 
     | 
    
         
            +
                           $ # End of string
         
     | 
| 
      
 184 
     | 
    
         
            +
                  }xi
         
     | 
| 
      
 185 
     | 
    
         
            +
                  if (obj =~ email_regex) == 0
         
     | 
| 
      
 186 
     | 
    
         
            +
                  else
         
     | 
| 
      
 187 
     | 
    
         
            +
                    raise App42Exception.new(name + " is not valid. ")
         
     | 
| 
      
 188 
     | 
    
         
            +
                  end
         
     | 
| 
      
 189 
     | 
    
         
            +
                end
         
     | 
| 
      
 190 
     | 
    
         
            +
             
     | 
| 
      
 191 
     | 
    
         
            +
                #
         
     | 
| 
      
 192 
     | 
    
         
            +
                # An exception to check if the file has valid extension or not
         
     | 
| 
      
 193 
     | 
    
         
            +
                #
         
     | 
| 
      
 194 
     | 
    
         
            +
                # @param fileName
         
     | 
| 
      
 195 
     | 
    
         
            +
                # @param name
         
     | 
| 
      
 196 
     | 
    
         
            +
                #
         
     | 
| 
      
 197 
     | 
    
         
            +
             
     | 
| 
      
 198 
     | 
    
         
            +
                def throwExceptionIfNotValidExtension(fileName, name)
         
     | 
| 
      
 199 
     | 
    
         
            +
                  if(fileName==nil)
         
     | 
| 
      
 200 
     | 
    
         
            +
                    raise App42Exception.new(name + " parameter can not be null")
         
     | 
| 
      
 201 
     | 
    
         
            +
                  end
         
     | 
| 
      
 202 
     | 
    
         
            +
                  if(fileName.index('.') == -1)
         
     | 
| 
      
 203 
     | 
    
         
            +
                    raise App42Exception.new(name + " does not contain valid extension. ")
         
     | 
| 
      
 204 
     | 
    
         
            +
                  end
         
     | 
| 
      
 205 
     | 
    
         
            +
                end
         
     | 
| 
      
 206 
     | 
    
         
            +
             
     | 
| 
      
 207 
     | 
    
         
            +
                #
         
     | 
| 
      
 208 
     | 
    
         
            +
                # Taking extension out
         
     | 
| 
      
 209 
     | 
    
         
            +
                #
         
     | 
| 
      
 210 
     | 
    
         
            +
                # @param fileName
         
     | 
| 
      
 211 
     | 
    
         
            +
                #
         
     | 
| 
      
 212 
     | 
    
         
            +
                # @return extension
         
     | 
| 
      
 213 
     | 
    
         
            +
                #
         
     | 
| 
      
 214 
     | 
    
         
            +
             
     | 
| 
      
 215 
     | 
    
         
            +
                def extractFileExtension(fileName)
         
     | 
| 
      
 216 
     | 
    
         
            +
                  ext = File.extname(fileName)
         
     | 
| 
      
 217 
     | 
    
         
            +
                  return ext;
         
     | 
| 
      
 218 
     | 
    
         
            +
                end
         
     | 
| 
      
 219 
     | 
    
         
            +
             
     | 
| 
      
 220 
     | 
    
         
            +
                #
         
     | 
| 
      
 221 
     | 
    
         
            +
                # To check if the image has a valid extension or not.
         
     | 
| 
      
 222 
     | 
    
         
            +
                #
         
     | 
| 
      
 223 
     | 
    
         
            +
                # @param fileName
         
     | 
| 
      
 224 
     | 
    
         
            +
                # @param name
         
     | 
| 
      
 225 
     | 
    
         
            +
                #
         
     | 
| 
      
 226 
     | 
    
         
            +
             
     | 
| 
      
 227 
     | 
    
         
            +
                def throwExceptionIfNotValidImageExtension(fileName, name)
         
     | 
| 
      
 228 
     | 
    
         
            +
             
     | 
| 
      
 229 
     | 
    
         
            +
                  if(fileName == nil)
         
     | 
| 
      
 230 
     | 
    
         
            +
                    raise App42Exception.new(name + " parameter can not be null")
         
     | 
| 
      
 231 
     | 
    
         
            +
                  end
         
     | 
| 
      
 232 
     | 
    
         
            +
             
     | 
| 
      
 233 
     | 
    
         
            +
                  if(fileName.index('.') == -1)
         
     | 
| 
      
 234 
     | 
    
         
            +
                    raise App42Exception.new(name + " does not contain valid extension. ")
         
     | 
| 
      
 235 
     | 
    
         
            +
                  end
         
     | 
| 
      
 236 
     | 
    
         
            +
             
     | 
| 
      
 237 
     | 
    
         
            +
                  ext = extractFileExtension(fileName);
         
     | 
| 
      
 238 
     | 
    
         
            +
                  if((ext.eql?(".jpg") == false) && (ext.eql?(".JPG") == false) && (ext.eql?(".jpeg") == false) && (ext.eql?(".JPEG") == false) && (ext.eql?(".gif") == false) && (ext.eql?(".GIF") == false) && (ext.eql?(".png") == false) && (ext.eql?(".PNG") == false))
         
     | 
| 
      
 239 
     | 
    
         
            +
                    raise App42Exception.new( "The Request parameters are invalid. Only file with extensions jpg, jpeg, gif and png are supported");
         
     | 
| 
      
 240 
     | 
    
         
            +
                  end
         
     | 
| 
      
 241 
     | 
    
         
            +
             
     | 
| 
      
 242 
     | 
    
         
            +
                end
         
     | 
| 
      
 243 
     | 
    
         
            +
              end
         
     | 
| 
      
 244 
     | 
    
         
            +
            end
         
     | 
    
        data/question.rb
    ADDED
    
    | 
         @@ -0,0 +1,79 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
             
     | 
| 
      
 2 
     | 
    
         
            +
            #USER, ASSIGN_ROLE, not need as we getting arry as parms
         
     | 
| 
      
 3 
     | 
    
         
            +
            role_array = []
         
     | 
| 
      
 4 
     | 
    
         
            +
            for role in role_list do
         
     | 
| 
      
 5 
     | 
    
         
            +
              role_array.push(role)
         
     | 
| 
      
 6 
     | 
    
         
            +
            end
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            #USER, GET USER BY ROLE, fetching a lot of data
         
     | 
| 
      
 9 
     | 
    
         
            +
            role = "Admin";            1
         
     | 
| 
      
 10 
     | 
    
         
            +
            userList = userService.get_users_by_role(role)
         
     | 
| 
      
 11 
     | 
    
         
            +
            puts "userName is #{user.userName}";
         
     | 
| 
      
 12 
     | 
    
         
            +
            puts "email is #{user.email}";
         
     | 
| 
      
 13 
     | 
    
         
            +
            puts "firstName #{user.profile.firstName}";
         
     | 
| 
      
 14 
     | 
    
         
            +
            userRoleList = user.roleList();
         
     | 
| 
      
 15 
     | 
    
         
            +
            jsonResponse = user.to_s()
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            #obj.get_all_users_count  ## TODO, undefine call methods
         
     | 
| 
      
 19 
     | 
    
         
            +
            def get_all_users_count
         
     | 
| 
      
 20 
     | 
    
         
            +
              response = @@user_obj.get_all_users_count
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              success = response.isResponseSuccess response
         
     | 
| 
      
 23 
     | 
    
         
            +
              totalRecords = response.totalRecords
         
     | 
| 
      
 24 
     | 
    
         
            +
              jsonResponse = response.to_s
         
     | 
| 
      
 25 
     | 
    
         
            +
            end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            #TODO, wrong no of argument
         
     | 
| 
      
 29 
     | 
    
         
            +
            userName = "Nick";
         
     | 
| 
      
 30 
     | 
    
         
            +
            pwd = "********";
         
     | 
| 
      
 31 
     | 
    
         
            +
            emailId = "nick@shephertz.com";
         
     | 
| 
      
 32 
     | 
    
         
            +
            profileData = App42::User::User::Profile.new();
         
     | 
| 
      
 33 
     | 
    
         
            +
            profileData.firstName = "Nick";
         
     | 
| 
      
 34 
     | 
    
         
            +
            profileData.lastName = "Gill";
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
            userList = userService.get_user_by_profile_data(profileData);
         
     | 
| 
      
 37 
     | 
    
         
            +
            for user in userList do
         
     | 
| 
      
 38 
     | 
    
         
            +
              puts "UserName is #{user.userName}";
         
     | 
| 
      
 39 
     | 
    
         
            +
              puts "EmailId is #{user.email}";
         
     | 
| 
      
 40 
     | 
    
         
            +
            end
         
     | 
| 
      
 41 
     | 
    
         
            +
            jsonResponse = userList.to_s()
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
            #obj.create_user ,# TODO uninitialized constant App42::User::User::Profile (NameError)
         
     | 
| 
      
 46 
     | 
    
         
            +
            def create_user
         
     | 
| 
      
 47 
     | 
    
         
            +
              user_name = "pravin80"
         
     | 
| 
      
 48 
     | 
    
         
            +
              email = "pravin80@shephertz.com"
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
              user = @@user_obj.create_user(user_name, "123456", email)
         
     | 
| 
      
 51 
     | 
    
         
            +
              profile_obj = App42::User::User::Profile.new
         
     | 
| 
      
 52 
     | 
    
         
            +
              profile_obj.officeLandLine = ("+1-1800-111-999")
         
     | 
| 
      
 53 
     | 
    
         
            +
              profile_obj.firstName = "Nick"
         
     | 
| 
      
 54 
     | 
    
         
            +
              profile_obj.dateOfBirth = "03-11-2012"
         
     | 
| 
      
 55 
     | 
    
         
            +
              profile_obj.country = ("USA")
         
     | 
| 
      
 56 
     | 
    
         
            +
              profile_obj.city = ("Houston")
         
     | 
| 
      
 57 
     | 
    
         
            +
              profile_obj.lastName = ("Gill")
         
     | 
| 
      
 58 
     | 
    
         
            +
              profile_obj.mobile = ("+958901234571")
         
     | 
| 
      
 59 
     | 
    
         
            +
              profile_obj.pincode = ("74193")
         
     | 
| 
      
 60 
     | 
    
         
            +
              profile_obj.sex = App42::User::User::UserGender.new.enum("MALE")
         
     | 
| 
      
 61 
     | 
    
         
            +
              profile_obj.homeLandLine = ("+1-1800-877-453")
         
     | 
| 
      
 62 
     | 
    
         
            +
              profile_obj.state = ("Texas")
         
     | 
| 
      
 63 
     | 
    
         
            +
              user.profile= profile_obj
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
              user_obj = @@user_obj.createOrUpdateProfile(user)
         
     | 
| 
      
 66 
     | 
    
         
            +
              puts "userName is #{user_obj.userName}"
         
     | 
| 
      
 67 
     | 
    
         
            +
              puts "email is #{user_obj.email}"
         
     | 
| 
      
 68 
     | 
    
         
            +
              puts "firstName #{user_obj.profile.firstName}"
         
     | 
| 
      
 69 
     | 
    
         
            +
              jsonResponse = user_obj.to_s()
         
     | 
| 
      
 70 
     | 
    
         
            +
            end
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
             
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,204 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: App42_Ruby_API
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.8.4
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 7 
     | 
    
         
            +
            - ShepHertz Technologies Pvt. Ltd.
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 10 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-08-12 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 13 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 14 
     | 
    
         
            +
              name: rest-client
         
     | 
| 
      
 15 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 16 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 17 
     | 
    
         
            +
                - - '='
         
     | 
| 
      
 18 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: 1.6.7
         
     | 
| 
      
 20 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 21 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 22 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 23 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 24 
     | 
    
         
            +
                - - '='
         
     | 
| 
      
 25 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: 1.6.7
         
     | 
| 
      
 27 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 28 
     | 
    
         
            +
              name: ruby-hmac
         
     | 
| 
      
 29 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 30 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 31 
     | 
    
         
            +
                - - '='
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 33 
     | 
    
         
            +
                    version: 0.4.0
         
     | 
| 
      
 34 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 35 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 36 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 37 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 38 
     | 
    
         
            +
                - - '='
         
     | 
| 
      
 39 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 40 
     | 
    
         
            +
                    version: 0.4.0
         
     | 
| 
      
 41 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 42 
     | 
    
         
            +
              name: json_pure
         
     | 
| 
      
 43 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 44 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 45 
     | 
    
         
            +
                - - '='
         
     | 
| 
      
 46 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 47 
     | 
    
         
            +
                    version: 1.6.6
         
     | 
| 
      
 48 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 49 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 50 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 51 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 52 
     | 
    
         
            +
                - - '='
         
     | 
| 
      
 53 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 54 
     | 
    
         
            +
                    version: 1.6.6
         
     | 
| 
      
 55 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 56 
     | 
    
         
            +
              name: bundler
         
     | 
| 
      
 57 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 58 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 59 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 60 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 61 
     | 
    
         
            +
                    version: '1.3'
         
     | 
| 
      
 62 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 63 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 64 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 65 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 66 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 67 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 68 
     | 
    
         
            +
                    version: '1.3'
         
     | 
| 
      
 69 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 70 
     | 
    
         
            +
              name: rake
         
     | 
| 
      
 71 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 72 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 73 
     | 
    
         
            +
                - - '>='
         
     | 
| 
      
 74 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 75 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 76 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 77 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 78 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 79 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 80 
     | 
    
         
            +
                - - '>='
         
     | 
| 
      
 81 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 82 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 83 
     | 
    
         
            +
            description: gem containing all the sdk
         
     | 
| 
      
 84 
     | 
    
         
            +
            email:
         
     | 
| 
      
 85 
     | 
    
         
            +
            - http://apps.shephertz.com/
         
     | 
| 
      
 86 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 87 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 88 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 89 
     | 
    
         
            +
            files:
         
     | 
| 
      
 90 
     | 
    
         
            +
            - .gitignore
         
     | 
| 
      
 91 
     | 
    
         
            +
            - App42_Ruby_API.gemspec
         
     | 
| 
      
 92 
     | 
    
         
            +
            - Gemfile
         
     | 
| 
      
 93 
     | 
    
         
            +
            - LICENSE.txt
         
     | 
| 
      
 94 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 95 
     | 
    
         
            +
            - Rakefile
         
     | 
| 
      
 96 
     | 
    
         
            +
            - TODO.rb
         
     | 
| 
      
 97 
     | 
    
         
            +
            - garbage.rb
         
     | 
| 
      
 98 
     | 
    
         
            +
            - lib/App42_Ruby_API.rb
         
     | 
| 
      
 99 
     | 
    
         
            +
            - lib/App42_Ruby_API/App42BadParameterException.rb
         
     | 
| 
      
 100 
     | 
    
         
            +
            - lib/App42_Ruby_API/App42Exception.rb
         
     | 
| 
      
 101 
     | 
    
         
            +
            - lib/App42_Ruby_API/App42LimitException.rb
         
     | 
| 
      
 102 
     | 
    
         
            +
            - lib/App42_Ruby_API/App42NotFoundException.rb
         
     | 
| 
      
 103 
     | 
    
         
            +
            - lib/App42_Ruby_API/App42Response.rb
         
     | 
| 
      
 104 
     | 
    
         
            +
            - lib/App42_Ruby_API/App42ResponseBuilder.rb
         
     | 
| 
      
 105 
     | 
    
         
            +
            - lib/App42_Ruby_API/App42SecurityException.rb
         
     | 
| 
      
 106 
     | 
    
         
            +
            - lib/App42_Ruby_API/version.rb
         
     | 
| 
      
 107 
     | 
    
         
            +
            - lib/connection/RESTConnection.rb
         
     | 
| 
      
 108 
     | 
    
         
            +
            - lib/email/Email.rb
         
     | 
| 
      
 109 
     | 
    
         
            +
            - lib/email/EmailMIME.rb
         
     | 
| 
      
 110 
     | 
    
         
            +
            - lib/email/EmailResponseBuilder.rb
         
     | 
| 
      
 111 
     | 
    
         
            +
            - lib/email/EmailService.rb
         
     | 
| 
      
 112 
     | 
    
         
            +
            - lib/gallery/Album.rb
         
     | 
| 
      
 113 
     | 
    
         
            +
            - lib/gallery/AlbumResponseBuilder.rb
         
     | 
| 
      
 114 
     | 
    
         
            +
            - lib/gallery/AlbumService.rb
         
     | 
| 
      
 115 
     | 
    
         
            +
            - lib/gallery/PhotoService.rb
         
     | 
| 
      
 116 
     | 
    
         
            +
            - lib/game/Game.rb
         
     | 
| 
      
 117 
     | 
    
         
            +
            - lib/game/GameResponseBuilder.rb
         
     | 
| 
      
 118 
     | 
    
         
            +
            - lib/game/GameService.rb
         
     | 
| 
      
 119 
     | 
    
         
            +
            - lib/game/Reward.rb
         
     | 
| 
      
 120 
     | 
    
         
            +
            - lib/game/RewardResponseBuilder.rb
         
     | 
| 
      
 121 
     | 
    
         
            +
            - lib/game/RewardService.rb
         
     | 
| 
      
 122 
     | 
    
         
            +
            - lib/game/ScoreBoardService.rb
         
     | 
| 
      
 123 
     | 
    
         
            +
            - lib/game/ScoreService.rb
         
     | 
| 
      
 124 
     | 
    
         
            +
            - lib/geo/Geo.rb
         
     | 
| 
      
 125 
     | 
    
         
            +
            - lib/geo/GeoPoint.rb
         
     | 
| 
      
 126 
     | 
    
         
            +
            - lib/geo/GeoResponseBuilder.rb
         
     | 
| 
      
 127 
     | 
    
         
            +
            - lib/geo/GeoService.rb
         
     | 
| 
      
 128 
     | 
    
         
            +
            - lib/imageProcessor/Image.rb
         
     | 
| 
      
 129 
     | 
    
         
            +
            - lib/imageProcessor/ImageProcessorResponseBuilder.rb
         
     | 
| 
      
 130 
     | 
    
         
            +
            - lib/imageProcessor/ImageProcessorService.rb
         
     | 
| 
      
 131 
     | 
    
         
            +
            - lib/log/Log.rb
         
     | 
| 
      
 132 
     | 
    
         
            +
            - lib/log/LogResponseBuilder.rb
         
     | 
| 
      
 133 
     | 
    
         
            +
            - lib/log/LogService.rb
         
     | 
| 
      
 134 
     | 
    
         
            +
            - lib/message/Queue.rb
         
     | 
| 
      
 135 
     | 
    
         
            +
            - lib/message/QueueResponseBuilder.rb
         
     | 
| 
      
 136 
     | 
    
         
            +
            - lib/message/QueueService.rb
         
     | 
| 
      
 137 
     | 
    
         
            +
            - lib/push/DeviceType.rb
         
     | 
| 
      
 138 
     | 
    
         
            +
            - lib/push/PushNotification.rb
         
     | 
| 
      
 139 
     | 
    
         
            +
            - lib/push/PushNotificationResposneBuilder.rb
         
     | 
| 
      
 140 
     | 
    
         
            +
            - lib/push/PushNotificationService.rb
         
     | 
| 
      
 141 
     | 
    
         
            +
            - lib/recommend/PreferenceData.rb
         
     | 
| 
      
 142 
     | 
    
         
            +
            - lib/recommend/Recommender.rb
         
     | 
| 
      
 143 
     | 
    
         
            +
            - lib/recommend/RecommenderResponseBuilder.rb
         
     | 
| 
      
 144 
     | 
    
         
            +
            - lib/recommend/RecommenderService.rb
         
     | 
| 
      
 145 
     | 
    
         
            +
            - lib/recommend/RecommenderSimilarity.rb
         
     | 
| 
      
 146 
     | 
    
         
            +
            - lib/review/Review.rb
         
     | 
| 
      
 147 
     | 
    
         
            +
            - lib/review/ReviewResponseBuilder.rb
         
     | 
| 
      
 148 
     | 
    
         
            +
            - lib/review/ReviewService.rb
         
     | 
| 
      
 149 
     | 
    
         
            +
            - lib/session/Session.rb
         
     | 
| 
      
 150 
     | 
    
         
            +
            - lib/session/SessionResponseBuilder.rb
         
     | 
| 
      
 151 
     | 
    
         
            +
            - lib/session/SessionService.rb
         
     | 
| 
      
 152 
     | 
    
         
            +
            - lib/shopping/Cart.rb
         
     | 
| 
      
 153 
     | 
    
         
            +
            - lib/shopping/CartResponseBuilder.rb
         
     | 
| 
      
 154 
     | 
    
         
            +
            - lib/shopping/CartService.rb
         
     | 
| 
      
 155 
     | 
    
         
            +
            - lib/shopping/Catalogue.rb
         
     | 
| 
      
 156 
     | 
    
         
            +
            - lib/shopping/CatalogueResponseBuilder.rb
         
     | 
| 
      
 157 
     | 
    
         
            +
            - lib/shopping/CatalogueService.rb
         
     | 
| 
      
 158 
     | 
    
         
            +
            - lib/shopping/ItemData.rb
         
     | 
| 
      
 159 
     | 
    
         
            +
            - lib/shopping/PaymentStatus.rb
         
     | 
| 
      
 160 
     | 
    
         
            +
            - lib/social/Social.rb
         
     | 
| 
      
 161 
     | 
    
         
            +
            - lib/social/SocialResponseBuilder.rb
         
     | 
| 
      
 162 
     | 
    
         
            +
            - lib/social/SocialService.rb
         
     | 
| 
      
 163 
     | 
    
         
            +
            - lib/storage/OrderByType.rb
         
     | 
| 
      
 164 
     | 
    
         
            +
            - lib/storage/Query.rb
         
     | 
| 
      
 165 
     | 
    
         
            +
            - lib/storage/QueryBuilder.rb
         
     | 
| 
      
 166 
     | 
    
         
            +
            - lib/storage/Storage.rb
         
     | 
| 
      
 167 
     | 
    
         
            +
            - lib/storage/StorageResponseBuilder.rb
         
     | 
| 
      
 168 
     | 
    
         
            +
            - lib/storage/StorageService.rb
         
     | 
| 
      
 169 
     | 
    
         
            +
            - lib/upload/Upload.rb
         
     | 
| 
      
 170 
     | 
    
         
            +
            - lib/upload/UploadFileType.rb
         
     | 
| 
      
 171 
     | 
    
         
            +
            - lib/upload/UploadResponseBuilder.rb
         
     | 
| 
      
 172 
     | 
    
         
            +
            - lib/upload/UploadService.rb
         
     | 
| 
      
 173 
     | 
    
         
            +
            - lib/user/User.rb
         
     | 
| 
      
 174 
     | 
    
         
            +
            - lib/user/UserResponseBuilder.rb
         
     | 
| 
      
 175 
     | 
    
         
            +
            - lib/user/UserService.rb
         
     | 
| 
      
 176 
     | 
    
         
            +
            - lib/util/util.rb
         
     | 
| 
      
 177 
     | 
    
         
            +
            - question.rb
         
     | 
| 
      
 178 
     | 
    
         
            +
            homepage: http://www.shephertz.com
         
     | 
| 
      
 179 
     | 
    
         
            +
            licenses:
         
     | 
| 
      
 180 
     | 
    
         
            +
            - MIT
         
     | 
| 
      
 181 
     | 
    
         
            +
            metadata: {}
         
     | 
| 
      
 182 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 183 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 184 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 185 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 186 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 187 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 188 
     | 
    
         
            +
              - - '>='
         
     | 
| 
      
 189 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 190 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 191 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 192 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 193 
     | 
    
         
            +
              - - '>='
         
     | 
| 
      
 194 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 195 
     | 
    
         
            +
                  version: 1.3.6
         
     | 
| 
      
 196 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 197 
     | 
    
         
            +
            rubyforge_project: App42_RUBY_SDK
         
     | 
| 
      
 198 
     | 
    
         
            +
            rubygems_version: 2.0.0.rc.2
         
     | 
| 
      
 199 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 200 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
      
 201 
     | 
    
         
            +
            summary: App42_RUBY_API is a gem containing all the api's that will be used to create
         
     | 
| 
      
 202 
     | 
    
         
            +
              an app
         
     | 
| 
      
 203 
     | 
    
         
            +
            test_files: []
         
     | 
| 
      
 204 
     | 
    
         
            +
            has_rdoc: 
         
     |