towsta 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/towsta/kinds/gallery.rb +6 -0
- data/lib/towsta/kinds/image.rb +6 -0
- data/lib/towsta/kinds/multiple.rb +0 -0
- data/lib/towsta/kinds/video.rb +22 -0
- data/lib/towsta/version.rb +1 -1
- data/lib/towsta.rb +4 -3
- data/towsta.gemspec +1 -0
- metadata +19 -4
data/lib/towsta/kinds/gallery.rb
CHANGED
data/lib/towsta/kinds/image.rb
CHANGED
@@ -4,6 +4,7 @@ module Towsta
|
|
4
4
|
class ImageKind < MainKind
|
5
5
|
|
6
6
|
def set content
|
7
|
+
return @content = content if content.class == Bresson::ImageReference
|
7
8
|
begin
|
8
9
|
@content = Bresson::ImageReference.new JSON.parse(content[1..-2], :symbolize_names => true)
|
9
10
|
rescue
|
@@ -11,6 +12,11 @@ module Towsta
|
|
11
12
|
end
|
12
13
|
end
|
13
14
|
|
15
|
+
def export
|
16
|
+
return '' if @content.nil?
|
17
|
+
"(#{@content.to_s})"
|
18
|
+
end
|
19
|
+
|
14
20
|
end
|
15
21
|
|
16
22
|
end
|
File without changes
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Towsta
|
2
|
+
module Kinds
|
3
|
+
|
4
|
+
class VideoKind < MainKind
|
5
|
+
|
6
|
+
def set content
|
7
|
+
return @content = content if content.class == Cameraman::VideoReference
|
8
|
+
begin
|
9
|
+
@content = Cameraman::VideoReference.new JSON.parse(content, :symbolize_names => true)
|
10
|
+
rescue
|
11
|
+
@content = nil
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def compare object
|
16
|
+
@content.to_s == object.to_s
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
data/lib/towsta/version.rb
CHANGED
data/lib/towsta.rb
CHANGED
@@ -8,6 +8,7 @@ require 'time'
|
|
8
8
|
require 'date'
|
9
9
|
require 'time'
|
10
10
|
require 'bresson'
|
11
|
+
require 'cameraman'
|
11
12
|
require 'sinatra'
|
12
13
|
require 'compass'
|
13
14
|
|
@@ -32,6 +33,8 @@ require File.expand_path('../towsta/kinds/password', __FILE__)
|
|
32
33
|
require File.expand_path('../towsta/kinds/text', __FILE__)
|
33
34
|
require File.expand_path('../towsta/kinds/user', __FILE__)
|
34
35
|
require File.expand_path('../towsta/kinds/vertical', __FILE__)
|
36
|
+
require File.expand_path('../towsta/kinds/video', __FILE__)
|
37
|
+
require File.expand_path('../towsta/kinds/multiple', __FILE__)
|
35
38
|
|
36
39
|
Dir["./controllers/*.rb"].each {|file| require file}
|
37
40
|
|
@@ -47,9 +50,7 @@ def sync_with_towsta params=nil
|
|
47
50
|
else
|
48
51
|
Towsta::Synchronizer.new :secret => $towsta_secret, :path => $towsta_path, :params => params
|
49
52
|
end
|
50
|
-
|
51
|
-
Dir["./models/*.rb"].each {|file| load file }
|
52
|
-
rescue; end;
|
53
|
+
Dir["./models/*.rb"].each {|file| load file }
|
53
54
|
end
|
54
55
|
|
55
56
|
def clear_sync
|
data/towsta.gemspec
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 1.2.
|
8
|
+
- 3
|
9
|
+
version: 1.2.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Mortaro
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-11-
|
17
|
+
date: 2011-11-27 00:00:00 -02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
type: :runtime
|
97
97
|
version_requirements: *id006
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
99
|
+
name: cameraman
|
100
100
|
prerelease: false
|
101
101
|
requirement: &id007 !ruby/object:Gem::Requirement
|
102
102
|
none: false
|
@@ -108,6 +108,19 @@ dependencies:
|
|
108
108
|
version: "0"
|
109
109
|
type: :runtime
|
110
110
|
version_requirements: *id007
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: shotgun
|
113
|
+
prerelease: false
|
114
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
segments:
|
120
|
+
- 0
|
121
|
+
version: "0"
|
122
|
+
type: :runtime
|
123
|
+
version_requirements: *id008
|
111
124
|
description: Simply integrates the towsta api
|
112
125
|
email:
|
113
126
|
- mortaro@towsta.com
|
@@ -135,10 +148,12 @@ files:
|
|
135
148
|
- lib/towsta/kinds/list.rb
|
136
149
|
- lib/towsta/kinds/main.rb
|
137
150
|
- lib/towsta/kinds/money.rb
|
151
|
+
- lib/towsta/kinds/multiple.rb
|
138
152
|
- lib/towsta/kinds/password.rb
|
139
153
|
- lib/towsta/kinds/text.rb
|
140
154
|
- lib/towsta/kinds/user.rb
|
141
155
|
- lib/towsta/kinds/vertical.rb
|
156
|
+
- lib/towsta/kinds/video.rb
|
142
157
|
- lib/towsta/login.rb
|
143
158
|
- lib/towsta/memory.rb
|
144
159
|
- lib/towsta/sinatra_extension.rb
|