appjam 0.1.8.pre12 → 0.1.8.pre13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61,8 +61,15 @@ module Appjam
61
61
  puts
62
62
  puts colorize("Gist Options")
63
63
  require 'yaml'
64
- g = YAML.load_file(File.expand_path(File.dirname(__FILE__) + '/gist.yml'))
65
-
64
+ begin
65
+ page_source = Net::HTTP.get(URI.parse("http://eiffelqiu.github.com/appjam/gist.yml"))
66
+ rescue SocketError => e
67
+ end
68
+ begin
69
+ g = YAML::load(page_source)
70
+ rescue ArgumentError => e
71
+ g = YAML.load_file(File.expand_path(File.dirname(__FILE__) + '/gist.yml'))
72
+ end
66
73
  g.each_pair {|key,value|
67
74
  gitopt = []
68
75
  puts
@@ -129,7 +129,18 @@ module Appjam
129
129
  self.destination_root = options[:root]
130
130
 
131
131
  require 'yaml'
132
- g = YAML.load_file(File.expand_path(File.dirname(__FILE__) + '/gist.yml'))
132
+ begin
133
+ page_source = Net::HTTP.get(URI.parse("http://eiffelqiu.github.com/appjam/gist.yml"))
134
+ rescue SocketError => e
135
+ puts "can not access github.com, back to local version gist.yml"
136
+ end
137
+ begin
138
+ puts "fetching new gists ..."
139
+ g = YAML::load(page_source)
140
+ rescue ArgumentError => e
141
+ puts "can't fetch new gists, loading local gists ..."
142
+ g = YAML.load_file(File.expand_path(File.dirname(__FILE__) + '/gist.yml'))
143
+ end
133
144
  g.each_pair {|key,value|
134
145
  gcategory = key.downcase
135
146
  g[key].each { |k|
@@ -46,7 +46,15 @@ module Appjam
46
46
  puts colorize("Available Options contains [#{@gist_name}]")
47
47
  puts
48
48
  require 'yaml'
49
- g = YAML.load_file(File.expand_path(File.dirname(__FILE__) + '/gist.yml'))
49
+ begin
50
+ page_source = Net::HTTP.get(URI.parse("http://eiffelqiu.github.com/appjam/gist.yml"))
51
+ rescue SocketError => e
52
+ end
53
+ begin
54
+ g = YAML::load(page_source)
55
+ rescue ArgumentError => e
56
+ g = YAML.load_file(File.expand_path(File.dirname(__FILE__) + '/gist.yml'))
57
+ end
50
58
  gitopt = []
51
59
  g.each_pair {|key,value|
52
60
  # puts colorize("Gist Category [#{key.gsub('_',' ')}]")
@@ -3,7 +3,7 @@ module Appjam
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
5
  PATCH = 8
6
- BUILD = 'pre12'
6
+ BUILD = 'pre13'
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.').chomp('.')
9
9
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appjam
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1923832033
4
+ hash: 1923832035
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
9
  - 8
10
10
  - pre
11
- - 12
12
- version: 0.1.8.pre12
11
+ - 13
12
+ version: 0.1.8.pre13
13
13
  platform: ruby
14
14
  authors:
15
15
  - Eiffel Q