amaranth 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +3 -0
- data/lib/amaranth/version.rb +1 -1
- data/lib/amaranth/video.rb +8 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4026edf55c5d3e188e34e96c8a5d3f2c4c625e00
|
4
|
+
data.tar.gz: f54eb5a0962a0195a6b48a2563098a64522a7830
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04e238c65780485a47f737c01b14f7857350b16df4aa05f0d3c6b5ad38e1a946d92920c9a05111e034209c95bde9294ab136df8c5df2b3d86d1c1e7d2350b0f7
|
7
|
+
data.tar.gz: cbdb03e24d9a5aeefb0a5189244a36eab65b9fb2091c952a3aa2045b32f075e2d431dcbeddc0e8f47f969ed6c1d120ab968ddd62218a87c802af92cfb18e4975
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/lib/amaranth/version.rb
CHANGED
data/lib/amaranth/video.rb
CHANGED
@@ -66,11 +66,18 @@ module Amaranth
|
|
66
66
|
private
|
67
67
|
|
68
68
|
READONLY_ATTRIBUTES = %i(all_urls languages)
|
69
|
+
OMIT_IF_BLANK_ATTRIBUTES = %i(duration)
|
69
70
|
|
70
71
|
def save_existing
|
71
|
-
attributes = to_h
|
72
|
+
attributes = to_h
|
73
|
+
attributes.reject! { |key, value| READONLY_ATTRIBUTES.include?(key) }
|
74
|
+
attributes.reject! { |key, value| OMIT_IF_BLANK_ATTRIBUTES.include?(key) && blank?(value) }
|
72
75
|
Request.put("/api/videos/#{id}/", attributes)
|
73
76
|
end
|
77
|
+
|
78
|
+
def blank? value
|
79
|
+
value.to_s.strip == ""
|
80
|
+
end
|
74
81
|
end
|
75
82
|
end
|
76
83
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amaranth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|