animoto 0.0.0.alpha5 → 0.0.0.alpha6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/animoto/client.rb +15 -18
- data/lib/animoto.rb +1 -1
- metadata +3 -3
data/lib/animoto/client.rb
CHANGED
|
@@ -161,25 +161,22 @@ module Animoto
|
|
|
161
161
|
#
|
|
162
162
|
# @raise [ArgumentError] if none of the files are found
|
|
163
163
|
def configure_from_rc_file
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
@endpoint ||= config['endpoint']
|
|
179
|
-
throw :done if @key && @secret
|
|
180
|
-
end
|
|
181
|
-
raise ArgumentError, "You must supply your key and secret"
|
|
164
|
+
current_path = Dir.pwd + '/.animotorc'
|
|
165
|
+
home_path = File.expand_path('~/.animotorc')
|
|
166
|
+
config = if File.exist?(current_path)
|
|
167
|
+
YAML.load(File.read(current_path))
|
|
168
|
+
elsif File.exist?(home_path)
|
|
169
|
+
home_path = File.expand_path '~/.animotorc'
|
|
170
|
+
YAML.load(File.read(home_path))
|
|
171
|
+
elsif File.exist?('/etc/.animotorc')
|
|
172
|
+
YAML.load(File.read('/etc/.animotorc'))
|
|
173
|
+
end
|
|
174
|
+
if config
|
|
175
|
+
@key ||= config['key']
|
|
176
|
+
@secret ||= config['secret']
|
|
177
|
+
@endpoint ||= config['endpoint']
|
|
182
178
|
end
|
|
179
|
+
@key && @secret ? return : raise(ArgumentError, "You must supply your key and secret")
|
|
183
180
|
end
|
|
184
181
|
|
|
185
182
|
# Builds a request to find a resource.
|
data/lib/animoto.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: animoto
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash: -
|
|
4
|
+
hash: -1710980404
|
|
5
5
|
prerelease: true
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
9
|
- 0
|
|
10
|
-
-
|
|
11
|
-
version: 0.0.0.
|
|
10
|
+
- alpha6
|
|
11
|
+
version: 0.0.0.alpha6
|
|
12
12
|
platform: ruby
|
|
13
13
|
authors:
|
|
14
14
|
- Animoto
|