yaml_constant_creation 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +81 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +20 -0
- data/README.md +4 -0
- data/README.rdoc +19 -0
- data/Rakefile +51 -0
- data/VERSION +1 -0
- data/lib/yaml_constant_creation.rb +0 -0
- data/lib/yaml_to_constants.rb +116 -0
- data/test/helper.rb +34 -0
- data/test/test_yaml_constant_creation.rb +7 -0
- data/test/yaml_autoload/level_2/test_a.yaml +1 -0
- data/test/yaml_autoload/level_2/test_b.yaml +0 -0
- data/test/yaml_autoload/test_a.yaml +15 -0
- data/test/yaml_autoload/test_b.yaml +0 -0
- data/test/yaml_autoload/test_c.yaml +0 -0
- data/test/yaml_to_constants_test.rb +60 -0
- data/yaml_constant_creation.gemspec +74 -0
- metadata +139 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5f50b1e3c3d48ee8e1b014fd99bf9adacb89c880
|
4
|
+
data.tar.gz: 5e8737cc569a4c911b3fe9fd376f7c7eec582fc0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7a23861c429195a64497eecd24a84b2884cb70cae1d0205279db707ebc61b1cb7ae21f47107701552f4220e2a2d2f7c69969313b8f4d3afc6665852a22c8ea4b
|
7
|
+
data.tar.gz: f9f5e443a16e5dcc1c4cd5e8ba3a19d3f6a90bb84f4cfa61e6f6b516ee008ebed8f2304fc4f9209de62b79350b45362ed6e4db8e622e00553e96097654bc0488
|
data/.document
ADDED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
yaml_generator
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.0.0-p451
|
data/Gemfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem "shoulda", ">= 0"
|
10
|
+
gem "rdoc", "~> 3.12"
|
11
|
+
gem "bundler", "~> 1.0"
|
12
|
+
gem "jeweler", "~> 2.0.1"
|
13
|
+
gem "simplecov", ">= 0"
|
14
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activesupport (4.1.0)
|
5
|
+
i18n (~> 0.6, >= 0.6.9)
|
6
|
+
json (~> 1.7, >= 1.7.7)
|
7
|
+
minitest (~> 5.1)
|
8
|
+
thread_safe (~> 0.1)
|
9
|
+
tzinfo (~> 1.1)
|
10
|
+
addressable (2.3.6)
|
11
|
+
builder (3.2.2)
|
12
|
+
descendants_tracker (0.0.4)
|
13
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
14
|
+
docile (1.1.3)
|
15
|
+
faraday (0.9.0)
|
16
|
+
multipart-post (>= 1.2, < 3)
|
17
|
+
git (1.2.6)
|
18
|
+
github_api (0.11.3)
|
19
|
+
addressable (~> 2.3)
|
20
|
+
descendants_tracker (~> 0.0.1)
|
21
|
+
faraday (~> 0.8, < 0.10)
|
22
|
+
hashie (>= 1.2)
|
23
|
+
multi_json (>= 1.7.5, < 2.0)
|
24
|
+
nokogiri (~> 1.6.0)
|
25
|
+
oauth2
|
26
|
+
hashie (2.1.1)
|
27
|
+
highline (1.6.21)
|
28
|
+
i18n (0.6.9)
|
29
|
+
jeweler (2.0.1)
|
30
|
+
builder
|
31
|
+
bundler (>= 1.0)
|
32
|
+
git (>= 1.2.5)
|
33
|
+
github_api
|
34
|
+
highline (>= 1.6.15)
|
35
|
+
nokogiri (>= 1.5.10)
|
36
|
+
rake
|
37
|
+
rdoc
|
38
|
+
json (1.8.1)
|
39
|
+
jwt (0.1.11)
|
40
|
+
multi_json (>= 1.5)
|
41
|
+
mini_portile (0.5.3)
|
42
|
+
minitest (5.3.3)
|
43
|
+
multi_json (1.9.3)
|
44
|
+
multi_xml (0.5.5)
|
45
|
+
multipart-post (2.0.0)
|
46
|
+
nokogiri (1.6.1)
|
47
|
+
mini_portile (~> 0.5.0)
|
48
|
+
oauth2 (0.9.3)
|
49
|
+
faraday (>= 0.8, < 0.10)
|
50
|
+
jwt (~> 0.1.8)
|
51
|
+
multi_json (~> 1.3)
|
52
|
+
multi_xml (~> 0.5)
|
53
|
+
rack (~> 1.2)
|
54
|
+
rack (1.5.2)
|
55
|
+
rake (10.3.1)
|
56
|
+
rdoc (3.12.2)
|
57
|
+
json (~> 1.4)
|
58
|
+
shoulda (3.5.0)
|
59
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
60
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
61
|
+
shoulda-context (1.2.1)
|
62
|
+
shoulda-matchers (2.6.0)
|
63
|
+
activesupport (>= 3.0.0)
|
64
|
+
simplecov (0.8.2)
|
65
|
+
docile (~> 1.1.0)
|
66
|
+
multi_json
|
67
|
+
simplecov-html (~> 0.8.0)
|
68
|
+
simplecov-html (0.8.0)
|
69
|
+
thread_safe (0.3.3)
|
70
|
+
tzinfo (1.1.0)
|
71
|
+
thread_safe (~> 0.1)
|
72
|
+
|
73
|
+
PLATFORMS
|
74
|
+
ruby
|
75
|
+
|
76
|
+
DEPENDENCIES
|
77
|
+
bundler (~> 1.0)
|
78
|
+
jeweler (~> 2.0.1)
|
79
|
+
rdoc (~> 3.12)
|
80
|
+
shoulda
|
81
|
+
simplecov
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Robert R. Meyer
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2014 Robert R. Meyer
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
= yaml_constant_creation
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Contributing to yaml_constant_creation
|
6
|
+
|
7
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
8
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
9
|
+
* Fork the project.
|
10
|
+
* Start a feature/bugfix branch.
|
11
|
+
* Commit and push until you are happy with your contribution.
|
12
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2014 Robert R. Meyer. See LICENSE.txt for
|
18
|
+
further details.
|
19
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
17
|
+
gem.name = "yaml_constant_creation"
|
18
|
+
gem.homepage = "http://github.com/Blue-Dog-Archolite/yaml_constant_creation"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{In development}
|
21
|
+
gem.description = %Q{In Development}
|
22
|
+
gem.email = "Blue.Dog.Archolite@gmail.com"
|
23
|
+
gem.authors = ["Robert R. Meyer"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "Code coverage detail"
|
36
|
+
task :simplecov do
|
37
|
+
ENV['COVERAGE'] = "true"
|
38
|
+
Rake::Task['test'].execute
|
39
|
+
end
|
40
|
+
|
41
|
+
task :default => :test
|
42
|
+
|
43
|
+
require 'rdoc/task'
|
44
|
+
Rake::RDocTask.new do |rdoc|
|
45
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
46
|
+
|
47
|
+
rdoc.rdoc_dir = 'rdoc'
|
48
|
+
rdoc.title = "yaml_constant_creation #{version}"
|
49
|
+
rdoc.rdoc_files.include('README*')
|
50
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
51
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
File without changes
|
@@ -0,0 +1,116 @@
|
|
1
|
+
# 1) Loads all files out of config/yaml_autoload/**/*.yaml
|
2
|
+
# 2) Uses namespace based on file structure (overseer/blah.yaml) becomes
|
3
|
+
# Configuration::Overseer::Blah
|
4
|
+
# 3) Only loads configuration for locale or generic configuration
|
5
|
+
# 4) Checks for environment names at top level for environment specific configuration
|
6
|
+
module YamlToConstants
|
7
|
+
class << self
|
8
|
+
@@constants_created = Set.new
|
9
|
+
@@default_namespace = "Configuration"
|
10
|
+
|
11
|
+
#functional methods
|
12
|
+
def loaded_file_paths
|
13
|
+
@@loaded_file_paths ||= begin
|
14
|
+
path = self.directory_load_path
|
15
|
+
path += "/**/*" if self.recursive?
|
16
|
+
Dir.glob(path).select { |fn| File.file?(fn) }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def initilize_all_files
|
21
|
+
loaded_file_paths.each do |file_path|
|
22
|
+
new_constant = constant_from_file_path(file_path)
|
23
|
+
new_constant_full = new_constant.join('::')
|
24
|
+
full_path = []
|
25
|
+
new_constant.each do |const|
|
26
|
+
full_path << const
|
27
|
+
full_path_text = full_path.join("::")
|
28
|
+
|
29
|
+
unless @@constants_created.include?(full_path_text)
|
30
|
+
Kernel.eval("#{full_path_text} = Module.new")
|
31
|
+
@@constants_created.add(full_path_text)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
to_eval = ("#{new_constant_full} = YamlToConstants.methods_from_file('#{file_path}') ")
|
36
|
+
puts to_eval
|
37
|
+
Kernel.eval(to_eval)
|
38
|
+
@@constants_created.add(new_constant_full)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def purge!
|
43
|
+
puts "PURGE " << @@constants_created.inspect
|
44
|
+
@@constants_created = Set.new
|
45
|
+
#Purge all objects created from the system for reset
|
46
|
+
#Need to figure this out
|
47
|
+
# Object.send(:remove_const, "#{default_namespace}".to_sym) if defined?(default_namespace.to_sym)
|
48
|
+
end
|
49
|
+
|
50
|
+
#Configuration variables
|
51
|
+
def load_configurations
|
52
|
+
#reset defaults
|
53
|
+
@@configuration_constants = nil
|
54
|
+
@@loaded_file_paths = nil
|
55
|
+
@@recursive = true
|
56
|
+
#Clean any left over constants from previous setup
|
57
|
+
purge!
|
58
|
+
|
59
|
+
#Assign options
|
60
|
+
yield self
|
61
|
+
|
62
|
+
#Create new constants with yaml values
|
63
|
+
initilize_all_files
|
64
|
+
end
|
65
|
+
|
66
|
+
def directory_load_path=(directory_path)
|
67
|
+
@@directory_load_path = directory_path
|
68
|
+
end
|
69
|
+
|
70
|
+
def recursive=(bool)
|
71
|
+
@@recursive = bool
|
72
|
+
end
|
73
|
+
|
74
|
+
def namespace=(name_space)
|
75
|
+
name_space = if name_space.is_a?(String)
|
76
|
+
name_space.constantize = Module.new
|
77
|
+
else
|
78
|
+
name_space
|
79
|
+
end
|
80
|
+
|
81
|
+
@@constants_created << name_space
|
82
|
+
@@default_namespace = name_space
|
83
|
+
end
|
84
|
+
|
85
|
+
def recursive?
|
86
|
+
@@recursive
|
87
|
+
end
|
88
|
+
|
89
|
+
def default_namespace
|
90
|
+
@@default_namespace
|
91
|
+
end
|
92
|
+
|
93
|
+
def directory_load_path
|
94
|
+
@@directory_load_path
|
95
|
+
end
|
96
|
+
|
97
|
+
#defined? Constant will check to see if it exists
|
98
|
+
def parse_file(file_path)
|
99
|
+
Psych.load_file(file_path)
|
100
|
+
end
|
101
|
+
|
102
|
+
def methods_from_file(file_path)
|
103
|
+
RecursiveOpenStruct.new(parse_file(file_path), :recurse_over_arrays => true)
|
104
|
+
end
|
105
|
+
|
106
|
+
def constant_from_file_path(file_path)
|
107
|
+
cst = file_path.gsub(directory_load_path, "").split(/\/|\./).compact
|
108
|
+
[default_namespace, cst].flatten.reject{|k|
|
109
|
+
k =~ /yaml/i
|
110
|
+
}.map(&:classify).compress
|
111
|
+
end
|
112
|
+
|
113
|
+
end
|
114
|
+
|
115
|
+
|
116
|
+
end
|
data/test/helper.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
|
3
|
+
module SimpleCov::Configuration
|
4
|
+
def clean_filters
|
5
|
+
@filters = []
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
SimpleCov.configure do
|
10
|
+
clean_filters
|
11
|
+
load_adapter 'test_frameworks'
|
12
|
+
end
|
13
|
+
|
14
|
+
ENV["COVERAGE"] && SimpleCov.start do
|
15
|
+
add_filter "/.rvm/"
|
16
|
+
end
|
17
|
+
require 'rubygems'
|
18
|
+
require 'bundler'
|
19
|
+
begin
|
20
|
+
Bundler.setup(:default, :development)
|
21
|
+
rescue Bundler::BundlerError => e
|
22
|
+
$stderr.puts e.message
|
23
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
24
|
+
exit e.status_code
|
25
|
+
end
|
26
|
+
require 'test/unit'
|
27
|
+
require 'shoulda'
|
28
|
+
|
29
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
30
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
31
|
+
require 'yaml_constant_creation'
|
32
|
+
|
33
|
+
class Test::Unit::TestCase
|
34
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
first_method: followup
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
production:
|
2
|
+
first_value: this is production!
|
3
|
+
|
4
|
+
development:
|
5
|
+
first_value: this is development!
|
6
|
+
magic:
|
7
|
+
# This is a hash with an array as a key
|
8
|
+
? - :k
|
9
|
+
- :j
|
10
|
+
- :l
|
11
|
+
: 1234
|
12
|
+
second_value: only in development!
|
13
|
+
|
14
|
+
test:
|
15
|
+
first_value: this is test!
|
File without changes
|
File without changes
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
describe YamlToConstants do
|
4
|
+
let(:path) { "#{Rails.root}/test/data/config/yaml_autoload" }
|
5
|
+
|
6
|
+
it "responds to load_configurations" do
|
7
|
+
YamlToConstants.load_configurations do |config|
|
8
|
+
config.directory_load_path= path
|
9
|
+
config.recursive = true
|
10
|
+
end
|
11
|
+
|
12
|
+
assert_equal path, YamlToConstants.directory_load_path
|
13
|
+
YamlToConstants.initilize_all_files
|
14
|
+
refute_nil defined?(Configuration::TestA)
|
15
|
+
refute_nil defined?(Configuration::TestB)
|
16
|
+
refute_nil defined?(Configuration::TestC)
|
17
|
+
end
|
18
|
+
#
|
19
|
+
# describe "Once configured with recursive" do
|
20
|
+
# before do
|
21
|
+
# YamlToConstants.stubs(:initilize_all_files).returns({})
|
22
|
+
# YamlToConstants.load_configurations do |config|
|
23
|
+
# config.directory_load_path= path
|
24
|
+
# config.recursive = true
|
25
|
+
# end
|
26
|
+
# end
|
27
|
+
#
|
28
|
+
# it "correctly lists files in directory to be loaded" do
|
29
|
+
# assert YamlToConstants.recursive?
|
30
|
+
# assert_equal Dir.glob(path + "/**/*").select { |fn| File.file?(fn) }, YamlToConstants.loaded_file_paths
|
31
|
+
# end
|
32
|
+
#
|
33
|
+
# it "creates objects" do
|
34
|
+
# refute_nil defined?(Configuration::TestA)
|
35
|
+
# refute_nil defined?(Configuration::TestB)
|
36
|
+
# refute_nil defined?(Configuration::TestC)
|
37
|
+
# raise YamlToConstants.purge!
|
38
|
+
# end
|
39
|
+
# end
|
40
|
+
#
|
41
|
+
# describe "Once configured without recursion" do
|
42
|
+
# before do
|
43
|
+
# YamlToConstants.load_configurations do |config|
|
44
|
+
# config.directory_load_path= path
|
45
|
+
# config.recursive = false
|
46
|
+
# end
|
47
|
+
# end
|
48
|
+
#
|
49
|
+
# it "correctly lists files in directory to be loaded" do
|
50
|
+
# refute YamlToConstants.recursive?
|
51
|
+
# assert_equal Dir.glob(path).select { |fn| File.file?(fn) }, YamlToConstants.loaded_file_paths
|
52
|
+
# end
|
53
|
+
#
|
54
|
+
# it "creates objects from parsed yaml" do
|
55
|
+
# refute_nil defined?(Configuration::TestA)
|
56
|
+
# refute_nil defined?(Configuration::TestB)
|
57
|
+
# refute_nil defined?(Configuration::TestC)
|
58
|
+
# end
|
59
|
+
# end
|
60
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: yaml_constant_creation 0.0.0 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "yaml_constant_creation"
|
9
|
+
s.version = "0.0.0"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
13
|
+
s.authors = ["Robert R. Meyer"]
|
14
|
+
s.date = "2014-04-30"
|
15
|
+
s.description = "Parses yaml files in a given diretory and turns them into constants with methods"
|
16
|
+
s.email = "Blue.Dog.Archolite@gmail.com"
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE",
|
19
|
+
"LICENSE.txt",
|
20
|
+
"README.md",
|
21
|
+
"README.rdoc"
|
22
|
+
]
|
23
|
+
s.files = [
|
24
|
+
".document",
|
25
|
+
".ruby-gemset",
|
26
|
+
".ruby-version",
|
27
|
+
"Gemfile",
|
28
|
+
"LICENSE",
|
29
|
+
"LICENSE.txt",
|
30
|
+
"README.md",
|
31
|
+
"README.rdoc",
|
32
|
+
"Rakefile",
|
33
|
+
"VERSION",
|
34
|
+
"lib/yaml_constant_creation.rb",
|
35
|
+
"lib/yaml_to_constants.rb",
|
36
|
+
"test/helper.rb",
|
37
|
+
"test/test_yaml_constant_creation.rb",
|
38
|
+
"test/yaml_autoload/level_2/test_a.yaml",
|
39
|
+
"test/yaml_autoload/level_2/test_b.yaml",
|
40
|
+
"test/yaml_autoload/test_a.yaml",
|
41
|
+
"test/yaml_autoload/test_b.yaml",
|
42
|
+
"test/yaml_autoload/test_c.yaml",
|
43
|
+
"test/yaml_to_constants_test.rb"
|
44
|
+
]
|
45
|
+
s.homepage = "http://github.com/Blue-Dog-Archolite/yaml_constant_creation"
|
46
|
+
s.licenses = ["MIT"]
|
47
|
+
s.rubygems_version = "2.2.2"
|
48
|
+
s.summary = "Store constants in yaml easier"
|
49
|
+
|
50
|
+
if s.respond_to? :specification_version then
|
51
|
+
s.specification_version = 4
|
52
|
+
|
53
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
54
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
55
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
56
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
57
|
+
s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
|
58
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
59
|
+
else
|
60
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
61
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
62
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
63
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
64
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
65
|
+
end
|
66
|
+
else
|
67
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
68
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
69
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
70
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
71
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
metadata
ADDED
@@ -0,0 +1,139 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: yaml_constant_creation
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Robert R. Meyer
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-04-30 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: shoulda
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rdoc
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.12'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.12'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: jeweler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.0.1
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.0.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: In Development
|
84
|
+
email: Blue.Dog.Archolite@gmail.com
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files:
|
88
|
+
- LICENSE
|
89
|
+
- LICENSE.txt
|
90
|
+
- README.md
|
91
|
+
- README.rdoc
|
92
|
+
files:
|
93
|
+
- .document
|
94
|
+
- .ruby-gemset
|
95
|
+
- .ruby-version
|
96
|
+
- Gemfile
|
97
|
+
- Gemfile.lock
|
98
|
+
- LICENSE
|
99
|
+
- LICENSE.txt
|
100
|
+
- README.md
|
101
|
+
- README.rdoc
|
102
|
+
- Rakefile
|
103
|
+
- VERSION
|
104
|
+
- lib/yaml_constant_creation.rb
|
105
|
+
- lib/yaml_to_constants.rb
|
106
|
+
- test/helper.rb
|
107
|
+
- test/test_yaml_constant_creation.rb
|
108
|
+
- test/yaml_autoload/level_2/test_a.yaml
|
109
|
+
- test/yaml_autoload/level_2/test_b.yaml
|
110
|
+
- test/yaml_autoload/test_a.yaml
|
111
|
+
- test/yaml_autoload/test_b.yaml
|
112
|
+
- test/yaml_autoload/test_c.yaml
|
113
|
+
- test/yaml_to_constants_test.rb
|
114
|
+
- yaml_constant_creation.gemspec
|
115
|
+
homepage: http://github.com/Blue-Dog-Archolite/yaml_constant_creation
|
116
|
+
licenses:
|
117
|
+
- MIT
|
118
|
+
metadata: {}
|
119
|
+
post_install_message:
|
120
|
+
rdoc_options: []
|
121
|
+
require_paths:
|
122
|
+
- lib
|
123
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - '>='
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
requirements: []
|
134
|
+
rubyforge_project:
|
135
|
+
rubygems_version: 2.2.2
|
136
|
+
signing_key:
|
137
|
+
specification_version: 4
|
138
|
+
summary: In development
|
139
|
+
test_files: []
|