diff options
| author | Zack Hobson | 2013-11-20 09:33:52 -0800 | 
|---|---|---|
| committer | Zack Hobson | 2013-11-20 09:33:52 -0800 | 
| commit | 653cff0e03734fd7cbfebfa8d065b32e7cba2d6b (patch) | |
| tree | 69462832f487e45edcd19b247a8f4a8d7e131ccf | |
| parent | 23c799e111fe8abafde55c8b60d314e1b77a7128 (diff) | |
| download | hcl-653cff0e03734fd7cbfebfa8d065b32e7cba2d6b.tar.bz2 | |
require dependencies in the correct files.
| -rw-r--r-- | lib/hcl/app.rb | 20 | ||||
| -rw-r--r-- | lib/hcl/commands.rb | 3 | ||||
| -rw-r--r-- | lib/hcl/day_entry.rb | 1 | ||||
| -rw-r--r-- | lib/hcl/task.rb | 1 | ||||
| -rw-r--r-- | lib/hcl/timesheet_resource.rb | 15 | 
5 files changed, 21 insertions, 19 deletions
| diff --git a/lib/hcl/app.rb b/lib/hcl/app.rb index f108087..684f521 100644 --- a/lib/hcl/app.rb +++ b/lib/hcl/app.rb @@ -1,26 +1,8 @@ -## stdlib dependencies  require 'yaml' -require 'rexml/document' -require 'net/http' -require 'net/https'  require 'fileutils' -## gem dependencies -require 'chronic'  require 'trollop' -require 'highline/import' - -# Workaround for annoying SSL warning: -#  >> warning: peer certificate won't be verified in this SSL session -# http://www.5dollarwhitebox.org/drupal/node/64 -class Net::HTTP -  alias_method :old_initialize, :initialize -  def initialize(*args) -    old_initialize(*args) -    @ssl_context = OpenSSL::SSL::SSLContext.new -    @ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE -  end -end +require 'highline'  module HCl    class App diff --git a/lib/hcl/commands.rb b/lib/hcl/commands.rb index 254138e..b31cca7 100644 --- a/lib/hcl/commands.rb +++ b/lib/hcl/commands.rb @@ -1,3 +1,6 @@ +require 'chronic' +require 'highline' +  module HCl    module Commands      def tasks diff --git a/lib/hcl/day_entry.rb b/lib/hcl/day_entry.rb index 214fbe0..c3fe254 100644 --- a/lib/hcl/day_entry.rb +++ b/lib/hcl/day_entry.rb @@ -1,3 +1,4 @@ +require 'rexml/document'  module HCl     class DayEntry < TimesheetResource diff --git a/lib/hcl/task.rb b/lib/hcl/task.rb index 8a5a833..508a0c0 100644 --- a/lib/hcl/task.rb +++ b/lib/hcl/task.rb @@ -1,3 +1,4 @@ +require 'yaml'  require 'fileutils'  module HCl diff --git a/lib/hcl/timesheet_resource.rb b/lib/hcl/timesheet_resource.rb index 5bab8af..615fb2a 100644 --- a/lib/hcl/timesheet_resource.rb +++ b/lib/hcl/timesheet_resource.rb @@ -1,3 +1,18 @@ +require 'net/http' +require 'net/https' + +# Workaround for annoying SSL warning: +#  >> warning: peer certificate won't be verified in this SSL session +# http://www.5dollarwhitebox.org/drupal/node/64 +class Net::HTTP +  alias_method :old_initialize, :initialize +  def initialize(*args) +    old_initialize(*args) +    @ssl_context = OpenSSL::SSL::SSLContext.new +    @ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE +  end +end +  module HCl    class TimesheetResource      class Failure < StandardError; end | 
