lapse 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/lapse/cli.rb CHANGED
@@ -65,13 +65,18 @@ module Lapse
65
65
  def photobooth(title, frame_count = 10)
66
66
  clip = authenticated_client.create_clip
67
67
 
68
- unless options[:url]
68
+ if !options[:url] && !system('which imagesnap')
69
69
  puts "Install imagesnap via \`brew install imagesnap\` to use your local camera."
70
70
  return
71
71
  end
72
72
 
73
73
  frames = frame_count.to_i.times.map do |i|
74
- file = get_frame(options[:url])
74
+ if options[:url]
75
+ file = get_frame(options[:url])
76
+ else
77
+ file = Tempfile.new(['photobooth', '.jpg'], encoding: 'BINARY')
78
+ system "imagesnap #{file.path}"
79
+ end
75
80
  upload_frame clip.id, file.path
76
81
  end
77
82
 
@@ -0,0 +1,13 @@
1
+ module Lapse
2
+ class Client
3
+ module GlobalTimelines
4
+ def global_timeline(params = {})
5
+ get("timelines/global", params).body
6
+ end
7
+
8
+ def featured_timeline(params = {})
9
+ get("timelines/featured", params).body
10
+ end
11
+ end
12
+ end
13
+ end
data/lib/lapse/client.rb CHANGED
@@ -9,6 +9,7 @@ module Lapse
9
9
  include Clips
10
10
  include Configuration
11
11
  include Frames
12
+ include GlobalTimelines
12
13
  include Users
13
14
  include UserTimelines
14
15
 
data/lib/lapse/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Lapse
2
2
  # Verion of the Lapse gem
3
- VERSION = '0.0.3'
3
+ VERSION = '0.0.4'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lapse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-06-09 00:00:00.000000000 Z
14
+ date: 2013-06-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: multi_json
@@ -70,6 +70,7 @@ files:
70
70
  - lib/lapse/client/clips.rb
71
71
  - lib/lapse/client/configuration.rb
72
72
  - lib/lapse/client/frames.rb
73
+ - lib/lapse/client/global_timelines.rb
73
74
  - lib/lapse/client/likes.rb
74
75
  - lib/lapse/client/user_timelines.rb
75
76
  - lib/lapse/client/users.rb
@@ -107,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
108
  version: '0'
108
109
  segments:
109
110
  - 0
110
- hash: -4262868761146380689
111
+ hash: -3125559125321929734
111
112
  requirements: []
112
113
  rubyforge_project:
113
114
  rubygems_version: 1.8.23