lib/pagseguro.rb in pagseguro-0.1.2 vs lib/pagseguro.rb in pagseguro-0.1.3.beta.1
- old
+ new
@@ -29,19 +29,19 @@
File.exist?(config_file)
end
# Load configuration file.
def config
- raise MissingConfigurationException, "file not found on #{config_file.inspect}" unless config?
+ raise MissingConfigurationError, "file not found on #{config_file.inspect}" unless config?
# load file if is not loaded yet
@@config ||= YAML.load_file(config_file)
# raise an exception if the environment hasn't been set
# or if file is empty
if @@config == false || !@@config[Rails.env]
- raise MissingEnvironmentException, ":#{Rails.env} environment not set on #{config_file.inspect}"
+ raise MissingEnvironmentError, ":#{Rails.env} environment not set on #{config_file.inspect}"
end
# retrieve the environment settings
@@config[Rails.env]
end
@@ -59,8 +59,8 @@
# Reader for the `developer` configuration
def developer?
config? && config["developer"] == true
end
- class MissingEnvironmentException < StandardError; end
- class MissingConfigurationException < StandardError; end
+ class MissingEnvironmentError < StandardError; end
+ class MissingConfigurationError < StandardError; end
end