motion-persistable 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/README.md +11 -6
- data/lib/motion/persistable/version.rb +1 -1
- metadata +14 -15
- data/.repl_history +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b01037b4a97223449b6cd70cf0f5f5b52fb396aa
|
4
|
+
data.tar.gz: 540da26674df4efd6898aa49b619f868d41699e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7739e4e445b9b897929e2fc022727cd0c0ac329244ba2ed7d23ae233b5ea9098ac00304176775f5b84a9d003502723458ae4e8a89230321fdd984f8e8561ceef
|
7
|
+
data.tar.gz: fb946e5cfe68b26a4ee6bad428d321fdfd901085d45ae404a28a4d424d2826aad08869613c7da42702ccfff9e81102e5309ba33c242e244e54ae2b578dfd17b0
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -12,20 +12,22 @@ Add this line to your application's Gemfile:
|
|
12
12
|
|
13
13
|
And then execute:
|
14
14
|
|
15
|
-
$
|
15
|
+
$ bundle
|
16
16
|
|
17
|
-
|
17
|
+
|
18
|
+
Or install it yourself with:
|
19
|
+
|
20
|
+
$ gem install motion-persistable
|
21
|
+
|
22
|
+
...add this line to your application's Rakefile:
|
18
23
|
|
19
24
|
Bundler.require # this should already be there
|
20
25
|
require 'motion-persistable'
|
21
26
|
|
22
|
-
Or install it yourself as:
|
23
|
-
|
24
|
-
$ gem install motion-persistable
|
25
27
|
|
26
28
|
## Usage
|
27
29
|
|
28
|
-
Include the module Motion::Persistable in any class that you want persistable attributes
|
30
|
+
Include the module **Motion::Persistable** in any class that you want persistable attributes
|
29
31
|
|
30
32
|
### Persistable Instance Methods
|
31
33
|
|
@@ -58,6 +60,9 @@ Include the module Motion::Persistable in any class that you want persistable at
|
|
58
60
|
|
59
61
|
end
|
60
62
|
|
63
|
+
## Gotchas
|
64
|
+
|
65
|
+
* Dont' set class attributes called `name()` without providing a `key()`. The `name()` method defined on instances of `Class` is used as a default key prefix when no `key()` method has been defined. This is handy because it provides key names such as `"User.login_count"` but will cause an infinite loop if no `key()` is defined as an alternative.
|
61
66
|
|
62
67
|
## Considerations
|
63
68
|
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-persistable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bodacious
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bubble-wrap
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: motion-stump
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: Persistable attributes for Rubymotion classes
|
@@ -73,8 +73,7 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- .gitignore
|
77
|
-
- .repl_history
|
76
|
+
- ".gitignore"
|
78
77
|
- Gemfile
|
79
78
|
- LICENSE.txt
|
80
79
|
- README.md
|
@@ -96,17 +95,17 @@ require_paths:
|
|
96
95
|
- lib
|
97
96
|
required_ruby_version: !ruby/object:Gem::Requirement
|
98
97
|
requirements:
|
99
|
-
- -
|
98
|
+
- - ">="
|
100
99
|
- !ruby/object:Gem::Version
|
101
100
|
version: '0'
|
102
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
102
|
requirements:
|
104
|
-
- -
|
103
|
+
- - ">="
|
105
104
|
- !ruby/object:Gem::Version
|
106
105
|
version: '0'
|
107
106
|
requirements: []
|
108
107
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.1
|
108
|
+
rubygems_version: 2.5.1
|
110
109
|
signing_key:
|
111
110
|
specification_version: 4
|
112
111
|
summary: A nice wrapper around Bubble-wrap's App::Persistence module that adds class
|
data/.repl_history
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
User
|
2
|
-
exit
|
3
|
-
User.new.age
|
4
|
-
User.new.email
|
5
|
-
User.new('theore').age
|
6
|
-
User.new('theore').age
|
7
|
-
domainName = NSBundle.mainBundle.bundleIdentifier
|
8
|
-
NSUserDefaults.standardUserDefaults.removePersistentDomainForName(domainName)
|
9
|
-
User.new('theore').age
|
10
|
-
User.new('theore').age = 14
|
11
|
-
User.new('theore').age
|
12
|
-
domainName = NSBundle.mainBundle.bundleIdentifier
|
13
|
-
NSUserDefaults.standardUserDefaults.removePersistentDomainForName(domainName)
|
14
|
-
User.new('theore').age
|
15
|
-
exit
|
16
|
-
User.new("Bodacious").last_signed_in = Time.now
|
17
|
-
User.new("Bodacious").last_sign_in = Time.now
|
18
|
-
STDOUT
|
19
|
-
STDOUT.read
|
20
|
-
exit
|