domain 0.0.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/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # 0.0.1 / FIX ME
2
+
3
+ * Enhancements
4
+
5
+ * Birthday!
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'http://rubygems.org'
2
+
3
+ group :development do
4
+ gem "rake", "~> 0.9.2"
5
+ gem "rspec", "~> 2.11"
6
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,20 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ diff-lcs (1.1.3)
5
+ rake (0.9.2.2)
6
+ rspec (2.11.0)
7
+ rspec-core (~> 2.11.0)
8
+ rspec-expectations (~> 2.11.0)
9
+ rspec-mocks (~> 2.11.0)
10
+ rspec-core (2.11.1)
11
+ rspec-expectations (2.11.3)
12
+ diff-lcs (~> 1.1.3)
13
+ rspec-mocks (2.11.3)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ rake (~> 0.9.2)
20
+ rspec (~> 2.11)
data/LICENCE.md ADDED
@@ -0,0 +1,22 @@
1
+ # The MIT Licence
2
+
3
+ Copyright (c) 2012 - Bernard Lambeau
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/Manifest.txt ADDED
@@ -0,0 +1,15 @@
1
+ domain.gemspec
2
+ domain.noespec
3
+ .gemtest
4
+ CHANGELOG.md
5
+ Gemfile
6
+ Gemfile.lock
7
+ bin/**/*
8
+ lib/**/*
9
+ LICENCE.md
10
+ Manifest.txt
11
+ Rakefile
12
+ README.md
13
+ spec/**/*
14
+ tasks/**/*
15
+ test/**/*
data/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # Domain
2
+
3
+ Provide tools for implementing domains (aka data types)
4
+
5
+ ## Links
6
+
7
+ https://github.com/blambeau/domain
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ # We run tests by default
2
+ task :default => :test
3
+
4
+ #
5
+ # Install all tasks found in tasks folder
6
+ #
7
+ # See .rake files there for complete documentation.
8
+ #
9
+ Dir["tasks/*.rake"].each do |taskfile|
10
+ load taskfile
11
+ end
data/domain.gemspec ADDED
@@ -0,0 +1,186 @@
1
+ # We require your library, mainly to have access to the VERSION number.
2
+ # Feel free to set $version manually.
3
+ $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
4
+ require "domain/version"
5
+ $version = Domain::Version.to_s
6
+
7
+ #
8
+ # This is your Gem specification. Default values are provided so that your library
9
+ # should be correctly packaged given what you have described in the .noespec file.
10
+ #
11
+ Gem::Specification.new do |s|
12
+
13
+ ################################################################### ABOUT YOUR GEM
14
+
15
+ # Gem name (required)
16
+ s.name = "domain"
17
+
18
+ # Gem version (required)
19
+ s.version = $version
20
+
21
+ # A short summary of this gem
22
+ #
23
+ # This is displayed in `gem list -d`.
24
+ s.summary = "Provide tools for implementing domains (aka data types)"
25
+
26
+ # A long description of this gem (required)
27
+ #
28
+ # The description should be more detailed than the summary. For example,
29
+ # you might wish to copy the entire README into the description.
30
+ s.description = "Domain simply provides base classes and modules for implementing domains very simply."
31
+
32
+ # The URL of this gem home page (optional)
33
+ s.homepage = "https://github.com/blambeau/domain"
34
+
35
+ # Gem publication date (required but auto)
36
+ #
37
+ # Today is automatically used by default, uncomment only if
38
+ # you know what you do!
39
+ #
40
+ # s.date = Time.now.strftime('%Y-%m-%d')
41
+
42
+ # The license(s) for the library. Each license must be a short name, no
43
+ # more than 64 characters.
44
+ #
45
+ # s.licences = %w{}
46
+
47
+ # The rubyforge project this gem lives under (optional)
48
+ #
49
+ # s.rubyforge_project = nil
50
+
51
+ ################################################################### ABOUT THE AUTHORS
52
+
53
+ # The list of author names who wrote this gem.
54
+ #
55
+ # If you are providing multiple authors and multiple emails they should be
56
+ # in the same order.
57
+ #
58
+ s.authors = ["Bernard Lambeau"]
59
+
60
+ # Contact emails for this gem
61
+ #
62
+ # If you are providing multiple authors and multiple emails they should be
63
+ # in the same order.
64
+ #
65
+ # NOTE: Somewhat strangly this attribute is always singular!
66
+ # Don't replace by s.emails = ...
67
+ s.email = ["blambeau@gmail.com"]
68
+
69
+ ################################################################### PATHS, FILES, BINARIES
70
+
71
+ # Paths in the gem to add to $LOAD_PATH when this gem is
72
+ # activated (required).
73
+ #
74
+ # The default 'lib' is typically sufficient.
75
+ s.require_paths = ["lib"]
76
+
77
+ # Files included in this gem.
78
+ #
79
+ # By default, we take all files included in the Manifest.txt file on root
80
+ # of the project. Entries of the manifest are interpreted as Dir[...]
81
+ # patterns so that lazy people may use wilcards like lib/**/*
82
+ #
83
+ here = File.expand_path(File.dirname(__FILE__))
84
+ s.files = File.readlines(File.join(here, 'Manifest.txt')).
85
+ inject([]){|files, pattern| files + Dir[File.join(here, pattern.strip)]}.
86
+ collect{|x| x[(1+here.size)..-1]}
87
+
88
+ # Test files included in this gem.
89
+ #
90
+ s.test_files = Dir["test/**/*"] + Dir["spec/**/*"]
91
+
92
+ # The path in the gem for executable scripts (optional)
93
+ #
94
+ s.bindir = "bin"
95
+
96
+ # Executables included in the gem.
97
+ #
98
+ s.executables = (Dir["bin/*"]).collect{|f| File.basename(f)}
99
+
100
+ ################################################################### REQUIREMENTS & INSTALL
101
+ # Remember the gem version requirements operators and schemes:
102
+ # = Equals version
103
+ # != Not equal to version
104
+ # > Greater than version
105
+ # < Less than version
106
+ # >= Greater than or equal to
107
+ # <= Less than or equal to
108
+ # ~> Approximately greater than
109
+ #
110
+ # Don't forget to have a look at http://lmgtfy.com/?q=Ruby+Versioning+Policies
111
+ # for setting your gem version.
112
+ #
113
+ # For your requirements to other gems, remember that
114
+ # ">= 2.2.0" (optimistic: specify minimal version)
115
+ # ">= 2.2.0", "< 3.0" (pessimistic: not greater than the next major)
116
+ # "~> 2.2" (shortcut for ">= 2.2.0", "< 3.0")
117
+ # "~> 2.2.0" (shortcut for ">= 2.2.0", "< 2.3.0")
118
+ #
119
+
120
+ #
121
+ # One call to add_dependency('gem_name', 'gem version requirement') for each
122
+ # runtime dependency. These gems will be installed with your gem.
123
+ # One call to add_development_dependency('gem_name', 'gem version requirement')
124
+ # for each development dependency. These gems are required for developers
125
+ #
126
+ s.add_development_dependency("rake", "~> 0.9.2")
127
+ s.add_development_dependency("rspec", "~> 2.11")
128
+
129
+
130
+ # The version of ruby required by this gem
131
+ #
132
+ # Uncomment and set this if your gem requires specific ruby versions.
133
+ #
134
+ # s.required_ruby_version = ">= 0"
135
+
136
+ # The RubyGems version required by this gem
137
+ #
138
+ # s.required_rubygems_version = ">= 0"
139
+
140
+ # The platform this gem runs on. See Gem::Platform for details.
141
+ #
142
+ # s.platform = nil
143
+
144
+ # Extensions to build when installing the gem.
145
+ #
146
+ # Valid types of extensions are extconf.rb files, configure scripts
147
+ # and rakefiles or mkrf_conf files.
148
+ #
149
+ s.extensions = []
150
+
151
+ # External (to RubyGems) requirements that must be met for this gem to work.
152
+ # It’s simply information for the user.
153
+ #
154
+ s.requirements = nil
155
+
156
+ # A message that gets displayed after the gem is installed
157
+ #
158
+ # Uncomment and set this if you want to say something to the user
159
+ # after gem installation
160
+ #
161
+ s.post_install_message = nil
162
+
163
+ ################################################################### SECURITY
164
+
165
+ # The key used to sign this gem. See Gem::Security for details.
166
+ #
167
+ # s.signing_key = nil
168
+
169
+ # The certificate chain used to sign this gem. See Gem::Security for
170
+ # details.
171
+ #
172
+ # s.cert_chain = []
173
+
174
+ ################################################################### RDOC
175
+
176
+ # An ARGV style array of options to RDoc
177
+ #
178
+ # See 'rdoc --help' about this
179
+ #
180
+ s.rdoc_options = []
181
+
182
+ # Extra files to add to RDoc such as README
183
+ #
184
+ s.extra_rdoc_files = Dir["README.md"] + Dir["CHANGELOG.md"] + Dir["LICENCE.md"]
185
+
186
+ end
data/domain.noespec ADDED
@@ -0,0 +1,22 @@
1
+ template-info:
2
+ name: "rubygem.noe"
3
+ version: 2.0.0
4
+ variables:
5
+ lower:
6
+ domain
7
+ upper:
8
+ Domain
9
+ version:
10
+ 0.0.1
11
+ summary: |-
12
+ Provide tools for implementing domains (aka data types)
13
+ description: |-
14
+ Domain simply provides base classes and modules for implementing domains very simply.
15
+ authors:
16
+ - {name: Bernard Lambeau, email: blambeau@gmail.com}
17
+ links:
18
+ - https://github.com/blambeau/domain
19
+ dependencies:
20
+ - {name: rake, version: "~> 0.9.2", groups: [development]}
21
+ - {name: rspec, version: "~> 2.11", groups: [development]}
22
+
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,14 @@
1
+ module Domain
2
+ module Version
3
+
4
+ MAJOR = 0
5
+ MINOR = 0
6
+ TINY = 1
7
+
8
+ def self.to_s
9
+ [ MAJOR, MINOR, TINY ].join('.')
10
+ end
11
+
12
+ end
13
+ VERSION = Version.to_s
14
+ end
data/lib/domain.rb ADDED
@@ -0,0 +1,8 @@
1
+ #
2
+ # Provide tools for implementing domains (aka data types)
3
+ #
4
+ module Domain
5
+
6
+ end # module Domain
7
+ require "domain/version"
8
+ require "domain/loader"
@@ -0,0 +1,9 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'domain'
3
+
4
+ module SpecHelpers
5
+ end
6
+
7
+ RSpec.configure do |c|
8
+ c.include SpecHelpers
9
+ end
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+ describe Domain do
3
+
4
+ it "should have a version number" do
5
+ Domain.const_defined?(:VERSION).should be_true
6
+ end
7
+
8
+ end
data/tasks/gem.rake ADDED
@@ -0,0 +1,73 @@
1
+ # Installs rake tasks for gemming and packaging
2
+ #
3
+ # This file installs the 'rake package', 'rake gem' tasks and associates
4
+ # (clobber_package, repackage, ...). It is automatically generated by Noe
5
+ # from your .noespec file, and should therefore be configured there, under
6
+ # the variables/rake_tasks/gem entry, as illustrated below:
7
+ #
8
+ # variables:
9
+ # rake_tasks:
10
+ # gem:
11
+ # package_dir: pkg
12
+ # need_tar: false
13
+ # need_tar_gz: false
14
+ # need_tar_bz2: false
15
+ # need_zip: false
16
+ # ...
17
+ #
18
+ # If you have specific needs requiring manual intervention on this file,
19
+ # don't forget to set safe-override to false in your noe specification:
20
+ #
21
+ # template-info:
22
+ # manifest:
23
+ # tasks/gem.rake:
24
+ # safe-override: false
25
+ #
26
+ begin
27
+ require 'rubygems/package_task'
28
+
29
+ # Dynamically load the gem spec
30
+ gemspec_file = File.expand_path('../../domain.gemspec', __FILE__)
31
+ gemspec = Kernel.eval(File.read(gemspec_file))
32
+
33
+ Gem::PackageTask.new(gemspec) do |t|
34
+
35
+ # Name of the package
36
+ t.name = gemspec.name
37
+
38
+ # Version of the package
39
+ t.version = gemspec.version
40
+
41
+ # Directory used to store the package files
42
+ t.package_dir = "pkg"
43
+
44
+ # True if a gzipped tar file (tgz) should be produced
45
+ t.need_tar = false
46
+
47
+ # True if a gzipped tar file (tar.gz) should be produced
48
+ t.need_tar_gz = false
49
+
50
+ # True if a bzip2'd tar file (tar.bz2) should be produced
51
+ t.need_tar_bz2 = false
52
+
53
+ # True if a zip file should be produced (default is false)
54
+ t.need_zip = false
55
+
56
+ # List of files to be included in the package.
57
+ t.package_files = gemspec.files
58
+
59
+ # Tar command for gzipped or bzip2ed archives.
60
+ t.tar_command = "tar"
61
+
62
+ # Zip command for zipped archives.
63
+ t.zip_command = "zip"
64
+
65
+ end
66
+ rescue LoadError
67
+ task :gem do
68
+ abort 'rubygems/package_task is not available. You should verify your rubygems installation'
69
+ end
70
+ task :package do
71
+ abort 'rubygems/package_task is not available. You should verify your rubygems installation'
72
+ end
73
+ end
@@ -0,0 +1,71 @@
1
+ # Installs a rake task for for running examples written using rspec.
2
+ #
3
+ # This file installs the 'rake spec_test' (aliased as 'rake spec') as well as
4
+ # extends 'rake test' to run spec tests, if any. It is automatically generated
5
+ # by Noe from your .noespec file, and should therefore be configured there,
6
+ # under the variables/rake_tasks/spec_test entry, as illustrated below:
7
+ #
8
+ # variables:
9
+ # rake_tasks:
10
+ # spec_test:
11
+ # pattern: spec/**/*_spec.rb
12
+ # verbose: true
13
+ # rspec_opts: [--color, --backtrace]
14
+ # ...
15
+ #
16
+ # If you have specific needs requiring manual intervention on this file,
17
+ # don't forget to set safe-override to false in your noe specification:
18
+ #
19
+ # template-info:
20
+ # manifest:
21
+ # tasks/spec_test.rake:
22
+ # safe-override: false
23
+ #
24
+ # This file has been written to conform to RSpec v2.4.0. More information about
25
+ # rspec and options of the rake task defined below can be found on
26
+ # http://relishapp.com/rspec
27
+ #
28
+ begin
29
+ require "rspec/core/rake_task"
30
+ desc "Run RSpec code examples"
31
+ RSpec::Core::RakeTask.new(:spec_test) do |t|
32
+ # Glob pattern to match files.
33
+ t.pattern = "spec/**/test_*.rb"
34
+
35
+ # Whether or not to fail Rake when an error occurs (typically when
36
+ # examples fail).
37
+ t.fail_on_error = true
38
+
39
+ # A message to print to stderr when there are failures.
40
+ t.failure_message = nil
41
+
42
+ # Use verbose output. If this is set to true, the task will print the
43
+ # executed spec command to stdout.
44
+ t.verbose = true
45
+
46
+ # Use rcov for code coverage?
47
+ t.rcov = false
48
+
49
+ # Path to rcov.
50
+ t.rcov_path = "rcov"
51
+
52
+ # Command line options to pass to rcov. See 'rcov --help' about this
53
+ t.rcov_opts = []
54
+
55
+ # Command line options to pass to ruby. See 'ruby --help' about this
56
+ t.ruby_opts = []
57
+
58
+ # Path to rspec
59
+ t.rspec_path = "rspec"
60
+
61
+ # Command line options to pass to rspec. See 'rspec --help' about this
62
+ t.rspec_opts = ["--color", "--backtrace"]
63
+ end
64
+ rescue LoadError => ex
65
+ task :spec_test do
66
+ abort 'rspec is not available. In order to run spec, you must: gem install rspec'
67
+ end
68
+ ensure
69
+ task :spec => [:spec_test]
70
+ task :test => [:spec_test]
71
+ end
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: domain
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Bernard Lambeau
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-27 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.9.2
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.9.2
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '2.11'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '2.11'
46
+ description: Domain simply provides base classes and modules for implementing domains
47
+ very simply.
48
+ email:
49
+ - blambeau@gmail.com
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files:
53
+ - README.md
54
+ - CHANGELOG.md
55
+ - LICENCE.md
56
+ files:
57
+ - domain.gemspec
58
+ - domain.noespec
59
+ - CHANGELOG.md
60
+ - Gemfile
61
+ - Gemfile.lock
62
+ - lib/domain/loader.rb
63
+ - lib/domain/version.rb
64
+ - lib/domain.rb
65
+ - LICENCE.md
66
+ - Manifest.txt
67
+ - Rakefile
68
+ - README.md
69
+ - spec/spec_helper.rb
70
+ - spec/test_domain.rb
71
+ - tasks/gem.rake
72
+ - tasks/spec_test.rake
73
+ homepage: https://github.com/blambeau/domain
74
+ licenses: []
75
+ post_install_message:
76
+ rdoc_options: []
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ none: false
81
+ requirements:
82
+ - - ! '>='
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ requirements: []
92
+ rubyforge_project:
93
+ rubygems_version: 1.8.24
94
+ signing_key:
95
+ specification_version: 3
96
+ summary: Provide tools for implementing domains (aka data types)
97
+ test_files:
98
+ - spec/spec_helper.rb
99
+ - spec/test_domain.rb