megam_gogs 0.4.0 → 0.5.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc7c80afb3a20c6887af0e14dc1d9dd3e90fd974
4
- data.tar.gz: bbfe67069bc92a64c631b7ddc326efc366c0d50a
3
+ metadata.gz: 4d14d7527a1de778ad8e71677beb43badb845f61
4
+ data.tar.gz: f9e3f1a228c970276f82b4b749a8b4d479bba9a9
5
5
  SHA512:
6
- metadata.gz: 001671c7ed32fd98238b7a2eafc7bd2c9cfdd1dba195448f6c20cdfda4e41491541351a9bf258fc3d7ce17f0dc2b5eccb88fa5554bc235e7b40506924c9e2f7f
7
- data.tar.gz: 31670851b5c7f700bb5d09d67043c13462d50831416155eaaf60e08623684e80f31ab474f6e6ee2c36cc55fbbbb4084007477ad08abdf5a28612463ebcc33b6c
6
+ metadata.gz: f84a7d833310b51f83517e5ed3b3967a542205cfc110f031d90fd3d82f8d6b49be3ac7cd33fdd46f43fa7cc6d576221ab6cd61fe724b1b6bb067fa58a9b30be6
7
+ data.tar.gz: 57db87ee964c6c2fe411e3612acf265bd9038eed89ea2e08e2bcb5a15ded3e5329815b0e8d6737737ad6c4e03354a8220238c84517a9f1ed2683cf4de3e735d3
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>megam_gogs.rb</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ </buildSpec>
9
+ <natures>
10
+ <nature>com.aptana.projects.webnature</nature>
11
+ </natures>
12
+ </projectDescription>
data/Gemfile CHANGED
File without changes
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
@@ -5,6 +5,7 @@ require 'openssl'
5
5
  require 'net/http'
6
6
  require 'excon'
7
7
  require 'base64'
8
+ require 'yaml'
8
9
 
9
10
  __LIB_DIR__ = File.expand_path(File.join(File.dirname(__FILE__), ".."))
10
11
  unless $LOAD_PATH.include?(__LIB_DIR__)
@@ -27,7 +28,6 @@ module Megam
27
28
  class Gogs
28
29
 
29
30
  AUTH_PREFIX = 'Authorization'
30
-
31
31
  HEADERS = {
32
32
  'Accept' => 'application/json',
33
33
  'Accept-Encoding' => 'gzip',
@@ -36,11 +36,22 @@ module Megam
36
36
  'X-Ruby-Platform' => RUBY_PLATFORM
37
37
 
38
38
  }
39
+
40
+ if File.exist?("#{ENV['MEGAM_HOME']}/nilavu.yml")
41
+ common = YAML.load_file("#{ENV['MEGAM_HOME']}/nilavu.yml") #COMMON YML
42
+ puts "=> Loaded #{ENV['MEGAM_HOME']}/nilavu.yml"
43
+ else
44
+ puts "=> Warning ! MEGAM_HOME environment variable not set."
45
+ common={"api" => {}, "storage" => {}, "varai" => {}, "auth" => {}, "monitor" => {}, "gog" => {}}
46
+ end
47
+
48
+ gogs_host = "#{common['gogs']['host']}" || ENV['GOGS_HOST']
49
+ gogs_port = "#{common['gogs']['port']}" || ENV['GOGS_PORT']
39
50
 
40
51
  OPTIONS = {
41
52
  :headers => {},
42
- :host => 'localhost',
43
- :port => '6001',
53
+ :host => gogs_host,
54
+ :port => gogs_port,
44
55
  :nonblock => false,
45
56
  :scheme => 'http'
46
57
  }
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class Gogs
3
- VERSION = "0.4.0"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
File without changes
data/test.rb CHANGED
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: megam_gogs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raj Thilak,Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-22 00:00:00.000000000 Z
11
+ date: 2015-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
@@ -77,6 +77,7 @@ extensions: []
77
77
  extra_rdoc_files: []
78
78
  files:
79
79
  - ".gitignore"
80
+ - ".project"
80
81
  - Gemfile
81
82
  - LICENSE
82
83
  - README.md
@@ -117,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
118
  version: '0'
118
119
  requirements: []
119
120
  rubyforge_project:
120
- rubygems_version: 2.4.5
121
+ rubygems_version: 2.4.6
121
122
  signing_key:
122
123
  specification_version: 4
123
124
  summary: Ruby Client for the Gogs (gogs.io)