rubiks 0.0.5 → 0.0.6

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 CHANGED
@@ -1,3 +1,8 @@
1
+ 0.0.6
2
+ -----
3
+ * [0.0.6 release](https://github.com/moneydesktop/rubiks/pull/3)
4
+ * [Nodes deep_dup the input hash in .new_from_hash](https://github.com/moneydesktop/rubiks/commit/81b2d68eddf5551abd0f360aee4c91d237e10c3c)
5
+
1
6
  0.0.5
2
7
  -----
3
8
  * [0.0.5 release](https://github.com/moneydesktop/rubiks/pull/2)
data/Gemfile CHANGED
@@ -18,5 +18,5 @@ group :development do
18
18
  gem 'awesome_print'
19
19
  gem 'kramdown'
20
20
  gem 'pry'
21
- gem 'pry-nav'
21
+ gem 'pry-debugger'
22
22
  end
data/README.md CHANGED
@@ -31,7 +31,7 @@ After installing the gem, fire up an IRB session with `irb` or `bundle exec irb`
31
31
  ```ruby
32
32
  require 'rubiks/examples'
33
33
 
34
- md = Rubiks::Examples::MondrianDocs.new
34
+ md = Rubiks::Examples::MondrianDocs
35
35
 
36
36
  md.filename # => "/path/to/rubiks/examples/mondrian_docs.yml"
37
37
 
data/Rakefile CHANGED
@@ -8,5 +8,10 @@ RSpec::Core::RakeTask.new(:spec)
8
8
  task :default => :spec
9
9
  task :test => :spec
10
10
 
11
+ task :debug do
12
+ ENV['DEBUG'] = 'true'
13
+ Rake::Task['spec'].invoke
14
+ end
15
+
11
16
  require 'yard'
12
17
  YARD::Rake::YardocTask.new
@@ -36,7 +36,7 @@ module ::Rubiks
36
36
  class MondrianDocs
37
37
  class << self
38
38
  def filename
39
- File.expand_path('../../../examples/mondrian_docs.yml', __FILE__)
39
+ File.expand_path('../../../spec/support/examples/mondrian_docs.yml', __FILE__)
40
40
  end
41
41
 
42
42
  def file_contents
@@ -1,4 +1,4 @@
1
- require 'rubiks/nodes/validated_node'
1
+ require 'rubiks/nodes/annotated_node'
2
2
 
3
3
  module ::Rubiks
4
4
 
@@ -11,7 +11,7 @@ module ::Rubiks
11
11
 
12
12
  def self.new_from_hash(hash={})
13
13
  new_instance = new
14
- return new_instance.from_hash(hash)
14
+ return new_instance.from_hash(hash.deep_dup)
15
15
  end
16
16
 
17
17
  def from_hash(working_hash)
@@ -19,7 +19,7 @@ module ::Rubiks
19
19
 
20
20
  def self.new_from_hash(hash={})
21
21
  new_instance = new('','','','','',[],[],[])
22
- return new_instance.from_hash(hash)
22
+ return new_instance.from_hash(hash.deep_dup)
23
23
  end
24
24
 
25
25
  def from_hash(working_hash)
@@ -10,7 +10,7 @@ module ::Rubiks
10
10
 
11
11
  def self.new_from_hash(hash={})
12
12
  new_instance = new('',[])
13
- return new_instance.from_hash(hash)
13
+ return new_instance.from_hash(hash.deep_dup)
14
14
  end
15
15
 
16
16
  def hierarchies_present
@@ -12,7 +12,7 @@ module ::Rubiks
12
12
 
13
13
  def self.new_from_hash(hash={})
14
14
  new_instance = new('','','',[])
15
- return new_instance.from_hash(hash)
15
+ return new_instance.from_hash(hash.deep_dup)
16
16
  end
17
17
 
18
18
  def dimension_present
@@ -17,7 +17,7 @@ module ::Rubiks
17
17
 
18
18
  def self.new_from_hash(hash={})
19
19
  new_instance = new
20
- return new_instance.from_hash(hash)
20
+ return new_instance.from_hash(hash.deep_dup)
21
21
  end
22
22
 
23
23
  def from_hash(working_hash)
@@ -11,7 +11,7 @@ module ::Rubiks
11
11
 
12
12
  def self.new_from_hash(hash={})
13
13
  new_instance = new
14
- return new_instance.from_hash(hash)
14
+ return new_instance.from_hash(hash.deep_dup)
15
15
  end
16
16
 
17
17
  def from_hash(working_hash)
@@ -12,7 +12,7 @@ module ::Rubiks
12
12
 
13
13
  def self.new_from_hash(hash={})
14
14
  new_instance = new('',[])
15
- return new_instance.from_hash(hash)
15
+ return new_instance.from_hash(hash.deep_dup)
16
16
  end
17
17
 
18
18
  def cubes_present
@@ -1,3 +1,3 @@
1
1
  module ::Rubiks
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -1,26 +1,3 @@
1
- #lib_path = File.expand_path("../../lib", __FILE__)
2
- #$LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
3
- #
4
- ## Don't use simplecov in ruby 1.8
5
- #if RUBY_VERSION !~ /^1\.8/
6
- # begin
7
- # require 'simplecov'
8
- # SimpleCov.start do
9
- # add_filter '/spec/'
10
- # end
11
- # rescue LoadError
12
- # end
13
- #end
14
- #
15
- #require 'bundler'
16
- #Bundler.require(:default, :development, :test)
17
- #
18
- #require 'rubiks'
19
- #
20
- #RSpec.configure do |config|
21
- # config.include Matchers
22
- #end
23
-
24
1
  require 'simplecov'
25
2
  require 'coveralls'
26
3
 
@@ -32,6 +9,7 @@ SimpleCov.start
32
9
 
33
10
  require 'rubiks'
34
11
  require 'rspec'
12
+ require 'pry-debugger' if ENV['DEBUG']
35
13
 
36
14
  require 'support/schema_context'
37
15
  require 'support/matchers/be_like'
@@ -0,0 +1,45 @@
1
+ shared_dimensions:
2
+ date_dimension: &date_dimension
3
+ name: date
4
+ hierarchies:
5
+ - name: year_quarter_month
6
+ levels:
7
+ - name: year
8
+ column: the_year
9
+ data_type: numeric
10
+
11
+ - name: quarter
12
+ data_type: string
13
+
14
+ - name: month
15
+ column: month_of_year
16
+ data_type: Numeric
17
+
18
+ gender_dimension: &gender_dimension
19
+ name: gender
20
+ hierarchies:
21
+ - name: gender
22
+ table: customer
23
+ levels:
24
+ - name: gender
25
+ data_type: string
26
+
27
+ cubes:
28
+ - name: sales
29
+ dimensions:
30
+ - <<: *date_dimension
31
+ - <<: *gender_dimension
32
+
33
+ measures:
34
+ - name: unit_sales
35
+ aggregator: sum
36
+ format_string: '#,###'
37
+
38
+ - name: logins
39
+ dimensions:
40
+ - <<: *date_dimension
41
+ - <<: *gender_dimension
42
+
43
+ measures:
44
+ - name: count
45
+ aggregator: count
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubiks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-11 00:00:00.000000000 Z
12
+ date: 2013-04-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rltk
@@ -78,7 +78,6 @@ files:
78
78
  - LICENSE.md
79
79
  - README.md
80
80
  - Rakefile
81
- - examples/mondrian_docs.yml
82
81
  - lib/rubiks.rb
83
82
  - lib/rubiks/examples.rb
84
83
  - lib/rubiks/nodes/annotated_node.rb
@@ -104,6 +103,8 @@ files:
104
103
  - spec/rubiks/nodes/schema_spec.rb
105
104
  - spec/rubiks/nodes/validated_node_spec.rb
106
105
  - spec/spec_helper.rb
106
+ - spec/support/examples/mondrian_docs.yml
107
+ - spec/support/examples/shared_dimensions.yml
107
108
  - spec/support/matchers/be_like.rb
108
109
  - spec/support/schema_context.rb
109
110
  homepage: https://github.com/moneydesktop/rubiks
@@ -120,7 +121,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
120
121
  version: '0'
121
122
  segments:
122
123
  - 0
123
- hash: 2318273741982470273
124
+ hash: -4301299725332261272
124
125
  required_rubygems_version: !ruby/object:Gem::Requirement
125
126
  none: false
126
127
  requirements:
@@ -129,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
130
  version: '0'
130
131
  segments:
131
132
  - 0
132
- hash: 2318273741982470273
133
+ hash: -4301299725332261272
133
134
  requirements: []
134
135
  rubyforge_project:
135
136
  rubygems_version: 1.8.25
@@ -149,6 +150,8 @@ test_files:
149
150
  - spec/rubiks/nodes/schema_spec.rb
150
151
  - spec/rubiks/nodes/validated_node_spec.rb
151
152
  - spec/spec_helper.rb
153
+ - spec/support/examples/mondrian_docs.yml
154
+ - spec/support/examples/shared_dimensions.yml
152
155
  - spec/support/matchers/be_like.rb
153
156
  - spec/support/schema_context.rb
154
157
  has_rdoc: