Permalink
Browse files

Few typo fixes and stuff.

  • Loading branch information...
1 parent 6d310ac commit 3c9bcf5094d3a54ba2ca8ee5c902871bff8ec435 Simon Hamilton committed Nov 13, 2011
Showing with 6 additions and 10 deletions.
  1. +2 −2 README.mdown
  2. +1 −1 app/views/settings.haml
  3. +0 −1 dyn-dnsimple
  4. +1 −2 lib/dyn-dnsimple.rb
  5. +2 −4 lib/settings.rb
View
@@ -10,7 +10,7 @@ You will need to have an existing A Record to modify.
Open Terminal and do the following:
- cd ~/bin (or mkdir ~/bin && cd ~/bin)
+ cd ~/bin (or mkdir -p ~/bin && cd ~/bin)
git clone git://github.com/hamstarr/dyn-dnsimple.git
cd dyn-dnsimple
gem install bundle
@@ -20,7 +20,7 @@ Open Terminal and do the following:
## Start DynDNSimple automatically
- launchctl submit -l DynDNSimple -- ~/bin/dns-dnsimple/dyn-dnsimple
+ launchctl submit -l DynDNSimple -- ~/bin/dyn-dnsimple/dyn-dnsimple
### Stop DynDNSimple from starting automatically
View
@@ -8,7 +8,7 @@
%body
%section.main
%h1 Update Settings
- -if !$settings.errors.empty?
+ - unless $settings.errors.empty?
#error_container
%p
Ooops... Did you forget something?
View
@@ -11,7 +11,6 @@ require 'dnsimple'
APP_ROOT = File.dirname(__FILE__)
$log = Logger.new( File.join(APP_ROOT, 'log', 'dyn-dnsimple.log'), 'daily' )
-$log.level = Logger::INFO
require File.join(APP_ROOT, 'lib', 'settings.rb')
require File.join(APP_ROOT, 'lib', 'dyn-dnsimple.rb')
View
@@ -8,7 +8,6 @@ def self.refresh!
EM::HttpRequest.new('http://icanhazip.com').get.callback do |http|
$settings.current_ip = http.response.strip!
$settings.save
-
$log.info "DynDNSimple: Current External IP is #{$settings.current_ip}"
update_record
end
@@ -36,6 +35,6 @@ def self.update_record
def self.need_to_update?(record)
record.name == $settings.hostname &&
record.record_type == "A" &&
- record.content == $settings.current_ip
+ record.content != $settings.current_ip
end
end
View
@@ -1,8 +1,6 @@
class Settings
- attr_accessor :username, :password, :domain,
- :hostname, :update_frequency, :http_port, :current_ip, :errors
-
- @config_file = ''
+ attr_accessor :username, :password, :domain, :hostname, :update_frequency,
+ :http_port, :current_ip, :errors
def initialize(options = {})
@config_file = File.join(APP_ROOT, 'config', 'config.yml')

0 comments on commit 3c9bcf5

Please sign in to comment.