fulcrum 0.5.0 → 0.6.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
  SHA1:
3
- metadata.gz: 8781944fbaa6083aed3dc664491ea0b4d64aa81a
4
- data.tar.gz: 7db587061a1f99f651c0702c9bb7fcad8f2569c8
3
+ metadata.gz: 012bd7a188f178c192ef09ad627d37a76a74dd90
4
+ data.tar.gz: 49a0e0c265d0bc1f76d4cab6736379da0d6e80b0
5
5
  SHA512:
6
- metadata.gz: c301bc6dc485899042c3a5d907a50d294ea0c4d35f79c14c04c6b146e8b09907cbba1dde06fb0499988c10cb017a12e3478194a081506f81c7643684f648667c
7
- data.tar.gz: 7e165b566ed6c682f5e65d35573e9b732db681e3b657342d17ca6c3291dd671154260ada9c9226d97d5fe70e3edc03c8cca3d20aec10b6e8bbaff114c4c3b37a
6
+ metadata.gz: 24507fddcf0a09585d15cd4e17cc48e9c63383ec75a81ac6d7ae16bdadfd17e0f0ae91bd37d74c2f83534a6847d64360698ba28b65290c52beb5ee913848833f
7
+ data.tar.gz: cb1d249febffb45f30bd11527daae7c601f2d772d067cdffd92073635abbb090f8487f61d6e727153f875c9e4045522679cfdb8d8be50d71bbcb71800abf8a46
@@ -1,3 +1,7 @@
1
+ ## v0.6.0
2
+ * Add format option for fetching media tracks (default: json) (#10)
3
+ * Lower ActiveSupport dependency to 4.1.x (#12)
4
+
1
5
  ## v0.5.0
2
6
  * Add audio support (#5)
3
7
  * Fix broken specs and deprecations (#2)
data/README.md CHANGED
@@ -230,10 +230,12 @@ Downloads the small version and yields an IO object to the block.
230
230
 
231
231
  Downloads the medium version and yields an IO object to the block.
232
232
 
233
- ### client.videos.track(id)
233
+ ### client.videos.track(id, format='json')
234
234
 
235
235
  Fetches the GPS track for the specified video.
236
236
 
237
+ Format can be 'json', 'geojson', 'gpx', or 'kml'.
238
+
237
239
 
238
240
 
239
241
  ## Audio
@@ -261,10 +263,12 @@ Downloads the small version and yields an IO object to the block.
261
263
 
262
264
  Downloads the medium version and yields an IO object to the block.
263
265
 
264
- ### client.audio.track(id)
266
+ ### client.audio.track(id, format='json')
265
267
 
266
268
  Fetches the GPS track for the specified audio.
267
269
 
270
+ Format can be 'json', 'geojson', 'gpx', or 'kml'.
271
+
268
272
 
269
273
 
270
274
  ## Memberships
@@ -312,3 +316,4 @@ Fetches the GPS track for the specified audio.
312
316
  3. Commit your changes (`git commit -am 'Added some feature'`)
313
317
  4. Push to the branch (`git push origin my-new-feature`)
314
318
  5. Create new Pull Request
319
+
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
20
20
  gem.add_development_dependency 'rspec', '~> 3.2', '>= 3.2.0'
21
21
  gem.add_development_dependency 'webmock', '~> 1.12', '>= 1.12.0'
22
22
 
23
- gem.add_dependency 'activesupport', '~> 4.2', '>= 4.2.1'
23
+ gem.add_dependency 'activesupport', '~> 4.1', '>= 4.1.0'
24
24
  gem.add_dependency 'faraday', '~> 0.9', '>= 0.9.1'
25
25
  gem.add_dependency 'faraday_middleware', '~> 0.9', '>= 0.9.1'
26
26
  end
@@ -13,6 +13,8 @@ require 'fulcrum/classification_set'
13
13
  require 'fulcrum/form'
14
14
  require 'fulcrum/membership'
15
15
  require 'fulcrum/photo'
16
+ require 'fulcrum/actions/media_versions'
17
+ require 'fulcrum/actions/gps_track'
16
18
  require 'fulcrum/video'
17
19
  require 'fulcrum/audio'
18
20
  require 'fulcrum/signature'
@@ -21,4 +23,5 @@ require 'fulcrum/record'
21
23
  require 'fulcrum/layer'
22
24
  require 'fulcrum/changeset'
23
25
  require 'fulcrum/webhook'
24
- require 'fulcrum/client'
26
+ require 'fulcrum/client'
27
+
@@ -0,0 +1,9 @@
1
+ module Fulcrum
2
+ module GpsTrack
3
+ extend ActiveSupport::Concern
4
+
5
+ def track(id, format='json')
6
+ call(:get, member_action(id, 'track', format))
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ module Fulcrum
2
+ module MediaVersions
3
+ extend ActiveSupport::Concern
4
+
5
+ def small(id, &blk)
6
+ download_version(id, 'small', &blk)
7
+ end
8
+
9
+ def medium(id, &blk)
10
+ download_version(id, 'medium', &blk)
11
+ end
12
+ end
13
+ end
@@ -1,5 +1,8 @@
1
1
  module Fulcrum
2
2
  class Audio < MediaResource
3
+ include MediaVersions
4
+ include GpsTrack
5
+
3
6
  def resources_name
4
7
  resource_name
5
8
  end
@@ -11,17 +14,5 @@ module Fulcrum
11
14
  def create_action
12
15
  'audio/upload'
13
16
  end
14
-
15
- def small(id, &blk)
16
- download_version(id, 'small', &blk)
17
- end
18
-
19
- def medium(id, &blk)
20
- download_version(id, 'medium', &blk)
21
- end
22
-
23
- def track(id)
24
- call(:get, member_action(id, 'track'))
25
- end
26
17
  end
27
18
  end
@@ -1,3 +1,3 @@
1
1
  module Fulcrum
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
@@ -1,5 +1,8 @@
1
1
  module Fulcrum
2
2
  class Video < MediaResource
3
+ include MediaVersions
4
+ include GpsTrack
5
+
3
6
  def default_content_type
4
7
  'video/mp4'
5
8
  end
@@ -7,17 +10,5 @@ module Fulcrum
7
10
  def create_action
8
11
  'videos/upload'
9
12
  end
10
-
11
- def small(id, &blk)
12
- download_version(id, 'small', &blk)
13
- end
14
-
15
- def medium(id, &blk)
16
- download_version(id, 'medium', &blk)
17
- end
18
-
19
- def track(id)
20
- call(:get, member_action(id, 'track'))
21
- end
22
13
  end
23
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fulcrum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fulcrum
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-09 00:00:00.000000000 Z
11
+ date: 2015-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -76,20 +76,20 @@ dependencies:
76
76
  requirements:
77
77
  - - "~>"
78
78
  - !ruby/object:Gem::Version
79
- version: '4.2'
79
+ version: '4.1'
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 4.2.1
82
+ version: 4.1.0
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '4.2'
89
+ version: '4.1'
90
90
  - - ">="
91
91
  - !ruby/object:Gem::Version
92
- version: 4.2.1
92
+ version: 4.1.0
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: faraday
95
95
  requirement: !ruby/object:Gem::Requirement
@@ -149,7 +149,9 @@ files:
149
149
  - lib/fulcrum/actions/create.rb
150
150
  - lib/fulcrum/actions/delete.rb
151
151
  - lib/fulcrum/actions/find.rb
152
+ - lib/fulcrum/actions/gps_track.rb
152
153
  - lib/fulcrum/actions/list.rb
154
+ - lib/fulcrum/actions/media_versions.rb
153
155
  - lib/fulcrum/actions/update.rb
154
156
  - lib/fulcrum/audio.rb
155
157
  - lib/fulcrum/changeset.rb
@@ -209,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
211
  version: '0'
210
212
  requirements: []
211
213
  rubyforge_project:
212
- rubygems_version: 2.4.5
214
+ rubygems_version: 2.4.5.1
213
215
  signing_key:
214
216
  specification_version: 4
215
217
  summary: Fulcrum API client for ruby
@@ -234,4 +236,3 @@ test_files:
234
236
  - spec/lib/webhook_spec.rb
235
237
  - spec/resource_examples.rb
236
238
  - spec/spec_helper.rb
237
- has_rdoc: