glean 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -33,9 +33,11 @@ gem 'glean'
33
33
 
34
34
  db/seeds.rb:
35
35
  ```ruby
36
- countries = Glean::Dataset.new('glean/countries')
37
- countries.each do |country|
38
- Country.create :name => country[:name], :code => country[:code]
36
+ if Country.count == 0
37
+ countries = Glean::Dataset.new('glean/countries')
38
+ countries.each do |country|
39
+ Country.create :name => country[:name], :code => country[:code]
40
+ end
39
41
  end
40
42
  ```
41
43
 
data/lib/glean/dataset.rb CHANGED
@@ -16,6 +16,7 @@ module Glean
16
16
  end
17
17
 
18
18
  def sync
19
+ Dir.mkdir(storage_path) unless File.exists?(storage_path)
19
20
  begin
20
21
  g = Git.open(path)
21
22
  g.pull
data/lib/glean/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Glean
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-18 00:00:00.000000000 Z
12
+ date: 2013-02-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake