gemmyrb 0.1.1 → 0.1.2

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: 1b30fe2939e2251a99af369b5ddd6c8b0ac67a17
4
- data.tar.gz: a8bd3b128d659c5cc1db588106ec302f357ddd0a
3
+ metadata.gz: d2e8b98d32d322e6d51bed3e6d7fe795e61eb2ea
4
+ data.tar.gz: 4cbcb9bc58eb5353d1d92eb2f0e24bbe91a316b4
5
5
  SHA512:
6
- metadata.gz: 586500544147c163596317533ec51a26a1be5c537ae71084acc2c39d7ba4fa52f1bc32855bf7d470c9993213028bba42e093ba0475d1258cfb70e750e244744b
7
- data.tar.gz: 02c9d99ba878a1e7f15892daea36ec72fb2dd53d067e6f0df5fbb9bd2a3f7e13b69e00301e46e0e55133bad71281fb79a57ace33e88db60725cc60c9781ecc5f
6
+ metadata.gz: acfad1fbbea670260ff7facce87015063e43ed46eb5a17dd5bc794e03c624d4d93b8a262c201fb9e8c6d773e730294181d4b5b70e9462d19732f05b3257863b0
7
+ data.tar.gz: 78d7cbd03c70f10e9afdb10c174010e840935260e87b18cd792728cb0af5c82a0808a557afefd0c7a3629dd06fe897f57900cb63ea2d4380e7d1ef1d2342c16f
@@ -5,14 +5,17 @@ class Gemmy::Components::Cache < Hash
5
5
  using Gemmy.patch("object/i/home")
6
6
  using Gemmy.patch("object/i/m")
7
7
 
8
- CachePath = ENV["GEMMY_CACHE_PATH"] || "#{home}/gemmy/caches"
9
-
10
- unless Dir.exists?(CachePath)
11
- `mkdir -p #{CachePath}`
8
+ def self.setup_cache_folder
9
+ cache_path = ENV["GEMMY_CACHE_PATH"] || "#{home}/gemmy/caches"
10
+ unless Dir.exists?(cache_path)
11
+ `mkdir -p #{cache_path}`
12
+ end
13
+ cache_path
12
14
  end
13
15
 
14
16
  def initialize(db_name, hash={})
15
- @db = hash.persisted "#{CachePath}/#{db_name}.yaml"
17
+ cache_path = self.class.setup_cache_folder
18
+ @db = hash.persisted "#{cache_path}/#{db_name}.yaml"
16
19
  @db.set_state hash
17
20
  end
18
21
 
@@ -1,3 +1,3 @@
1
1
  class Gemmy
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemmyrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - max pleaner