futureshop 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de1dda6ccfb095050e2c4555103dcf79fbc9bb816230671a43d03ebd2ab8ce7b
4
- data.tar.gz: 8f9c5ce46b616c378f131a769709256d3e02753179966495f1b6da797da7cdf8
3
+ metadata.gz: 9c7319b9455fdd1e3d74f600e88bb4412ae18cb9bc44dd21ae9f0b3cf973abf2
4
+ data.tar.gz: 442ee86969ef328888583a4161342d872a17414581a0e7ce2e160c7aa8437f6e
5
5
  SHA512:
6
- metadata.gz: c16675ddac87f365e25bd71661900a81731b1b390112e58c98e0d31cb7a0afcd7f824bb98b5cc92bed40c109a36a735d464f5c2acc6ddd78e378ed09afd2e692
7
- data.tar.gz: 93b8ae4040cfa6f496871a4aa84c815a94da50f24a99a4b44f974efa06bcf1b7f0289256ac7b282841e23e380ec5732c174b49a2c99ed778f6535b43d81ecac9
6
+ metadata.gz: 4255adf63d28af1d55988b826d8be1c0f791ef805163fa193a869a3e41d902c4534a94fbcb73f4572e92d2d897f211208c32973ccae2ab4ef159c19850d8e70b
7
+ data.tar.gz: fac3eaece886d91a44021dc688c3e6cd196334fba574f4956dc6403bf53c04677041f96cd71f27abe2de7d39a1f79f31f361422bf59e841562168dd868ad039b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.6] - 2021-11-04
4
+
5
+ - Change required Ruby version from 3.0.0 to 2.7.0
6
+ - Complete command options
7
+
3
8
  ## [0.1.5] - 2021-10-21
4
9
 
5
10
  - Add `Futureshop::Inventory` class
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/futuresohp
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
- opt.on "-f", "--format=FORMAT", ["json", "csv"]
42
- opt.on "--order-date-start=DATE", Time
43
- opt.on "--order-date-end=DATE", Time
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/futuresohp"
12
- spec.required_ruby_version = ">= 3.0.0"
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/futuresohp/-/blob/main/CHANGELOG.md"
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.
@@ -1,3 +1,3 @@
1
1
  module Futureshop
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
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.5
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-10-21 00:00:00.000000000 Z
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/futuresohp
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/futuresohp
83
- source_code_uri: https://gitlab.com/KitaitiMakoto/futuresohp
84
- changelog_uri: https://gitlab.com/KitaitiMakoto/futuresohp/-/blob/main/CHANGELOG.md
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: 3.0.0
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.2.22
100
+ rubygems_version: 3.1.6
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: futureshop APIv2 client and tools