futureshop 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/exe/futureshop +14 -8
- data/futureshop.gemspec +3 -3
- data/lib/futureshop/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c7319b9455fdd1e3d74f600e88bb4412ae18cb9bc44dd21ae9f0b3cf973abf2
|
4
|
+
data.tar.gz: 442ee86969ef328888583a4161342d872a17414581a0e7ce2e160c7aa8437f6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4255adf63d28af1d55988b826d8be1c0f791ef805163fa193a869a3e41d902c4534a94fbcb73f4572e92d2d897f211208c32973ccae2ab4ef159c19850d8e70b
|
7
|
+
data.tar.gz: fac3eaece886d91a44021dc688c3e6cd196334fba574f4956dc6403bf53c04677041f96cd71f27abe2de7d39a1f79f31f361422bf59e841562168dd868ad039b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -31,4 +31,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
31
31
|
|
32
32
|
## Contributing
|
33
33
|
|
34
|
-
Bug reports and merge requests are welcome on GitHub at https://gitlab.com/KitaitiMakoto/
|
34
|
+
Bug reports and merge requests are welcome on GitHub at https://gitlab.com/KitaitiMakoto/futureshop
|
data/exe/futureshop
CHANGED
@@ -29,6 +29,11 @@ end
|
|
29
29
|
|
30
30
|
def parse_global_options(argv)
|
31
31
|
parse_options(argv) {|opt|
|
32
|
+
opt.banner = "Usage:\n" + SUPPORTED_COMMANDS.collect {|command|
|
33
|
+
" #{opt.program_name} [global options] #{command} [options]"
|
34
|
+
}.join("\n")
|
35
|
+
opt.version = Futureshop::VERSION
|
36
|
+
opt.separator "Global options:"
|
32
37
|
opt.on "--verbose" do
|
33
38
|
$VERBOSE = true
|
34
39
|
end
|
@@ -38,9 +43,10 @@ end
|
|
38
43
|
def orders(global_options, argv)
|
39
44
|
options = {format: "json"}
|
40
45
|
options.update(parse_options(argv) {|opt|
|
41
|
-
|
42
|
-
opt.on "--
|
43
|
-
opt.on "--order-date-
|
46
|
+
formats = %w[json csv]
|
47
|
+
opt.on "-f", "--format=FORMAT", ["json", "csv"], "Output format. Available: #{formats.join(', ')}"
|
48
|
+
opt.on "--order-date-start=YYYY-MM-DD", Time, "Retrieve orders whose date is newer than or equal to argument."
|
49
|
+
opt.on "--order-date-end=YYYY-MM-DD", Time, "Retrieve orders whose date is older than or equal to argument."
|
44
50
|
})
|
45
51
|
Futureshop.orders(order_date_start: options[:"order-date-start"], order_date_end: options[:"order-date-end"], format: options[:format])
|
46
52
|
end
|
@@ -54,11 +60,11 @@ def inventories(global_options, argv)
|
|
54
60
|
jan_code: []
|
55
61
|
}
|
56
62
|
options = options.update(parse_options(argv) {|opt|
|
57
|
-
opt.on "--type=TYPE", Array
|
58
|
-
opt.on "--create-date-start=DATE", Time
|
59
|
-
opt.on "--create-date-end=DATE", Time
|
60
|
-
opt.on "--product-no=NUMBER", Array
|
61
|
-
opt.on "--jan-code=CODE", Array
|
63
|
+
opt.on "--type=TYPE", Array, "Type. Available: regular, preorder, planned, realstore"
|
64
|
+
opt.on "--create-date-start=DATE", Time, "Retrieve products whose registration date is newer than or equal to argument."
|
65
|
+
opt.on "--create-date-end=DATE", Time, "Retrieve products whose registration date is older than or equal to argument."
|
66
|
+
opt.on "--product-no=NUMBER", Array, "Product number."
|
67
|
+
opt.on "--jan-code=CODE", Array, "JAN code."
|
62
68
|
})
|
63
69
|
if options[:type]
|
64
70
|
unknown_types = options[:type].select {|type| ! %w[regular preorder planned realstore].include?(type)}
|
data/futureshop.gemspec
CHANGED
@@ -8,13 +8,13 @@ Gem::Specification.new do |spec|
|
|
8
8
|
|
9
9
|
spec.summary = "futureshop APIv2 client and tools"
|
10
10
|
spec.description = "futureshop APIv2 client and tools"
|
11
|
-
spec.homepage = "https://gitlab.com/KitaitiMakoto/
|
12
|
-
spec.required_ruby_version = ">=
|
11
|
+
spec.homepage = "https://gitlab.com/KitaitiMakoto/futureshop"
|
12
|
+
spec.required_ruby_version = ">= 2.7.0"
|
13
13
|
spec.license = "AGPL-3.0-or-later"
|
14
14
|
|
15
15
|
spec.metadata["homepage_uri"] = spec.homepage
|
16
16
|
spec.metadata["source_code_uri"] = spec.homepage
|
17
|
-
spec.metadata["changelog_uri"] = "https://gitlab.com/KitaitiMakoto/
|
17
|
+
spec.metadata["changelog_uri"] = "https://gitlab.com/KitaitiMakoto/futureshop/-/blob/main/CHANGELOG.md"
|
18
18
|
|
19
19
|
# Specify which files should be added to the gem when it is released.
|
20
20
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
data/lib/futureshop/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: futureshop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kitaiti Makoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -75,13 +75,13 @@ files:
|
|
75
75
|
- lib/futureshop/client.rb
|
76
76
|
- lib/futureshop/inventory.rb
|
77
77
|
- lib/futureshop/version.rb
|
78
|
-
homepage: https://gitlab.com/KitaitiMakoto/
|
78
|
+
homepage: https://gitlab.com/KitaitiMakoto/futureshop
|
79
79
|
licenses:
|
80
80
|
- AGPL-3.0-or-later
|
81
81
|
metadata:
|
82
|
-
homepage_uri: https://gitlab.com/KitaitiMakoto/
|
83
|
-
source_code_uri: https://gitlab.com/KitaitiMakoto/
|
84
|
-
changelog_uri: https://gitlab.com/KitaitiMakoto/
|
82
|
+
homepage_uri: https://gitlab.com/KitaitiMakoto/futureshop
|
83
|
+
source_code_uri: https://gitlab.com/KitaitiMakoto/futureshop
|
84
|
+
changelog_uri: https://gitlab.com/KitaitiMakoto/futureshop/-/blob/main/CHANGELOG.md
|
85
85
|
post_install_message:
|
86
86
|
rdoc_options: []
|
87
87
|
require_paths:
|
@@ -90,14 +90,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
90
90
|
requirements:
|
91
91
|
- - ">="
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
93
|
+
version: 2.7.0
|
94
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - ">="
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
99
|
requirements: []
|
100
|
-
rubygems_version: 3.
|
100
|
+
rubygems_version: 3.1.6
|
101
101
|
signing_key:
|
102
102
|
specification_version: 4
|
103
103
|
summary: futureshop APIv2 client and tools
|