itch_rewards 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28124fd296c0c6919d5a5bf9aa01fe4b0165f310f61bcb78133126fbc6becc9c
4
- data.tar.gz: c865c1beff954f19277914f9ad33413eb29a02509a38fd37187fde48ff284f64
3
+ metadata.gz: 6c69e7257af79281fb022bde524cab5e7a7db04d65bfbcf064da80c38cf6a34c
4
+ data.tar.gz: 790dd59c9351b15b40d8797da1683e9abb25d394fc1c14a35801937f0663f878
5
5
  SHA512:
6
- metadata.gz: e77fe5877e20855f24b4b1dc2a3a0e6ba8bca40dbd1d0bdcab7574c115821e4c09f11c3e8be2f9af4796af8c1d1744d4e34ee869e547451b1f4a913e2f95f45e
7
- data.tar.gz: 29db46393f880c338ab51c1bcaffbd2e4327e315a306564709ffa1a3efd291b0a9f26e3e9144980aa27fd59d15aee9665c0be2b898e17b84b286910239693176
6
+ metadata.gz: 2d885c37321b58c117729b0c64b056108d96f61120e40b64cb73c74a2455339648be83f093dc12ddc30d5258ab83896fd6ea08be1c691e7c943aa939b7887594
7
+ data.tar.gz: 0da373cd14408370240c0164141d24c0a4b27dbe020ba49a32a7f6a147923ba07c202f9bd19e53db2ee0871c0af512a3b57eb9be8e7d13945c4c4c9eec1d4848
data/.gitignore CHANGED
@@ -11,3 +11,4 @@
11
11
  .rspec_status
12
12
  .itch-cookies.yml
13
13
  itch-reward-config.yml
14
+ .tool-versions
data/CHANGELOG.md CHANGED
@@ -1,4 +1,6 @@
1
- ## [Unreleased]
1
+ ## [0.2.0] - 2023-04-05
2
+
3
+ Update itch-client library to fix failed reward parsing is some cases
2
4
 
3
5
  ## [0.1.0] - 2021-05-23
4
6
 
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- itch_rewards (0.1.4)
4
+ itch_rewards (0.2.0)
5
5
  dry-cli (~> 0.7.0)
6
- itch_client (~> 0.2.0)
6
+ itch_client (~> 0.4.2, >= 0.4.2)
7
7
  pastel (~> 0.8.0)
8
8
  tty-prompt (~> 0.23.1)
9
9
  tty-table (~> 0.12.0)
@@ -11,22 +11,22 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- addressable (2.7.0)
15
- public_suffix (>= 2.0.2, < 5.0)
16
- connection_pool (2.2.5)
14
+ addressable (2.8.3)
15
+ public_suffix (>= 2.0.2, < 6.0)
16
+ connection_pool (2.4.0)
17
17
  diff-lcs (1.4.4)
18
18
  domain_name (0.5.20190701)
19
19
  unf (>= 0.0.5, < 1.0.0)
20
20
  dry-cli (0.7.0)
21
- http-cookie (1.0.3)
21
+ http-cookie (1.0.5)
22
22
  domain_name (~> 0.5)
23
23
  io-console (0.5.9)
24
24
  irb (1.3.5)
25
25
  reline (>= 0.1.5)
26
- itch_client (0.2.0)
26
+ itch_client (0.4.2)
27
27
  mechanize (~> 2.8)
28
- mechanize (2.8.1)
29
- addressable (~> 2.7)
28
+ mechanize (2.8.5)
29
+ addressable (~> 2.8)
30
30
  domain_name (~> 0.5, >= 0.5.20190701)
31
31
  http-cookie (~> 1.0, >= 1.0.3)
32
32
  mime-types (~> 3.0)
@@ -36,18 +36,18 @@ GEM
36
36
  rubyntlm (~> 0.6, >= 0.6.3)
37
37
  webrick (~> 1.7)
38
38
  webrobots (~> 0.1.2)
39
- mime-types (3.3.1)
39
+ mime-types (3.4.1)
40
40
  mime-types-data (~> 3.2015)
41
- mime-types-data (3.2021.0225)
41
+ mime-types-data (3.2023.0218.1)
42
42
  net-http-digest_auth (1.4.1)
43
- net-http-persistent (4.0.1)
43
+ net-http-persistent (4.0.2)
44
44
  connection_pool (~> 2.2)
45
- nokogiri (1.11.6-x86_64-linux)
45
+ nokogiri (1.14.2-x86_64-linux)
46
46
  racc (~> 1.4)
47
47
  pastel (0.8.0)
48
48
  tty-color (~> 0.5)
49
- public_suffix (4.0.6)
50
- racc (1.5.2)
49
+ public_suffix (5.0.1)
50
+ racc (1.6.2)
51
51
  rake (13.0.3)
52
52
  reline (0.2.5)
53
53
  io-console (~> 0.5)
@@ -86,14 +86,15 @@ GEM
86
86
  tty-screen (~> 0.8)
87
87
  unf (0.1.4)
88
88
  unf_ext
89
- unf_ext (0.0.7.7)
90
- unicode-display_width (2.0.0)
89
+ unf_ext (0.0.8.2)
90
+ unicode-display_width (2.4.2)
91
91
  unicode_utils (1.4.0)
92
- webrick (1.7.0)
92
+ webrick (1.8.1)
93
93
  webrobots (0.1.2)
94
94
  wisper (2.0.1)
95
95
 
96
96
  PLATFORMS
97
+ ruby
97
98
  x86_64-linux
98
99
 
99
100
  DEPENDENCIES
data/README.md CHANGED
@@ -12,12 +12,12 @@ Commandline tool to update game rewards on Itch.io, and automatically update rew
12
12
  Usage: itch-rewards COMMAND [options]
13
13
 
14
14
  Commands:
15
- itch-rewards list # List all rewards for a game
16
- itch-rewards list-games # List all games
17
- itch-rewards recalculate # Update reward quantity and description from configuration file
18
- itch-rewards setup # Save cookies for itch.io and create reward config example file
19
- itch-rewards update GAME_ID REWARD_ID # Update a reward
20
- itch-rewards version # Print version
15
+ itch-rewards list # List all rewards for a game
16
+ itch-rewards list-games # List all games
17
+ itch-rewards recalculate # Update reward quantity and description from configuration file
18
+ itch-rewards setup # Save cookies for itch.io and create reward config example file
19
+ itch-rewards update GAME_ID REWARD_ID # Update a reward
20
+ itch-rewards version # Print version
21
21
  ```
22
22
 
23
23
  ### Authenticating
@@ -47,12 +47,12 @@ You'll also be prompted to create an (optional) configuration file that can be u
47
47
  While logging in via cookies is easier (and required for non-interactive login, ex: for cron tasks), all commands also accept the following options.
48
48
 
49
49
  ```shell
50
- --username=VALUE, -u VALUE # Itch username
51
- --password=VALUE, -p VALUE # Itch password
52
- --cookie-path=VALUE # Path to cookies file for future logins, default: ".itch-cookies.yml"
53
- --[no-]cookies # Enable cookie storage, default: true
54
- --[no-]interactive # Enable interactive prompts, default: true
55
- --help, -h # Print help
50
+ --username=VALUE, -u VALUE # Itch username
51
+ --password=VALUE, -p VALUE # Itch password
52
+ --cookie-path=VALUE # Path to cookies file for future logins, default: ".itch-cookies.yml"
53
+ --[no-]cookies # Enable cookie storage, default: true
54
+ --[no-]interactive # Enable interactive prompts, default: true
55
+ --help, -h # Print help
56
56
  ```
57
57
 
58
58
  ### List games
@@ -105,15 +105,15 @@ Description:
105
105
  Update a reward
106
106
 
107
107
  Arguments:
108
- GAME_ID # REQUIRED Game with the reward to edit
109
- REWARD_ID # REQUIRED Reward ID to update
108
+ GAME_ID # REQUIRED Game with the reward to edit
109
+ REWARD_ID # REQUIRED Reward ID to update
110
110
 
111
111
  Options:
112
- --quantity=VALUE # Reward quantity (total, including redeemed)
113
- --title=VALUE # Reward title
114
- --[no-]archived # Reward archived status
115
- --description=VALUE # Reward description
116
- --price=VALUE # Reward price without currency (ex: 15.99)
112
+ --quantity=VALUE # Reward quantity (total, including redeemed)
113
+ --title=VALUE # Reward title
114
+ --[no-]archived # Reward archived status
115
+ --description=VALUE # Reward description
116
+ --price=VALUE # Reward price without currency (ex: 15.99)
117
117
 
118
118
  Examples:
119
119
  itch-rewards update 123456 78910 --quantity 5 # Set the reward count to 5 for reward ID 78910 in game ID 123456
@@ -132,8 +132,8 @@ Description:
132
132
  Update reward quantity and description from configuration file
133
133
 
134
134
  Options:
135
- --config=VALUE # Path to config file, default: "itch-reward-config.yml"
136
- --[no-]save # Saves changes when enabled. Otherwise, dry-run and show result, default: false
135
+ --config=VALUE # Path to config file, default: "itch-reward-config.yml"
136
+ --[no-]save # Saves changes when enabled. Otherwise, dry-run and show result, default: false
137
137
  ```
138
138
 
139
139
 
@@ -193,7 +193,7 @@ MyGame:
193
193
  id: 123456
194
194
  reward_id: 789012
195
195
  reward_by_purchase: 0
196
- reward_by_tip: 0.0
196
+ reward_by_tip: 1.0
197
197
  reward_offset: 0
198
198
  minimum_available: 0
199
199
  ```
@@ -229,4 +229,4 @@ The above will change the reward description to "Rewards added: 10".
229
229
  The following placehoder values are available:
230
230
  * `{ amount }`: The total number of reward copies in the pool, including redeemed rewards.
231
231
  * `{ remaining_percent }`: A number between 0.0 and 100.0, indicating the percentage until the next reward
232
- * `{ remaining_percent_integer }`: A number between 0 and 100. As above (but with no decimal value included).
232
+ * `{ remaining_percent_integer }`: A number between 0 and 100. As above (but with no decimal value included).
data/itch_rewards.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.executables = ['itch-rewards']
28
28
  spec.require_paths = ["lib"]
29
29
 
30
- spec.add_dependency "itch_client", "~> 0.2.0"
30
+ spec.add_dependency "itch_client", [">= 0.4.2", "~> 0.4.2"]
31
31
  spec.add_dependency "dry-cli", "~> 0.7.0"
32
32
  spec.add_dependency "tty-prompt", "~> 0.23.1"
33
33
  spec.add_dependency "tty-table", "~> 0.12.0"
@@ -264,7 +264,7 @@ module ItchRewards
264
264
  end
265
265
 
266
266
  unless options[:save]
267
- cli.warn "Dry run, results will not not saved"
267
+ cli.warn "Dry run, results will not be saved"
268
268
  end
269
269
 
270
270
  purchases_by_game = client.purchases.history.each.group_by {|row| row['object_name'] }.to_h
@@ -20,7 +20,7 @@ games:
20
20
  # ex: with rewards_by_tip set to 0.5, a $10 tip on a $5 game would add 1 reward copy
21
21
  reward_by_tip: 0.0
22
22
 
23
- # Add a flat value to reward quantity available (ex: for adding initial reward copies )
23
+ # Add a flat value to reward quantity available (ex: for adding initial reward copies)
24
24
  reward_offset: 0
25
25
 
26
26
  # Minimum reward quantity available, regardless of other settings
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ItchRewards
4
- VERSION = "0.1.4"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itch_rewards
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Billiam
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-29 00:00:00.000000000 Z
11
+ date: 2023-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: itch_client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.4.2
17
20
  - - "~>"
18
21
  - !ruby/object:Gem::Version
19
- version: 0.2.0
22
+ version: 0.4.2
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 0.4.2
24
30
  - - "~>"
25
31
  - !ruby/object:Gem::Version
26
- version: 0.2.0
32
+ version: 0.4.2
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: dry-cli
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -127,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
133
  - !ruby/object:Gem::Version
128
134
  version: '0'
129
135
  requirements: []
130
- rubygems_version: 3.2.15
136
+ rubygems_version: 3.1.6
131
137
  signing_key:
132
138
  specification_version: 4
133
139
  summary: Itch community copy automation utility