ardm-aggregates 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,6 @@
1
+ --exclude "spec,^/"
2
+ --sort coverage
3
+ --callsites
4
+ --xrefs
5
+ --profile
6
+ --text-summary
@@ -0,0 +1,4 @@
1
+ --colour
2
+ --loadby random
3
+ --format profile
4
+ --backtrace
@@ -0,0 +1,57 @@
1
+ require 'dm-core/spec/setup'
2
+ require 'dm-core/spec/lib/adapter_helpers'
3
+ require 'dm-core/spec/lib/pending_helpers'
4
+
5
+ require 'dm-aggregates'
6
+ require 'dm-migrations'
7
+
8
+ require 'public/shared/aggregate_shared_spec'
9
+
10
+ DataMapper::Spec.setup
11
+
12
+ Spec::Runner.configure do |config|
13
+
14
+ config.extend(DataMapper::Spec::Adapters::Helpers)
15
+ config.include(DataMapper::Spec::PendingHelpers)
16
+
17
+ config.before(:all) do
18
+
19
+ # A simplistic example, using with an Integer property
20
+ class ::Knight
21
+ include DataMapper::Resource
22
+
23
+ property :id, Serial
24
+ property :name, String
25
+ end
26
+
27
+ class ::Dragon
28
+ include DataMapper::Resource
29
+
30
+ property :id, Serial
31
+ property :name, String
32
+ property :is_fire_breathing, Boolean
33
+ property :toes_on_claw, Integer
34
+ property :birth_at, DateTime
35
+ property :birth_on, Date
36
+ property :birth_time, Time
37
+
38
+ belongs_to :knight, :required => false
39
+ end
40
+
41
+ # A more complex example, with BigDecimal and Float properties
42
+ # Statistics taken from CIA World Factbook:
43
+ # https://www.cia.gov/library/publications/the-world-factbook/
44
+ class ::Country
45
+ include DataMapper::Resource
46
+
47
+ property :id, Serial
48
+ property :name, String, :required => true
49
+ property :population, Integer
50
+ property :birth_rate, Float, :precision => 4, :scale => 2
51
+ property :gold_reserve_tonnes, Float, :precision => 6, :scale => 2
52
+ property :gold_reserve_value, Decimal, :precision => 15, :scale => 1 # approx. value in USD
53
+ end
54
+ DataMapper.finalize
55
+
56
+ end
57
+ end
@@ -0,0 +1,38 @@
1
+ spec_defaults = lambda do |spec|
2
+ spec.pattern = 'spec/**/*_spec.rb'
3
+ spec.libs << 'lib' << 'spec'
4
+ spec.spec_opts << '--options' << 'spec/spec.opts'
5
+ end
6
+
7
+ begin
8
+ require 'spec/rake/spectask'
9
+
10
+ Spec::Rake::SpecTask.new(:spec, &spec_defaults)
11
+ rescue LoadError
12
+ task :spec do
13
+ abort 'rspec is not available. In order to run spec, you must: gem install rspec'
14
+ end
15
+ end
16
+
17
+ begin
18
+ require 'rcov'
19
+ require 'spec/rake/verify_rcov'
20
+
21
+ Spec::Rake::SpecTask.new(:rcov) do |rcov|
22
+ spec_defaults.call(rcov)
23
+ rcov.rcov = true
24
+ rcov.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
25
+ end
26
+
27
+ RCov::VerifyTask.new(:verify_rcov => :rcov) do |rcov|
28
+ rcov.threshold = 100
29
+ end
30
+ rescue LoadError
31
+ %w[ rcov verify_rcov ].each do |name|
32
+ task name do
33
+ abort "rcov is not available. In order to run #{name}, you must: gem install rcov"
34
+ end
35
+ end
36
+ end
37
+
38
+ task :default => :spec
@@ -0,0 +1,9 @@
1
+ begin
2
+ require 'yard'
3
+
4
+ YARD::Rake::YardocTask.new
5
+ rescue LoadError
6
+ task :yard do
7
+ abort 'YARD is not available. In order to run yard, you must: gem install yard'
8
+ end
9
+ end
@@ -0,0 +1,19 @@
1
+ begin
2
+ require 'pathname'
3
+ require 'yardstick/rake/measurement'
4
+ require 'yardstick/rake/verify'
5
+
6
+ # yardstick_measure task
7
+ Yardstick::Rake::Measurement.new
8
+
9
+ # verify_measurements task
10
+ Yardstick::Rake::Verify.new do |verify|
11
+ verify.threshold = 100
12
+ end
13
+ rescue LoadError
14
+ %w[ yardstick_measure verify_measurements ].each do |name|
15
+ task name.to_s do
16
+ abort "Yardstick is not available. In order to run #{name}, you must: gem install yardstick"
17
+ end
18
+ end
19
+ end
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ardm-aggregates
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Martin Emde
8
+ - Emmanuel Gomez
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-01-30 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: ardm-core
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.2'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.2'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '0.9'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '0.9'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rspec
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '1.3'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '1.3'
56
+ description: DataMapper plugin providing support for aggregates on collections
57
+ email:
58
+ - me@martinemde.com
59
+ - emmanuel.gomez@gmail.com
60
+ executables: []
61
+ extensions: []
62
+ extra_rdoc_files:
63
+ - LICENSE
64
+ - README.rdoc
65
+ files:
66
+ - ".gitignore"
67
+ - ".travis.yml"
68
+ - Gemfile
69
+ - LICENSE
70
+ - README.rdoc
71
+ - Rakefile
72
+ - VERSION
73
+ - ardm-aggregates.gemspec
74
+ - lib/ardm-aggregates.rb
75
+ - lib/dm-aggregates.rb
76
+ - lib/dm-aggregates/adapters/dm-do-adapter.rb
77
+ - lib/dm-aggregates/aggregate_functions.rb
78
+ - lib/dm-aggregates/collection.rb
79
+ - lib/dm-aggregates/core_ext/symbol.rb
80
+ - lib/dm-aggregates/functions.rb
81
+ - lib/dm-aggregates/model.rb
82
+ - lib/dm-aggregates/operators.rb
83
+ - lib/dm-aggregates/query.rb
84
+ - lib/dm-aggregates/repository.rb
85
+ - lib/dm-aggregates/version.rb
86
+ - spec/isolated/require_after_setup_spec.rb
87
+ - spec/isolated/require_before_setup_spec.rb
88
+ - spec/isolated/require_spec.rb
89
+ - spec/public/collection_spec.rb
90
+ - spec/public/model_spec.rb
91
+ - spec/public/shared/aggregate_shared_spec.rb
92
+ - spec/rcov.opts
93
+ - spec/spec.opts
94
+ - spec/spec_helper.rb
95
+ - tasks/spec.rake
96
+ - tasks/yard.rake
97
+ - tasks/yardstick.rake
98
+ homepage: https://github.com/ar-dm/ardm-aggregates
99
+ licenses:
100
+ - MIT
101
+ metadata: {}
102
+ post_install_message:
103
+ rdoc_options: []
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ requirements: []
117
+ rubyforge_project:
118
+ rubygems_version: 2.2.2
119
+ signing_key:
120
+ specification_version: 4
121
+ summary: Ardm fork of dm-aggregates
122
+ test_files: []
123
+ has_rdoc: