yacht 0.1.0 → 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.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ coverage
2
+ *.gem
3
+ .DS_Store
4
+ Gemfile.lock
data/.rvmrc ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # adapted from: http://rvm.beginrescueend.com/workflow/rvmrc/
4
+
5
+ ruby_string="1.9.2-p0"
6
+ gemset_name="yacht"
7
+
8
+ if rvm list strings | grep -q "${ruby_string}" ; then
9
+
10
+ # Load or create the specified environment
11
+ if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
12
+ && -s "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}" ]] ; then
13
+ \. "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}"
14
+ else
15
+ rvm --create "${ruby_string}@${gemset_name}"
16
+ fi
17
+
18
+ else
19
+
20
+ # Notify the user to install the desired interpreter before proceeding.
21
+ echo "${ruby_string} was not found, please run 'rvm install ${ruby_string}' and then cd back into the project directory."
22
+
23
+ fi
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ Copyright (c) 2011 AT&T Interactive
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ The Software shall be used for Good, not Evil.
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/README.rdoc CHANGED
@@ -70,4 +70,8 @@ First create two (or more) YAML files in the same directory to define your setti
70
70
 
71
71
  == How it works
72
72
 
73
- Currently, the +Yacht+ gem defines a class called +YachtLoader+ that will read your YAML files and output them as a regular +Hash+ or a +ClassyStruct+ . Then you use <tt>YachtLoader#to_classy_struct</tt> (or <tt>YachtLoader#to_hash</tt>) to define a constant. You can name the constant whatever you like, but you should use +Yacht+. This is because a planned feature is to have +Yacht+ defined when the gem is required and have everything namespaced under a single +Yacht+ class.
73
+ Currently, the +Yacht+ gem defines a class called +YachtLoader+ that will read your YAML files and output them as a regular +Hash+ or a +ClassyStruct+ . Then you use <tt>YachtLoader#to_classy_struct</tt> (or <tt>YachtLoader#to_hash</tt>) to define a constant. You can name the constant whatever you like, but you should use +Yacht+. This is because a planned feature is to have +Yacht+ defined when the gem is required and have everything namespaced under a single +Yacht+ class.
74
+
75
+ == License
76
+
77
+ Yacht is licensed under the MIT License with one addition: The Software shall be used for Good, not Evil.
@@ -0,0 +1,6 @@
1
+ require 'rspec/core/rake_task'
2
+
3
+ desc "Run RSpec"
4
+ RSpec::Core::RakeTask.new do |t|
5
+ t.verbose = true
6
+ end
@@ -1,3 +1,3 @@
1
1
  class YachtLoader
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -13,7 +13,7 @@ SimpleCov.start
13
13
 
14
14
  require 'yacht'
15
15
 
16
- Spec::Runner.configure do |config|
16
+ RSpec.configure do |config|
17
17
  config.after :each do
18
18
  YachtLoader.environment = nil
19
19
  YachtLoader.dir = nil
@@ -26,14 +26,14 @@ describe "to_classy_struct" do
26
26
  it "passes options to to_hash" do
27
27
  YachtLoader.should_receive(:to_hash).with({:my => :awesome_option})
28
28
 
29
- Yacht = YachtLoader.to_classy_struct({:my => :awesome_option})
29
+ YachtLoader.to_classy_struct({:my => :awesome_option})
30
30
  end
31
31
 
32
32
  it "raises a custom error if ClassyStruct cannot be created" do
33
33
  YachtLoader.stub!(:to_hash).and_raise("some funky error")
34
34
 
35
35
  expect {
36
- Yacht = YachtLoader.to_classy_struct
36
+ YachtLoader.to_classy_struct
37
37
  }.to raise_error(YachtLoader::LoadError, /some funky error/)
38
38
  end
39
39
  end
data/yacht.gemspec ADDED
@@ -0,0 +1,29 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib/', __FILE__)
3
+ $:.unshift lib unless $:.include?(lib)
4
+
5
+ require 'yacht_loader/version'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "yacht"
9
+ s.version = YachtLoader::VERSION
10
+ s.authors = ["Mani Tadayon", "Rico Rodriquez Collins"]
11
+ s.description = "Yacht is Yet Another Application Configuration Helper Tool."
12
+ s.summary = "yacht-#{s.version}"
13
+ s.email = ["mtadayon@atti.com", "rcollins@atti.com"]
14
+ s.homepage = "https://github.com/attinteractive/yacht"
15
+
16
+ s.platform = Gem::Platform::RUBY
17
+
18
+ s.add_dependency "classy_struct", ">= 0.3.2"
19
+
20
+ s.add_development_dependency "rspec", '>= 2.6.0'
21
+ s.add_development_dependency "simplecov", '>= 0.4.1'
22
+
23
+ s.required_rubygems_version = ">= 1.6.1"
24
+ s.files = `git ls-files`.split("\n")
25
+ s.test_files = `git ls-files -- spec/*`.split("\n")
26
+ s.extra_rdoc_files = ["LICENSE", "README.rdoc"]
27
+ s.rdoc_options = ["--charset=UTF-8"]
28
+ s.require_path = "lib"
29
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: yacht
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mani Tadayon
@@ -11,7 +11,8 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-05-18 00:00:00 Z
14
+ date: 2011-05-19 00:00:00 -07:00
15
+ default_executable:
15
16
  dependencies:
16
17
  - !ruby/object:Gem::Dependency
17
18
  name: classy_struct
@@ -30,9 +31,9 @@ dependencies:
30
31
  requirement: &id002 !ruby/object:Gem::Requirement
31
32
  none: false
32
33
  requirements:
33
- - - "="
34
+ - - ">="
34
35
  - !ruby/object:Gem::Version
35
- version: 1.3.1
36
+ version: 2.6.0
36
37
  type: :development
37
38
  version_requirements: *id002
38
39
  - !ruby/object:Gem::Dependency
@@ -41,12 +42,12 @@ dependencies:
41
42
  requirement: &id003 !ruby/object:Gem::Requirement
42
43
  none: false
43
44
  requirements:
44
- - - "="
45
+ - - ">="
45
46
  - !ruby/object:Gem::Version
46
- version: 0.4.2
47
+ version: 0.4.1
47
48
  type: :development
48
49
  version_requirements: *id003
49
- description:
50
+ description: Yacht is Yet Another Application Configuration Helper Tool.
50
51
  email:
51
52
  - mtadayon@atti.com
52
53
  - rcollins@atti.com
@@ -54,29 +55,36 @@ executables: []
54
55
 
55
56
  extensions: []
56
57
 
57
- extra_rdoc_files: []
58
-
58
+ extra_rdoc_files:
59
+ - LICENSE
60
+ - README.rdoc
59
61
  files:
62
+ - .gitignore
63
+ - .rspec
64
+ - .rvmrc
65
+ - Gemfile
66
+ - LICENSE
67
+ - README.rdoc
68
+ - Rakefile
69
+ - gem_tasks/spec.rake
60
70
  - lib/monkeypatches/hash.rb
61
71
  - lib/yacht.rb
62
72
  - lib/yacht_loader/base.rb
63
73
  - lib/yacht_loader/classy_struct.rb
64
74
  - lib/yacht_loader/rails.rb
65
75
  - lib/yacht_loader/version.rb
66
- - spec/spec.opts
67
76
  - spec/spec_helper.rb
68
77
  - spec/yacht_loader/base_spec.rb
69
78
  - spec/yacht_loader/classy_struct_spec.rb
70
79
  - spec/yacht_loader/rails_spec.rb
71
- - Gemfile
72
- - Rakefile
73
- - README.rdoc
80
+ - yacht.gemspec
81
+ has_rdoc: true
74
82
  homepage: https://github.com/attinteractive/yacht
75
83
  licenses: []
76
84
 
77
85
  post_install_message:
78
- rdoc_options: []
79
-
86
+ rdoc_options:
87
+ - --charset=UTF-8
80
88
  require_paths:
81
89
  - lib
82
90
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -90,13 +98,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
98
  requirements:
91
99
  - - ">="
92
100
  - !ruby/object:Gem::Version
93
- version: 1.3.7
101
+ version: 1.6.1
94
102
  requirements: []
95
103
 
96
104
  rubyforge_project:
97
- rubygems_version: 1.7.2
105
+ rubygems_version: 1.6.2
98
106
  signing_key:
99
107
  specification_version: 3
100
- summary: Use YAML files to manage application configuration.
101
- test_files: []
102
-
108
+ summary: yacht-0.1.1
109
+ test_files:
110
+ - spec/spec_helper.rb
111
+ - spec/yacht_loader/base_spec.rb
112
+ - spec/yacht_loader/classy_struct_spec.rb
113
+ - spec/yacht_loader/rails_spec.rb
File without changes