smsc_manager 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/config_smsc.rb CHANGED
@@ -8,6 +8,7 @@ require 'rubygems'
8
8
  gem 'smsc_manager'
9
9
  require 'smsc_manager'
10
10
  require 'pp'
11
+ #puts "ENV #{ENV}"
11
12
  #puts "Argv is: #{ARGV} argv.size is #{ARGV.size}"
12
13
  puts "configuring smsc settings"
13
14
  begin
@@ -16,7 +17,7 @@ require 'pp'
16
17
  rescue Exception => e
17
18
  puts "exception found"
18
19
  ensure
19
- smsc=SmscConnection.new if smsc==nil
20
+ smsc=SmscManager::SmscConnection.new if smsc==nil
20
21
  end
21
22
  #puts "Argv is: #{ARGV} argv.size is #{ARGV.size}"
22
23
  smsc.hostname=ARGV[0]
@@ -27,14 +27,19 @@ class SmscConnection
27
27
  puts "-res #{@res} -time #{s}"
28
28
  return @res
29
29
  end
30
+ def self.path_to_config
31
+ File.join(File.dirname(__FILE__), '../../config/smsc.yml')
32
+ end
33
+
30
34
  def dump
31
35
  #change this in database or here
32
- config = File.open("config/smsc.yml",'w') { |f| YAML.dump(self,f) }
36
+ config = File.open(path_to_config,'w') { |f| YAML.dump(self,f) }
33
37
  end
34
38
  def self.load_smsc
35
39
  #change this in database or here
36
-
37
- config = File.open("config/smsc.yml") { |f| YAML.load(f) }
40
+ test_path=self.path_to_config
41
+ puts "Path to config is: #{test_path}"
42
+ config = File.open(path_to_config) { |f| YAML.load(f) }
38
43
  #puts "config is: #{config} config.class is: #{config.class}"
39
44
  if config.class==SmscManager::SmscConnection
40
45
  smsc=config
@@ -2,7 +2,7 @@ module SmscManager #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: smsc_manager
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.2
6
+ version: 0.2.3
7
7
  date: 2007-02-12 00:00:00 +08:00
8
8
  summary: connection to smsc via http using kannel
9
9
  require_paths: