Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests pass using bundler, once yaml and multi_json are properly required #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ For an extensive usage in production, see the "wukong gem.":http://github.com/mr

h2. Notice

Configliere 4.x now has 100% spec coverage, more powerful commandline handling, zero required dependencies. However, it also strips out several obscure features and much magical code, which breaks said obscure features and magic-dependent code. See the "CHANGELOG.":CHANGELOG.textile for details as you upgrade.
Configliere 4.x now has 100% spec coverage, more powerful commandline handling, and minimal required dependencies. However, it also strips out several obscure features and much magical code, which breaks said obscure features and magic-dependent code. See the "CHANGELOG.":CHANGELOG.textile for details as you upgrade.

h2. Design goals:

Expand Down
4 changes: 4 additions & 0 deletions lib/configliere.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
require 'date' # type conversion
require 'time' # type conversion
require 'fileutils' # so save! can mkdir

require 'multi_json'
require 'yaml'

require 'configliere/deep_hash' # magic hash for params
require 'configliere/param' # params container
require 'configliere/define' # define param behavior
Expand Down
5 changes: 0 additions & 5 deletions lib/configliere/config_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def read filename, options={}
end

def read_yaml yaml_str, options={}
require 'yaml'
new_data = YAML.load(yaml_str) || {}
# Extract the :env (production/development/etc)
if options[:env]
Expand All @@ -58,11 +57,7 @@ def read_yaml yaml_str, options={}
self
end

#
# we depend on you to require some sort of JSON
#
def read_json json_str, options={}
require 'multi_json'
new_data = MultiJson.load(json_str) || {}
# Extract the :env (production/development/etc)
if options[:env]
Expand Down