data_magic 1.0 → 1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/ChangeLog +4 -0
- data/README.md +3 -2
- data/lib/data_magic.rb +1 -7
- data/lib/data_magic/core_ext/{fixnum.rb → integer.rb} +1 -1
- data/lib/data_magic/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e67b1c5429e8be13be3e344f6ab716a89a26fef2
|
4
|
+
data.tar.gz: 31127c9fe43eb08a7c92abf59a11516d97fce262
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 625b4ddb46b5f191f1e1dd6f8daa547368385596253bccf090ed704a9e1b79701bce94135dadbba670c805726e1285e7b79461492e5b8db628c58cf7866625e4
|
7
|
+
data.tar.gz: 18ccb17574943c342f5cbe5aad0fb66f364ef2b1a48dd7c94ef66dedec822a9c3de97f31e15b1a8fabed4d6de4135c387063859f0539a13e72cbd15a8c8ade4b
|
data/.travis.yml
CHANGED
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -22,8 +22,9 @@ DataMagic.load 'filename.yml'
|
|
22
22
|
````
|
23
23
|
|
24
24
|
Another way to specify the file to load is to use a _tag_ in a cucumber scenario. You tag should take the
|
25
|
-
form of `@datamagic_FILENAME` where `FILENAME` is replaced with the file you wish to load.
|
26
|
-
|
25
|
+
form of `@datamagic_FILENAME` where `FILENAME` is replaced with the file you wish to load. For example,
|
26
|
+
if you add the tag `@datamagic_foo` then the file `foo.yml` will be loaded. If you want
|
27
|
+
to use the tags you simply have to add the following code in a hook:
|
27
28
|
|
28
29
|
````ruby
|
29
30
|
Before do |scenario|
|
data/lib/data_magic.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'data_magic/core_ext/string'
|
2
|
-
require 'data_magic/core_ext/
|
2
|
+
require 'data_magic/core_ext/integer'
|
3
3
|
require "data_magic/version"
|
4
4
|
require "data_magic/translation"
|
5
5
|
require 'data_magic/date_translation'
|
@@ -85,12 +85,6 @@ module DataMagic
|
|
85
85
|
base_hash.deep_merge new_hash
|
86
86
|
end
|
87
87
|
|
88
|
-
def self.fixture_tags_on(scenario)
|
89
|
-
# tags for cuke 2, source_tags for cuke 1
|
90
|
-
tags = scenario.send(scenario.respond_to?(:tags) ? :tags : :source_tags)
|
91
|
-
tags.map(&:name).select { |t| t =~ /@datamagic_/ }
|
92
|
-
end
|
93
|
-
|
94
88
|
def self.fixture_files_on(scenario)
|
95
89
|
# tags for cuke 2, source_tags for cuke 1
|
96
90
|
tags = scenario.send(scenario.respond_to?(:tags) ? :tags : :source_tags)
|
data/lib/data_magic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_magic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faker
|
@@ -95,7 +95,7 @@ files:
|
|
95
95
|
- features/yaml/another.yml
|
96
96
|
- features/yaml/example.yml
|
97
97
|
- lib/data_magic.rb
|
98
|
-
- lib/data_magic/core_ext/
|
98
|
+
- lib/data_magic/core_ext/integer.rb
|
99
99
|
- lib/data_magic/core_ext/string.rb
|
100
100
|
- lib/data_magic/date_translation.rb
|
101
101
|
- lib/data_magic/standard_translation.rb
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
126
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.5.
|
127
|
+
rubygems_version: 2.5.2
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: Provides datasets to application via YAML files
|