lazy_lazer 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/lazy_lazer.gemspec +4 -3
- data/lib/lazy_lazer/version.rb +1 -1
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0a0ff87d642e74181e1978368095eb97a70a04e
|
4
|
+
data.tar.gz: 23830bf11b2f063fbb490ace0db4070dbad04850
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ca0d7ed68bf597c46eec6cee920eb949bf0ccb896507e387a616c92b318c02a8cedd81862a2d2989da44df3e59f8633b8c63e21eb95a52601e3745a376224c1
|
7
|
+
data.tar.gz: 61aa3915c660c862acfa4bbc7525d3894ae9f834f5160349109d659e15b1bd676fc451203c3d9e955d4cc026056f539cd61909261c955195849978080442a7cc
|
data/README.md
CHANGED
@@ -18,13 +18,13 @@ class User
|
|
18
18
|
property :email, default: nil
|
19
19
|
|
20
20
|
# user = User.new(id: 1)
|
21
|
-
# user.
|
22
|
-
property :
|
21
|
+
# user.language #=> :en_US
|
22
|
+
property :language, default: :en_US
|
23
23
|
|
24
24
|
# user = User.new(id: 1, first_name: 'John')
|
25
25
|
# user.name #=> 'John'
|
26
26
|
# user.first_name #=> NoMethodError: ...
|
27
|
-
property :last_name, default: -> {
|
27
|
+
property :last_name, default: -> { %w[Doe Bloggs Hansen].sample }
|
28
28
|
|
29
29
|
# user = User.new(id: 1, created_at: 1502834161)
|
30
30
|
# user.created_at #=> 2017-08-15 22:56:13 +0100
|
@@ -35,8 +35,8 @@ class User
|
|
35
35
|
property :age, with: :to_i
|
36
36
|
|
37
37
|
def reload
|
38
|
-
update_attributes!(
|
39
|
-
fully_loaded = true # model
|
38
|
+
update_attributes!(email: "#{last_name}@gmail.com") # update your attributes
|
39
|
+
self.fully_loaded = true # mark model as fully updated
|
40
40
|
self # a rails convention, totally optional
|
41
41
|
end
|
42
42
|
end
|
data/lazy_lazer.gemspec
CHANGED
@@ -13,6 +13,8 @@ Gem::Specification.new do |spec|
|
|
13
13
|
|
14
14
|
spec.summary = 'Create lazily loadable models.'
|
15
15
|
spec.homepage = 'https://github.com/avinashbot/lazy_lazer'
|
16
|
+
spec.license = 'MIT'
|
17
|
+
spec.required_ruby_version = '>= 2.1.0'
|
16
18
|
|
17
19
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
20
|
f.match(%r{^(test|spec|features)/})
|
@@ -24,9 +26,8 @@ Gem::Specification.new do |spec|
|
|
24
26
|
spec.add_development_dependency 'bundler', '~> 1.15'
|
25
27
|
spec.add_development_dependency 'rake', '~> 10.0'
|
26
28
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
27
|
-
spec.add_development_dependency 'guard', '~> 2.14'
|
28
|
-
spec.add_development_dependency 'guard-rspec', '~> 4.7'
|
29
|
-
|
30
29
|
spec.add_development_dependency 'rubocop', '~> 0.47'
|
31
30
|
spec.add_development_dependency 'pry', '~> 0.10'
|
31
|
+
spec.add_development_dependency 'guard', '~> 2.14'
|
32
|
+
spec.add_development_dependency 'guard-rspec', '~> 4.7'
|
32
33
|
end
|
data/lib/lazy_lazer/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lazy_lazer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Avinash Dwarapu
|
@@ -53,61 +53,61 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rubocop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0.47'
|
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
|
-
version: '
|
68
|
+
version: '0.47'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: pry
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0.10'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '0.10'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: guard
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '2.14'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '2.14'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: guard-rspec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '4.7'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '4.7'
|
111
111
|
description:
|
112
112
|
email:
|
113
113
|
- avinash@dwarapu.me
|
@@ -133,7 +133,8 @@ files:
|
|
133
133
|
- lib/lazy_lazer/utilities.rb
|
134
134
|
- lib/lazy_lazer/version.rb
|
135
135
|
homepage: https://github.com/avinashbot/lazy_lazer
|
136
|
-
licenses:
|
136
|
+
licenses:
|
137
|
+
- MIT
|
137
138
|
metadata: {}
|
138
139
|
post_install_message:
|
139
140
|
rdoc_options: []
|
@@ -143,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
143
144
|
requirements:
|
144
145
|
- - ">="
|
145
146
|
- !ruby/object:Gem::Version
|
146
|
-
version:
|
147
|
+
version: 2.1.0
|
147
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
149
|
requirements:
|
149
150
|
- - ">="
|