forward 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/forward/cli.rb CHANGED
@@ -43,8 +43,7 @@ module Forward
43
43
  Forward.log(:debug, "Parsing options")
44
44
  @options = {
45
45
  :host => '127.0.0.1',
46
- :port => 80,
47
- :random => true
46
+ :port => 80
48
47
  }
49
48
 
50
49
  if ARGV.include?('--debug')
@@ -160,15 +159,14 @@ module Forward
160
159
  exit_with_error("`#{cname}' is an invalid domain format") unless cname =~ CNAME_REGEX
161
160
  end
162
161
 
163
- # Validates the subdomain and returns a Hash containing it and also
164
- # sets random to false, if validation passes.
162
+ # Validates the subdomain and returns a Hash containing it.
165
163
  #
166
164
  # subdomain - A String containing the subdomain.
167
165
  #
168
166
  # Returns a Hash containing the subdomain
169
167
  def self.parse_subdomain(subdomain)
170
168
  validate_subdomain(subdomain)
171
- { :subdomain => subdomain, :random => false }
169
+ { :subdomain => subdomain }
172
170
  end
173
171
 
174
172
  # Checks to make sure the subdomain is in the correct format and exits with an
@@ -180,13 +178,8 @@ module Forward
180
178
  exit_with_error("`#{subdomain}' is an invalid subdomain format") unless subdomain =~ SUBDOMAIN_REGEX
181
179
  end
182
180
 
183
- # Checks to see if the cname and random options are both set at the same.
184
- # time and exits with an error message if they are.
185
181
  def self.validate_options
186
182
  Forward.log(:debug, "Validating options: `#{@options.inspect}'")
187
- if !@options[:cname].nil? && @options[:random]
188
- exit_with_error "You can't use a cname and a random url"
189
- end
190
183
  end
191
184
 
192
185
  # Asks for the user's email and password and puts them in a Hash.
@@ -1,3 +1,3 @@
1
1
  module Forward
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forward
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
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: 2012-10-15 00:00:00.000000000 Z
12
+ date: 2012-10-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json