omega-tariffs-custom 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -1,10 +1,6 @@
1
1
  Manifest
2
2
  README.rdoc
3
3
  Rakefile
4
- lib/common_tariff.rb
5
- lib/morning_packet_tariff.rb
6
- lib/night_packet_holiday_tariff.rb
7
- lib/night_packet_weekday_tariff.rb
8
4
  lib/omega-tariffs-custom.rb
9
5
  spec/common_tariff_spec.rb
10
6
  spec/lib/active_record_classes_stub.rb
@@ -13,3 +9,7 @@ spec/lib/spec_helper.rb
13
9
  spec/morning_packet_tariff_spec.rb
14
10
  spec/night_packet_holiday_tariff_spec.rb
15
11
  spec/night_packet_weekday_tariff_spec.rb
12
+ yml/common_tariff.yml
13
+ yml/morning_packet_tariff.yml
14
+ yml/night_packet_holiday_tariff.yml
15
+ yml/night_packet_weekday_tariff.yml
data/Rakefile CHANGED
@@ -2,8 +2,8 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('omega-tariffs-custom', '0.1.0') do |p|
6
- p.description = "Just a test sky gem"
5
+ Echoe.new('omega-tariffs-custom', '0.1.1') do |p|
6
+ p.description = "Omega Sector custom tariffs gem"
7
7
  p.url = "http://uniqsystems.ru"
8
8
  p.author = "Uniq Systems"
9
9
  p.email = "ivan@uniqsystems.ru"
@@ -1,23 +1,17 @@
1
- require 'common_tariff'
2
- require 'morning_packet_tariff'
3
- require 'night_packet_holiday_tariff'
4
- require 'night_packet_weekday_tariff'
5
-
6
1
  require 'rubygems'
7
2
  require 'omega-tariffs-base'
8
3
  require 'yaml'
9
4
 
10
5
  module UniqSysOmega
11
6
  module CustomTariffs
12
- module Specs
13
- include UniqSysOmega::Tariffs
14
- end
15
-
16
7
  class CustomTariffBuilder
17
8
  class <<self
18
9
 
10
+ include UniqSysOmega::Tariffs
11
+
19
12
  def build(symbol, tariff_id)
20
- Specs.send(symbol, tariff_id)
13
+ settings = YAML.load_file(File.expand_path(File.join(File.dirname(__FILE__), '..', 'yml', "#{symbol.to_s}.yml")))
14
+ TarifBuilder.build Settings.new(settings), tariff_id
21
15
  end
22
16
 
23
17
  end
@@ -2,21 +2,21 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{omega-tariffs-custom}
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Uniq Systems"]
9
9
  s.date = %q{2010-09-22}
10
- s.description = %q{Just a test sky gem}
10
+ s.description = %q{Omega Sector custom tariffs gem}
11
11
  s.email = %q{ivan@uniqsystems.ru}
12
- s.extra_rdoc_files = ["README.rdoc", "lib/common_tariff.rb", "lib/morning_packet_tariff.rb", "lib/night_packet_holiday_tariff.rb", "lib/night_packet_weekday_tariff.rb", "lib/omega-tariffs-custom.rb"]
13
- s.files = ["Manifest", "README.rdoc", "Rakefile", "lib/common_tariff.rb", "lib/morning_packet_tariff.rb", "lib/night_packet_holiday_tariff.rb", "lib/night_packet_weekday_tariff.rb", "lib/omega-tariffs-custom.rb", "spec/common_tariff_spec.rb", "spec/lib/active_record_classes_stub.rb", "spec/lib/init.rb", "spec/lib/spec_helper.rb", "spec/morning_packet_tariff_spec.rb", "spec/night_packet_holiday_tariff_spec.rb", "spec/night_packet_weekday_tariff_spec.rb", "omega-tariffs-custom.gemspec"]
12
+ s.extra_rdoc_files = ["README.rdoc", "lib/omega-tariffs-custom.rb"]
13
+ s.files = ["Manifest", "README.rdoc", "Rakefile", "lib/omega-tariffs-custom.rb", "spec/common_tariff_spec.rb", "spec/lib/active_record_classes_stub.rb", "spec/lib/init.rb", "spec/lib/spec_helper.rb", "spec/morning_packet_tariff_spec.rb", "spec/night_packet_holiday_tariff_spec.rb", "spec/night_packet_weekday_tariff_spec.rb", "yml/common_tariff.yml", "yml/morning_packet_tariff.yml", "yml/night_packet_holiday_tariff.yml", "yml/night_packet_weekday_tariff.yml", "omega-tariffs-custom.gemspec"]
14
14
  s.homepage = %q{http://uniqsystems.ru}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Omega-tariffs-custom", "--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = %q{omega-tariffs-custom}
18
18
  s.rubygems_version = %q{1.3.7}
19
- s.summary = %q{Just a test sky gem}
19
+ s.summary = %q{Omega Sector custom tariffs gem}
20
20
 
21
21
  if s.respond_to? :specification_version then
22
22
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -1,9 +1,3 @@
1
- module UniqSysOmega
2
- module CustomTariffs
3
- module Specs
4
-
5
- def self.common_tariff(tariff_id)
6
- settings = YAML.load <<-CONFIG
7
1
  ---
8
2
  :klass: RepeatingFilter
9
3
  :settings:
@@ -38,10 +32,3 @@ module UniqSysOmega
38
32
  :klass: RateFilter
39
33
  :settings:
40
34
  :rate: 295
41
- CONFIG
42
- TarifBuilder.build Settings.new(settings), tariff_id
43
- end
44
-
45
- end
46
- end
47
- end
@@ -1,9 +1,3 @@
1
- module UniqSysOmega
2
- module CustomTariffs
3
- module Specs
4
-
5
- def self.morning_packet_tariff(tariff_id)
6
- settings = YAML.load <<-CONFIG
7
1
  ---
8
2
  :klass: RepeatingFilter
9
3
  :settings:
@@ -27,11 +21,4 @@ module UniqSysOmega
27
21
  :starts_at: 2010-08-02 10:00:00 +04:00
28
22
  :period: 86400
29
23
  :
30
- :klass: DenyFilter
31
- CONFIG
32
- TarifBuilder.build Settings.new(settings), tariff_id
33
- end
34
-
35
- end
36
- end
37
- end
24
+ :klass: DenyFilter
@@ -1,9 +1,3 @@
1
- module UniqSysOmega
2
- module CustomTariffs
3
- module Specs
4
-
5
- def self.night_packet_holiday_tariff(tariff_id)
6
- settings = YAML.load <<-CONFIG
7
1
  ---
8
2
  :klass: RepeatingFilter
9
3
  :settings:
@@ -40,11 +34,4 @@ module UniqSysOmega
40
34
  :starts_at: 2010-08-09 08:00:00 +04:00
41
35
  :period: 604800
42
36
  :
43
- :klass: DenyFilter
44
- CONFIG
45
- TarifBuilder.build Settings.new(settings), tariff_id
46
- end
47
-
48
- end
49
- end
50
- end
37
+ :klass: DenyFilter
@@ -1,9 +1,3 @@
1
- module UniqSysOmega
2
- module CustomTariffs
3
- module Specs
4
-
5
- def self.night_packet_weekday_tariff(tariff_id)
6
- settings = YAML.load <<-CONFIG
7
1
  ---
8
2
  :klass: RepeatingFilter
9
3
  :settings:
@@ -40,11 +34,4 @@ module UniqSysOmega
40
34
  :starts_at: 2010-08-07 08:00:00 +04:00
41
35
  :period: 604800
42
36
  :
43
- :klass: DenyFilter
44
- CONFIG
45
- TarifBuilder.build Settings.new(settings), tariff_id
46
- end
47
-
48
- end
49
- end
50
- end
37
+ :klass: DenyFilter
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omega-tariffs-custom
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Uniq Systems
@@ -50,7 +50,7 @@ dependencies:
50
50
  version: 0.1.4
51
51
  type: :development
52
52
  version_requirements: *id002
53
- description: Just a test sky gem
53
+ description: Omega Sector custom tariffs gem
54
54
  email: ivan@uniqsystems.ru
55
55
  executables: []
56
56
 
@@ -58,19 +58,11 @@ extensions: []
58
58
 
59
59
  extra_rdoc_files:
60
60
  - README.rdoc
61
- - lib/common_tariff.rb
62
- - lib/morning_packet_tariff.rb
63
- - lib/night_packet_holiday_tariff.rb
64
- - lib/night_packet_weekday_tariff.rb
65
61
  - lib/omega-tariffs-custom.rb
66
62
  files:
67
63
  - Manifest
68
64
  - README.rdoc
69
65
  - Rakefile
70
- - lib/common_tariff.rb
71
- - lib/morning_packet_tariff.rb
72
- - lib/night_packet_holiday_tariff.rb
73
- - lib/night_packet_weekday_tariff.rb
74
66
  - lib/omega-tariffs-custom.rb
75
67
  - spec/common_tariff_spec.rb
76
68
  - spec/lib/active_record_classes_stub.rb
@@ -79,6 +71,10 @@ files:
79
71
  - spec/morning_packet_tariff_spec.rb
80
72
  - spec/night_packet_holiday_tariff_spec.rb
81
73
  - spec/night_packet_weekday_tariff_spec.rb
74
+ - yml/common_tariff.yml
75
+ - yml/morning_packet_tariff.yml
76
+ - yml/night_packet_holiday_tariff.yml
77
+ - yml/night_packet_weekday_tariff.yml
82
78
  - omega-tariffs-custom.gemspec
83
79
  has_rdoc: true
84
80
  homepage: http://uniqsystems.ru
@@ -119,6 +115,6 @@ rubyforge_project: omega-tariffs-custom
119
115
  rubygems_version: 1.3.7
120
116
  signing_key:
121
117
  specification_version: 3
122
- summary: Just a test sky gem
118
+ summary: Omega Sector custom tariffs gem
123
119
  test_files: []
124
120