unsplash 1.4.1 → 1.4.2

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
  SHA1:
3
- metadata.gz: e70a022ee0b5488803bc7e415afdd69577a751d2
4
- data.tar.gz: 5a8e44471bcc150845cff5140ff6a741507dd51b
3
+ metadata.gz: df1b958c9e2122a59d484cb7feb97c70558404f7
4
+ data.tar.gz: 3e869765785ef68d2139ff1d528a8501725d5c8f
5
5
  SHA512:
6
- metadata.gz: ace5b797bc7e04065238e3d94723546af9a6825eb734e6b4d61f198398d837481e77fecf440e4cd010c776eb365028aabf1783e5cc2501d9138998cad851c4e9
7
- data.tar.gz: bc3c21dd1a7b2c2b1991a74fcb620273bb9bd9dcfb2bf9c911070627e825382435a4623f7c8c9249ff42b8edf82b677c522b45f2bb745eba070e8a2bc913bf61
6
+ metadata.gz: 8e9241f01329ec5b656e50cb956e94bebc97ec5de8a9b6876e3687d1f9b59a3af05dd3f31e096172edd713566473e0c33edd5a80dfc84f9b5438868046d751f1
7
+ data.tar.gz: 047a0ec4edf001bcb2fed288e075c680dbb3403cf8210e8f725003b2b5c77cbf4457cfadc7bee17d3e2172300f6fb72e126bdecbfa0198dc4745163d944ebc35
@@ -0,0 +1,17 @@
1
+ #### Steps to Reproduce
2
+
3
+ -
4
+
5
+ #### Observed Behaviour
6
+
7
+ -
8
+
9
+ > _Image or video please._
10
+
11
+ #### Expected Behaviour
12
+
13
+ -
14
+
15
+ #### Technical Notes
16
+
17
+ -
@@ -0,0 +1,12 @@
1
+ #### Overview
2
+
3
+ -
4
+ - Closes #
5
+
6
+ #### Todo
7
+
8
+ -
9
+
10
+ #### Screenshots/Videos (User Facing Changes)
11
+
12
+ > _Insert responsive image(s) and/or video(s)_
@@ -0,0 +1,13 @@
1
+ [
2
+ { "name": "Priority: Critical", "color": "#e11d21" },
3
+
4
+ { "name": "Status: Blocked", "color": "#e11d21" },
5
+ { "name": "Status: On Hold", "color": "#e11d21" },
6
+ { "name": "Status: In Progress", "color": "#fbca04" },
7
+ { "name": "Status: Ready for Review", "color": "#bfe5bf" },
8
+
9
+ { "name": "Type: Bug", "color": "#e11d21" },
10
+ { "name": "Type: Maintenance", "color": "#fbca04" },
11
+ { "name": "Type: Enhancement", "color": "#84b6eb" },
12
+ { "name": "Type: Question", "color": "#cc317c" }
13
+ ]
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.3.0
1
+ ruby-2.4.0
data/.travis.yml CHANGED
@@ -2,4 +2,5 @@ language: ruby
2
2
  rvm:
3
3
  - 2.2.5
4
4
  - 2.3.1
5
+ - 2.4.0
5
6
  before_install: gem install bundler -v 1.10.2
@@ -21,6 +21,12 @@ module Unsplash # :nodoc:
21
21
  end
22
22
  end
23
23
 
24
+ # Raw JSON as returned by Unsplash API.
25
+ # @return [Hash] json
26
+ def to_h
27
+ @attributes.to_h
28
+ end
29
+
24
30
  # @private
25
31
  def method_missing(method, *args, &block)
26
32
  attribute = @attributes.send(method, *args, &block)
@@ -48,4 +54,4 @@ module Unsplash # :nodoc:
48
54
  end
49
55
  end
50
56
  end
51
- end
57
+ end
@@ -15,7 +15,7 @@ module Unsplash # :nodoc:
15
15
 
16
16
  # Get a list of all collections.
17
17
  # @param page [Integer] Which page of search results to return.
18
- # @param per_page [Integer] The number of search results per page.
18
+ # @param per_page [Integer] The number of search results per page. (default: 10, maximum: 30)
19
19
  # @return [Array] A single page of the +Unsplash::Collection+ list.
20
20
  def all(page = 1, per_page = 10)
21
21
  params = {
@@ -28,7 +28,7 @@ module Unsplash # :nodoc:
28
28
 
29
29
  # Get a list of all curated collections.
30
30
  # @param page [Integer] Which page of search results to return.
31
- # @param per_page [Integer] The number of search results per page.
31
+ # @param per_page [Integer] The number of search results per page. (default: 10, maximum: 30)
32
32
  # @return [Array] A single page of the +Unsplash::Collection+ list.
33
33
  def curated(page = 1, per_page = 10)
34
34
  params = {
@@ -55,11 +55,13 @@ module Unsplash # :nodoc:
55
55
  # Get a single page of collection results for a query.
56
56
  # @param query [String] Keywords to search for.
57
57
  # @param page [Integer] Which page of search results to return.
58
+ # @param per_page [Integer] The number of collections search result per page. (default: 10, maximum: 30)
58
59
  # @return [Array] a list of +Unsplash::Collection+ objects.
59
- def search(query, page = 1)
60
+ def search(query, page = 1, per_page = 10)
60
61
  params = {
61
62
  query: query,
62
- page: page
63
+ page: page,
64
+ per_page: per_page
63
65
  }
64
66
  Unsplash::Search.search("/search/collections", self, params)
65
67
  end
@@ -96,6 +98,8 @@ module Unsplash # :nodoc:
96
98
  end
97
99
 
98
100
  # Get a list of the photos contained in this collection.
101
+ # @param page [Integer] Which page of photos collection to return.
102
+ # @param per_page [Integer] The number of photos per page. (default: 10, maximum: 30)
99
103
  # @return [Array] The list of +Unsplash::Photo+s in the collection.
100
104
  def photos(page = 1, per_page = 10)
101
105
  params = {
@@ -62,7 +62,7 @@ module Unsplash # :nodoc:
62
62
  if count
63
63
  params[:count] = count
64
64
  photos = parse_list connection.get("/photos/random/", params).body
65
- photos.map { |photo|
65
+ photos.map { |photo|
66
66
  photo.user = Unsplash::User.new photo[:user]
67
67
  photo
68
68
  }
@@ -76,17 +76,20 @@ module Unsplash # :nodoc:
76
76
  # Search for photos by keyword.
77
77
  # @param query [String] Keywords to search for.
78
78
  # @param page [Integer] Which page of search results to return.
79
- def search(query, page = 1)
79
+ # @param per_page [Integer] The number of users search result per page. (default: 10, maximum: 30)
80
+ # @return [Array] a list of +Unsplash::Photo+ objects.
81
+ def search(query, page = 1, per_page = 10)
80
82
  params = {
81
83
  query: query,
82
- page: page
84
+ page: page,
85
+ per_page: per_page
83
86
  }
84
87
  Unsplash::Search.search("/search/photos", self, params)
85
88
  end
86
89
 
87
90
  # Get a list of all photos.
88
91
  # @param page [Integer] Which page of search results to return.
89
- # @param per_page [Integer] The number of search results per page.
92
+ # @param per_page [Integer] The number of search results per page. (default: 10, maximum: 30)
90
93
  # @return [Array] A single page of +Unsplash::Photo+ search results.
91
94
  def all(page = 1, per_page = 10)
92
95
  params = {
@@ -98,7 +101,7 @@ module Unsplash # :nodoc:
98
101
 
99
102
  # Get a single page from the list of the curated photos (front-page’s photos).
100
103
  # @param page [Integer] Which page of search results to return.
101
- # @param per_page [Integer] The number of search results per page.
104
+ # @param per_page [Integer] The number of search results per page. (default: 10, maximum: 30)
102
105
  # @param order_by [String] How to sort the photos.
103
106
  # @return [Array] A single page of +Unsplash::Photo+ search results.
104
107
  def curated(page = 1, per_page = 10, order_by = "popular")
data/lib/unsplash/user.rb CHANGED
@@ -28,11 +28,13 @@ module Unsplash # nodoc:
28
28
  # Get a single page of user results for a query.
29
29
  # @param query [String] Keywords to search for.
30
30
  # @param page [Integer] Which page of search results to return.
31
+ # @param per_page [Integer] The number of users search result per page. (default: 10, maximum: 30)
31
32
  # @return [Array] a list of +Unsplash::User+ objects.
32
- def search(query, page = 1)
33
+ def search(query, page = 1, per_page = 10)
33
34
  params = {
34
35
  query: query,
35
- page: page
36
+ page: page,
37
+ per_page: per_page
36
38
  }
37
39
  Unsplash::Search.search("/search/users", self, params)
38
40
  end
@@ -57,7 +59,7 @@ module Unsplash # nodoc:
57
59
 
58
60
  # Get a list of photos liked by the user.
59
61
  # @param page [Integer] Which page of results to return.
60
- # @param per_page [Integer] The number of results per page.
62
+ # @param per_page [Integer] The number of results per page. (default: 10, maximum: 30)
61
63
  # @return [Array] a list of +Unsplash::Photo+ objects.
62
64
  def likes(page = 1, per_page = 10)
63
65
  params = {
@@ -73,7 +75,7 @@ module Unsplash # nodoc:
73
75
 
74
76
  # Get a list of collections created by the user.
75
77
  # @param page [Integer] Which page of results to return.
76
- # @param per_page [Integer] The number of results per page.
78
+ # @param per_page [Integer] The number of results per page. (default: 10, maximum: 30)
77
79
  # @return [Array] a list of +Unsplash::Collection+ objects.
78
80
  def collections(page = 1, per_page = 10)
79
81
  params = {
@@ -88,5 +90,4 @@ module Unsplash # nodoc:
88
90
  end
89
91
 
90
92
  end
91
-
92
93
  end
@@ -1,4 +1,4 @@
1
1
  module Unsplash # :nodoc:
2
2
  # :nodoc:
3
- VERSION = "1.4.1"
3
+ VERSION = "1.4.2"
4
4
  end
data/unsplash.gemspec CHANGED
@@ -20,14 +20,14 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.required_ruby_version = ">= 2.0.0"
22
22
 
23
- spec.add_dependency "httparty", "~> 0.13.5"
23
+ spec.add_dependency "httparty", "~> 0.14.0"
24
24
  spec.add_dependency "oauth2", "~> 1"
25
25
 
26
26
  # spec.add_development_dependency "bundler", "~> 1.10"
27
- spec.add_development_dependency "rake", "~> 10.0"
28
- spec.add_development_dependency "rspec", "~> 3.3.0"
29
- spec.add_development_dependency "vcr", "~> 2.9.3"
30
- spec.add_development_dependency "webmock", "~> 1.20.4"
27
+ spec.add_development_dependency "rake", "~> 12.0"
28
+ spec.add_development_dependency "rspec", "~> 3.5.0"
29
+ spec.add_development_dependency "vcr", "~> 3.0.0"
30
+ spec.add_development_dependency "webmock", "~> 2.3.0"
31
31
  spec.add_development_dependency "pry"
32
- spec.add_development_dependency "coveralls", '~> 0.8.12'
32
+ spec.add_development_dependency "coveralls", '~> 0.8.17'
33
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unsplash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Klaassen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-05 00:00:00.000000000 Z
11
+ date: 2017-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.13.5
19
+ version: 0.14.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.13.5
26
+ version: 0.14.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: oauth2
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,56 +44,56 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '12.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '12.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 3.3.0
61
+ version: 3.5.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 3.3.0
68
+ version: 3.5.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: vcr
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 2.9.3
75
+ version: 3.0.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 2.9.3
82
+ version: 3.0.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: webmock
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.20.4
89
+ version: 2.3.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.20.4
96
+ version: 2.3.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: pry
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.8.12
117
+ version: 0.8.17
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.8.12
124
+ version: 0.8.17
125
125
  description:
126
126
  email:
127
127
  - aaron@unsplash.com
@@ -129,6 +129,9 @@ executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
+ - ".github/ISSUE_TEMPLATE.md"
133
+ - ".github/PULL_REQUEST_TEMPLATE.md"
134
+ - ".github/labels.json"
132
135
  - ".gitignore"
133
136
  - ".rspec"
134
137
  - ".ruby-version"
@@ -175,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
178
  version: '0'
176
179
  requirements: []
177
180
  rubyforge_project:
178
- rubygems_version: 2.5.1
181
+ rubygems_version: 2.6.10
179
182
  signing_key:
180
183
  specification_version: 4
181
184
  summary: Ruby wrapper for the Unsplash API.