addons 0.0.8 → 0.0.9

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: 4192c1fc6d80b2e8a42151b0937c768b965a7f54
4
- data.tar.gz: 91b1ec60a2cfeb1b4c412ee149a1a1804124148e
3
+ metadata.gz: 34d47952c09b18520a6a613dd4f73f73548f924d
4
+ data.tar.gz: 91f7fd89e92b1eb2c77e70106cc4911dbf944af2
5
5
  SHA512:
6
- metadata.gz: 65a2e254b7d20bffd71cd48df5e43d4f257e7fb03b3791c84eec995998a4127bdf423e9e95eefc4597258c3c64726cf1d256109e9241f2b94369e7b65c0f08cd
7
- data.tar.gz: 8377d0746a1f4cb34701222c7b5be4b4dfcb2a12c02d6b9a7b7183b958691983792fb255653b3f5dc708348aecfe72b344809987a4bd4702034e1761b3bb43ae
6
+ metadata.gz: 9130ec44b10b49d157ef9137ebd3bb62a3eb20b7a07d8938c802e7cc3d5d7d8ef246152a2f33ac3ff1ac30cebbcdcc38e9d0c0d1e16f4278c1c568779a667fda
7
+ data.tar.gz: bb1412197ba4e31355364b844fb351367c4176561fef8523db7b24f467148ead25e62ecdcaae36acbdce98458a4c1872b42938c80ab6881c117f76def7cafa05
data/README.md CHANGED
@@ -27,3 +27,6 @@ TODO: Write usage instructions here
27
27
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
28
  4. Push to the branch (`git push origin my-new-feature`)
29
29
  5. Create new Pull Request
30
+
31
+
32
+ <a href="https://github.com/addonlist/addons-gem-test" target="_blank">Test App repo</a>
data/lib/addons/config.rb CHANGED
@@ -12,14 +12,16 @@ module Addons
12
12
  if ENV['ADDONS_APP_ID'].nil? or ENV['ADDONS_APP_ID'] == ""
13
13
  filename = Rails.root.join('config', 'application.yml')
14
14
 
15
- File.open(filename, 'r') do |file|
16
- # NOTE: read the ADDONS_APP_ID and ADDONS_APP_TOKEN from application.yml and set ENV vars.
15
+ if File.exists?(filename)
16
+ File.open(filename, 'r') do |file|
17
+ # NOTE: read the ADDONS_APP_ID and ADDONS_APP_TOKEN from application.yml and set ENV vars.
17
18
 
18
- file.each_line do |line|
19
- matches = line.match(/(.*): (.*)/)
19
+ file.each_line do |line|
20
+ matches = line.match(/(.*): (.*)/)
20
21
 
21
- env_var, value = matches[1], matches[2]
22
- ENV[env_var] = value
22
+ env_var, value = matches[1], matches[2]
23
+ ENV[env_var] = value
24
+ end
23
25
  end
24
26
  end
25
27
  end
@@ -27,8 +29,10 @@ module Addons
27
29
  puts "checking ENV['ADDONS_APP_ID'] and ENV['ADDONS_APP_TOKEN']"
28
30
 
29
31
  if ENV['ADDONS_APP_ID'] == nil
32
+ puts "Error: ENV['ADDONS_APP_ID'] must be defined"
30
33
  return false, "Error: ENV['ADDONS_APP_ID'] must be defined"
31
34
  elsif ENV['ADDONS_APP_TOKEN'] == nil
35
+ puts "Error: ENV['ADDONS_APP_TOKEN'] must be defined"
32
36
  return false, "Error: ENV['ADDONS_APP_TOKEN'] must be defined"
33
37
  end
34
38
 
@@ -1,3 +1,3 @@
1
1
  module Addons
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: addons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Addonlist
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-07 00:00:00.000000000 Z
11
+ date: 2014-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json