smartcar 0.1.1 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +24 -3
- data/.yardopts +2 -0
- data/CODE_OF_CONDUCT.md +1 -1
- data/Gemfile.lock +28 -20
- data/README.md +88 -16
- data/lib/smartcar.rb +19 -2
- data/lib/smartcar/base.rb +24 -22
- data/lib/smartcar/battery.rb +5 -6
- data/lib/smartcar/charge.rb +4 -5
- data/lib/smartcar/engine_oil.rb +4 -6
- data/lib/smartcar/fuel.rb +5 -5
- data/lib/smartcar/location.rb +4 -5
- data/lib/smartcar/oauth.rb +80 -82
- data/lib/smartcar/odometer.rb +4 -6
- data/lib/smartcar/permissions.rb +5 -7
- data/lib/smartcar/tire_pressure.rb +8 -6
- data/lib/smartcar/user.rb +5 -5
- data/lib/smartcar/utils.rb +34 -10
- data/lib/smartcar/vehicle.rb +202 -94
- data/lib/smartcar/vehicle_attributes.rb +12 -0
- data/lib/smartcar/version.rb +2 -1
- data/lib/smartcar/vin.rb +4 -5
- data/ruby-sdk.gemspec +18 -11
- metadata +37 -5
@@ -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/version.rb
CHANGED
data/lib/smartcar/vin.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
module Smartcar
|
2
|
-
# class to represent
|
3
|
-
#
|
4
|
-
# @author [ashwin]
|
2
|
+
# Hidden class to represent vin
|
5
3
|
#
|
4
|
+
#@attr [String] vin Vin of the vehicle
|
6
5
|
class Vin < Base
|
7
|
-
|
6
|
+
# Path Proc for hitting vin end point
|
8
7
|
PATH = Proc.new{|id| "/vehicles/#{id}/vin"}
|
9
|
-
|
8
|
+
attr_reader :vin
|
10
9
|
end
|
11
10
|
end
|
data/ruby-sdk.gemspec
CHANGED
@@ -3,24 +3,31 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
require "smartcar/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name
|
7
|
-
spec.version
|
8
|
-
spec.
|
9
|
-
spec.
|
10
|
-
spec.
|
11
|
-
spec.
|
12
|
-
spec.
|
13
|
-
spec.
|
14
|
-
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
|
15
20
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
16
21
|
end
|
17
|
-
spec.bindir
|
18
|
-
spec.executables
|
22
|
+
spec.bindir = "exe"
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
24
|
spec.require_paths = ["lib"]
|
20
25
|
|
21
26
|
spec.add_development_dependency "bundler", "~> 2.0"
|
22
27
|
spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
|
23
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
24
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"
|
25
32
|
spec.add_dependency "oauth2", "~> 1.4"
|
26
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartcar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ashwin Subramanian
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,6 +72,34 @@ dependencies:
|
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
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'
|
75
103
|
- !ruby/object:Gem::Dependency
|
76
104
|
name: oauth2
|
77
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,7 +117,7 @@ dependencies:
|
|
89
117
|
description: This is a ruby gem to access the smartcar APIs. It includes the API classes
|
90
118
|
and the OAuth system.
|
91
119
|
email:
|
92
|
-
-
|
120
|
+
- ashwin.subramanian@smartcar.com
|
93
121
|
executables: []
|
94
122
|
extensions: []
|
95
123
|
extra_rdoc_files: []
|
@@ -97,6 +125,7 @@ files:
|
|
97
125
|
- ".gitignore"
|
98
126
|
- ".rspec"
|
99
127
|
- ".travis.yml"
|
128
|
+
- ".yardopts"
|
100
129
|
- CODE_OF_CONDUCT.md
|
101
130
|
- Gemfile
|
102
131
|
- Gemfile.lock
|
@@ -119,13 +148,16 @@ files:
|
|
119
148
|
- lib/smartcar/user.rb
|
120
149
|
- lib/smartcar/utils.rb
|
121
150
|
- lib/smartcar/vehicle.rb
|
151
|
+
- lib/smartcar/vehicle_attributes.rb
|
122
152
|
- lib/smartcar/version.rb
|
123
153
|
- lib/smartcar/vin.rb
|
124
154
|
- ruby-sdk.gemspec
|
125
155
|
homepage: https://rubygems.org/gems/smartcar
|
126
156
|
licenses:
|
127
157
|
- MIT
|
128
|
-
metadata:
|
158
|
+
metadata:
|
159
|
+
source_code_uri: https://github.com/smartcar/ruby-sdk
|
160
|
+
documentation_uri: https://www.rubydoc.info/gems/smartcar
|
129
161
|
post_install_message:
|
130
162
|
rdoc_options: []
|
131
163
|
require_paths:
|
@@ -134,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
134
166
|
requirements:
|
135
167
|
- - ">="
|
136
168
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
169
|
+
version: 2.5.0
|
138
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
171
|
requirements:
|
140
172
|
- - ">="
|