cardmarket_cli 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4d5f72fb224481a3dcb9b1adaddb059d1442f7bfa0c2cb98e654eba29fe8904c
4
+ data.tar.gz: 2389e4398eb9c4a8ac2b6f55b41dfd831e47333d75fdaa245da13f2c1d664b64
5
+ SHA512:
6
+ metadata.gz: 18dad3b706d80d0c4954bd97b10eccc69ca99fbc38d97293190182518980b481c750ec6b1bc80a9966143e40c5fc5e61e664c1ea3369742155ddd9ae48e58234
7
+ data.tar.gz: 3ffc04164745c7f1432f5b78c45672d1bb14a9f3e31fafa4c878d80d41cc94f2adccb1096aea640caf3c26344c67360abb6adc60a8f33fd52b0a8658dfd19d1e
data/.gitignore ADDED
@@ -0,0 +1,15 @@
1
+ .idea/
2
+ config.json
3
+ *.yaml
4
+ *.log
5
+ *.json
6
+ *.gem
7
+ /.vendor/
8
+ /.bundle/
9
+ /.yardoc
10
+ /_yardoc/
11
+ /coverage/
12
+ /doc/
13
+ /pkg/
14
+ /spec/reports/
15
+ /tmp/
data/.rubocop.yml ADDED
@@ -0,0 +1,14 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.7.1
3
+ NewCops: enable
4
+
5
+ Style/StringLiterals:
6
+ Enabled: true
7
+ EnforcedStyle: single_quotes
8
+
9
+ Style/StringLiteralsInInterpolation:
10
+ Enabled: true
11
+ EnforcedStyle: single_quotes
12
+
13
+ Layout/LineLength:
14
+ Max: 120
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at kontakt@knuddelkrabbe.de. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,100 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cardmarket_cli (0.0.0)
5
+ oauth (~> 0.5.5)
6
+ typhoeus (~> 1.4)
7
+ xml-simple (~> 1.1)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ ansi (1.5.0)
13
+ ast (2.4.2)
14
+ builder (3.2.4)
15
+ coderay (1.1.3)
16
+ ethon (0.12.0)
17
+ ffi (>= 1.3.0)
18
+ ffi (1.14.2)
19
+ formatador (0.2.5)
20
+ guard (2.16.2)
21
+ formatador (>= 0.2.4)
22
+ listen (>= 2.7, < 4.0)
23
+ lumberjack (>= 1.0.12, < 2.0)
24
+ nenv (~> 0.1)
25
+ notiffany (~> 0.0)
26
+ pry (>= 0.9.12)
27
+ shellany (~> 0.0)
28
+ thor (>= 0.18.1)
29
+ guard-compat (1.2.1)
30
+ guard-minitest (2.4.6)
31
+ guard-compat (~> 1.2)
32
+ minitest (>= 3.0)
33
+ listen (3.4.1)
34
+ rb-fsevent (~> 0.10, >= 0.10.3)
35
+ rb-inotify (~> 0.9, >= 0.9.10)
36
+ lumberjack (1.2.8)
37
+ method_source (1.0.0)
38
+ minitest (5.13.0)
39
+ minitest-reporters (1.4.3)
40
+ ansi
41
+ builder
42
+ minitest (>= 5.0)
43
+ ruby-progressbar
44
+ nenv (0.3.0)
45
+ notiffany (0.1.3)
46
+ nenv (~> 0.1)
47
+ shellany (~> 0.0)
48
+ oauth (0.5.5)
49
+ parallel (1.20.1)
50
+ parser (3.0.0.0)
51
+ ast (~> 2.4.1)
52
+ pry (0.14.0)
53
+ coderay (~> 1.1)
54
+ method_source (~> 1.0)
55
+ rainbow (3.0.0)
56
+ rake (13.0.3)
57
+ rb-fsevent (0.10.4)
58
+ rb-inotify (0.10.1)
59
+ ffi (~> 1.0)
60
+ regexp_parser (2.1.1)
61
+ rexml (3.2.4)
62
+ rubocop (1.11.0)
63
+ parallel (~> 1.10)
64
+ parser (>= 3.0.0.0)
65
+ rainbow (>= 2.2.2, < 4.0)
66
+ regexp_parser (>= 1.8, < 3.0)
67
+ rexml
68
+ rubocop-ast (>= 1.2.0, < 2.0)
69
+ ruby-progressbar (~> 1.7)
70
+ unicode-display_width (>= 1.4.0, < 3.0)
71
+ rubocop-ast (1.4.1)
72
+ parser (>= 2.7.1.5)
73
+ rubocop-minitest (0.10.3)
74
+ rubocop (>= 0.87, < 2.0)
75
+ rubocop-rake (0.5.1)
76
+ rubocop
77
+ ruby-progressbar (1.11.0)
78
+ shellany (0.0.1)
79
+ thor (1.1.0)
80
+ typhoeus (1.4.0)
81
+ ethon (>= 0.9.0)
82
+ unicode-display_width (2.0.0)
83
+ xml-simple (1.1.8)
84
+
85
+ PLATFORMS
86
+ ruby
87
+
88
+ DEPENDENCIES
89
+ cardmarket_cli!
90
+ guard (~> 2.16.2)
91
+ guard-minitest (~> 2.4.6)
92
+ minitest (~> 5.13.0)
93
+ minitest-reporters (~> 1.4.3)
94
+ rake (~> 13.0)
95
+ rubocop (~> 1.7)
96
+ rubocop-minitest (~> 0.10.3)
97
+ rubocop-rake (~> 0.5.1)
98
+
99
+ BUNDLED WITH
100
+ 2.1.4
data/Guardfile ADDED
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ # A sample Guardfile
4
+ # More info at https://github.com/guard/guard#readme
5
+
6
+ ## Uncomment and set this to only include directories you want to watch
7
+ # directories %w(app lib config test spec features) \
8
+ # .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
9
+
10
+ ## Note: if you are using the `directories` clause above and you are not
11
+ ## watching the project directory ('.'), then you will want to move
12
+ ## the Guardfile to a watched dir and symlink it back, e.g.
13
+ #
14
+ # $ mkdir config
15
+ # $ mv Guardfile config/
16
+ # $ ln -s config/Guardfile .
17
+ #
18
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
19
+ API_TESTS = %w[meta_product product wantslist wantslist_item].freeze
20
+
21
+ guard :minitest do
22
+ # with Minitest::Unit
23
+ watch(%r{^test/(.*)/?(.*)_test\.rb$})
24
+ watch(%r{^lib/cardmarket_cli/(.*/)?([^/]+)\.rb$}) { |m| "test/unit/#{m[1]}#{m[2]}_test.rb" }
25
+ watch(%r{^test/test_helper\.rb$}) { 'test' }
26
+ watch(%r{^test/cardmarket_test.rb$}) { 'test' }
27
+ watch(%r{^test/api_test.rb$}) do
28
+ API_TESTS.map { |m| "test/unit/entities/#{m}_test.rb" } << 'test/account_test.rb'
29
+ end
30
+
31
+ # with Minitest::Spec
32
+ # watch(%r{^spec/(.*)_spec\.rb$})
33
+ # watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
34
+ # watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
35
+ end
data/LICENSE.md ADDED
@@ -0,0 +1,55 @@
1
+ # Blue Oak Model License
2
+
3
+ Version 1.0.0
4
+
5
+ ## Purpose
6
+
7
+ This license gives everyone as much permission to work with
8
+ this software as possible, while protecting contributors
9
+ from liability.
10
+
11
+ ## Acceptance
12
+
13
+ In order to receive this license, you must agree to its
14
+ rules. The rules of this license are both obligations
15
+ under that agreement and conditions to your license.
16
+ You must not do anything with this software that triggers
17
+ a rule that you cannot or will not follow.
18
+
19
+ ## Copyright
20
+
21
+ Each contributor licenses you to do everything with this
22
+ software that would otherwise infringe that contributor's
23
+ copyright in it.
24
+
25
+ ## Notices
26
+
27
+ You must ensure that everyone who gets a copy of
28
+ any part of this software from you, with or without
29
+ changes, also gets the text of this license or a link to
30
+ <https://blueoakcouncil.org/license/1.0.0>.
31
+
32
+ ## Excuse
33
+
34
+ If anyone notifies you in writing that you have not
35
+ complied with [Notices](#notices), you can keep your
36
+ license by taking all practical steps to comply within 30
37
+ days after the notice. If you do not do so, your license
38
+ ends immediately.
39
+
40
+ ## Patent
41
+
42
+ Each contributor licenses you to do everything with this
43
+ software that would otherwise infringe any patent claims
44
+ they can license or become able to license.
45
+
46
+ ## Reliability
47
+
48
+ No contributor can revoke this license.
49
+
50
+ ## No Liability
51
+
52
+ ***As far as the law allows, this software comes as is,
53
+ without any warranty or condition, and no contributor
54
+ will be liable to anyone for any damages related to this
55
+ software or this license, under any kind of legal claim.***
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Cardmarket CLI
2
+ ## Warning
3
+ The [Cardmarket API](https://api.cardmarket.com/ws/documentation/API_Main_Page) gives full access to your [Cardmarket](https://www.cardmarket.com/) Account.
4
+ Including the ability to make orders.
5
+ Use this software on your own risk.
6
+ I am not liable for any damages related to this software (See [licence](#License)).
7
+ ## Installation
8
+ 1. Install [Ruby](https://www.ruby-lang.org/en/documentation/installation/)
9
+ 2. Install the [Bundler Gem](https://bundler.io/)
10
+ ```
11
+ gem install bundler
12
+ ```
13
+ 3. Clone the repository
14
+ ```
15
+ git clone https://github.com/Lisstem/cardmarket-cli.git
16
+ ```
17
+ 4. Move into the directory and install the need gems
18
+ ```
19
+ cd cardmarket-cli && bundle install
20
+ ```
21
+ 5. Move into the code directory and copy the example config
22
+ ```
23
+ cd code && cp example_config.json config.json
24
+ ```
25
+ 6. Set your secrets from [Cardmarket](https://www.cardmarket.com/en/Magic/Account/API) in config.json
26
+ ## Usage
27
+ Still working on that :D
28
+ ## License
29
+ [Blue Oak Model License 1.0.0](LICENSE.md)
data/Rakefile ADDED
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rake/testtask'
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << 'test'
8
+ t.libs << 'lib'
9
+ t.test_files = FileList['test/**/*_test.rb']
10
+ end
11
+
12
+ require 'rubocop/rake_task'
13
+
14
+ RuboCop::RakeTask.new do |t|
15
+ t.options = ['--auto-correct']
16
+ end
17
+
18
+ task default: %i[test rubocop]
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/setup'
5
+ require 'cardmarket_cli'
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require 'irb'
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path('lib', __dir__)
4
+ require 'cardmarket_cli/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'cardmarket_cli'
8
+ spec.version = CardmarketCLI::VERSION
9
+ spec.authors = ['lisstem']
10
+ spec.email = ['kontakt@knuddelkrabbe.de']
11
+
12
+ spec.summary = 'CLI for cardmarket.com'
13
+ # spec.description = 'TODO: Write a longer description or delete this line.'
14
+ spec.homepage = 'https://github.com/Lisstem/cardmarket-cli'
15
+ spec.license = 'Nonstandard'
16
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.7.1')
17
+
18
+ # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
19
+
20
+ spec.metadata['homepage_uri'] = spec.homepage
21
+ spec.metadata['source_code_uri'] = spec.homepage
22
+ # spec.metadata['changelog_uri'] = "TODO: Put your gem's CHANGELOG.md URL here."
23
+
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
27
+ end
28
+ spec.bindir = 'exe'
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ['lib']
31
+
32
+ spec.add_dependency 'oauth', '~> 0.5.5'
33
+ spec.add_dependency 'typhoeus', '~> 1.4'
34
+ spec.add_dependency 'xml-simple', '~> 1.1'
35
+
36
+ spec.add_development_dependency 'guard', '~> 2.16.2'
37
+ spec.add_development_dependency 'guard-minitest', '~> 2.4.6'
38
+ spec.add_development_dependency 'minitest', '~> 5.13.0'
39
+ spec.add_development_dependency 'minitest-reporters', '~> 1.4.3'
40
+ spec.add_development_dependency 'rake', '~> 13.0'
41
+ spec.add_development_dependency 'rubocop', '~> 1.7'
42
+ spec.add_development_dependency 'rubocop-minitest', '~> 0.10.3'
43
+ spec.add_development_dependency 'rubocop-rake', '~> 0.5.1'
44
+ end