smartcar 0.0.0 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +20 -0
- data/.rspec +3 -0
- data/.travis.yml +28 -0
- data/.yardopts +2 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +59 -0
- data/LICENSE.txt +21 -0
- data/README.md +147 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/smartcar.rb +53 -0
- data/lib/smartcar/base.rb +72 -0
- data/lib/smartcar/battery.rb +13 -0
- data/lib/smartcar/charge.rb +13 -0
- data/lib/smartcar/engine_oil.rb +12 -0
- data/lib/smartcar/fuel.rb +15 -0
- data/lib/smartcar/location.rb +10 -0
- data/lib/smartcar/oauth.rb +91 -0
- data/lib/smartcar/odometer.rb +9 -0
- data/lib/smartcar/permissions.rb +9 -0
- data/lib/smartcar/tire_pressure.rb +19 -0
- data/lib/smartcar/user.rb +26 -0
- data/lib/smartcar/utils.rb +35 -0
- data/lib/smartcar/vehicle.rb +294 -0
- data/lib/smartcar/vehicle_attributes.rb +12 -0
- data/lib/smartcar/version.rb +4 -0
- data/lib/smartcar/vin.rb +10 -0
- data/ruby-sdk.gemspec +33 -0
- metadata +151 -14
@@ -0,0 +1,12 @@
|
|
1
|
+
module Smartcar
|
2
|
+
# class to represent Vehicle attributes like make model year
|
3
|
+
#@attr [String] id Smartcar vehicle ID
|
4
|
+
#@attr [String] make Manufacturer of the vehicle.
|
5
|
+
#@attr [String] model Model of the vehicle.
|
6
|
+
#@attr [Number] year Model year of the vehicle.
|
7
|
+
class VehicleAttributes < Base
|
8
|
+
# Path Proc for hitting vehicle attributes end point
|
9
|
+
PATH = Proc.new{|id| "/vehicles/#{id}"}
|
10
|
+
attr_accessor :id, :make, :model, :year
|
11
|
+
end
|
12
|
+
end
|
data/lib/smartcar/vin.rb
ADDED
data/ruby-sdk.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "smartcar/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "smartcar"
|
7
|
+
spec.version = Smartcar::VERSION
|
8
|
+
spec.required_ruby_version = ">= 2.5.0"
|
9
|
+
spec.authors = ["Ashwin Subramanian"]
|
10
|
+
spec.email = ["ashwin.subramanian@smartcar.com"]
|
11
|
+
spec.homepage = 'https://rubygems.org/gems/smartcar'
|
12
|
+
spec.summary = %q{Ruby Gem to access smartcar APIs (https://smartcar.com/docs/)}
|
13
|
+
spec.description = %q{This is a ruby gem to access the smartcar APIs. It includes the API classes and the OAuth system.}
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.metadata = {
|
16
|
+
"source_code_uri" => "https://github.com/smartcar/ruby-sdk",
|
17
|
+
"documentation_uri" => "https://www.rubydoc.info/gems/smartcar",
|
18
|
+
}
|
19
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
spec.bindir = "exe"
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ["lib"]
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
27
|
+
spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
|
28
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
29
|
+
spec.add_development_dependency "byebug", "~> 11.0"
|
30
|
+
spec.add_development_dependency "redcarpet", "~> 3.5.0"
|
31
|
+
spec.add_development_dependency "selenium-webdriver", "~> 3.142"
|
32
|
+
spec.add_dependency "oauth2", "~> 1.4"
|
33
|
+
end
|
metadata
CHANGED
@@ -1,25 +1,163 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartcar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Ashwin Subramanian
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
|
14
|
-
|
11
|
+
date: 2020-06-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '12.3'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 12.3.3
|
37
|
+
type: :development
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '12.3'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 12.3.3
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '3.0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '3.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: byebug
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '11.0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '11.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: redcarpet
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 3.5.0
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 3.5.0
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: selenium-webdriver
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '3.142'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '3.142'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: oauth2
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '1.4'
|
110
|
+
type: :runtime
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '1.4'
|
117
|
+
description: This is a ruby gem to access the smartcar APIs. It includes the API classes
|
118
|
+
and the OAuth system.
|
119
|
+
email:
|
120
|
+
- ashwin.subramanian@smartcar.com
|
15
121
|
executables: []
|
16
122
|
extensions: []
|
17
123
|
extra_rdoc_files: []
|
18
|
-
files:
|
19
|
-
|
124
|
+
files:
|
125
|
+
- ".gitignore"
|
126
|
+
- ".rspec"
|
127
|
+
- ".travis.yml"
|
128
|
+
- ".yardopts"
|
129
|
+
- CODE_OF_CONDUCT.md
|
130
|
+
- Gemfile
|
131
|
+
- Gemfile.lock
|
132
|
+
- LICENSE.txt
|
133
|
+
- README.md
|
134
|
+
- Rakefile
|
135
|
+
- bin/console
|
136
|
+
- bin/setup
|
137
|
+
- lib/smartcar.rb
|
138
|
+
- lib/smartcar/base.rb
|
139
|
+
- lib/smartcar/battery.rb
|
140
|
+
- lib/smartcar/charge.rb
|
141
|
+
- lib/smartcar/engine_oil.rb
|
142
|
+
- lib/smartcar/fuel.rb
|
143
|
+
- lib/smartcar/location.rb
|
144
|
+
- lib/smartcar/oauth.rb
|
145
|
+
- lib/smartcar/odometer.rb
|
146
|
+
- lib/smartcar/permissions.rb
|
147
|
+
- lib/smartcar/tire_pressure.rb
|
148
|
+
- lib/smartcar/user.rb
|
149
|
+
- lib/smartcar/utils.rb
|
150
|
+
- lib/smartcar/vehicle.rb
|
151
|
+
- lib/smartcar/vehicle_attributes.rb
|
152
|
+
- lib/smartcar/version.rb
|
153
|
+
- lib/smartcar/vin.rb
|
154
|
+
- ruby-sdk.gemspec
|
155
|
+
homepage: https://rubygems.org/gems/smartcar
|
20
156
|
licenses:
|
21
157
|
- MIT
|
22
|
-
metadata:
|
158
|
+
metadata:
|
159
|
+
source_code_uri: https://github.com/smartcar/ruby-sdk
|
160
|
+
documentation_uri: https://www.rubydoc.info/gems/smartcar
|
23
161
|
post_install_message:
|
24
162
|
rdoc_options: []
|
25
163
|
require_paths:
|
@@ -28,16 +166,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
28
166
|
requirements:
|
29
167
|
- - ">="
|
30
168
|
- !ruby/object:Gem::Version
|
31
|
-
version:
|
169
|
+
version: 2.5.0
|
32
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
33
171
|
requirements:
|
34
172
|
- - ">="
|
35
173
|
- !ruby/object:Gem::Version
|
36
174
|
version: '0'
|
37
175
|
requirements: []
|
38
|
-
|
39
|
-
rubygems_version: 2.4.8
|
176
|
+
rubygems_version: 3.1.2
|
40
177
|
signing_key:
|
41
178
|
specification_version: 4
|
42
|
-
summary:
|
179
|
+
summary: Ruby Gem to access smartcar APIs (https://smartcar.com/docs/)
|
43
180
|
test_files: []
|