snapcat 0.0.3 → 0.0.4

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: 210ff4b78bf0a20179d05f40946180261f0b4f6c
4
- data.tar.gz: b102a50953b9ceec9b7aba1c8a1ea57e47762ce0
3
+ metadata.gz: a1458ee24fb19bd6a13181c418acd1a98b428d9f
4
+ data.tar.gz: 87f76a449bcb15ceac064f9d988be98240fb23e2
5
5
  SHA512:
6
- metadata.gz: b80f2ae4bc3023b231129a5fc5b0fb4f70554e3b55d2c3fc0fc3ad79226da3bda425fb9a4447a2c84110ae317604f7b1ded722ecbed00dc6e35045a15277d987
7
- data.tar.gz: f7c7899e72168bac1898b32348e2ddadafa743df7f8f83502872c4108039389e9cfea7631addca2df8cc1b55924ce4f0d860fe575e8b789dcd8415c9fb30d572
6
+ metadata.gz: 117c5507b0efc95a7d1823ca48106f592cc8c990633da11da8f61cc2460511fcde30c0711b61b6aef5b22fc83051f18f5f6f171803386c424a4da6476a84f5c5
7
+ data.tar.gz: 9812ee8724a913615469e99bfe18e1daa86472951c66352b5db56f0118ece99f7b53a988512198d2be22be55d1a9c2851e695fc2b48cfcf82593da3b3559315b
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  Snapcat
2
2
  =======
3
- [![Build Status](https://travis-ci.org/NealKemp/snapcat.png)](https://travis-ci.org/NealKemp/snapcat)
3
+ [![Build Status](https://travis-ci.org/nneal/snapcat.png)](https://travis-ci.org/nneal/snapcat)
4
4
 
5
5
 
6
6
  A cat-tastic Ruby wrapper for the [Snapchat](http://snapchat.com) private API.
data/lib/snapcat/media.rb CHANGED
@@ -5,16 +5,12 @@ module Snapcat
5
5
  @type = Type.new(code: type_code, data: @data)
6
6
  end
7
7
 
8
- def image?
9
- @type.image?
8
+ def file_extension
9
+ @type.file_extension
10
10
  end
11
11
 
12
- def file_extension
13
- if image?
14
- 'jpg'
15
- elsif video?
16
- 'mp4'
17
- end
12
+ def image?
13
+ @type.image?
18
14
  end
19
15
 
20
16
  def generate_id(username)
@@ -48,6 +44,14 @@ module Snapcat
48
44
  @code = code_from(options[:code], options[:data])
49
45
  end
50
46
 
47
+ def file_extension
48
+ if image?
49
+ 'jpg'
50
+ elsif video?
51
+ 'mp4'
52
+ end
53
+ end
54
+
51
55
  def image?
52
56
  [IMAGE, FRIEND_REQUEST_IMAGE].include? @code
53
57
  end
data/snapcat.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'snapcat'
7
- spec.version = '0.0.3'
7
+ spec.version = '0.0.4'
8
8
  spec.authors = ['Neal Kemp']
9
9
  spec.email = ['']
10
10
  spec.description = %q{Snapchat API wrapper}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snapcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neal Kemp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-28 00:00:00.000000000 Z
11
+ date: 2013-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httmultiparty