data_magic 0.6 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,10 @@
1
+ === Version 0.7 / 2012-5-17
2
+ * Enhancements
3
+ * Refactored to use yml_reader to remove duplication
4
+ * Changed default directory from 'config' to 'config/data'
5
+ * Fixes
6
+ * Removed unused classes after refactoring
7
+
1
8
  === Version 0.6 / 2012-5-4
2
9
  * Fixes
3
10
  * Minor fix so it works properly with ruby 1.8.7
data/cucumber.yml CHANGED
@@ -1 +1 @@
1
- default: --no-source --color --format Cucumber::Formatter::Fuubar
1
+ default: --no-source --color --format pretty
data/lib/data_magic.rb CHANGED
@@ -1,6 +1,4 @@
1
1
  require "data_magic/version"
2
- require "data_magic/config"
3
- require "data_magic/reader"
4
2
  require "data_magic/translation"
5
3
  require 'yml_reader'
6
4
 
@@ -32,7 +30,7 @@ module DataMagic
32
30
  attr_reader :yml
33
31
 
34
32
  def default_directory
35
- 'config'
33
+ 'config/data'
36
34
  end
37
35
  end
38
36
 
@@ -1,3 +1,3 @@
1
1
  module DataMagic
2
- VERSION = "0.6"
2
+ VERSION = "0.7"
3
3
  end
@@ -7,7 +7,7 @@ describe DataMagic do
7
7
  end
8
8
 
9
9
  it "should default to a directory named config" do
10
- DataMagic.yml_directory.should == 'config'
10
+ DataMagic.yml_directory.should == 'config/data'
11
11
  end
12
12
 
13
13
  it "should store a yml directory" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_magic
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.6'
4
+ version: '0.7'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-04 00:00:00.000000000 Z
12
+ date: 2012-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faker
16
- requirement: &70359185872900 !ruby/object:Gem::Requirement
16
+ requirement: &70261596978060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.0.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70359185872900
24
+ version_requirements: *70261596978060
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: yml_reader
27
- requirement: &70359185871820 !ruby/object:Gem::Requirement
27
+ requirement: &70261596977560 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.1'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70359185871820
35
+ version_requirements: *70261596977560
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70359185869020 !ruby/object:Gem::Requirement
38
+ requirement: &70261596977100 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.6.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70359185869020
46
+ version_requirements: *70261596977100
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: cucumber
49
- requirement: &70359185868240 !ruby/object:Gem::Requirement
49
+ requirement: &70261596976640 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 1.1.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70359185868240
57
+ version_requirements: *70261596976640
58
58
  description: Provides datasets to application stored in YAML files
59
59
  email:
60
60
  - jeff.morgan@leandog.com
@@ -80,8 +80,6 @@ files:
80
80
  - features/yaml/another.yml
81
81
  - features/yaml/example.yml
82
82
  - lib/data_magic.rb
83
- - lib/data_magic/config.rb
84
- - lib/data_magic/reader.rb
85
83
  - lib/data_magic/translation.rb
86
84
  - lib/data_magic/version.rb
87
85
  - spec/lib/data_magic_spec.rb
@@ -1,30 +0,0 @@
1
- module DataMagic
2
- module Config
3
-
4
- class << self
5
- attr_accessor :data_magic_yml_directory
6
-
7
- #
8
- # retrieve the yml_directory - the location where all of the yml
9
- # files will be located.
10
- #
11
- def yml_directory
12
- $stderr.puts "*** DEPRECATION WARNING"
13
- $stderr.puts "*** DataMagic::Config has being deprecated and will be removed soon."
14
- $stderr.puts "*** Please use DataMagic.yml_directory."
15
- end
16
-
17
- #
18
- # set the yml_directory - this is where the gem will look for
19
- # all of the yml files.
20
- #
21
- def yml_directory=(value)
22
- $stderr.puts "*** DEPRECATION WARNING"
23
- $stderr.puts "*** DataMagic::Config has being deprecated and will be removed soon."
24
- $stderr.puts "*** Please use DataMagic.yml_directory=."
25
- end
26
-
27
- end
28
-
29
- end
30
- end
@@ -1,13 +0,0 @@
1
- require 'yaml'
2
-
3
- module DataMagic
4
- class Reader
5
- #
6
- # load a file from the config directory and parse into a hash
7
- #
8
- def load_file(filename)
9
- YAML.load_file "#{::DataMagic::Config.yml_directory}/#{filename}"
10
- end
11
- end
12
- end
13
-