acumatica 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.rspec +1 -0
- data/.travis.yml +12 -0
- data/Gemfile.lock +55 -3
- data/Guardfile +14 -0
- data/Rakefile +8 -7
- data/acumatica.gemspec +3 -1
- data/bin/console +1 -0
- data/bin/guard +29 -0
- data/bin/rspec +29 -0
- data/lib/acumatica/stock_item.rb +5 -3
- data/lib/acumatica/version.rb +1 -1
- metadata +39 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b5390548880ffb766eca49f23356b9c5cda909a2
|
|
4
|
+
data.tar.gz: 41bf04cd0c3d17bc7a6b5e3ae683aba296dfc324
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f1ce0f9c84c1af44e93d8c554a3626af9ce4e3fe5f7ed36285a485ff23f3ed0208d53fca709d9ca92f0010eee449b559f9d87cd8d9f39fe4e387884f9f31f51b
|
|
7
|
+
data.tar.gz: a4f982f50116b8d3ecc8e12a3dfb67df6da10ebbe12f028298d94faea5271e3af8f0e3bda0d124b7a2785b7f8431778866676e84ef1bf248d1d2335ea8178a84
|
data/.gitignore
CHANGED
data/.rspec
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
--require spec_helper
|
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
acumatica (0.2.
|
|
4
|
+
acumatica (0.2.1)
|
|
5
5
|
faraday
|
|
6
6
|
faraday-cookie_jar
|
|
7
7
|
faraday_middleware
|
|
@@ -13,10 +13,13 @@ GEM
|
|
|
13
13
|
addressable (2.5.2)
|
|
14
14
|
public_suffix (>= 2.0.2, < 4.0)
|
|
15
15
|
byebug (10.0.0)
|
|
16
|
+
coderay (1.1.2)
|
|
16
17
|
crack (0.4.3)
|
|
17
18
|
safe_yaml (~> 1.0.0)
|
|
19
|
+
diff-lcs (1.3)
|
|
18
20
|
domain_name (0.5.20170404)
|
|
19
21
|
unf (>= 0.0.5, < 1.0.0)
|
|
22
|
+
dotenv (2.2.2)
|
|
20
23
|
faraday (0.14.0)
|
|
21
24
|
multipart-post (>= 1.2, < 3)
|
|
22
25
|
faraday-cookie_jar (0.0.6)
|
|
@@ -24,15 +27,62 @@ GEM
|
|
|
24
27
|
http-cookie (~> 1.0.0)
|
|
25
28
|
faraday_middleware (0.12.2)
|
|
26
29
|
faraday (>= 0.7.4, < 1.0)
|
|
30
|
+
ffi (1.9.23)
|
|
31
|
+
formatador (0.2.5)
|
|
32
|
+
guard (2.14.2)
|
|
33
|
+
formatador (>= 0.2.4)
|
|
34
|
+
listen (>= 2.7, < 4.0)
|
|
35
|
+
lumberjack (>= 1.0.12, < 2.0)
|
|
36
|
+
nenv (~> 0.1)
|
|
37
|
+
notiffany (~> 0.0)
|
|
38
|
+
pry (>= 0.9.12)
|
|
39
|
+
shellany (~> 0.0)
|
|
40
|
+
thor (>= 0.18.1)
|
|
41
|
+
guard-compat (1.2.1)
|
|
42
|
+
guard-rspec (4.7.3)
|
|
43
|
+
guard (~> 2.1)
|
|
44
|
+
guard-compat (~> 1.1)
|
|
45
|
+
rspec (>= 2.99.0, < 4.0)
|
|
27
46
|
hashdiff (0.3.7)
|
|
28
47
|
http-cookie (1.0.3)
|
|
29
48
|
domain_name (~> 0.5)
|
|
30
49
|
json (2.1.0)
|
|
31
|
-
|
|
50
|
+
listen (3.1.5)
|
|
51
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
|
52
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
|
53
|
+
ruby_dep (~> 1.2)
|
|
54
|
+
lumberjack (1.0.13)
|
|
55
|
+
method_source (0.9.0)
|
|
32
56
|
multipart-post (2.0.0)
|
|
57
|
+
nenv (0.3.0)
|
|
58
|
+
notiffany (0.1.1)
|
|
59
|
+
nenv (~> 0.1)
|
|
60
|
+
shellany (~> 0.0)
|
|
61
|
+
pry (0.11.3)
|
|
62
|
+
coderay (~> 1.1.0)
|
|
63
|
+
method_source (~> 0.9.0)
|
|
33
64
|
public_suffix (3.0.2)
|
|
34
65
|
rake (10.5.0)
|
|
66
|
+
rb-fsevent (0.10.3)
|
|
67
|
+
rb-inotify (0.9.10)
|
|
68
|
+
ffi (>= 0.5.0, < 2)
|
|
69
|
+
rspec (3.7.0)
|
|
70
|
+
rspec-core (~> 3.7.0)
|
|
71
|
+
rspec-expectations (~> 3.7.0)
|
|
72
|
+
rspec-mocks (~> 3.7.0)
|
|
73
|
+
rspec-core (3.7.1)
|
|
74
|
+
rspec-support (~> 3.7.0)
|
|
75
|
+
rspec-expectations (3.7.0)
|
|
76
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
77
|
+
rspec-support (~> 3.7.0)
|
|
78
|
+
rspec-mocks (3.7.0)
|
|
79
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
80
|
+
rspec-support (~> 3.7.0)
|
|
81
|
+
rspec-support (3.7.1)
|
|
82
|
+
ruby_dep (1.5.0)
|
|
35
83
|
safe_yaml (1.0.4)
|
|
84
|
+
shellany (0.0.1)
|
|
85
|
+
thor (0.20.0)
|
|
36
86
|
unf (0.1.4)
|
|
37
87
|
unf_ext
|
|
38
88
|
unf_ext (0.0.7.5)
|
|
@@ -49,8 +99,10 @@ DEPENDENCIES
|
|
|
49
99
|
acumatica!
|
|
50
100
|
bundler (~> 1.16)
|
|
51
101
|
byebug
|
|
52
|
-
|
|
102
|
+
dotenv
|
|
103
|
+
guard-rspec
|
|
53
104
|
rake (~> 10.0)
|
|
105
|
+
rspec (~> 3.7.0)
|
|
54
106
|
vcr
|
|
55
107
|
webmock
|
|
56
108
|
|
data/Guardfile
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
guard :rspec, cmd: "bin/rspec" do
|
|
2
|
+
require "guard/rspec/dsl"
|
|
3
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
|
4
|
+
|
|
5
|
+
# RSpec files
|
|
6
|
+
rspec = dsl.rspec
|
|
7
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
|
8
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
|
9
|
+
watch(rspec.spec_files)
|
|
10
|
+
|
|
11
|
+
# Ruby files
|
|
12
|
+
ruby = dsl.ruby
|
|
13
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
|
14
|
+
end
|
data/Rakefile
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
require "bundler/gem_tasks"
|
|
2
|
-
require "rake/testtask"
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
end
|
|
3
|
+
begin
|
|
4
|
+
require 'rspec/core/rake_task'
|
|
5
|
+
|
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
9
7
|
|
|
10
|
-
task :default => :
|
|
8
|
+
task :default => :spec
|
|
9
|
+
rescue LoadError
|
|
10
|
+
# no rspec available
|
|
11
|
+
end
|
data/acumatica.gemspec
CHANGED
|
@@ -23,8 +23,10 @@ Gem::Specification.new do |spec|
|
|
|
23
23
|
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.16"
|
|
25
25
|
spec.add_development_dependency "byebug"
|
|
26
|
+
spec.add_development_dependency "dotenv"
|
|
27
|
+
spec.add_development_dependency "guard-rspec"
|
|
26
28
|
spec.add_development_dependency "rake", "~> 10.0"
|
|
27
|
-
spec.add_development_dependency "
|
|
29
|
+
spec.add_development_dependency "rspec", "~> 3.7.0"
|
|
28
30
|
spec.add_development_dependency "vcr"
|
|
29
31
|
spec.add_development_dependency "webmock"
|
|
30
32
|
|
data/bin/console
CHANGED
data/bin/guard
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'guard' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
require "pathname"
|
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
13
|
+
Pathname.new(__FILE__).realpath)
|
|
14
|
+
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
require "rubygems"
|
|
27
|
+
require "bundler/setup"
|
|
28
|
+
|
|
29
|
+
load Gem.bin_path("guard", "guard")
|
data/bin/rspec
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'rspec' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
require "pathname"
|
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
13
|
+
Pathname.new(__FILE__).realpath)
|
|
14
|
+
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
require "rubygems"
|
|
27
|
+
require "bundler/setup"
|
|
28
|
+
|
|
29
|
+
load Gem.bin_path("rspec-core", "rspec")
|
data/lib/acumatica/stock_item.rb
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
module Acumatica
|
|
2
2
|
class StockItem < OpenStruct
|
|
3
|
-
def self.create(params)
|
|
4
|
-
Acumatica::Client.instance.connection.put do |req|
|
|
3
|
+
def self.create(params = {})
|
|
4
|
+
response = Acumatica::Client.instance.connection.put do |req|
|
|
5
5
|
req.url url
|
|
6
6
|
req.body = params
|
|
7
7
|
end
|
|
8
|
+
|
|
9
|
+
self.new(response.body)
|
|
8
10
|
end
|
|
9
11
|
|
|
10
12
|
def self.find_all(select: nil, filter: nil, expand: nil, offset: nil, limit: nil)
|
|
@@ -47,7 +49,7 @@ module Acumatica
|
|
|
47
49
|
private
|
|
48
50
|
|
|
49
51
|
def methodify(word)
|
|
50
|
-
word.gsub(/(
|
|
52
|
+
word.gsub(/([a-z])([A-Z])|\s/,'\1_\2').downcase
|
|
51
53
|
end
|
|
52
54
|
end
|
|
53
55
|
end
|
data/lib/acumatica/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: acumatica
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jared Moody
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-04-
|
|
11
|
+
date: 2018-04-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -38,6 +38,34 @@ dependencies:
|
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: dotenv
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: guard-rspec
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
41
69
|
- !ruby/object:Gem::Dependency
|
|
42
70
|
name: rake
|
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -53,19 +81,19 @@ dependencies:
|
|
|
53
81
|
- !ruby/object:Gem::Version
|
|
54
82
|
version: '10.0'
|
|
55
83
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
84
|
+
name: rspec
|
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
|
58
86
|
requirements:
|
|
59
87
|
- - "~>"
|
|
60
88
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
89
|
+
version: 3.7.0
|
|
62
90
|
type: :development
|
|
63
91
|
prerelease: false
|
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
93
|
requirements:
|
|
66
94
|
- - "~>"
|
|
67
95
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
96
|
+
version: 3.7.0
|
|
69
97
|
- !ruby/object:Gem::Dependency
|
|
70
98
|
name: vcr
|
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -158,14 +186,19 @@ extensions: []
|
|
|
158
186
|
extra_rdoc_files: []
|
|
159
187
|
files:
|
|
160
188
|
- ".gitignore"
|
|
189
|
+
- ".rspec"
|
|
190
|
+
- ".travis.yml"
|
|
161
191
|
- CODE_OF_CONDUCT.md
|
|
162
192
|
- Gemfile
|
|
163
193
|
- Gemfile.lock
|
|
194
|
+
- Guardfile
|
|
164
195
|
- LICENSE.txt
|
|
165
196
|
- README.md
|
|
166
197
|
- Rakefile
|
|
167
198
|
- acumatica.gemspec
|
|
168
199
|
- bin/console
|
|
200
|
+
- bin/guard
|
|
201
|
+
- bin/rspec
|
|
169
202
|
- bin/setup
|
|
170
203
|
- lib/acumatica.rb
|
|
171
204
|
- lib/acumatica/client.rb
|
|
@@ -191,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
191
224
|
version: '0'
|
|
192
225
|
requirements: []
|
|
193
226
|
rubyforge_project:
|
|
194
|
-
rubygems_version: 2.
|
|
227
|
+
rubygems_version: 2.5.2.2
|
|
195
228
|
signing_key:
|
|
196
229
|
specification_version: 4
|
|
197
230
|
summary: A wrapper for the acumatica API
|