data_reader 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f73829d7eaf46a4dba02827cbe1c13255e6316bc
4
- data.tar.gz: 3f21945b2bd955f00a6ca318930c9d6e28f0300f
2
+ SHA256:
3
+ metadata.gz: 9a9082a5d52d807a6da3609a8503f49a0587f0dfb3eb64d94fbcd0446854ffb4
4
+ data.tar.gz: 3b31553d32f4e9af8fa8c5c1b6f658713598df9dda3e41f16126d16be7620933
5
5
  SHA512:
6
- metadata.gz: f73e7f233816684826fb5d22f5c1138b2e9ea4733f4f69c0852b3a653433a776ec508636cef0b1e05ec572fa7227dfe4298601488fca1bbf925eed4d07f0e71e
7
- data.tar.gz: 69d0030724241ad7fcd2489d1604e872d18a0841470a24d3f8e5b4c36b49063725a5cc17493a2ca0a5814c5afeae1d4286ce8334e3642bd95b83d597a1d755e2
6
+ metadata.gz: 3adcf3dbc00ff99725ebfc08a80fab31ce6daa49d373f3b60984f50d577300c2e81d56e95ad5b8e2819da3849e7c86bc08bff12aa10a21d57b3d44974c216879
7
+ data.tar.gz: 1a048a10a843ecc56c431e45a6b4681ceec7d72d1146805edd0e4cd477b9bb52625e27ebe64aa2491bce879a2e1e04686d98adef749ec7f2e03ba4f5c65b457d
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ **The MIT License (MIT)**
2
2
 
3
- Copyright (c) 2016 Jeff Nyman
3
+ Copyright © 2016-2019 Jeff Nyman
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # DataReader
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/data_reader.svg)](http://badge.fury.io/rb/data_reader)
4
- [![License](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jeffnyman/data_reader/blob/master/LICENSE.txt)
4
+ [![License](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jeffnyman/data_reader/blob/master/LICENSE.md)
5
5
 
6
6
  The DataReader gem is used to provide a standard mechanism for providing a YAML data source and loading data from it. DataReader is mainly used as a support gem that can be included by other libraries that need this functionality.
7
7
 
@@ -13,13 +13,23 @@ To get the latest stable release, add this line to your application's Gemfile:
13
13
  gem 'data_reader'
14
14
  ```
15
15
 
16
- And then include it in your bundle:
16
+ To get the latest code:
17
17
 
18
- $ bundle
18
+ ```ruby
19
+ gem 'data_reader', git: 'https://github.com/jeffnyman/data_reader'
20
+ ```
21
+
22
+ After doing one of the above, execute the following command:
23
+
24
+ ```
25
+ $ bundle
26
+ ```
19
27
 
20
28
  You can also install DataReader just as you would any other gem:
21
29
 
22
- $ gem install data_reader
30
+ ```
31
+ $ gem install data_reader
32
+ ```
23
33
 
24
34
  ## Usage
25
35
 
@@ -53,11 +63,11 @@ project_dir\
53
63
 
54
64
  env\
55
65
  environments.yml
56
-
66
+
57
67
  example-data-reader.rb
58
68
  ```
59
69
 
60
- All the code shown below would go in the `example-data-reader` file.
70
+ All the code shown below would go in the `example-data-reader.rb` file.
61
71
 
62
72
  With the above class in place and the above directory structure, you could do this:
63
73
 
@@ -271,7 +281,11 @@ If you were using `default_data_path`, likewise just make sure you prepend `self
271
281
 
272
282
  ## Development
273
283
 
274
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec:all` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`.
284
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec:all` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
285
+
286
+ The default `rake` command will run all tests as well as a RuboCop analysis.
287
+
288
+ To install this gem onto your local machine, run `bundle exec rake install`.
275
289
 
276
290
  ## Contributing
277
291
 
@@ -296,4 +310,4 @@ This code is based upon the [YmlReader](https://github.com/cheezy/yml_reader) ge
296
310
  ## License
297
311
 
298
312
  DataReader is distributed under the [MIT](http://www.opensource.org/licenses/MIT) license.
299
- See the [LICENSE](https://github.com/jeffnyman/data_reader/blob/master/LICENSE.txt) file for details.
313
+ See the [LICENSE](https://github.com/jeffnyman/data_reader/blob/master/LICENSE.md) file for details.
data/data_reader.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_development_dependency "bundler", "~> 1.13"
24
+ spec.add_development_dependency "bundler", "~> 2.0"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
27
  spec.add_development_dependency "rubocop"
@@ -1,3 +1,3 @@
1
1
  module DataReader
2
- VERSION = "1.1.0".freeze
2
+ VERSION = "1.2.0".freeze
3
3
  end
data/lib/data_reader.rb CHANGED
@@ -10,7 +10,11 @@ module DataReader
10
10
 
11
11
  def data_path
12
12
  return @data_path if @data_path
13
- return default_data_path if respond_to? :default_data_path
13
+
14
+ if respond_to? :default_data_path
15
+ @data_path = default_data_path
16
+ return default_data_path
17
+ end
14
18
 
15
19
  nil
16
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_reader
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Nyman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-07 00:00:00.000000000 Z
11
+ date: 2019-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.13'
19
+ version: '2.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.13'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +94,7 @@ files:
94
94
  - ".travis.yml"
95
95
  - CODE_OF_CONDUCT.md
96
96
  - Gemfile
97
- - LICENSE.txt
97
+ - LICENSE.md
98
98
  - README.md
99
99
  - Rakefile
100
100
  - bin/console
@@ -107,7 +107,7 @@ licenses:
107
107
  - MIT
108
108
  metadata: {}
109
109
  post_install_message: "\n(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n
110
- \ DataReader 1.1.0 has been installed.\n(::) (::) (::) (::) (::) (::) (::) (::)
110
+ \ DataReader 1.2.0 has been installed.\n(::) (::) (::) (::) (::) (::) (::) (::)
111
111
  (::) (::) (::) (::)\n "
112
112
  rdoc_options: []
113
113
  require_paths:
@@ -123,8 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubyforge_project:
127
- rubygems_version: 2.5.2.2
126
+ rubygems_version: 3.0.4
128
127
  signing_key:
129
128
  specification_version: 4
130
129
  summary: Provides a standard method for reading YAML data files