rubiks 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.1.7
2
+ * Add table_prefix setting
3
+
1
4
  ## 0.1.6
2
5
  * Added controls to flush the schema cache and reset the mondrian connection
3
6
 
data/README.md CHANGED
@@ -26,21 +26,21 @@
26
26
  [mondrian_schema]: http://mondrian.pentaho.com/documentation/schema.php
27
27
  [rails]: http://rubyonrails.org
28
28
 
29
- Rubiks is a [Online Analytical Processing](wiki_olap) ( **OLAP** ) library written in [JRuby](jruby).
30
- It runs on top of [Mondrian](mondrian) (an [Open-source](wiki_open_source) [OLAP](wiki_olap) server
31
- written in [Java](wiki_java)) and provides the ability to:
29
+ Rubiks is a [Online Analytical Processing][wiki_olap] ( **OLAP** ) library written in [JRuby][jruby].
30
+ It runs on top of [Mondrian][mondrian] (an [Open-source][wiki_open_source] [OLAP][wiki_olap] server
31
+ written in [Java][wiki_java]) and provides the ability to:
32
32
 
33
- * define a [OLAP](wiki_olap) schema in Ruby
34
- * generate a [Mondrian XML schema](mondrian_schema) from this definition
35
- * execute [MultiDimensional eXpressions](wiki_mdx) ( **MDX** ) queries against the OLAP server
33
+ * define a [OLAP][wiki_olap] schema in Ruby
34
+ * generate a [Mondrian XML schema][mondrian_schema] from this definition
35
+ * execute [MultiDimensional eXpressions][wiki_mdx] ( **MDX** ) queries against the OLAP server
36
36
 
37
37
 
38
38
  ### Assumptions
39
39
 
40
- * You are using [JRuby](jruby)
41
- * You are using [PostgreSQL](postgresql)
42
- * You have designed and populated your [Data Warehouse](wiki_data_warehouse) (see [Dimensional Modeling](wiki_dimensional_modeling) and [Star Schema](wiki_star_schema))
43
- * You are using [Ruby on Rails](rails) database naming conventions
40
+ * You are using [JRuby][jruby]
41
+ * You are using [PostgreSQL][postgresql]
42
+ * You have designed and populated your [Data Warehouse][wiki_data_warehouse] (see [Dimensional Modeling][wiki_dimensional_modeling] and [Star Schema][wiki_star_schema])
43
+ * You are using [Ruby on Rails][rails] database naming conventions
44
44
 
45
45
 
46
46
  ### Installation
data/lib/rubiks.rb CHANGED
@@ -35,4 +35,12 @@ module ::Rubiks
35
35
  def self.schema
36
36
  @schema ||= ::Rubiks::Schema.default
37
37
  end
38
+
39
+ def self.table_prefix
40
+ @table_prefix ||= 'view_'
41
+ end
42
+
43
+ def self.table_prefix=(prefix)
44
+ @table_prefix = prefix
45
+ end
38
46
  end
@@ -73,7 +73,7 @@ module ::Rubiks
73
73
 
74
74
  def table(new_value=nil)
75
75
  @table = new_value if new_value.present?
76
- @table ||= @options[:table] || "view_#{name.tableize}"
76
+ @table ||= @options[:table] || "#{Rubiks.table_prefix}#{name.tableize}"
77
77
  end
78
78
 
79
79
  def to_json(options={})
@@ -1,3 +1,3 @@
1
1
  module ::Rubiks
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
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.1.6
4
+ version: 0.1.7
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-05-06 00:00:00.000000000 Z
12
+ date: 2013-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -164,7 +164,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
164
164
  version: '0'
165
165
  segments:
166
166
  - 0
167
- hash: -2941452672752005346
167
+ hash: 3628922799881598040
168
168
  required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  none: false
170
170
  requirements:
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  segments:
175
175
  - 0
176
- hash: -2941452672752005346
176
+ hash: 3628922799881598040
177
177
  requirements: []
178
178
  rubyforge_project:
179
179
  rubygems_version: 1.8.25