libgss 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 003ad5bfa2a5716b99d9f0d4198c07c3a3ff9e82
4
- data.tar.gz: 4709750e7b9547e8a0fd707866bf89bf8e2b4a8e
3
+ metadata.gz: d8069a9f71bc78010caa4d4670c9ce38b4b33032
4
+ data.tar.gz: 2be8025d2349b2f20dee5d8d31b17ff83af700bf
5
5
  SHA512:
6
- metadata.gz: 6d5b51d3a75db29e2e3f9f0e3ab86c7487f692d668b02678e5bbadaebaec7c7ea1814d4326975ce24ab9f393197b1ed8f6baa6db8c86895284dbb52cb7cda8ae
7
- data.tar.gz: b2db6f7782cd97f9979b0003c8cc17210de7a812cfe6780776275ccbf4bc110c441caa2d2a49e7a19ec6e75c8f627e745a8c8f9a7af69dc0cb853c67faaa7eb6
6
+ metadata.gz: e7e9bbfd44029bfc36c8a0a5c50573aad1789578f31e861a9a5eed8c8c43124ed5957729b3fd094d6833f545ac64eaaf67edde335b9b28dd2457475a652eef66
7
+ data.tar.gz: 6493c0728133a50ea7cffcb50b9a13675085192ec1fa0f866bdd802bef723f4e3bbdf34a6959fc062a6e1e9811471f4936f8b76b4e79709c34efc688f5ff0c7a
@@ -167,10 +167,18 @@ module Libgss
167
167
  AssetRequest.new(@httpclient, protected_asset_url(asset_path), req_headers)
168
168
  end
169
169
 
170
- # @param [String] path 対象となるapp_garden.ymlへのパス。デフォルトは "config/app_garden.yml"
170
+ # @param [String] path 対象となるapp_garden.ymlへのパス。デフォルトは "config/app_garden.yml" あるいは "config/app_garden.yml.erb"
171
171
  # @return 成功した場合自身のオブジェクトを返します。
172
- def load_app_garden(path = "config/app_garden.yml")
173
- hash = YAML.load_file_with_erb(path)
172
+ def load_app_garden(path = nil)
173
+ path ||= Dir.glob("config/app_garden.yml*").first
174
+ raise ArgumentError, "file not found config/app_garden.yml* at #{Dir.pwd}" unless path
175
+
176
+ # hash = YAML.load_file_with_erb(path, binding: binding) # tengine_supportが対応したらこんな感じで書きたい
177
+ erb = ERB.new(IO.read(path))
178
+ erb.filename = path
179
+ text = erb.result(binding) # Libgss::FontanaをFontanaとしてアクセスできるようにしたいので、このbindingの指定が必要です
180
+ hash = YAML.load(text)
181
+
174
182
  self.consumer_secret = hash["consumer_secret"]
175
183
  if platform = hash["platform"]
176
184
  name = (platform["name"] || "").strip
@@ -1,3 +1,3 @@
1
1
  module Libgss
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libgss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - akima
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-26 00:00:00.000000000 Z
11
+ date: 2013-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler