amee-data-abstraction 1.0.0
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/.rvmrc +1 -0
- data/CHANGELOG.txt +4 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +41 -0
- data/LICENSE.txt +27 -0
- data/README.txt +188 -0
- data/Rakefile +102 -0
- data/VERSION +1 -0
- data/amee-data-abstraction.gemspec +115 -0
- data/examples/_calculator_form.erb +27 -0
- data/examples/calculation_controller.rb +16 -0
- data/init.rb +4 -0
- data/lib/amee-data-abstraction.rb +30 -0
- data/lib/amee-data-abstraction/calculation.rb +236 -0
- data/lib/amee-data-abstraction/calculation_set.rb +101 -0
- data/lib/amee-data-abstraction/drill.rb +63 -0
- data/lib/amee-data-abstraction/exceptions.rb +47 -0
- data/lib/amee-data-abstraction/input.rb +197 -0
- data/lib/amee-data-abstraction/metadatum.rb +58 -0
- data/lib/amee-data-abstraction/ongoing_calculation.rb +545 -0
- data/lib/amee-data-abstraction/output.rb +16 -0
- data/lib/amee-data-abstraction/profile.rb +108 -0
- data/lib/amee-data-abstraction/prototype_calculation.rb +350 -0
- data/lib/amee-data-abstraction/term.rb +506 -0
- data/lib/amee-data-abstraction/terms_list.rb +150 -0
- data/lib/amee-data-abstraction/usage.rb +90 -0
- data/lib/config/amee_units.rb +129 -0
- data/lib/core-extensions/class.rb +27 -0
- data/lib/core-extensions/hash.rb +43 -0
- data/lib/core-extensions/ordered_hash.rb +21 -0
- data/lib/core-extensions/proc.rb +15 -0
- data/rails/init.rb +32 -0
- data/spec/amee-data-abstraction/calculation_set_spec.rb +54 -0
- data/spec/amee-data-abstraction/calculation_spec.rb +75 -0
- data/spec/amee-data-abstraction/drill_spec.rb +38 -0
- data/spec/amee-data-abstraction/input_spec.rb +77 -0
- data/spec/amee-data-abstraction/metadatum_spec.rb +17 -0
- data/spec/amee-data-abstraction/ongoing_calculation_spec.rb +494 -0
- data/spec/amee-data-abstraction/profile_spec.rb +39 -0
- data/spec/amee-data-abstraction/prototype_calculation_spec.rb +256 -0
- data/spec/amee-data-abstraction/term_spec.rb +385 -0
- data/spec/amee-data-abstraction/terms_list_spec.rb +53 -0
- data/spec/config/amee_units_spec.rb +71 -0
- data/spec/core-extensions/class_spec.rb +25 -0
- data/spec/core-extensions/hash_spec.rb +44 -0
- data/spec/core-extensions/ordered_hash_spec.rb +12 -0
- data/spec/core-extensions/proc_spec.rb +12 -0
- data/spec/fixtures/electricity.rb +35 -0
- data/spec/fixtures/electricity_and_transport.rb +55 -0
- data/spec/fixtures/transport.rb +26 -0
- data/spec/spec.opts +2 -0
- data/spec/spec_helper.rb +244 -0
- metadata +262 -0
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm 1.8.7@amee-data-abstraction
|
data/CHANGELOG.txt
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
gem "amee", "~> 3.0"
|
4
|
+
gem 'uuidtools', '2.1.2'
|
5
|
+
gem 'quantify', '1.1.0'
|
6
|
+
|
7
|
+
# Add dependencies to develop your gem here.
|
8
|
+
# Include everything needed to run rake, tests, features, etc.
|
9
|
+
group :development do
|
10
|
+
gem "bundler", "~> 1.0.0"
|
11
|
+
gem "jeweler", "~> 1.6.4"
|
12
|
+
gem 'rspec', '1.3.0'
|
13
|
+
gem 'rcov'
|
14
|
+
gem 'rspec_spinner', '1.1.3'
|
15
|
+
gem 'flexmock', '> 0.8.6'
|
16
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activesupport (2.3.12)
|
5
|
+
amee (3.0.1)
|
6
|
+
activesupport (~> 2.3.5)
|
7
|
+
json
|
8
|
+
log4r
|
9
|
+
nokogiri (~> 1.4.3.1)
|
10
|
+
flexmock (0.9.0)
|
11
|
+
git (1.2.5)
|
12
|
+
jeweler (1.6.4)
|
13
|
+
bundler (~> 1.0)
|
14
|
+
git (>= 1.2.5)
|
15
|
+
rake
|
16
|
+
json (1.5.3)
|
17
|
+
log4r (1.1.9)
|
18
|
+
nokogiri (1.4.3.1)
|
19
|
+
quantify (1.1.0)
|
20
|
+
activesupport
|
21
|
+
rake (0.9.2)
|
22
|
+
rcov (0.9.10)
|
23
|
+
rspec (1.3.0)
|
24
|
+
rspec_spinner (1.1.3)
|
25
|
+
rtui
|
26
|
+
rtui (0.2.2)
|
27
|
+
uuidtools (2.1.2)
|
28
|
+
|
29
|
+
PLATFORMS
|
30
|
+
ruby
|
31
|
+
|
32
|
+
DEPENDENCIES
|
33
|
+
amee (~> 3.0)
|
34
|
+
bundler (~> 1.0.0)
|
35
|
+
flexmock (> 0.8.6)
|
36
|
+
jeweler (~> 1.6.4)
|
37
|
+
quantify (= 1.1.0)
|
38
|
+
rcov
|
39
|
+
rspec (= 1.3.0)
|
40
|
+
rspec_spinner (= 1.1.3)
|
41
|
+
uuidtools (= 2.1.2)
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
Copyright (c) 2011, AMEE UK Ltd.
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
Redistributions of source code must retain the above copyright notice,
|
8
|
+
this list of conditions and the following disclaimer.
|
9
|
+
|
10
|
+
Redistributions in binary form must reproduce the above copyright notice,
|
11
|
+
this list of conditions and the following disclaimer in the documentation
|
12
|
+
and/or other materials provided with the distribution.
|
13
|
+
|
14
|
+
Neither the name of AMEE UK Ltd nor the names of its contributors may be
|
15
|
+
used to endorse or promote products derived from this software without
|
16
|
+
specific prior written permission.
|
17
|
+
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
19
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
20
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
22
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
23
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
24
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
25
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
26
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
27
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.txt
ADDED
@@ -0,0 +1,188 @@
|
|
1
|
+
== amee-data-abstraction
|
2
|
+
|
3
|
+
The amee-data-abstraction gem provides an easy-to-use, highly configurable interface
|
4
|
+
for providing AMEE-driven calculations to Rails applications.
|
5
|
+
|
6
|
+
Licensed under the BSD 3-Clause license (See LICENSE.txt for details)
|
7
|
+
|
8
|
+
Authors: James Hetherington, James Smith, Andrew Berkeley, George Palmer
|
9
|
+
|
10
|
+
Copyright: Copyright (c) 2011 AMEE UK Ltd
|
11
|
+
|
12
|
+
Homepage: http://github.com/AMEE/amee-data-abstraction
|
13
|
+
|
14
|
+
Documentation: http://rubydoc.info/gems/amee-data-abstraction
|
15
|
+
|
16
|
+
== INSTALLATION
|
17
|
+
|
18
|
+
gem install amee-data-abstraction
|
19
|
+
|
20
|
+
== REQUIREMENTS
|
21
|
+
|
22
|
+
* ruby 1.8.7
|
23
|
+
* rubygems >= 1.5
|
24
|
+
|
25
|
+
All gem requirements should be installed as part of the rubygems installation process
|
26
|
+
above, but are listed here for completeness.
|
27
|
+
|
28
|
+
* amee ~> 3.0
|
29
|
+
* uuidtools = 2.1.2
|
30
|
+
* quantify = 1.1.0
|
31
|
+
|
32
|
+
== USAGE
|
33
|
+
|
34
|
+
The library provides several useful functions:
|
35
|
+
|
36
|
+
1. Abstracts away most of the details for making API calls into an elegant DSL-style
|
37
|
+
configuration.
|
38
|
+
|
39
|
+
2. Provides a host of macro-style helper methods for rapidly generating
|
40
|
+
calcualtion templates
|
41
|
+
|
42
|
+
3. Models each type of AMEE calculation as a fully configurable Ruby object.
|
43
|
+
|
44
|
+
4. Enables the configuring of which inputs (drills and profile item values) and
|
45
|
+
outputs (return values) to handle and display for each calculation type.
|
46
|
+
|
47
|
+
5. Enables configuration of default interfaces (select lists, text fields, etc.)
|
48
|
+
for calculation components.
|
49
|
+
|
50
|
+
6. Enables customised, human-readable names and other descriptors to be associated
|
51
|
+
with calculations or calculation components (inputs, outputs, etc.).
|
52
|
+
|
53
|
+
7. Enables arbitrary metadata to be associated with calculations.
|
54
|
+
|
55
|
+
8. Provides support for handling alternative units, including full configurability.
|
56
|
+
|
57
|
+
|
58
|
+
=== Brief introduction
|
59
|
+
|
60
|
+
The calculations provided by AMEE categories are represented by instances of the
|
61
|
+
class AMEE::DataAbstraction::Calculation.
|
62
|
+
|
63
|
+
This class has two subclasses, (1) PrototypeCalculation, which is used to
|
64
|
+
represent a blank calculation template for a particular type of calculation; and
|
65
|
+
(2) OngoingCalculation, instances of which represent actual individual calculations
|
66
|
+
which are made.
|
67
|
+
|
68
|
+
Calculation objects contain instances of the AMEE::DataAbstraction::Term class.
|
69
|
+
The Term class, and its subclasses Input, Drill, Profile, Metadatum, Usage, and
|
70
|
+
Output, represent components of a calculation such as inputs, outputs (i.e.
|
71
|
+
caluclated values) and arbitrary metadatum.
|
72
|
+
|
73
|
+
Prototype calculations can be contained within an instance of the class
|
74
|
+
AMEE::DataAbstraction::CalculationSet, in order to provide rapid access to any
|
75
|
+
defined calculation templates and instantiating of a new instance of a real
|
76
|
+
calcualtion.
|
77
|
+
|
78
|
+
=== Example usage
|
79
|
+
|
80
|
+
Configure a calculation
|
81
|
+
|
82
|
+
include AMEE::DataAbstraction
|
83
|
+
|
84
|
+
my_template_calculation = PrototypeCalculation.new {
|
85
|
+
|
86
|
+
label :electricity # Custom unique label
|
87
|
+
name "Grid electricity supply" # Custom name
|
88
|
+
path "/some/path/in/the/amee/platform" # AMEE platform category path
|
89
|
+
terms_from_amee # helper for initializing and
|
90
|
+
configuring all calculation
|
91
|
+
terms based on AMEE platform
|
92
|
+
}
|
93
|
+
|
94
|
+
#=> <AMEE::DataAbstraction::PrototypeCalculation ... >
|
95
|
+
|
96
|
+
Create a new calculation instance
|
97
|
+
|
98
|
+
my_calculation = my_template_calculation.begin_calculation
|
99
|
+
|
100
|
+
#=> <AMEE::DataAbstraction::OngoingCalculation ... >
|
101
|
+
|
102
|
+
Set the calculation inputs
|
103
|
+
|
104
|
+
params = { :country => 'Sweden',
|
105
|
+
:consumption => { :value => 6000, :unit => 'kWh' }}
|
106
|
+
|
107
|
+
my_calculation.choose! params
|
108
|
+
|
109
|
+
Submit to AMEE for calculation
|
110
|
+
|
111
|
+
my_calculation.calculate!
|
112
|
+
|
113
|
+
my_calculation[:co2].to_s #=> "2456 kg"
|
114
|
+
|
115
|
+
|
116
|
+
=== Configuring mutliple application calculation prototypes
|
117
|
+
|
118
|
+
Typical practice is initialize the calculation prototypes required for an
|
119
|
+
application via a configuration file which creates the required calculation
|
120
|
+
templates within an instance of CalculationSet. If the calculation set is assigned
|
121
|
+
to a global variable or constant, the set of prototypes is available for
|
122
|
+
initializing new calculations and templating view structures (e.g. tables, forms)
|
123
|
+
from anywhere in the application.
|
124
|
+
|
125
|
+
Adding a configuration to /config or /config/initializers may be appropriate
|
126
|
+
|
127
|
+
# e.g. /config/initializers/calculations.rb
|
128
|
+
|
129
|
+
Calculations = AMEE::DataAbstraction::CalculationSet {
|
130
|
+
|
131
|
+
calculation {
|
132
|
+
label :electricity
|
133
|
+
name "Grid Electricity Supply"
|
134
|
+
path "/some/electricity/associated/path/in/amee"
|
135
|
+
terms_from_amee
|
136
|
+
}
|
137
|
+
|
138
|
+
calculation {
|
139
|
+
label :transport
|
140
|
+
name "Employee Commuting"
|
141
|
+
path "/some/transport/associated/path/in/amee"
|
142
|
+
terms_from_amee
|
143
|
+
}
|
144
|
+
|
145
|
+
calculation {
|
146
|
+
label :fuel
|
147
|
+
name "Fuel Consumption"
|
148
|
+
path "/some/fuel/associated/path/in/amee"
|
149
|
+
terms_from_amee
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
#=> <AMEE::DataAbstraction::CalculationSet ... >
|
154
|
+
|
155
|
+
From this global calculation set, initialize a new calculation
|
156
|
+
|
157
|
+
my_fuel_calculation = Calculations[:fuel].begin_calculation
|
158
|
+
|
159
|
+
#=> <AMEE::DataAbstraction::OngoingCalculation ... >
|
160
|
+
|
161
|
+
a_different_transport_calculation = Calculations[:transport].begin_calculation
|
162
|
+
|
163
|
+
#=> <AMEE::DataAbstraction::OngoingCalculation ... >
|
164
|
+
|
165
|
+
=== Configuring a connection to AMEE
|
166
|
+
|
167
|
+
The AMEE::DataAbstraction module uses the 'amee' ruby gem to interact with AMEE.
|
168
|
+
The standard method for configuring and instantiating a connection to the AMEE
|
169
|
+
API is to provide authentication credentials in the /config/amee.yml file,
|
170
|
+
structured thus:
|
171
|
+
|
172
|
+
---
|
173
|
+
production:
|
174
|
+
server: live.amee.com
|
175
|
+
username: <some user name>
|
176
|
+
password: <some password>
|
177
|
+
cache: rails
|
178
|
+
|
179
|
+
development:
|
180
|
+
server: stage.amee.com
|
181
|
+
username: <some user name>
|
182
|
+
password: <some password>
|
183
|
+
cache: rails
|
184
|
+
|
185
|
+
test:
|
186
|
+
server: stage.amee.com
|
187
|
+
username: <some user name>
|
188
|
+
password: <some password>
|
data/Rakefile
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
# Copyright (C) 2011 AMEE UK Ltd. - http://www.amee.com
|
2
|
+
# Released as Open Source Software under the BSD 3-Clause license. See LICENSE.txt for details.
|
3
|
+
|
4
|
+
# encoding: utf-8
|
5
|
+
|
6
|
+
require 'rubygems'
|
7
|
+
require 'bundler'
|
8
|
+
begin
|
9
|
+
Bundler.setup(:default, :development)
|
10
|
+
rescue Bundler::BundlerError => e
|
11
|
+
$stderr.puts e.message
|
12
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
13
|
+
exit e.status_code
|
14
|
+
end
|
15
|
+
require 'rake'
|
16
|
+
require 'spec'
|
17
|
+
require 'spec/rake/spectask'
|
18
|
+
|
19
|
+
task :default => [:spec]
|
20
|
+
|
21
|
+
Spec::Rake::SpecTask.new do |t|
|
22
|
+
t.spec_opts = ['--options', "spec/spec.opts"]
|
23
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
24
|
+
t.rcov = true
|
25
|
+
t.rcov_opts = ['--exclude', 'spec,/*ruby*,']
|
26
|
+
end
|
27
|
+
|
28
|
+
require 'jeweler'
|
29
|
+
# Fix for Jeweler to use stable branch
|
30
|
+
class Jeweler
|
31
|
+
module Commands
|
32
|
+
class ReleaseToGit
|
33
|
+
def run
|
34
|
+
unless clean_staging_area?
|
35
|
+
system "git status"
|
36
|
+
raise "Unclean staging area! Be sure to commit or .gitignore everything first. See `git status` above."
|
37
|
+
end
|
38
|
+
repo.checkout('stable')
|
39
|
+
repo.push('origin', 'stable')
|
40
|
+
if release_not_tagged?
|
41
|
+
output.puts "Tagging #{release_tag}"
|
42
|
+
repo.add_tag(release_tag)
|
43
|
+
output.puts "Pushing #{release_tag} to origin"
|
44
|
+
repo.push('origin', release_tag)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
class ReleaseGemspec
|
49
|
+
def run
|
50
|
+
unless clean_staging_area?
|
51
|
+
system "git status"
|
52
|
+
raise "Unclean staging area! Be sure to commit or .gitignore everything first. See `git status` above."
|
53
|
+
end
|
54
|
+
repo.checkout('stable')
|
55
|
+
regenerate_gemspec!
|
56
|
+
commit_gemspec! if gemspec_changed?
|
57
|
+
output.puts "Pushing stable to origin"
|
58
|
+
repo.push('origin', 'stable')
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
Jeweler::Tasks.new do |gem|
|
65
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
66
|
+
gem.name = "amee-data-abstraction"
|
67
|
+
gem.homepage = "http://github.com/AMEE/amee-data-abstraction"
|
68
|
+
gem.license = "BSD 3-Clause"
|
69
|
+
gem.summary = %Q{Calculation and form building tool hiding details of AMEEconnect}
|
70
|
+
gem.description = %Q{Part of the AMEEappkit this gem provides a data abstraction layer, decreasing the amount and detail of development required}
|
71
|
+
gem.email = "help@amee.com"
|
72
|
+
gem.authors = ["James Hetherington", "Andrew Berkeley", "James Smith", "George Palmer"]
|
73
|
+
# dependencies defined in Gemfile
|
74
|
+
end
|
75
|
+
Jeweler::RubygemsDotOrgTasks.new
|
76
|
+
|
77
|
+
require 'rake/testtask'
|
78
|
+
Rake::TestTask.new(:test) do |test|
|
79
|
+
test.libs << 'lib' << 'test'
|
80
|
+
test.pattern = 'test/**/test_*.rb'
|
81
|
+
test.verbose = true
|
82
|
+
end
|
83
|
+
|
84
|
+
require 'rcov/rcovtask'
|
85
|
+
Rcov::RcovTask.new do |test|
|
86
|
+
test.libs << 'test'
|
87
|
+
test.pattern = 'test/**/test_*.rb'
|
88
|
+
test.verbose = true
|
89
|
+
test.rcov_opts << '--exclude "gems/*"'
|
90
|
+
end
|
91
|
+
|
92
|
+
task :default => :test
|
93
|
+
|
94
|
+
require 'rake/rdoctask'
|
95
|
+
Rake::RDocTask.new do |rdoc|
|
96
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
97
|
+
|
98
|
+
rdoc.rdoc_dir = 'rdoc'
|
99
|
+
rdoc.title = "amee-data-abstraction #{version}"
|
100
|
+
rdoc.rdoc_files.include('README*')
|
101
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
102
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.0
|
@@ -0,0 +1,115 @@
|
|
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
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{amee-data-abstraction}
|
8
|
+
s.version = "1.0.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["James Hetherington", "Andrew Berkeley", "James Smith", "George Palmer"]
|
12
|
+
s.date = %q{2011-08-11}
|
13
|
+
s.description = %q{Part of the AMEEappkit this gem provides a data abstraction layer, decreasing the amount and detail of development required}
|
14
|
+
s.email = %q{help@amee.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.txt"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".rvmrc",
|
21
|
+
"CHANGELOG.txt",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE.txt",
|
25
|
+
"README.txt",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"amee-data-abstraction.gemspec",
|
29
|
+
"examples/_calculator_form.erb",
|
30
|
+
"examples/calculation_controller.rb",
|
31
|
+
"init.rb",
|
32
|
+
"lib/amee-data-abstraction.rb",
|
33
|
+
"lib/amee-data-abstraction/calculation.rb",
|
34
|
+
"lib/amee-data-abstraction/calculation_set.rb",
|
35
|
+
"lib/amee-data-abstraction/drill.rb",
|
36
|
+
"lib/amee-data-abstraction/exceptions.rb",
|
37
|
+
"lib/amee-data-abstraction/input.rb",
|
38
|
+
"lib/amee-data-abstraction/metadatum.rb",
|
39
|
+
"lib/amee-data-abstraction/ongoing_calculation.rb",
|
40
|
+
"lib/amee-data-abstraction/output.rb",
|
41
|
+
"lib/amee-data-abstraction/profile.rb",
|
42
|
+
"lib/amee-data-abstraction/prototype_calculation.rb",
|
43
|
+
"lib/amee-data-abstraction/term.rb",
|
44
|
+
"lib/amee-data-abstraction/terms_list.rb",
|
45
|
+
"lib/amee-data-abstraction/usage.rb",
|
46
|
+
"lib/config/amee_units.rb",
|
47
|
+
"lib/core-extensions/class.rb",
|
48
|
+
"lib/core-extensions/hash.rb",
|
49
|
+
"lib/core-extensions/ordered_hash.rb",
|
50
|
+
"lib/core-extensions/proc.rb",
|
51
|
+
"rails/init.rb",
|
52
|
+
"spec/amee-data-abstraction/calculation_set_spec.rb",
|
53
|
+
"spec/amee-data-abstraction/calculation_spec.rb",
|
54
|
+
"spec/amee-data-abstraction/drill_spec.rb",
|
55
|
+
"spec/amee-data-abstraction/input_spec.rb",
|
56
|
+
"spec/amee-data-abstraction/metadatum_spec.rb",
|
57
|
+
"spec/amee-data-abstraction/ongoing_calculation_spec.rb",
|
58
|
+
"spec/amee-data-abstraction/profile_spec.rb",
|
59
|
+
"spec/amee-data-abstraction/prototype_calculation_spec.rb",
|
60
|
+
"spec/amee-data-abstraction/term_spec.rb",
|
61
|
+
"spec/amee-data-abstraction/terms_list_spec.rb",
|
62
|
+
"spec/config/amee_units_spec.rb",
|
63
|
+
"spec/core-extensions/class_spec.rb",
|
64
|
+
"spec/core-extensions/hash_spec.rb",
|
65
|
+
"spec/core-extensions/ordered_hash_spec.rb",
|
66
|
+
"spec/core-extensions/proc_spec.rb",
|
67
|
+
"spec/fixtures/electricity.rb",
|
68
|
+
"spec/fixtures/electricity_and_transport.rb",
|
69
|
+
"spec/fixtures/transport.rb",
|
70
|
+
"spec/spec.opts",
|
71
|
+
"spec/spec_helper.rb"
|
72
|
+
]
|
73
|
+
s.homepage = %q{http://github.com/AMEE/amee-data-abstraction}
|
74
|
+
s.licenses = ["BSD 3-Clause"]
|
75
|
+
s.require_paths = ["lib"]
|
76
|
+
s.rubygems_version = %q{1.6.2}
|
77
|
+
s.summary = %q{Calculation and form building tool hiding details of AMEEconnect}
|
78
|
+
|
79
|
+
if s.respond_to? :specification_version then
|
80
|
+
s.specification_version = 3
|
81
|
+
|
82
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
83
|
+
s.add_runtime_dependency(%q<amee>, ["~> 3.0"])
|
84
|
+
s.add_runtime_dependency(%q<uuidtools>, ["= 2.1.2"])
|
85
|
+
s.add_runtime_dependency(%q<quantify>, ["= 1.1.0"])
|
86
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
87
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
88
|
+
s.add_development_dependency(%q<rspec>, ["= 1.3.0"])
|
89
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
90
|
+
s.add_development_dependency(%q<rspec_spinner>, ["= 1.1.3"])
|
91
|
+
s.add_development_dependency(%q<flexmock>, ["> 0.8.6"])
|
92
|
+
else
|
93
|
+
s.add_dependency(%q<amee>, ["~> 3.0"])
|
94
|
+
s.add_dependency(%q<uuidtools>, ["= 2.1.2"])
|
95
|
+
s.add_dependency(%q<quantify>, ["= 1.1.0"])
|
96
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
97
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
98
|
+
s.add_dependency(%q<rspec>, ["= 1.3.0"])
|
99
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
100
|
+
s.add_dependency(%q<rspec_spinner>, ["= 1.1.3"])
|
101
|
+
s.add_dependency(%q<flexmock>, ["> 0.8.6"])
|
102
|
+
end
|
103
|
+
else
|
104
|
+
s.add_dependency(%q<amee>, ["~> 3.0"])
|
105
|
+
s.add_dependency(%q<uuidtools>, ["= 2.1.2"])
|
106
|
+
s.add_dependency(%q<quantify>, ["= 1.1.0"])
|
107
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
108
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
109
|
+
s.add_dependency(%q<rspec>, ["= 1.3.0"])
|
110
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
111
|
+
s.add_dependency(%q<rspec_spinner>, ["= 1.1.3"])
|
112
|
+
s.add_dependency(%q<flexmock>, ["> 0.8.6"])
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|