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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b97391a59b7f022f99a5211abffff9d9baeb907
4
- data.tar.gz: 54639abaacb86f5be191f3d0d98fcc0172486587
3
+ metadata.gz: b0a0ff87d642e74181e1978368095eb97a70a04e
4
+ data.tar.gz: 23830bf11b2f063fbb490ace0db4070dbad04850
5
5
  SHA512:
6
- metadata.gz: 44492444116d6d9fee06516379daa59801977ffe9dbdf5578534711030a43e06ae019d1ec38ec6a913300089fc5189b8b2c56eec356ee8ee58976f2a3f5ad2c6
7
- data.tar.gz: 192948daba02e2c91815856085bf115fc1d072c6615f45dcd34934ca52f3ac95fd4cc2d670c4b561df43d1102450669d9a0420c0b2d3314e363de5c1b4c520ca
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.preferred_language #=> :en_US
22
- property :preferred_language, default: :en_US
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: -> { '<last name>' }
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!(...) # update your attributes somehow
39
- fully_loaded = true # model is fully updated, no more lazy loading necessary
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LazyLazer
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
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.0
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: guard
56
+ name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.14'
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: '2.14'
68
+ version: '0.47'
69
69
  - !ruby/object:Gem::Dependency
70
- name: guard-rspec
70
+ name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '4.7'
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: '4.7'
82
+ version: '0.10'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rubocop
84
+ name: guard
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.47'
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: '0.47'
96
+ version: '2.14'
97
97
  - !ruby/object:Gem::Dependency
98
- name: pry
98
+ name: guard-rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.10'
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: '0.10'
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: '0'
147
+ version: 2.1.0
147
148
  required_rubygems_version: !ruby/object:Gem::Requirement
148
149
  requirements:
149
150
  - - ">="