ungulate 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/ungulate/file_upload.rb +1 -1
- data/spec/ungulate/file_upload_spec.rb +10 -2
- data/ungulate.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.15
|
data/lib/ungulate/file_upload.rb
CHANGED
@@ -43,7 +43,7 @@ class Ungulate::FileUpload
|
|
43
43
|
|
44
44
|
def policy=(policy)
|
45
45
|
@policy_ruby = policy
|
46
|
-
@policy_ruby['expiration'].utc
|
46
|
+
@policy_ruby['expiration'] = @policy_ruby['expiration'].utc
|
47
47
|
policy_json = ActiveSupport::JSON.encode(@policy_ruby)
|
48
48
|
@policy = Base64.encode64(policy_json).gsub("\n", '')
|
49
49
|
end
|
@@ -58,7 +58,7 @@ module Ungulate
|
|
58
58
|
and_return([ ['colour', 'blue'], ['predicate', 'subject', 'object'] ])
|
59
59
|
end
|
60
60
|
|
61
|
-
it "should return
|
61
|
+
it "should return value of index 1 in a two-item array" do
|
62
62
|
subject.condition('colour').should == 'blue'
|
63
63
|
end
|
64
64
|
|
@@ -115,7 +115,15 @@ module Ungulate
|
|
115
115
|
end
|
116
116
|
|
117
117
|
it "should ensure the expiration is utc" do
|
118
|
-
|
118
|
+
utc_time = Time.now.utc
|
119
|
+
|
120
|
+
@expiration.stub(:utc).and_return(utc_time)
|
121
|
+
Base64.stub(:encode64).and_return('')
|
122
|
+
|
123
|
+
ActiveSupport::JSON.should_receive(:encode).
|
124
|
+
with(hash_including('expiration' => utc_time)).
|
125
|
+
any_number_of_times
|
126
|
+
|
119
127
|
subject.policy = @policy
|
120
128
|
end
|
121
129
|
end
|
data/ungulate.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ungulate}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.15"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andrew Bruce"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-12-05}
|
13
13
|
s.default_executable = %q{ungulate_server.rb}
|
14
14
|
s.description = %q{WIP}
|
15
15
|
s.email = %q{andrew@camelpunch.com}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ungulate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 15
|
10
|
+
version: 0.0.15
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrew Bruce
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-12-05 00:00:00 +00:00
|
19
19
|
default_executable: ungulate_server.rb
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|