shutl_yaml_properties 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,20 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ Gemfile.lock
19
+
20
+ .rbenv-version
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 1.9.3
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :development do
4
+ gem 'license_finder'
5
+ end
6
+ # Specify your gem's dependencies in yaml_properties.gemspec
7
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Mark Burns
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # YamlProperties
2
+
3
+ If you find yourself often setting app config in yaml files for different
4
+ environments etc. Then this can be quite useful to simply access those variables.
5
+
6
+ ## Examples
7
+ ```ruby
8
+ #usual bundler install
9
+ gem 'yaml_config'
10
+
11
+ #usage in your code
12
+ YamlProperties.redis_port
13
+ YamlProperties.smtp_server
14
+
15
+ # data in config/properties.yml
16
+ redis_port: 1369
17
+ smtp_server: smtp.example.com
18
+ ```
19
+
20
+ Also can be added to a module or class like
21
+
22
+ ```ruby
23
+ module YourFunkyConfigThing
24
+ extend YamlProperties
25
+
26
+ #Override filename like this
27
+ def self.yaml_file
28
+ ENV['SINATRA_ENV'] == 'development' ? 'config/properties.yml' : 'config/properties_production.yml'
29
+ end
30
+ end
31
+
32
+
33
+ #Always reload e.g. in Rails dev environment
34
+ YamlProperties.dev_environment = Rails.env.development?
35
+ ```
36
+
37
+
38
+ ##For Cucumber etc
39
+ ```ruby
40
+
41
+ #features/support/env.rb
42
+ After do |scenario|
43
+ YamlProperties.reset!
44
+ end
45
+
46
+ #features/step_definitions/egg_steps.rb
47
+ Given /\AThere are \d+ eggs in a dozen\z/ |dozen|
48
+ YamlProperties.override_attribute :egg, dozen
49
+ end
50
+ ```
51
+
52
+ #Yadayada
53
+
54
+ Usual gem/bundler usage/contribution guidelines
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/bin/yaml_diff ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby -w
2
+
3
+ require File.expand_path('../diff.rb', __FILE__)
4
+
5
+ raise "Please provide 2 YAML files" unless args.size == 2
6
+
7
+ YamlProperties::Diff.new args[0], args[1]
@@ -0,0 +1,20 @@
1
+ ---
2
+ whitelist:
3
+ - MIT
4
+ - Apache 2.0
5
+ - ruby
6
+ - BSD
7
+ - ISC
8
+ - LGPL-3
9
+ - GPLv2
10
+ - LGPL
11
+ - Apache License 2.0
12
+ - LGPL-3.0
13
+ - Apache License Version 2.0
14
+ - 2-clause BSDL
15
+ - New BSD
16
+ - commercial
17
+ ignore_groups: []
18
+
19
+ dependencies_file_dir: ./doc/
20
+ project_name: # project name
File without changes
@@ -0,0 +1,25 @@
1
+ activesupport, 4.0.0, MIT
2
+ atomic, 1.1.13, Apache-2.0
3
+ bundler, 1.3.5, MIT
4
+ columnize, 0.3.6, Ruby
5
+ debugger, 1.4.0, BSD
6
+ debugger-linecache, 1.1.2, MIT
7
+ debugger-ruby_core_source, 1.2.3, MIT
8
+ diff-lcs, 1.2.4, MIT
9
+ httparty, 0.11.0, MIT
10
+ i18n, 0.6.5, MIT
11
+ license_finder, 0.9.2, MIT
12
+ minitest, 4.7.5, MIT
13
+ multi_json, 1.8.0, MIT
14
+ multi_xml, 0.5.5, MIT
15
+ rake, 10.1.0, MIT
16
+ rspec, 2.14.1, MIT
17
+ rspec-core, 2.14.5, MIT
18
+ rspec-expectations, 2.14.2, MIT
19
+ rspec-mocks, 2.14.3, MIT
20
+ sequel, 4.2.0, MIT
21
+ sqlite3, 1.3.8, MIT
22
+ thor, 0.18.1, MIT
23
+ thread_safe, 0.1.2, Apache-2.0
24
+ tzinfo, 0.3.37, MIT
25
+ yaml_properties, 0.0.11, MIT
Binary file