alphred 1.1.0 → 1.1.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: 795eb675cd111730b33cab166f6e9787971eee70
4
- data.tar.gz: 688aa2fc538532b9e545fe51618a42e3af931da9
3
+ metadata.gz: fefc02f560672a6e1b7f981299f3133499e7a2b1
4
+ data.tar.gz: f5a39b3b8d5848f17ba9b8b0b85ae198e928612d
5
5
  SHA512:
6
- metadata.gz: b8f23d077d9e757647dcd9f159b3affaf4b44fe874d80244293f8aa62a440f56a0e399fc5a51531e02150700033058c13ef1005aaccf64e535f9a2c4fa8e2391
7
- data.tar.gz: 143b5a4a6ebf396baeeac8f4eed372236efbd2896b0e457740dbb32c8b278e5f0438ed0edac14d1d422a638f735e3aedf3447d52c2c57a66985ae6cf1d9cfd76
6
+ metadata.gz: db37176a6f25e8e49f734c1a99b1c79723fbdb1596e7ce9f663ae5137f68da7fc5b32a53d13d78213ef13b1c45fbb0222d2f0c5416b0efd0eb4dc7fd3b81b073
7
+ data.tar.gz: 1f5d9d4eb783c4605209882c5c1159d2cefb6b83c0012f28e55c760bd761222569aa67f21eb0967b6ab7c0e5ec963c3552daf70d12c7c1244081a342c385582e
@@ -1,12 +1,14 @@
1
1
  ## Unreleased
2
2
 
3
- ## [1.1.0] - 2015-11-01
3
+ ## [1.1.1] - 2015-11-05
4
+ ### Changed
5
+ - Don't crash when the config file doesn't exist.
4
6
 
7
+ ## [1.1.0] - 2015-11-01
5
8
  ### Added
6
9
  - `Config` class for handling persistent configuration across workflow updates.
7
10
  - CHANGELOG
8
11
 
9
12
  ## [1.0.0] - 2015-10-31
10
-
11
13
  ### Added
12
14
  - Library for making Alfred workflows.
data/README.md CHANGED
@@ -124,6 +124,7 @@ dependencies.
124
124
  ## TODO
125
125
 
126
126
  - Add development mode for easier debugging. (Nicer errors, etc.)
127
+ - Rake task for installing to Alfred
127
128
 
128
129
  ## Development
129
130
 
@@ -2,8 +2,6 @@ require "json"
2
2
 
3
3
  module Alphred
4
4
  class Config
5
- PATH = File.join(ENV["alfred_workflow_data"], 'config.json')
6
-
7
5
  def self.load(**defaults)
8
6
  config = self.new(**defaults)
9
7
  config.load!
@@ -17,12 +15,13 @@ module Alphred
17
15
  end
18
16
 
19
17
  def load!
20
- self.data.merge!(JSON.load(File.open(PATH)))
18
+ return unless File.exist?(self.path)
19
+ self.data.merge!(JSON.load(File.open(self.path)))
21
20
  end
22
21
 
23
22
  def update!(json)
24
23
  data = self.data.merge(JSON.load(json))
25
- File.write(PATH, JSON.dump(data), mode: ?w)
24
+ File.write(self.path, JSON.dump(data), mode: ?w)
26
25
  end
27
26
 
28
27
  def [](key)
@@ -48,5 +47,9 @@ module Alphred
48
47
 
49
48
  Items.new(*items).to_xml
50
49
  end
50
+
51
+ def path
52
+ File.join(ENV["alfred_workflow_data"], 'config.json')
53
+ end
51
54
  end
52
55
  end
@@ -1,3 +1,3 @@
1
1
  module Alphred
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alphred
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alpha Chen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-01 00:00:00.000000000 Z
11
+ date: 2015-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder