couchbase-settings 0.1.4 → 0.3.4
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.
@@ -1,15 +1,17 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
lib = File.expand_path('
|
2
|
+
lib = File.expand_path('./lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
4
5
|
require 'couchbase_settings/version'
|
5
6
|
|
7
|
+
|
6
8
|
Gem::Specification.new do |gem|
|
7
9
|
gem.name = "couchbase-settings"
|
8
|
-
gem.version =
|
10
|
+
gem.version = "0.3.4"
|
9
11
|
gem.authors = ["Jasdeep Jaitla"]
|
10
12
|
gem.email = ["jasdeep@scalabl3.com"]
|
11
13
|
gem.description = %q{A Simple Couchbase Settings gem to read RAILS_ROOT/config/couchbase.yml file}
|
12
|
-
gem.summary = %q{A Simple Couchbase Settings gem to read RAILS_ROOT/config/couchbase.yml file}
|
14
|
+
gem.summary = %q{A Simple Couchbase Settings gem to read RAILS_ROOT/config/couchbase.yml file, used with gem couchbase-docstore and couchbase-structures}
|
13
15
|
gem.homepage = "https://github.com/scalabl3/couchbase-settings"
|
14
16
|
|
15
17
|
gem.extra_rdoc_files = [
|
@@ -20,13 +22,12 @@ Gem::Specification.new do |gem|
|
|
20
22
|
"LICENSE.txt",
|
21
23
|
"README.md",
|
22
24
|
"Rakefile",
|
23
|
-
"
|
24
|
-
"lib/couchbase_settings.rb",
|
25
|
+
"lib/couchbase-settings.rb",
|
26
|
+
"lib/couchbase_settings/version.rb",
|
25
27
|
"lib/couchbase_settings/railtie.rb",
|
26
|
-
"
|
28
|
+
"couchbase-settings.gemspec"
|
27
29
|
]
|
28
30
|
|
29
|
-
gem.files = `git ls-files`.split($/)
|
30
31
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
31
32
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
32
33
|
gem.require_paths = ["lib"]
|
@@ -2,14 +2,27 @@ require 'rails'
|
|
2
2
|
require 'yaml'
|
3
3
|
require 'erb'
|
4
4
|
require "couchbase_settings/version"
|
5
|
+
require "couchbase_settings/railtie" if defined?(Rails)
|
6
|
+
|
5
7
|
|
6
8
|
module CouchbaseSettings
|
7
9
|
class UndefinedCouchbaseSettings < StandardError; end
|
8
10
|
class << self
|
11
|
+
|
9
12
|
def setup!
|
13
|
+
puts "---------------------------------------------------"
|
14
|
+
puts "CouchbaseSetting loaded... (/config/couchbase.yml)"
|
15
|
+
|
10
16
|
find_ymls.each do |yml|
|
11
17
|
create_cbsettings_class(yml)
|
12
18
|
end
|
19
|
+
|
20
|
+
puts "---------------------------------------------------"
|
21
|
+
#puts CouchbaseSetting.to_hash if defined?(CouchbaseSetting)
|
22
|
+
end
|
23
|
+
|
24
|
+
def inspect
|
25
|
+
CouchbaseSetting.to_hash
|
13
26
|
end
|
14
27
|
|
15
28
|
def find_ymls
|
@@ -23,7 +36,7 @@ module CouchbaseSettings
|
|
23
36
|
#klass_name = File.basename(yml_file).gsub(".yml","").camelize
|
24
37
|
klass_name = "CouchbaseSetting"
|
25
38
|
#klass_name = "#{klass_name}CouchbaseSetting" unless klass_name=="CouchbaseSetting"
|
26
|
-
klass = Object.const_set(klass_name,Class.new)
|
39
|
+
klass = Object.const_set(klass_name,Class.new)
|
27
40
|
|
28
41
|
hash.each do |key,value|
|
29
42
|
#Rails.logger.debug "hash: key = #{key}, value = #{value}"
|
@@ -38,6 +51,8 @@ module CouchbaseSettings
|
|
38
51
|
raise UndefinedCouchbaseSettings, "#{method_id} is not defined in #{self.to_s}"
|
39
52
|
end
|
40
53
|
end
|
54
|
+
|
55
|
+
puts CouchbaseSetting.to_hash
|
41
56
|
end
|
42
57
|
|
43
58
|
def load_yml(yml_file)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: couchbase-settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.4
|
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-
|
12
|
+
date: 2013-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A Simple Couchbase Settings gem to read RAILS_ROOT/config/couchbase.yml
|
15
15
|
file
|
@@ -20,15 +20,14 @@ extensions: []
|
|
20
20
|
extra_rdoc_files:
|
21
21
|
- LICENSE.txt
|
22
22
|
files:
|
23
|
-
- .gitignore
|
24
23
|
- Gemfile
|
25
24
|
- LICENSE.txt
|
26
25
|
- README.md
|
27
26
|
- Rakefile
|
28
|
-
-
|
29
|
-
- lib/couchbase_settings.rb
|
30
|
-
- lib/couchbase_settings/railtie.rb
|
27
|
+
- lib/couchbase-settings.rb
|
31
28
|
- lib/couchbase_settings/version.rb
|
29
|
+
- lib/couchbase_settings/railtie.rb
|
30
|
+
- couchbase-settings.gemspec
|
32
31
|
homepage: https://github.com/scalabl3/couchbase-settings
|
33
32
|
licenses: []
|
34
33
|
post_install_message:
|
@@ -52,5 +51,6 @@ rubyforge_project:
|
|
52
51
|
rubygems_version: 1.8.24
|
53
52
|
signing_key:
|
54
53
|
specification_version: 3
|
55
|
-
summary: A Simple Couchbase Settings gem to read RAILS_ROOT/config/couchbase.yml file
|
54
|
+
summary: A Simple Couchbase Settings gem to read RAILS_ROOT/config/couchbase.yml file,
|
55
|
+
used with gem couchbase-docstore and couchbase-structures
|
56
56
|
test_files: []
|