parse-stack 1.0.7 → 1.0.8
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 +4 -4
 - data/.gitignore +1 -0
 - data/Changes.md +6 -0
 - data/Gemfile +1 -0
 - data/Gemfile.lock +6 -4
 - data/README.md +3 -0
 - data/bin/console +2 -5
 - data/lib/parse/model/core/properties.rb +5 -3
 - data/lib/parse/stack/version.rb +1 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 165349f0e4fd1b1a0205243c503652c6b368a216
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: d6796a7fc8df73afefbb3887fa576c3c0784c49d
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: bd504bcc1a7ba6b36027e8a4efe208adb6e4cc3fc84bf3829ab1aac3708e87112828634c98451619c6fc96177b77880a535204e99e532e2328a296b3654154aa
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: e58c3f344e90c1fce73e6de012a373c47612903894c190649cd11ee8ffda00daf9056fbb9ed715fa1cff41ebb0cacaa501874a3c39a374da6accb0f1323fbc9a
         
     | 
    
        data/.gitignore
    CHANGED
    
    
    
        data/Changes.md
    CHANGED
    
    | 
         @@ -1,5 +1,11 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # Parse-Stack Changes
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            1.0.8
         
     | 
| 
      
 4 
     | 
    
         
            +
            -----------
         
     | 
| 
      
 5 
     | 
    
         
            +
            - Fixes issues when setting a collection proxy property with a collection proxy.
         
     | 
| 
      
 6 
     | 
    
         
            +
            - Default array values are now properly casted as collection proxies.
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Default booleans values of `false` are now properly set.
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       3 
9 
     | 
    
         
             
            1.0.7
         
     | 
| 
       4 
10 
     | 
    
         
             
            -----------
         
     | 
| 
       5 
11 
     | 
    
         
             
            - Fixes issues when copying dates.
         
     | 
    
        data/Gemfile
    CHANGED
    
    
    
        data/Gemfile.lock
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            PATH
         
     | 
| 
       2 
2 
     | 
    
         
             
              remote: .
         
     | 
| 
       3 
3 
     | 
    
         
             
              specs:
         
     | 
| 
       4 
     | 
    
         
            -
                parse-stack (1.0. 
     | 
| 
      
 4 
     | 
    
         
            +
                parse-stack (1.0.8)
         
     | 
| 
       5 
5 
     | 
    
         
             
                  active_model_serializers (>= 0.9, < 1)
         
     | 
| 
       6 
6 
     | 
    
         
             
                  activemodel (>= 4, < 5)
         
     | 
| 
       7 
7 
     | 
    
         
             
                  activesupport (>= 4, < 5)
         
     | 
| 
         @@ -16,10 +16,10 @@ GEM 
     | 
|
| 
       16 
16 
     | 
    
         
             
              specs:
         
     | 
| 
       17 
17 
     | 
    
         
             
                active_model_serializers (0.9.4)
         
     | 
| 
       18 
18 
     | 
    
         
             
                  activemodel (>= 3.2)
         
     | 
| 
       19 
     | 
    
         
            -
                activemodel (4.2. 
     | 
| 
       20 
     | 
    
         
            -
                  activesupport (= 4.2. 
     | 
| 
      
 19 
     | 
    
         
            +
                activemodel (4.2.6)
         
     | 
| 
      
 20 
     | 
    
         
            +
                  activesupport (= 4.2.6)
         
     | 
| 
       21 
21 
     | 
    
         
             
                  builder (~> 3.1)
         
     | 
| 
       22 
     | 
    
         
            -
                activesupport (4.2. 
     | 
| 
      
 22 
     | 
    
         
            +
                activesupport (4.2.6)
         
     | 
| 
       23 
23 
     | 
    
         
             
                  i18n (~> 0.7)
         
     | 
| 
       24 
24 
     | 
    
         
             
                  json (~> 1.7, >= 1.7.7)
         
     | 
| 
       25 
25 
     | 
    
         
             
                  minitest (~> 5.1)
         
     | 
| 
         @@ -30,6 +30,7 @@ GEM 
     | 
|
| 
       30 
30 
     | 
    
         
             
                builder (3.2.2)
         
     | 
| 
       31 
31 
     | 
    
         
             
                coderay (1.1.0)
         
     | 
| 
       32 
32 
     | 
    
         
             
                debug_inspector (0.0.2)
         
     | 
| 
      
 33 
     | 
    
         
            +
                dotenv (2.1.0)
         
     | 
| 
       33 
34 
     | 
    
         
             
                faraday (0.9.2)
         
     | 
| 
       34 
35 
     | 
    
         
             
                  multipart-post (>= 1.2, < 3)
         
     | 
| 
       35 
36 
     | 
    
         
             
                faraday_middleware (0.10.0)
         
     | 
| 
         @@ -62,6 +63,7 @@ PLATFORMS 
     | 
|
| 
       62 
63 
     | 
    
         | 
| 
       63 
64 
     | 
    
         
             
            DEPENDENCIES
         
     | 
| 
       64 
65 
     | 
    
         
             
              bundler (~> 1)
         
     | 
| 
      
 66 
     | 
    
         
            +
              dotenv
         
     | 
| 
       65 
67 
     | 
    
         
             
              minitest (~> 5)
         
     | 
| 
       66 
68 
     | 
    
         
             
              parse-stack!
         
     | 
| 
       67 
69 
     | 
    
         
             
              pry (< 1)
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -100,6 +100,9 @@ class Song < Parse::Object 
     | 
|
| 
       100 
100 
     | 
    
         
             
              has_many :likes, as: :user, through: :relation
         
     | 
| 
       101 
101 
     | 
    
         
             
            end
         
     | 
| 
       102 
102 
     | 
    
         | 
| 
      
 103 
     | 
    
         
            +
            # create tables or add new columns (non-destructive)
         
     | 
| 
      
 104 
     | 
    
         
            +
            Song.auto_upgrade!
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
       103 
106 
     | 
    
         
             
            artist = Artist.first(:name.like => /Sinatra/, :genres.in => ['swing'])
         
     | 
| 
       104 
107 
     | 
    
         | 
| 
       105 
108 
     | 
    
         
             
            song = Song.new name: "Fly Me to the Moon"
         
     | 
    
        data/bin/console
    CHANGED
    
    | 
         @@ -2,15 +2,12 @@ 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            require "bundler/setup"
         
     | 
| 
       4 
4 
     | 
    
         
             
            require "parse/stack"
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
      
 5 
     | 
    
         
            +
            require 'dotenv'
         
     | 
| 
      
 6 
     | 
    
         
            +
            Dotenv.load
         
     | 
| 
       6 
7 
     | 
    
         
             
            # You can add fixtures and/or initialization code here to make experimenting
         
     | 
| 
       7 
8 
     | 
    
         
             
            # with your gem easier. You can also use a different console, if you like.
         
     | 
| 
       8 
9 
     | 
    
         | 
| 
       9 
10 
     | 
    
         
             
            # (If you use this, don't forget to add pry to your Gemfile!)
         
     | 
| 
       10 
     | 
    
         
            -
            ENV["PARSE_APP_ID"] ||= "vesNFfsUUjbiWtbFljEV41RwXVJ2vw7HPFwLdisL".freeze
         
     | 
| 
       11 
     | 
    
         
            -
            ENV["PARSE_API_KEY"] ||=  "FndxgK7oGnjsRznFbMs8r7TG5WHwFSOmgWQr6Qui".freeze
         
     | 
| 
       12 
     | 
    
         
            -
            ENV["PARSE_MASTER_KEY"] ||= "oZs3AlBMKg6JDe82XVm7NJpO5GmvibiXbpMtwEHi".freeze
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
11 
     | 
    
         
             
            require "pry"
         
     | 
| 
       15 
12 
     | 
    
         
             
            Pry.start
         
     | 
| 
       16 
13 
     | 
    
         | 
| 
         @@ -143,14 +143,14 @@ module Parse 
     | 
|
| 
       143 
143 
     | 
    
         
             
                    # get the default value if provided (or Proc)
         
     | 
| 
       144 
144 
     | 
    
         
             
                    default_value = opts[:default]
         
     | 
| 
       145 
145 
     | 
    
         
             
                    unless default_value.nil?
         
     | 
| 
       146 
     | 
    
         
            -
                      defaults_list.push(key)  
     | 
| 
      
 146 
     | 
    
         
            +
                      defaults_list.push(key) unless default_value.nil?
         
     | 
| 
       147 
147 
     | 
    
         | 
| 
       148 
148 
     | 
    
         
             
                      define_method("#{key}_default") do
         
     | 
| 
       149 
149 
     | 
    
         
             
                        # If the default object provided is a Proc, then run the proc, otherwise
         
     | 
| 
       150 
150 
     | 
    
         
             
                        # we'll assume it's just a plain literal value
         
     | 
| 
       151 
151 
     | 
    
         
             
                        default_value.is_a?(Proc) ? default_value.call(self) : default_value
         
     | 
| 
       152 
152 
     | 
    
         
             
                      end
         
     | 
| 
       153 
     | 
    
         
            -
             
     | 
| 
      
 153 
     | 
    
         
            +
             
     | 
| 
       154 
154 
     | 
    
         
             
                    end
         
     | 
| 
       155 
155 
     | 
    
         | 
| 
       156 
156 
     | 
    
         
             
                    # We define a getter with the key
         
     | 
| 
         @@ -176,6 +176,7 @@ module Parse 
     | 
|
| 
       176 
176 
     | 
    
         
             
                      if value.nil? && respond_to?("#{key}_default")
         
     | 
| 
       177 
177 
     | 
    
         | 
| 
       178 
178 
     | 
    
         
             
                         value = send("#{key}_default")
         
     | 
| 
      
 179 
     | 
    
         
            +
                         value = format_value(key, value, data_type)
         
     | 
| 
       179 
180 
     | 
    
         
             
                        # lets set the variable with the updated value
         
     | 
| 
       180 
181 
     | 
    
         
             
                         instance_variable_set ivar, value
         
     | 
| 
       181 
182 
     | 
    
         
             
                         send "#{key}_will_change!"
         
     | 
| 
         @@ -184,7 +185,7 @@ module Parse 
     | 
|
| 
       184 
185 
     | 
    
         
             
                      # if the value is a String (like an iso8601 date) and the data type of
         
     | 
| 
       185 
186 
     | 
    
         
             
                      # this object is :date, then let's be nice and create a parse date for it.
         
     | 
| 
       186 
187 
     | 
    
         
             
                      if value.is_a?(String) && data_type == :date
         
     | 
| 
       187 
     | 
    
         
            -
                        value =  
     | 
| 
      
 188 
     | 
    
         
            +
                        value = format_value(key, value, data_type)
         
     | 
| 
       188 
189 
     | 
    
         
             
                        instance_variable_set ivar, value
         
     | 
| 
       189 
190 
     | 
    
         
             
                        send "#{key}_will_change!"
         
     | 
| 
       190 
191 
     | 
    
         
             
                      end
         
     | 
| 
         @@ -360,6 +361,7 @@ module Parse 
     | 
|
| 
       360 
361 
     | 
    
         
             
                    val = val #should be regular hash, maybe in the future we return hashie?
         
     | 
| 
       361 
362 
     | 
    
         
             
                  when :array
         
     | 
| 
       362 
363 
     | 
    
         
             
                    # All "array" types use a collection proxy
         
     | 
| 
      
 364 
     | 
    
         
            +
                    val = val.to_a if val.is_a?(Parse::CollectionProxy) #all objects must be in array form
         
     | 
| 
       363 
365 
     | 
    
         
             
                    val = [val] unless val.is_a?(Array) #all objects must be in array form
         
     | 
| 
       364 
366 
     | 
    
         
             
                    val.compact! #remove any nil
         
     | 
| 
       365 
367 
     | 
    
         
             
                    val = Parse::CollectionProxy.new val, delegate: self, key: key
         
     | 
    
        data/lib/parse/stack/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: parse-stack
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.8
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Anthony Persaud
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2016-03- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2016-03-25 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: activemodel
         
     | 
| 
         @@ -338,7 +338,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       338 
338 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       339 
339 
     | 
    
         
             
            requirements: []
         
     | 
| 
       340 
340 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       341 
     | 
    
         
            -
            rubygems_version: 2. 
     | 
| 
      
 341 
     | 
    
         
            +
            rubygems_version: 2.5.1
         
     | 
| 
       342 
342 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       343 
343 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       344 
344 
     | 
    
         
             
            summary: Parse Ruby Client SDK and Object Relational Mapping stack
         
     |