ryw-facebooker2 0.0.5.x2 → 0.0.5.x3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/facebooker2.rb +4 -4
- metadata +3 -3
data/lib/facebooker2.rb
CHANGED
@@ -29,7 +29,7 @@ module Facebooker2
|
|
29
29
|
|
30
30
|
# when configuration is missing, raise exception
|
31
31
|
def self.raise_unconfigured_exception
|
32
|
-
raise NotConfigured.new("No configuration provided for Facebooker2. Either set the app_id and secret or call Facebooker2.
|
32
|
+
raise NotConfigured.new("No configuration provided for Facebooker2. Either set the app_id and secret or call Facebooker2.load_facebook_yaml in an initializer")
|
33
33
|
end
|
34
34
|
|
35
35
|
# load configuration from hash
|
@@ -40,9 +40,9 @@ module Facebooker2
|
|
40
40
|
end
|
41
41
|
|
42
42
|
# read configuration from yaml config file
|
43
|
-
def self.
|
44
|
-
config = YAML.load(ERB.new(File.read(File.join(::Rails.root,"config","
|
45
|
-
raise NotConfigured.new("Unable to load configuration for #{::Rails.env} from
|
43
|
+
def self.load_facebook_yaml
|
44
|
+
config = YAML.load(ERB.new(File.read(File.join(::Rails.root,"config","facebook.yml"))).result)[::Rails.env]
|
45
|
+
raise NotConfigured.new("Unable to load configuration for #{::Rails.env} from facebook.yml. Is it set up?") if config.nil?
|
46
46
|
self.configuration = config.with_indifferent_access
|
47
47
|
end
|
48
48
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ryw-facebooker2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 8118002
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
9
|
- 5
|
10
|
-
-
|
11
|
-
version: 0.0.5.
|
10
|
+
- x3
|
11
|
+
version: 0.0.5.x3
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Ryan Walker
|