envato 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +12 -0
  3. data/.github/workflows/ci.yml +51 -0
  4. data/.gitignore +1 -0
  5. data/README.md +6 -147
  6. data/envato.gemspec +7 -7
  7. data/lib/envato/version.rb +1 -1
  8. data/lib/envato.rb +2 -5
  9. metadata +38 -79
  10. data/Gemfile.lock +0 -84
  11. data/spec/bookmarks_spec.rb +0 -15
  12. data/spec/envato_spec.rb +0 -26
  13. data/spec/item_spec.rb +0 -90
  14. data/spec/market_spec.rb +0 -100
  15. data/spec/markets_spec.rb +0 -14
  16. data/spec/search_spec.rb +0 -41
  17. data/spec/spec_helper.rb +0 -51
  18. data/spec/user_spec.rb +0 -118
  19. data/spec/users_spec.rb +0 -15
  20. data/spec/vcr/bookmarks_list.yml +0 -87
  21. data/spec/vcr/item_info.yml +0 -88
  22. data/spec/vcr/item_list_purchases.yml +0 -87
  23. data/spec/vcr/item_prices.yml +0 -86
  24. data/spec/vcr/item_purchases.yml +0 -87
  25. data/spec/vcr/item_version.yml +0 -87
  26. data/spec/vcr/market_categories_graphicriver.yml +0 -147
  27. data/spec/vcr/market_categories_themeforest.yml +0 -201
  28. data/spec/vcr/market_features_graphicriver.yml +0 -97
  29. data/spec/vcr/market_features_themeforest.yml +0 -93
  30. data/spec/vcr/market_new_files.yml +0 -86
  31. data/spec/vcr/market_new_files_graphicriver_graphics.yml +0 -115
  32. data/spec/vcr/market_popular_items_themeforest.yml +0 -86
  33. data/spec/vcr/market_total_items.yml +0 -85
  34. data/spec/vcr/search_comments.yml +0 -88
  35. data/spec/vcr/search_item.yml +0 -88
  36. data/spec/vcr/search_more_like_this.yml +0 -88
  37. data/spec/vcr/user_account.yml +0 -86
  38. data/spec/vcr/user_badges.yml +0 -98
  39. data/spec/vcr/user_badges_not_exists.yml +0 -83
  40. data/spec/vcr/user_collection.yml +0 -88
  41. data/spec/vcr/user_collections.yml +0 -90
  42. data/spec/vcr/user_email.yml +0 -85
  43. data/spec/vcr/user_items.yml +0 -86
  44. data/spec/vcr/user_name.yml +0 -85
  45. data/spec/vcr/user_statement.yml +0 -111
  46. data/spec/vcr/users_total.yml +0 -85
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d218714f8633fe293e92eae29201a5f3e43713237f167ccca14786eccd2a6441
4
- data.tar.gz: 7edab5418e1e89d7077e56e1b9919c26e3981c0108b0c532aacf3be9ab8c3715
3
+ metadata.gz: ca318d16d398b0a77237e559d9f021fb3b16ca50bc323c280440ad6b467a968a
4
+ data.tar.gz: 8fb7c7d0744fae188d2c3e29187c0373de1991adc29d33d04d105ed707b93bcd
5
5
  SHA512:
6
- metadata.gz: 8eadf73abe33a300e4d20e3d53fac5ca1b8fa30cac3561c0676a489e265afaa5991a26f0afb53fcce5b7de3623f3455cd8d747717bd3074118cdfd87fb7c50cb
7
- data.tar.gz: 61fdb4c1bac7b49ccb01fccdc6f2f562a37f93ee7c4952bdcd63752c97988a8f72fc4f8133afb90a7177022372a51b3beb31427d40d7a0a9081e9f02c25367c0
6
+ metadata.gz: b0fe756e6317f1edd3eb27153b0b3e886b0f98cb45bf9f4613d61386f7d7f9aa9a118f9f207fb9c401182f914a20bae04fa53d4c1e9c34feeecf095b00d1e321
7
+ data.tar.gz: a7051264e17963184e5f14a6810989261251ab89c96dee004b4597c006af17fb8669b746a4b152996fabf192b30b6e638967b579167b43ac48394b83f7d8f952
@@ -0,0 +1,12 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: /
5
+ schedule:
6
+ interval: daily
7
+ open-pull-requests-limit: 20
8
+ - package-ecosystem: "github-actions"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "weekly"
12
+ open-pull-requests-limit: 20
@@ -0,0 +1,51 @@
1
+ name: Ruby specs
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ name: tests
6
+ strategy:
7
+ fail-fast: false
8
+ matrix:
9
+ os: [ubuntu-latest, macos-latest]
10
+ ruby: ['2.6', '2.7', '3.0', '3.1', head, truffleruby, truffleruby-head]
11
+ runs-on: ${{ matrix.os }}
12
+ continue-on-error: true
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ bundler-cache: true
19
+
20
+ - name: Get the newest rubygems version to rid ourselves of warnings
21
+ run: gem update --system --no-document
22
+
23
+ - name: Install bundler
24
+ run: gem i bundler --no-document
25
+
26
+ - name: Install dependencies
27
+ run: |
28
+ bundle config set --local without benchmark
29
+ bundle install --jobs=3
30
+ - name: RSpec testing
31
+ run: |
32
+ JRUBY_OPTS="--dev --debug" bundle exec rspec --color --format documentation
33
+ - name: Coveralls Parallel
34
+ uses: coverallsapp/github-action@1.1.3
35
+ with:
36
+ github-token: ${{ secrets.github_token }}
37
+ flag-name: run-${{ matrix.ruby-version }}
38
+ path-to-lcov: ./coverage/lcov/envato.lcov
39
+ parallel: true
40
+
41
+ coverage:
42
+ name: Coverage
43
+ needs: test
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - name: Coveralls Finished
47
+ uses: coverallsapp/github-action@1.1.3
48
+ with:
49
+ github-token: ${{ secrets.github_token }}
50
+ path-to-lcov: ${{ github.workspace }}/coverage/lcov.info
51
+ parallel-finished: true
data/.gitignore CHANGED
@@ -44,3 +44,4 @@ api.sh
44
44
  fixtures
45
45
  .rspec_status
46
46
  Gemfile.lock
47
+ Gemfile.lock
data/README.md CHANGED
@@ -1,152 +1,11 @@
1
1
  # Envato API - Ruby client ([gem](https://rubygems.org/gems/envato))
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/envato.svg)](https://badge.fury.io/rb/envato)
4
+ ![Gem](https://shields.api-test.nl/gem/dt/envato)
5
+ [![Ruby specs](https://github.com/ruby-api-client/envato/actions/workflows/ci.yml/badge.svg)](https://github.com/ruby-api-client/envato/actions/workflows/ci.yml)
6
+ [![Coverage Status](https://coveralls.io/repos/github/ruby-api-client/envato/badge.svg?branch=master)](https://coveralls.io/github/ruby-api-client/envato?branch=master)
7
+
3
8
  ## TODO
4
9
 
5
10
  - examples
6
- - documentation
7
- - tests
8
-
9
- # Available methods
10
-
11
- ### V1 requests
12
- ```ruby
13
- # get /search/more_like_this
14
- # GET https://api.envato.com/v1/discovery/search/search/more_like_this
15
- client.search.more_like_this(item_id:, page: 1, page_size: 10)
16
-
17
- # get /search/comment
18
- # GET https://api.envato.com/v1/discovery/search/search/comment
19
- client.search.comment(item_id:)
20
-
21
- # get /search/item
22
- # GET https://api.envato.com/v1/discovery/search/search/item
23
- client.search.item
24
-
25
- # get /number-of-files:{site}.json
26
- # GET https://api.envato.com/v1/market/number-of-files:{site}.json
27
- client.market.number_of_files(site:) # eg. "themeforest"
28
-
29
- # get /total-users.json
30
- # GET https://api.envato.com/v1/market/total-users.json
31
- client.users.total
32
-
33
- # get /total-items.json
34
- # GET https://api.envato.com/v1/market/total-items.json
35
- client.items.total
36
-
37
- # get /item-prices:{item_id}.json
38
- # GET https://api.envato.com/v1/market/item-prices:{item_id}.json
39
- client.market.item_proces(item_id:)
40
-
41
-
42
- # get /user:{username}.json
43
- # GET https://api.envato.com/v1/market/user:{username}.json
44
- client.users.info(username:)
45
-
46
- # get /user-items-by-site:{username}.json
47
- # GET https://api.envato.com/v1/market/user-items-by-site:{username}.json
48
- client.users.items_by_site(username:)
49
-
50
- # get /popular:{site}.json
51
- # GET https://api.envato.com/v1/market/popular:{site}.json
52
- client.market.popular(site:)
53
-
54
- # get /categories:{site}.json
55
- # GET https://api.envato.com/v1/market/categories:{site}.json
56
- client.categories.list(site:)
57
-
58
- # get /features:{site}.json
59
- # GET https://api.envato.com/v1/market/features:{site}.json
60
- client.features.list(site:)
61
-
62
- # get /new-files:{site,category}.json
63
- # GET https://api.envato.com/v1/market/new-files:{site,category}.json
64
- client.new_files.list(site:)
65
-
66
- # get /new-files-from-user:{username,site}.json
67
- # GET https://api.envato.com/v1/market/new-files-from-user:{username,site}.json
68
- client.users.new_fileslist(username:, site:)
69
-
70
- # get /random-new-files:{site}.json
71
- # GET https://api.envato.com/v1/market/random-new-files:{site}.json
72
- client.market.random_new_files(site:)
73
-
74
- # get /user-badges:{username}.json
75
- # GET https://api.envato.com/v1/market/user-badges:{username}.json
76
- client.users.badges(username:)
77
-
78
- # get /private/user/earnings-and-sales-by-month.json
79
- # GET https://api.envato.com/v1/market/private/user/earnings-and-sales-by-month.json
80
- client.user.money_stats
81
-
82
- get /private/user/account.json
83
- GET https://api.envato.com/v1/market/private/user/account.json
84
- client.user.account
85
-
86
- get /private/user/username.json
87
- GET https://api.envato.com/v1/market/private/user/username.json
88
- client.user.name
89
-
90
- get /private/user/email.json
91
- GET https://api.envato.com/v1/market/private/user/email.json
92
- client.user.email
93
-
94
- ### V3 requests
95
- get /author/sales
96
- GET https://api.envato.com/v3/market/author/sales
97
-
98
- get /author/sale?sale=
99
- https://api.envato.com/v3/market/author/sale
100
-
101
-
102
- get /buyer/download
103
- GET https://api.envato.com/v3/market/buyer/download
104
-
105
- get /buyer/list-purchases
106
- GET https://api.envato.com/v3/market/buyer/list-purchases
107
-
108
- get /buyer/purchase?code=
109
- GET https://api.envato.com/v3/market/buyer/purchase
110
-
111
- get /buyer/purchases
112
- GET https://api.envato.com/v3/market/buyer/purchases
113
-
114
- get /catalog/collection?id=
115
- GET https://api.envato.com/v3/market/catalog/collection
116
-
117
- get /catalog/item-version?id=
118
- GET https://api.envato.com/v3/market/catalog/item-version
119
-
120
- get /catalog/item?id=
121
- GET https://api.envato.com/v3/market/catalog/item
122
-
123
- put /user/bookmark_add?collectionid=&item_id=
124
- PUT https://api.envato.com/v3/market/user/bookmark_add?collectionid=&item_id=
125
-
126
- delete /user/bookmark_remove
127
- DELETE https://api.envato.com/v3/market/user/bookmark_remove?id=
128
-
129
- get /user/bookmarks_for_items?item_ids=123,1234,567
130
- GET https://api.envato.com/v3/market/user/bookmarks_for_items
131
-
132
- get /user/bookmarks - OK
133
- GET https://api.envato.com/v3/market/user/bookmarks
134
-
135
- post /user/collection_create?name=
136
- POST https://api.envato.com/v3/market/user/collection_create
137
-
138
- get /user/collection?id=
139
- GET https://api.envato.com/v3/market/user/collection
140
-
141
- get /user/collections - OK
142
- GET https://api.envato.com/v3/market/user/collections
143
- client.user.collections
144
-
145
- put /user/favourite_collection_add?item_id=
146
- PUT https://api.envato.com/v3/market/user/favourite_collection_add?item_id=
147
- client.user.
148
-
149
- get /user/statement - OK
150
- GET https://api.envato.com/v3/market/user/statement
151
- client.user.statement
152
- ```
11
+ - document methods
data/envato.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.description = "WIP - Envato API wrapper written in Ruby"
13
13
  s.authors = ["Ilya Brin"]
14
14
  s.email = "ilya@codeplay.ru"
15
- s.files = `git ls-files -z`.split("\x0")
15
+ s.files = `git ls-files`.split($RS).reject {|fn| fn.start_with? "spec" }
16
16
  s.executables = s.files.grep(%r{^bin/}) {|f| File.basename(f) }
17
17
  s.require_paths = ["lib"]
18
18
  s.homepage = "https://github.com/ruby-api-client/envato"
@@ -22,13 +22,13 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.metadata["rubygems_mfa_required"] = "true"
24
24
 
25
- s.add_dependency "addressable", "~> 2.3", ">= 2.3.7"
26
25
  s.add_dependency "faraday", "~> 1.7"
27
26
 
28
27
  s.add_development_dependency "bundler"
29
- s.add_development_dependency "rake", ">= 10"
30
- s.add_development_dependency "rspec", ">= 3.0"
31
- s.add_development_dependency "simplecov", ">= 0.9"
32
- s.add_development_dependency "vcr"
33
- s.add_development_dependency "webmock"
28
+ s.add_development_dependency "rake", "~> 12.3"
29
+ s.add_development_dependency "rspec", "~> 3.0"
30
+ s.add_development_dependency "simplecov", "~> 0.9"
31
+ s.add_development_dependency "simplecov-lcov", "~> 0.7.0"
32
+ s.add_development_dependency "vcr", "~> 6.1"
33
+ s.add_development_dependency "webmock", "~> 3.18"
34
34
  end
@@ -3,6 +3,6 @@
3
3
  module Envato
4
4
  major = 1
5
5
  minor = 0
6
- patch = 0
6
+ patch = 1
7
7
  VERSION = "#{major}.#{minor}.#{patch}"
8
8
  end
data/lib/envato.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "addressable/uri"
4
3
  require "faraday"
5
4
  require "envato/version"
6
5
 
@@ -11,6 +10,7 @@ module Envato
11
10
  autoload :Collection, "envato/collection"
12
11
  autoload :Error, "envato/error"
13
12
 
13
+ # resources
14
14
  autoload :UserResource, "envato/resources/user"
15
15
  autoload :UsersResource, "envato/resources/users"
16
16
  autoload :MarketResource, "envato/resources/market"
@@ -19,6 +19,7 @@ module Envato
19
19
  autoload :BookmarksResource, "envato/resources/bookmarks"
20
20
  autoload :ItemResource, "envato/resources/item"
21
21
 
22
+ # objects
22
23
  autoload :User, "envato/objects/types"
23
24
  autoload :UserAccount, "envato/objects/types"
24
25
  autoload :UserStatement, "envato/objects/types"
@@ -26,13 +27,9 @@ module Envato
26
27
  autoload :UserStatement, "envato/objects/types"
27
28
  autoload :UserCollection, "envato/objects/types"
28
29
  autoload :UserBookmark, "envato/objects/types"
29
-
30
30
  autoload :UsersTotal, "envato/objects/types"
31
-
32
31
  autoload :SearchMatch, "envato/objects/types"
33
-
34
32
  autoload :CollectionItem, "envato/objects/types"
35
-
36
33
  autoload :Item, "envato/objects/types"
37
34
  autoload :ItemPrice, "envato/objects/types"
38
35
  autoload :ItemVersion, "envato/objects/types"
metadata CHANGED
@@ -1,35 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: envato
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Brin
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-13 00:00:00.000000000 Z
11
+ date: 2022-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: addressable
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.3'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 2.3.7
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '2.3'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 2.3.7
33
13
  - !ruby/object:Gem::Dependency
34
14
  name: faraday
35
15
  requirement: !ruby/object:Gem::Requirement
@@ -62,83 +42,98 @@ dependencies:
62
42
  name: rake
63
43
  requirement: !ruby/object:Gem::Requirement
64
44
  requirements:
65
- - - ">="
45
+ - - "~>"
66
46
  - !ruby/object:Gem::Version
67
- version: '10'
47
+ version: '12.3'
68
48
  type: :development
69
49
  prerelease: false
70
50
  version_requirements: !ruby/object:Gem::Requirement
71
51
  requirements:
72
- - - ">="
52
+ - - "~>"
73
53
  - !ruby/object:Gem::Version
74
- version: '10'
54
+ version: '12.3'
75
55
  - !ruby/object:Gem::Dependency
76
56
  name: rspec
77
57
  requirement: !ruby/object:Gem::Requirement
78
58
  requirements:
79
- - - ">="
59
+ - - "~>"
80
60
  - !ruby/object:Gem::Version
81
61
  version: '3.0'
82
62
  type: :development
83
63
  prerelease: false
84
64
  version_requirements: !ruby/object:Gem::Requirement
85
65
  requirements:
86
- - - ">="
66
+ - - "~>"
87
67
  - !ruby/object:Gem::Version
88
68
  version: '3.0'
89
69
  - !ruby/object:Gem::Dependency
90
70
  name: simplecov
91
71
  requirement: !ruby/object:Gem::Requirement
92
72
  requirements:
93
- - - ">="
73
+ - - "~>"
94
74
  - !ruby/object:Gem::Version
95
75
  version: '0.9'
96
76
  type: :development
97
77
  prerelease: false
98
78
  version_requirements: !ruby/object:Gem::Requirement
99
79
  requirements:
100
- - - ">="
80
+ - - "~>"
101
81
  - !ruby/object:Gem::Version
102
82
  version: '0.9'
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov-lcov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.7.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.7.0
103
97
  - !ruby/object:Gem::Dependency
104
98
  name: vcr
105
99
  requirement: !ruby/object:Gem::Requirement
106
100
  requirements:
107
- - - ">="
101
+ - - "~>"
108
102
  - !ruby/object:Gem::Version
109
- version: '0'
103
+ version: '6.1'
110
104
  type: :development
111
105
  prerelease: false
112
106
  version_requirements: !ruby/object:Gem::Requirement
113
107
  requirements:
114
- - - ">="
108
+ - - "~>"
115
109
  - !ruby/object:Gem::Version
116
- version: '0'
110
+ version: '6.1'
117
111
  - !ruby/object:Gem::Dependency
118
112
  name: webmock
119
113
  requirement: !ruby/object:Gem::Requirement
120
114
  requirements:
121
- - - ">="
115
+ - - "~>"
122
116
  - !ruby/object:Gem::Version
123
- version: '0'
117
+ version: '3.18'
124
118
  type: :development
125
119
  prerelease: false
126
120
  version_requirements: !ruby/object:Gem::Requirement
127
121
  requirements:
128
- - - ">="
122
+ - - "~>"
129
123
  - !ruby/object:Gem::Version
130
- version: '0'
124
+ version: '3.18'
131
125
  description: WIP - Envato API wrapper written in Ruby
132
126
  email: ilya@codeplay.ru
133
127
  executables: []
134
128
  extensions: []
135
129
  extra_rdoc_files: []
136
130
  files:
131
+ - ".github/dependabot.yml"
132
+ - ".github/workflows/ci.yml"
137
133
  - ".gitignore"
138
134
  - ".rspec"
139
135
  - ".rubocop.yml"
140
136
  - Gemfile
141
- - Gemfile.lock
142
137
  - LICENSE
143
138
  - README.md
144
139
  - Rakefile
@@ -158,48 +153,12 @@ files:
158
153
  - lib/envato/resources/user.rb
159
154
  - lib/envato/resources/users.rb
160
155
  - lib/envato/version.rb
161
- - spec/bookmarks_spec.rb
162
- - spec/envato_spec.rb
163
- - spec/item_spec.rb
164
- - spec/market_spec.rb
165
- - spec/markets_spec.rb
166
- - spec/search_spec.rb
167
- - spec/spec_helper.rb
168
- - spec/user_spec.rb
169
- - spec/users_spec.rb
170
- - spec/vcr/bookmarks_list.yml
171
- - spec/vcr/item_info.yml
172
- - spec/vcr/item_list_purchases.yml
173
- - spec/vcr/item_prices.yml
174
- - spec/vcr/item_purchases.yml
175
- - spec/vcr/item_version.yml
176
- - spec/vcr/market_categories_graphicriver.yml
177
- - spec/vcr/market_categories_themeforest.yml
178
- - spec/vcr/market_features_graphicriver.yml
179
- - spec/vcr/market_features_themeforest.yml
180
- - spec/vcr/market_new_files.yml
181
- - spec/vcr/market_new_files_graphicriver_graphics.yml
182
- - spec/vcr/market_popular_items_themeforest.yml
183
- - spec/vcr/market_total_items.yml
184
- - spec/vcr/search_comments.yml
185
- - spec/vcr/search_item.yml
186
- - spec/vcr/search_more_like_this.yml
187
- - spec/vcr/user_account.yml
188
- - spec/vcr/user_badges.yml
189
- - spec/vcr/user_badges_not_exists.yml
190
- - spec/vcr/user_collection.yml
191
- - spec/vcr/user_collections.yml
192
- - spec/vcr/user_email.yml
193
- - spec/vcr/user_items.yml
194
- - spec/vcr/user_name.yml
195
- - spec/vcr/user_statement.yml
196
- - spec/vcr/users_total.yml
197
156
  homepage: https://github.com/ruby-api-client/envato
198
157
  licenses:
199
158
  - MIT
200
159
  metadata:
201
160
  rubygems_mfa_required: 'true'
202
- post_install_message:
161
+ post_install_message:
203
162
  rdoc_options: []
204
163
  require_paths:
205
164
  - lib
@@ -214,8 +173,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
173
  - !ruby/object:Gem::Version
215
174
  version: '0'
216
175
  requirements: []
217
- rubygems_version: 3.0.3.1
218
- signing_key:
176
+ rubygems_version: 3.2.3
177
+ signing_key:
219
178
  specification_version: 4
220
179
  summary: WIP - Envato API client
221
180
  test_files: []
data/Gemfile.lock DELETED
@@ -1,84 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- envato (1.0.0)
5
- addressable (~> 2.3, >= 2.3.7)
6
- faraday (~> 1.7)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- addressable (2.8.1)
12
- public_suffix (>= 2.0.2, < 6.0)
13
- crack (0.4.5)
14
- rexml
15
- diff-lcs (1.5.0)
16
- docile (1.4.0)
17
- faraday (1.10.2)
18
- faraday-em_http (~> 1.0)
19
- faraday-em_synchrony (~> 1.0)
20
- faraday-excon (~> 1.1)
21
- faraday-httpclient (~> 1.0)
22
- faraday-multipart (~> 1.0)
23
- faraday-net_http (~> 1.0)
24
- faraday-net_http_persistent (~> 1.0)
25
- faraday-patron (~> 1.0)
26
- faraday-rack (~> 1.0)
27
- faraday-retry (~> 1.0)
28
- ruby2_keywords (>= 0.0.4)
29
- faraday-em_http (1.0.0)
30
- faraday-em_synchrony (1.0.0)
31
- faraday-excon (1.1.0)
32
- faraday-httpclient (1.0.1)
33
- faraday-multipart (1.0.4)
34
- multipart-post (~> 2)
35
- faraday-net_http (1.0.1)
36
- faraday-net_http_persistent (1.2.0)
37
- faraday-patron (1.0.0)
38
- faraday-rack (1.0.0)
39
- faraday-retry (1.0.3)
40
- hashdiff (1.0.1)
41
- multipart-post (2.2.3)
42
- public_suffix (5.0.0)
43
- rake (13.0.6)
44
- rexml (3.2.5)
45
- rspec (3.11.0)
46
- rspec-core (~> 3.11.0)
47
- rspec-expectations (~> 3.11.0)
48
- rspec-mocks (~> 3.11.0)
49
- rspec-core (3.11.0)
50
- rspec-support (~> 3.11.0)
51
- rspec-expectations (3.11.1)
52
- diff-lcs (>= 1.2.0, < 2.0)
53
- rspec-support (~> 3.11.0)
54
- rspec-mocks (3.11.1)
55
- diff-lcs (>= 1.2.0, < 2.0)
56
- rspec-support (~> 3.11.0)
57
- rspec-support (3.11.1)
58
- ruby2_keywords (0.0.5)
59
- simplecov (0.21.2)
60
- docile (~> 1.1)
61
- simplecov-html (~> 0.11)
62
- simplecov_json_formatter (~> 0.1)
63
- simplecov-html (0.12.3)
64
- simplecov_json_formatter (0.1.4)
65
- vcr (6.1.0)
66
- webmock (3.18.1)
67
- addressable (>= 2.8.0)
68
- crack (>= 0.3.2)
69
- hashdiff (>= 0.4.0, < 2.0.0)
70
-
71
- PLATFORMS
72
- universal-darwin-21
73
-
74
- DEPENDENCIES
75
- bundler
76
- envato!
77
- rake (>= 10)
78
- rspec (>= 3.0)
79
- simplecov (>= 0.9)
80
- vcr
81
- webmock
82
-
83
- BUNDLED WITH
84
- 2.3.22
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
- require "envato"
5
-
6
- RSpec.describe "#bookmarks.list" do
7
- subject(:resp) do
8
- VCR.use_cassette("bookmarks_list") do
9
- @envato.bookmarks.list
10
- end
11
- end
12
-
13
- it { expect(resp).to be_instance_of(Envato::Collection) }
14
- it { expect(resp.data.first).to be_instance_of(Envato::UserBookmark) }
15
- end
data/spec/envato_spec.rb DELETED
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
- require "envato"
5
-
6
- RSpec.describe Envato::Client do
7
- context "with valid token" do
8
- describe "#user", :vcr do
9
- it "name" do
10
- allow(@envato.user)
11
- .to receive(:name)
12
- .and_return(Envato::UserResource)
13
- end
14
- end
15
- end
16
-
17
- context "without token" do
18
- it do
19
- expect { described_class.new }.to raise_error(ArgumentError)
20
- end
21
- end
22
- end
23
-
24
- RSpec.describe "#VERSION" do
25
- it { expect(Envato::VERSION).to eq "1.0.0" }
26
- end